At what rate should I be reading midi cc data stored to a buffer?

Tim Massar's icon

I'm making a midi looper for CC. I've decided that using a buffer and reading and writing with a phasor would be the best option. However, its overkill to use sample rate for this. I may be making this up, but doesn't midi process at 1/96 of a quarter note? What rate, or ratio to bpm would be ideal for setting the phasor to read out of the buffers so it's smooth enough for CC but also not requiring huge buffers (i want to go 32 bars max).

Roman Thilenius's icon

"but doesn't midi process at 1/96 of a quarter note?"

within max such data is processed "as exact as currently possible" in conjunction with the 1ms scheduler clock.

if you plan to store such data as audio (i say: why not) and you think samplingrate is overkill, simply put all involved audio objects into a [poly~ myfunnyname down 2] to run them at half the system sampling rate.

alternatively you could timetag the data before you record it. i.e. there is a clocker running somewhere which add the absolute time or the delta time (time occured since last midi event) in front of the midi data: "120 myfunnymididata" - and eventually still save it as audio samples in a buffer. the latency will rise from 3 to 4 samples (for 3 byte midi messages).
in this case you do not recrod all the time, but only write data into the buffer using peek~ when there is actuall data coming in.

Source Audio's icon

I would use seq(~) or mtr instead.

If you are using 7bit midi resolution

there is not much to smooth there.

Unless you use 14bit controls.

but alslo that would produce bunch of repeated values

when reading buffer using phasor~

not to talk about sync to bpm etc etc

unneeded complication, in my eyes.