First post, by Peter Swinkels
With a lot of help I have figured most of what Cartooners's (and a few other games) music file headers contain:
Endianess: little.
Extension: *.mus
[File Layout]
[File Layout]
Begin Structure: Header.
0x00 WORD Relative MIDI track offset.
0x02 0x10 BYTES Roland MIDI channel off/on table.
0x12 0x10 BYTES Roland global MIDI volume table.
0x22 0x09 BYTES Adlib MIDI channel initialization table.
0x2B 0x0C BYTES CMS MIDI channel initializationtable.
0x37 0x0C BYTES CMS MIDI channel finetune offset table.
0x43 0x08 BYTES Tandy sound chip initialization table.
0x4B WORD PC-Speaker pitch and speed.
0x4D BYTES Random data which may be anything without affecting the music/sound.
End Structure
Begin Structure: MIDI track data.
0x00 BYTES MIDI track data.
End Structure
Begin Structure: Footer.
0x00 BYTE MIDI event "Stop playback".
0x01 BYTE Indicates whether or not the music/sound is played again when the end is reached: (0x80 = repeat, 0x81 stop.)
End Structure
[Notes]
The headers typically contain the following string: "rsxx}u".
[Other games with similar file MIDI music files]
See the file "Electronic Arts Music Files.ods".
By modifying the header section marked as "Tandy related" and playing the music file using each sound driver supplied with Cartooners in turn and a compatible Tandy driver from a game called Populous I noticed modifying the data only affected playback when using the Tandy driver meaning these 8 bytes are specifically meant for playback with a Tandy sound chip. I looked up some Tandy sound chip data, but unfortunately I have never been good at understanding the technical details involving playing MIDI music through a soundcard. I have no idea how the values in the header relate to the sound chip's documentation. So, does anyone reading this any experience playing MIDI music using a Tandy soundchip?
Links:
A webpage documenting the Tandy sound chip: https://www.smspower.org/Development/SN76489
Bisqwit helped me figure out the Adlib/Roland/CMS/PC-Speaker related header data. His webpage: https://bisqwit.iki.fi/
My project: https://github.com/PeterSwinkels/Cartooners-File-Viewer
EDIT:
I changed the term "dedication" to "initialization" because the former term can't be found in any meaningful fashion as relating to soundcards. Bisqwit used that term and I think he confused the terms. 😀
Do not read if you don't like attention seeking self-advertisements!
Did you read it anyway? Well, you can find all sorts of stuff I made using various programming languages over here:
https://github.com/peterswinkels