CSNG (File Format): Difference between revisions
Jump to navigation
Jump to search
→Region Data
imported>Jackoalan (Multi-track SNG clarifications) |
imported>Jackoalan |
||
Line 144: | Line 144: | ||
====Region Commands==== | ====Region Commands==== | ||
After the region data header, the actual playback commands begin. There are only | After the region data header, the actual playback commands begin. There are only 3 types of commands | ||
in SNG: ''note'' and '' | in SNG: ''note'', ''control change'', and ''program change''. | ||
=====Delta Time RLE===== | =====Delta Time RLE===== | ||
Line 175: | Line 175: | ||
=====Note Command===== | =====Note Command===== | ||
When the two bytes following the delta-time != 0xffff, and the high- | When the two bytes following the delta-time != 0xffff, and the high-bits of both bytes are ''unset'', | ||
this is a '''note command'''. | this is a '''note command'''. | ||
Line 204: | Line 204: | ||
=====Control Change Command===== | =====Control Change Command===== | ||
When the two bytes following the delta-time != 0xffff, and the high- | When the two bytes following the delta-time != 0xffff, and the high-bits of both bytes are ''set'', | ||
this is a '''control change command'''. | this is a '''control change command'''. | ||
Line 224: | Line 224: | ||
| 0x2 | | 0x2 | ||
| colspan=2 {{unknown|End of control change}} | | colspan=2 {{unknown|End of control change}} | ||
|} | |||
=====Program Change Command===== | |||
When the two bytes following the delta-time != 0xffff, and the high-bit of the first byte is ''set'', | |||
this is a '''program change command'''. | |||
See the [https://www.midi.org/specifications/item/gm-level-1-sound-set standard MIDI program numbers] for details. | |||
{| class="wikitable" | |||
! Offset | |||
! Size | |||
! Description | |||
|- | |||
| 0x0 | |||
| 1 | |||
| '''Program'''; AND with 0x7f for the value | |||
|- | |||
| 0x1 | |||
| 1 | |||
| '''Padding'''; always zero | |||
|- | |||
| 0x2 | |||
| colspan=2 {{unknown|End of program change}} | |||
|} | |} | ||