@thopa here is a clocked recorder script I made which works similar to what you’re asking. It does not have “motion detector recording” like Voltage Block, though. Instead you use a gate on input 1 to clear old and begin a new clocked recording on the “IN” jack. When the gate is low the script is in clocked playback mode.
Script 1 (arm record while high, disarm and reset sequence on falling edge):
IF ! STATE 1: X 0; P.I P.L
IF ! STATE 1: BREAK
IF X: BREAK
P.I 0; P.L 0; X 1
P.MAP: 0
Script 2 (trigger advances clock):
IF && X STATE 1: $ 4
IF ! OR X STATE 1: $ 3
Script 3 (playback function):
CV 1 P.NEXT
Script 4 (record function):
J IN; P.PUSH J; CV 1 J
Init script:
$.POL 1 3; X 0