(12-20-2022, 05:37 AM)proxemics Wrote: Hi XORadmin, I looked at the pattern file and indeed it does look like it wouldn't be too hard to parse. Obviously there's "NerdSEQ Pattern." at the top, then what appear to be 16 blocks, though those may or may not correlate with 16 drummatrix views, I may be hallucinating them.
Having been around tech for a long time I know how hard it is for a single developer or even a handful to have a feature list that is too long. In my experience the answer is always to make the time to let others help. If you can give some rough idea of the pattern file format we can help! I'm pretty sure your users would come up with an editor or similar.
Each tracktype (Modular/CV16/Trigger16/Audio) got a different layout. The drummatrix itself is hidden in 2 bytes ;-)
But lets show the most basic ones and I will deliver the other ones later (especially CV16 where I have to pack the data in 12 bit words).
Header
Amount of bytes Content
[16] Name 'NerdSEQ Pattern'
[2] Version Number
[1] Track type (9 Audio, 10 Modular, 12 Video, 13 Trigger16, 14 CV16, 15 Midi)
[1] Pattern Length
[1] Pattern Clock
[8] Pattern name
[40] Placeholder for eventual future stuff
Now 64 times (for the 64 steps) the pattern rows of each 21 bytes
Modular:
[1] Note
[2] Placeholder
[1] Patch
[1] Table
[1] Trigger
[2] MOD
[3] FX1 (1 byte fx command, 2 bytes payload)
[3] FX1 (1 byte fx command, 2 bytes payload)
[3] FX1 (1 byte fx command, 2 bytes payload)
[3] FX1 (1 byte fx command, 2 bytes payload)
[1] Groove
Trigger16
[1] Trigger column1
[1] Trigger column2
[1] Trigger column3
[1] Trigger column4
[1] Trigger column5
[1] Trigger column6
[1] Trigger column7
[1] Trigger column8
[3] FX1 (1 byte fx command, 2 bytes payload)
[3] FX2 (1 byte fx command, 2 bytes payload)
[3] FX3 (1 byte fx command, 2 bytes payload)
[1] Patch
[2] Drummatrix (bitwise)
[1] Groove
Midi
[1] Note 1
[1] Velocity 1
[1] Note 2
[1] Velocity 2
[1] Note 3
[1] Velocity 3
[1] Note 4
[1] Velocity 4
[1] Program Change
[3] FX1 (1 byte fx command, 2 bytes payload)
[3] FX2 (1 byte fx command, 2 bytes payload)
[3] FX3 (1 byte fx command, 2 bytes payload)
[1] Patch
[1] Table
[1] Groove
I think this is a good start.
Please be aware that the payloads and MOD (eg 2 byte words of values) could be little or big endian. I got to look it up when I am back at the code. But I know there is a difference in tracktypes which I got to iron out at some time.
Empty columns are 0xFF or 0xFFFF.
All no warranties and you could get funny results when using bad values. Everything could be changed at some point.