xcmf is a graphical interface to play CMF music files. CMF stands for Creative Music Format. CMF is very similar to MIDI format, the difference being, that in CMF music files, the instrument patches are stored inside the file and the intrument patches are designed for the FM synthesizer only. xcmf provides a tape-player like interface with buttons for play, fastforward, rewind, and stop. There are controls for changing playback speed and volume.
In order to play a CMF music file, you must first select a CMF file from the file menu. A selection box pops up and displays the list of CMF files. Select a file and then press the OK button. Finally, press the Play button. You may change the speed or the volume at any time. You may also press the Rewind or the Fast-forward buttons at any time to seek to a position in the CMF file. While seeking backwards or forwards, you may press the Stop button or the Play button to continue playing the file. In order to play a new song, the xcmf must be in a “stopped” state.
CMF files are organized in three separate blocks, namely, the
Control Number Control Data Description 0x66 1 - 127 Music markers 0x67 0 or 1 If 0, then all the channels are designated as melody channels. If 1, then channels 12 - 16 are designated as rhythm channels and channels 1 - 11 are melody. 12 - Bass drum, 13 - Snare, 14 - Tomtom, 15 - Cymbal, 16 Hihat 0x68 0 - 127 Pitch Bend Up by 1/128th of a semitone. A value of 64 implies that the pitch is changed only by 1/2 a semitone. 0x69 0 - 127 Pitch Bend down by 1/128 of a semitone. A value of 64 changes the pitch by 1/2 a semitone.
OFFSET (Bytes) DESCRIPTION 00 - 03 File ID - “CTMF” 04 - 05 File format version - byte 04 = MSB, byte 05 = LSB. Current version 1.1 06 - 07 Offset of the instrument block 08 - 09 Offset of the music block 0A - 0B Ticks per quarter note (one beat) Number of timer ticks equivalent to a quarter note. If the timer is set to 96Hz and the tempo is 120, this value is 48. 0C - 0D Clock ticks per second - default is 96 0E - 0F Offset of the music title. The title must be a null-terminated ASCII string. If this offset is 0 it means there is no music title in the CMF file. 10 - 11 Offset of the composer’s name. The name must be a null-terninated ASCII strings. If this offset is 0 then there is no name in the CMF file. 12 - 13 Offset of Remarks. The remarks must be a null-terminated ASCII string. If this offset is 0 it means there is no remarks title in the CMF file. The remarks string must be at most 32 characters including the null char. 14 - 23 Channel in use table This 16 byte table indicates which of the 16 FM channels are being used by the CMF file. If a channel is in use then the corresponding byte is set to 1 24 - 25 Number of instruments Used. 26 - 27 Basic tempo - the tempo used in the CMF file 28 Title, remarks begin here.