I just remembered that I promised @UnsignedArduino that I would make a post linking to the new song format! Well, better late than never.
The format of the song buffer is documented here:
That file also contains all of the code for encoding/decoding the songs from buffers (in this case, uint8Arrays). The default instruments are all defined in the getEmptySong function.
This code is mirrored in the arcade game engine here:
If I were, hypothetically, making a webapp that converted midi files into the new song format, then I would:
Hi @richard, sorry to bother you but right now, I’m having difficulty with the instrument octaves. I’m setting the octave to 2 here:
I’m using a test MIDI file that has a glissando of notes from MIDI note 21 to 108, the lowest and highest notes on a piano. For some reason, the notes appear to be “shifted” by a couple of octaves. You can hear it here:
Do you have any idea why? I’ve tried other octaves like 0, 1, and 3 but they all produce shifted ranges too. Do I have to split up the notes to separate tracks that handle instruments with different octaves?