In my Finger Drum training game, I made a way to create patterns within the app itself by pressing pads on a midi controller.
In my previous demo, i created a playback system inspired by the MIDI file specification - though once it came to editing, it seemed a bit too general purpose for the first version of the app i want to produce, which would really be limited to:
- 4 measure/bar patterns
- sixteenth note subdivisions
- no bpm changing (while you can change the bpm of the playback, the pattern can not change the bpm in the middle of it like midi allows with the change tempo event)
- 4/4 time signature
Now the data for the patterns honestly looks very similar to what you see on screen... something like
pattern : [64]bit_set[Pad_Id]
1000 0000 0000 0000 0000 0010 0000 0000 0000 0000 0000 0000 0000 0000 0010 0000 0000 0001 0000 0000 ... and so on
I figured if i ever do want to support some more dynamic music format - or even something like midi export / import to this data format, it would be pretty straightforward. At least that's my thoughts now haha