Wow, you put a lot of work into that.
But I fail to understand why this -
const TunePart tune[50][64][4]
{
{
{
{ Note::C, 5, 192, 2, { EffectType::SetVolume, 1 } },
{ EffectType::Mystery, 3 },
{ EffectType::SetVolume, 0 },
{ EffectType::SetVolume, 0 },
},
{
{ EffectType::SetVolume, 2 },
{ EffectType::SetVolume, 0 },
{},
{},
},
{
{ EffectType::SetVolume, 3 },
{},
{},
{},
},
Is better than this -
const uint8_t tune[50][64][4][5]={
{
// Pattern:0
// .----------------------[Note] Upper nibble is the note value.
// |.---------------------[Octave] Lower nibble is the octave.
// || .-----------------[Volume + 128] If first bit is set then volume is used.
// || | .------------[Instrument] Can use up to 255 instruments I suppose.
// || | | .-------[Effect] Effects are based on standard MOD effects.
// || | | | .--[Effect Value] Values for above effects.
// || | | | |
{{0x15,0xC0,0x02,0x0C,0x01},{0x00,0x00,0x00,0x0F,0x03},{0x00,0x00,0x00,0x0C,0x00},{0x00,0x00,0x00,0x0C,0x00}},
{{0x00,0x00,0x00,0x0C,0x02},{0x00,0x00,0x00,0x0C,0x00},{0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00}},
{{0x00,0x00,0x00,0x0C,0x03},{0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00}},
{{0x00,0x00,0x00,0x0C,0x04},{0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00}},
{{0x15,0xC0,0x03,0x0C,0x05},{0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00}},
The raw data, doesn’t really need to be dumbed down so much. my format is both readable, and reflects the format well enough.
or why removing the sound header data from the sample array is better? The main idea with the sample data was to act as much like a genuine file as possible, much like gfx should be.