ok, heres what I knocked up....
autoseq.axo (5.2 KB) (v0.1)
autotest.axp (2.6 KB)
ok, i 'cheated' a bit... I created an axo object to do the work, basically because when things are a little more complicated, its easier for me to write it in C, and frankly its more efficient to do it like this
(I'm pretty sure you could do it with existing objects if you wished)
size is the max number of events to record.
it is also limited to running for 16.5 days, to extend this we would have to introduce quantising... or extend the counter.
on the positive side, event play/record should be accurate to 1/3000 sec.
you have a play or record mode, and a gate (like a transport in a daw i.e active = running) . then just send it values when recording. (I've put logging in so you can see what its doing , this would come out for 'real' use)
outputs v is the value (it echoes during record, which make it easy to connect) and end indicates when the last event is reached.
the idea is to loop you could use 'end' to trigger reset... but of course that might not be immediate but at the start of a bar etc.
evt is event number (not really useful) , and clk is clock... the later would be useful when using multiple automate objects, which could then share a common clock ... basically id add clock input, and internal/external clock flag.
(they will sync already, as its based on k-rate,but using a common/external clock would mean we could do fun things like shift time forwards and backwards)
if you look in the axo, and ignore the logic around starting/stopping etc, you will see it does as i said, uses 2 arrays one to store time the other the value. its really very simple
I didnt have much time, but as far as i could tell its working correctly.
when I get some more time, I'll finish it off,
in particular, id probably make it so switch between play/record, automatically reset ... i.e. so you can keep the clock running. add the int/ext clock and clk input. (and remove logging ) ... I might also add some kind of quantising function, as its quite fun as a note recorder.
let me know if it kind of does what you expected.
EDIT: oops forgot to update uuid/sha... new version added.