Gunstick wrote:I think you did not get the reason for this thread. We discuss how we can create a space efficient but still fast playable music format.
I know. How much space do you want to trade for more speed? Or how much speed do you want to trade for smaller data? I usually go for first max speed.
p01 wrote:That way, the SOS tune ( an example picked completely at random Wink ) takes 27,708 bytes instead of 29,809 bytes if the bitfield of all the registers is always stored.
If you are coding for such random tunes as the SOS tune you better first have a look at the data:
Code: Select all
reg update count
Registers 8, 12, 13 are not updated so no need to write code for it. Reoder the registers on occurence. You might consider to couple updates to registers 0 and 1 (they both are the frequency of channel A) then you can pack the most frequent registers into 7 bits and only need an extension byte 387 times at max. (Updating registers 0 and 1 as an pair costs 66 bytes extra but saves at least (807-387)=420 extension bytes.)
Warning: I didn't check whether the data I analysed was indeed SOS by Mad Max. I just grabbed the music data in the source directory from a screen that should contain SOS as music. But who knows what happened to that directory the last 12 years?