@nicnut I was suggesting 1 (64-step) array for all voices, just to be clear..
then instead of storing 8X64=512 floats for each pattern you would only have to store 64 floats, and only need 1 text file per pattern. But if you want to save patterns per-voice this might not be the best, and idk if it would be better or worse for cpu when loading, or how much extra ram the necessary objects would take.
here https://github.com/sebshader/shadylib
I have abstractions called seqbank and mseq that store 16-step sequences in arrays, though they store floats, not binary values. maybe they would be helpful to look at..
for cpu speed in playback, arrays for each voice probably will be best. you'd have 8 simple reads per step rather than 1 read and a buncha bit-shifting shenanigans, which in pd involves a lot of unnecessary float-int casting and calls. (tho ram usage might be lower with a few objects vs. 7 arrays of 64 floats)
edit: I forgot there's also [tseq] in the GitHub repo which might be similar to what you want (stores toggle values to an array), though it leaves state saving up to the outside world (a crude example of that is in tseq-help.pd). Anyways you could just use the read/write method for array if you want to save per-voice, that'd be easiest.
you could still use the binary trick for state saving though (files would be smaller, not sure if it would be slower or faster loading)
if you are interested in that, to elaborate: say hihat is at bit position 0 and snare is at bit position 1. Then if you wanted the first beat with just snare and the second with both you'd have the first value of the file as 2 and the second as 3 (because the bit values would be 10 for snare on & hihat off, which is 2 in binary, and 11 for both on, which would be 3 in binary. Then in your preset loader, for each step in the sequencer you loop through each bit of that number using a [>> 1]
object with a loop and store that value in the appropriate toggle & array for the correct voice and step # using [& 1]
)
edit 2: I'm not actually sure if pd is capable of saving all 24 bits.. might only work up to 18 bits or something. But it can definitely do 8 bits at least