CMF File format
Header Block
0000 4Bytes File ID - 'CTMF'
0004 2Bytes Version number (currently 1.10)
0006 Word Offset of instrument block from start of file
0008 Word Offset of music block from start of file
000a Word Ticks per quarter note (Default = 120)
000c Word Clock ticks per second (Default = 96)
000e Word Offset of music title from start of file (0 = none)
0010 Word Offset of composer name (0 = none)
0012 Word Offset of remarks (0 = none)
0014 16Bytes Channel-in-use table
0024 Word Number of instruments used
0026 Word Basic tempo
0028 ??? Title, composer, remarks if present.

Instrument Block
0000 Byte Modulator characteristic
0001 Byte Carrier characteristic
Bit 7  -  Pitch vibrato
Bit 6  -  Amplitude vibrato
Bit 5  -  Sustaining sound
Bit 4  -  Envelope scaling
Bits 3-0  -  Frequency multiplier
0002 Byte Modulator scaling/output level
0003 Byte Carrier scaling/output level
Bits 7-6  -  Level scaling
Bits 5-0  -  Output level
0004 Byte Modulator attack/delay
0005 Byte Carrier attack/delay
Bits 7-4  -  Attack rate
Bits 3-0  -  Delay rate
0006 Byte Modulator sustain level/release rate
0007 Byte Carrier sustain level/release rate
Bits 7-4  -  Sustain level
Bits 3-0  -  Release rate
0008 Byte Modulator Wave select (Only bits 0-1)
0009 Byte Carrier Wave select (Only bits 0-1)
000a Byte Feedback/connection
Bits 7-4  -  Cleared
Bits 3-1  -  Modulator feedback
Bit 0  -  Connection
000b 5Bytes Not used (reserved)