<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.lumasworkshop.com/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=RavuAlHemio</id>
	<title>Luma&#039;s Workshop - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.lumasworkshop.com/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=RavuAlHemio"/>
	<link rel="alternate" type="text/html" href="https://www.lumasworkshop.com/wiki/Special:Contributions/RavuAlHemio"/>
	<updated>2026-07-17T16:21:23Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://www.lumasworkshop.com/w/index.php?title=BMS_(File_Format)&amp;diff=1052</id>
		<title>BMS (File Format)</title>
		<link rel="alternate" type="text/html" href="https://www.lumasworkshop.com/w/index.php?title=BMS_(File_Format)&amp;diff=1052"/>
		<updated>2026-07-06T00:33:21Z</updated>

		<summary type="html">&lt;p&gt;RavuAlHemio: /* Data */ parseNoteOn: Midi Gate voices are those where the bottom 3 bits are 0&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:File formats]]&lt;br /&gt;
== File Format ==&lt;br /&gt;
BMS files are &#039;&#039;&#039;B&#039;&#039;&#039;inary &#039;&#039;&#039;M&#039;&#039;&#039;usic &#039;&#039;&#039;S&#039;&#039;&#039;equences that store commands for the audio engine to play notes, similar to the MIDI file format.&lt;br /&gt;
&lt;br /&gt;
== Structure ==&lt;br /&gt;
BMS consists of pure assembly code, where each track containing events such as notes, patch changes, etc. is an independent executor thread with opcodes to execute. &lt;br /&gt;
In contrast to Midi, events are read linearly per channel in a data stream and interpreted byte by byte. This means that multiple tracks within the same channel cannot be played back synchronously and would therefore have to be baked onto one track. However, BMS tracks can jump or call to different places in the file, e.g. to loop the song or to ensure a very high storage efficiency.&lt;br /&gt;
&lt;br /&gt;
The game&#039;s audio engine can only play up to 16 tracks at a time - very similar to MIDI with its 16 channels.&lt;br /&gt;
&lt;br /&gt;
BMS also includes extended MIDI operations, such as more powerful versions of controllers, with fade-in capability, and higher resolution control values. However, no song in either Galaxy game makes use of this.&lt;br /&gt;
&lt;br /&gt;
=== Filestructure ===&lt;br /&gt;
There are no headers or filesize checks. The file usually starts with the following:&lt;br /&gt;
*&#039;&#039;&#039;Global Track / Tempo Track&#039;&#039;&#039; BMS always starts (very similary to Midi&#039;s &amp;quot;Tempo Track&amp;quot; or &amp;quot;Conductor Track&amp;quot;) directly with track containing Meta-Events, which only contains global control data, typically:&lt;br /&gt;
**Pulses per Quarter Note (PPQN) set&lt;br /&gt;
**Tempo (BPM)&lt;br /&gt;
**Looping commands (to keep BPM changes synchronized during the song if necessary)&lt;br /&gt;
**OpenTrack command that starts playing the following track&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Channel Specific Track&#039;&#039;&#039;  a kind of management track for channel/Main Track definitions&lt;br /&gt;
**Usally contains &#039;&#039;&#039;C1&#039;&#039;&#039; OpenTrack events for each executor track (channel). For some unknown reason, the exact same looping and duration events from the global track need to be repeated here, otherwise some events such as pitchwheel will not work in the song.&lt;br /&gt;
&lt;br /&gt;
== Data ==&lt;br /&gt;
BMS files contain raw instructions for the audio engine without any headers or filesize checks. Each instruction (OpCode) stands for its own function in the engine. The following table lists all JAudio2 OpCodes that have functions in SMG2:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! OpCode&lt;br /&gt;
! Function (SMG/SMG2)&lt;br /&gt;
! Usage&lt;br /&gt;
! Example&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 00&amp;lt;br /&amp;gt;01&amp;lt;br /&amp;gt;02&amp;lt;br /&amp;gt;...&amp;lt;br /&amp;gt;7D&amp;lt;br /&amp;gt;7E&amp;lt;br /&amp;gt;7F&lt;br /&gt;
| JASSeqParser::parseNoteOn&lt;br /&gt;
| {OpCode[1]} {Voice[1]} {Velocity[1]} {Wait[n]}&amp;lt;br /&amp;gt;OpCode: one byte with range 0x00 through 0x7F. 0x00 = C-1, 0x3C = C4 (middle C), 0x7F = G9.&amp;lt;br /&amp;gt;Voice: one byte with range 0x01 through 0x07 (needs testing/verification). Each Voice can only hold one Note.&amp;lt;br /&amp;gt;Velocity: one byte with range 0x00 through 0x7F. 0x00 = 0, 0x7F = 127.&amp;lt;br /&amp;gt;Wait: variable length, only present for Midi Gate notes (bottom three bits of Voice are all 0).&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;If the bottom three bits of Voice are 0, the game will treat this note as a Midi Gate note, and will expect that the Wait value is present. The Wait value is one or more bytes with range 0x00 through 0xFF; each time the byte is 0x80 or greater (i.e. bit 7 = 1), another following byte will be taken into account. If the Wait value is 0x00, the game waits until the note has finished; otherwise, it waits the number of ticks specified in the Wait value.&lt;br /&gt;
| 64 02 68&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;64: Key E4&amp;lt;br /&amp;gt;02: Voice 2&amp;lt;br /&amp;gt;68: Velocity 104&lt;br /&gt;
| Starts playing a Note with the previously defined Instrument (see E1, E2 and E3).&lt;br /&gt;
|-&lt;br /&gt;
| 80&lt;br /&gt;
| JASSeqParser::cmdWaitByte&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Seems to do nothing based on the code.&lt;br /&gt;
|-&lt;br /&gt;
| 81&amp;lt;br /&amp;gt;...&amp;lt;br /&amp;gt;87&lt;br /&gt;
| JASSeqParser::parseNoteOff&lt;br /&gt;
| {OpCode[1]}&amp;lt;br /&amp;gt;OpCode: one byte with range 0x81 through 0x87. 0x81 = Close Voice 1, 0x87 = Close Voice 7.&lt;br /&gt;
| 81: Stop voice ID 1&lt;br /&gt;
| Stops playing a Note.&lt;br /&gt;
|-&lt;br /&gt;
| 88&amp;lt;br /&amp;gt;...&amp;lt;br /&amp;gt;8F&lt;br /&gt;
| Unknown&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 90&amp;lt;br /&amp;gt;...&amp;lt;br /&amp;gt;9F&lt;br /&gt;
| JASSeqParser::parseRegCommand&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {RegBits[1]} {TargetOpCode[1]} {TargetParams[n]}&amp;lt;br/&amp;gt;Triggers TargetOpCode while replacing some of its fixed parameters with register value lookups.&amp;lt;br/&amp;gt;Taking the lowest 3 bits of OpCode and adding 1 defines how many parameters TargetOpCode has (90 = 1 parameter, 91 = 2 parameters, ..., 97 = 8 parameters, 98 = 1 parameter, 99 = 2 parameters, ..., 9F = 8 parameters). For each parameter, if the corresponding bit in RegBits (MSB first) is set, the parameter type is changed to a register read. (For example, if RegBits = 160 = 0b10100000, the first and the third parameter are changed to register reads.) Finally, TargetOpCode is performed with TargetParams.&amp;lt;br/&amp;gt;TargetOpCode must be at least A0.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A0&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A1&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A2&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A3&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A4&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A5&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A6&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A7&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A8&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A9&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| AA&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| AB&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| AC&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| AD&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| AE&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| AF&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B0&lt;br /&gt;
| Extended Opcode Indicator&lt;br /&gt;
| See B000 or B001.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B1&lt;br /&gt;
| JASSeqParser::cmdNoteOn&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B2&lt;br /&gt;
| JASSeqParser::cmdNoteOff&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B3&lt;br /&gt;
| JASSeqParser::cmdNote&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B4&lt;br /&gt;
| JASSeqParser::cmdSetLastNote&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B5&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B6&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B7&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B8&lt;br /&gt;
| JASSeqParser::cmdParamE&lt;br /&gt;
| {OpCode[1]} {Target[1]} {Parameter[1]}&amp;lt;br/&amp;gt;OpCode: one byte, B8.&amp;lt;br/&amp;gt;Target: one byte with range 0x00 through 0x03.&amp;lt;br/&amp;gt;Parameter: one byte with range 0x00 through 0xFF (Int8), whichs purpose depends on the target:&lt;br /&gt;
* Target 0: Volume. 0x7F = Full volume (100%), 0x00 = Silent (0%). 0x80 through 0xFF are treated the same as silence (0%).&lt;br /&gt;
* Target 1: Pitch. Adding one (0x01) or subtracting one (0xFF) increases/decreases pitch by one key, like from D#4 to E4.&lt;br /&gt;
* Target 2: Reverb. 0x7F = Strong reverb, 0x00 = no reverb. 0x80 through 0xFF are treated the same as no reverb.&lt;br /&gt;
* Target 3: Panning. 0x7F = right channel, 0x00 = center, 0x80 = left channel.&lt;br /&gt;
| B8 00 64&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;B8: OpCode&amp;lt;br/&amp;gt;00: Target (Volume)&amp;lt;br/&amp;gt;64: ~78% volume&lt;br /&gt;
| Allows different operations onto the music track&lt;br /&gt;
|-&lt;br /&gt;
| B9&lt;br /&gt;
| JASSeqParser::cmdParamI&lt;br /&gt;
| {OpCode[1]} {Target[1]} {Parameter[2]}&amp;lt;br/&amp;gt;OpCode: one byte, B9.&amp;lt;br/&amp;gt;Target: one byte with range 0x00 through 0x03.&amp;lt;br/&amp;gt;Parameter: two bytes with range 0x0000 through 0xFFFF (Int16), whichs purpose depends on the target:&lt;br /&gt;
* Target 0: Volume. 0x7FFF = Full volume (100%), 0x0000 = Silent (0%). 0x8000 through 0xFFFF are treated the same as silence (0%).&lt;br /&gt;
* Target 1: Pitch. Adding one (0x0100) or subtracting one (0xFF00) increases/decreases pitch by one key, like from D#4 to E4. Values inbetween can be used for fine-tuning.&lt;br /&gt;
* Target 2: Reverb. 0x7FFF = Strong reverb, 0x0000 = no reverb. 0x8000 through 0xFFFF are treated the same as no reverb.&lt;br /&gt;
* Target 3: Panning. 0x7FFF = right channel, 0x0000 = center, 0x8000 = left channel.&lt;br /&gt;
| B9 01 04 00&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;B9: OpCode&amp;lt;br/&amp;gt;01: Target (Pitch)&amp;lt;br/&amp;gt;04 00: Pitch of 4 keys&lt;br /&gt;
| Allows different operations with higher precision onto the music track&lt;br /&gt;
|-&lt;br /&gt;
| BA&lt;br /&gt;
| JASSeqParser::cmdParamEI&lt;br /&gt;
| {OpCode[1]} {Target[1]} {Parameter[1]} {Fade time[2]}&amp;lt;br/&amp;gt;OpCode: one byte, BA.&amp;lt;br/&amp;gt;Target: one byte with range 0x00 through 0x03.&amp;lt;br/&amp;gt;Parameter: one byte with range 0x00 through 0xFF (Int8), whichs purpose depends on the target:&lt;br /&gt;
* Target 0: Volume. 0x7F = Full volume (100%), 0x00 = Silent (0%). 0x80 through 0xFF are treated the same as silence (0%).&lt;br /&gt;
* Target 1: Pitch. Adding one (0x01) or subtracting one (0xFF) increases/decreases pitch by one key, like from D#4 to E4.&lt;br /&gt;
* Target 2: Reverb. 0x7F = Strong reverb, 0x00 = no reverb. 0x80 through 0xFF are treated the same as no reverb.&lt;br /&gt;
* Target 3: Panning. 0x7F = right channel, 0x00 = center, 0x80 = left channel.&lt;br /&gt;
Fade time: two bytes with range 0x0000 through 0xFFFF. The amount of time in ticks until the Parameter value is met.&lt;br /&gt;
| BA 02 22 01 68&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;BA: OpCode&amp;lt;br/&amp;gt;02: Target (Reverb)&amp;lt;br/&amp;gt;22: Reverb of strength 34&amp;lt;br/&amp;gt;01 68: 360 Ticks&lt;br /&gt;
| Allows different operations with fade time onto the music track&lt;br /&gt;
|-&lt;br /&gt;
| BB&lt;br /&gt;
| JASSeqParser::cmdParamII&lt;br /&gt;
| {OpCode[1]} {Target[1]} {Parameter[2]} {Fade time[2]}&amp;lt;br/&amp;gt;OpCode: one byte, BB.&amp;lt;br/&amp;gt;Target: one byte with range 0x00 through 0x03.&amp;lt;br/&amp;gt;Parameter: two bytes with range 0x0000 through 0xFFFF (Int16), whichs purpose depends on the target:&lt;br /&gt;
* Target 0: Volume. 0x7FFF = Full volume (100%), 0x0000 = Silent (0%). 0x8000 through 0xFFFF are treated the same as silence (0%).&lt;br /&gt;
* Target 1: Pitch. Adding one (0x0100) or subtracting one (0xFF00) increases/decreases pitch by one key, like from D#4 to E4. Values inbetween can be used for fine-tuning.&lt;br /&gt;
* Target 2: Reverb. 0x7FFF = Strong reverb, 0x0000 = no reverb. 0x8000 through 0xFFFF are treated the same as no reverb.&lt;br /&gt;
* Target 3: Panning. 0x7FFF = right channel, 0x0000 = center, 0x8000 = left channel.&lt;br /&gt;
Fade time: two bytes with range 0x0000 through 0xFFFF. The amount of time in ticks until the Parameter value is met.&lt;br /&gt;
| BA 03 7F FF 02 00&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;BB: OpCode&amp;lt;br/&amp;gt;03: Target (Panning)&amp;lt;br/&amp;gt;7F FF: Panned to right channel&amp;lt;br/&amp;gt;02 00: 512 Ticks&lt;br /&gt;
| Allows different operations with higher precision and fade time onto the music track&lt;br /&gt;
|-&lt;br /&gt;
| BC&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| BD&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| BE&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| BF&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| C0&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| C1&lt;br /&gt;
| JASSeqParser::cmdOpenTrack&lt;br /&gt;
| {OpCode[1]} {ChannelNumber[1]} {TrackPointer[3]}&amp;lt;br /&amp;gt;OpCode: one byte, C1.&amp;lt;br /&amp;gt;ChannelNumber: one byte with range 0x00 through 0x0F. 0x00 = Channel 0, 0x0F = Channel 15.&amp;lt;br /&amp;gt;TrackPointer: three bytes with range 0x000000 through 0xFFFFFF. Defines a start offset in the file to play.&lt;br /&gt;
| C1 04 05 B4 73&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;C1: OpCode&amp;lt;br /&amp;gt;04: Channel 4&amp;lt;br /&amp;gt;05 B4 73: Offset to track&lt;br /&gt;
| Starts playing a certain track on a certain channel. Channel 15 is usually reserved for Yoshi Drums. [[SMR.szs#BGM_parameters|If enabled in the BGM parameter table in SMR.szs]], channel 0 can be used for timing and chords usage that do not play any instruments from the sound bank.&lt;br /&gt;
|-&lt;br /&gt;
| C2&lt;br /&gt;
| JASSeqParser::cmdCloseTrack&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| C3&lt;br /&gt;
| JASSeqParser::cmdCall&lt;br /&gt;
| {OpCode[1]} {Pointer[3]}&amp;lt;br /&amp;gt;OpCode: one byte, C3.&amp;lt;br /&amp;gt;Pointer: three bytes with range 0x000000 through 0xFFFFFF. Defines an offset in the file.&lt;br /&gt;
| C3 00 00 40&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;C3: OpCode&amp;lt;br /&amp;gt;00 00 40: Offset&lt;br /&gt;
| Redirects execution to the defined offset. Execution can return with C5.&lt;br /&gt;
|-&lt;br /&gt;
| C4&lt;br /&gt;
| JASSeqParser::cmdCallF&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| C5&lt;br /&gt;
| JASSeqParser::cmdRet&lt;br /&gt;
| {OpCode[1]}&amp;lt;br /&amp;gt;OpCode: one byte, C5.&lt;br /&gt;
| &lt;br /&gt;
| Returns redirected execution (like from C3) to the initial call.&lt;br /&gt;
|-&lt;br /&gt;
| C6&lt;br /&gt;
| JASSeqParser::cmdRetF&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| C7&lt;br /&gt;
| JASSeqParser::cmdJmp&lt;br /&gt;
| {OpCode[1]} {Pointer[3]}&amp;lt;br /&amp;gt;OpCode: one byte, C7.&amp;lt;br /&amp;gt;Pointer: three bytes with range 0x000000 through 0xFFFFFF. Defines an offset in the file.&lt;br /&gt;
| C7 08 02 34&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;C7: OpCode&amp;lt;br /&amp;gt;08 02 34: Offset&lt;br /&gt;
| Redirects execution to the defined offset, used for Loops.&lt;br /&gt;
|-&lt;br /&gt;
| C8&lt;br /&gt;
| JASSeqParser::cmdJmpF&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| C9&lt;br /&gt;
| JASSeqParser::cmdJmpTable&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CA&lt;br /&gt;
| JASSeqParser::cmdCallTable&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CB&lt;br /&gt;
| JASSeqParser::cmdLoopS&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CC&lt;br /&gt;
| JASSeqParser::cmdLoopE&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CD&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CE&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CF&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D0&lt;br /&gt;
| JASSeqParser::cmdReadPort&lt;br /&gt;
| {OpCode[1]} {Source[1]} {Destination[1]}&lt;br /&gt;
Opcode: One byte, D0&lt;br /&gt;
Source: One byte, 0-15 , source port &lt;br /&gt;
Destination: One byte, 0-32, destination register&lt;br /&gt;
| &lt;br /&gt;
| Imports the value from sequence port Source and writes it to destination register &#039;Destination&#039;, the value is also written to register 3&lt;br /&gt;
|-&lt;br /&gt;
| D1&lt;br /&gt;
| JASSeqParser::cmdWritePort&lt;br /&gt;
| {OpCode[1]} {Source[1]} {Destination[1]}&lt;br /&gt;
Opcode: One byte, D1&lt;br /&gt;
Source: One byte, source register, 0-32&lt;br /&gt;
Destination: One Byte, destination port, 0-15&lt;br /&gt;
| &lt;br /&gt;
| Writes the value in register &#039;Source&#039; and saves it to register 3, as well as port &#039;Destination&#039;&lt;br /&gt;
|-&lt;br /&gt;
| D2&lt;br /&gt;
| JASSeqParser::cmdCheckPortImport&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D3&lt;br /&gt;
| JASSeqParser::cmdCheckPortExport&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D4&lt;br /&gt;
| JASSeqParser::cmdParentWritePort&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {Port[1]} {Register[1]}&amp;lt;br/&amp;gt;Reads the value from this track&#039;s Register (0-32) and writes it to the parent track&#039;s Port (0-15).&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D5&lt;br /&gt;
| JASSeqParser::cmdChildWritePort&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {ChildAndPort[1]} {Register[1]}&amp;lt;br/&amp;gt;Reads the value from this track&#039;s Register (0-32) and writes it to the child track&#039;s port given by ChildAndPort. The top 4 bits of ChildAndPort (0-15) represent the number of the child track, the bottom 4 bits (0-15) the port.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D6&lt;br /&gt;
| JASSeqParser::cmdParentReadPort&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {Port[1]} {Register[1]}&amp;lt;br/&amp;gt;Reads the value from the parent track&#039;s Port (0-15) and writes it to this track&#039;s Register (0-32).&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D7&lt;br /&gt;
| JASSeqParser::cmdChildReadPort&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {ChildAndPort[1]} {Register[1]}&amp;lt;br/&amp;gt;Reads the value from the child track&#039;s port given by ChildAndPort and writes it to this track&#039;s Register. The top 4 bits of ChildAndPort (0-15) represent the number of the child track, the bottom 4 bits (0-15) the port.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D8&lt;br /&gt;
| JASSeqParser::cmdRegLoad&lt;br /&gt;
| {OpCode[1]} {Setting[1]} {Unknown[1]} {Variable[1]}&amp;lt;br /&amp;gt;OpCode: one byte, D8.&amp;lt;br /&amp;gt;Setting: one byte with unknown range. Different bytes will trigger different effects:&amp;lt;br /&amp;gt;- 0x62: set PPQN (seen in BMS)&amp;lt;br /&amp;gt;- 0x6B: set PPQN (seen in SC)&amp;lt;br /&amp;gt;Unknown: one byte with unknown range and purpose.&amp;lt;br /&amp;gt;Variable: one byte with different range and purpose depending on the Setting byte.&lt;br /&gt;
| D8 62 00 78&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;D8: OpCode&amp;lt;br /&amp;gt;62: set PPQN&amp;lt;br /&amp;gt;00: Unknown&amp;lt;br /&amp;gt;78: PPQN 120&lt;br /&gt;
| Different purposes.&lt;br /&gt;
|-&lt;br /&gt;
| D9&lt;br /&gt;
| JASSeqParser::cmdReg&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {RegOp[1]} {Register[1]} {Value[2]}&amp;lt;br/&amp;gt;Reads a value from Register (0-32), performs RegOp with Value on it, then stores the result into Register. Values for RegOp are:&amp;lt;br/&amp;gt;- 0: do nothing&amp;lt;br/&amp;gt;- 1: Read(Register) + Value&amp;lt;br/&amp;gt;- 2: Read(Register) - Value&amp;lt;br/&amp;gt;- 3: Read(Register) - Value, but store result into register 3 instead of Register&amp;lt;br/&amp;gt;- 4: Read(Register) × Value, but store result into register 33 instead of Register&amp;lt;br/&amp;gt;- 5: Read(Register) AND Value (bitwise)&amp;lt;br/&amp;gt;- 6: Read(Register) OR Value (bitwise)&amp;lt;br/&amp;gt;- 7: Read(Register) XOR Value (bitwise)&amp;lt;br/&amp;gt;- 8: a random number 0 &amp;amp;leq; n &amp;amp;lt; Value&amp;lt;br/&amp;gt;- 9: Read(Register) SHL Value (bitshift left)&amp;lt;br/&amp;gt;- 10: Read(Register) SHR Value (bitshift right)&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DA&lt;br /&gt;
| JASSeqParser::cmdReg&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {RegOp[1]} {Register[1]} {OtherRegister[1]}&amp;lt;br/&amp;gt;Performs the same operation as D9, except the value to the operation is not specified directly, but read from OtherRegister (0-32).&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DB&lt;br /&gt;
| JASSeqParser::cmdRegUni&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DC&lt;br /&gt;
| JASSeqParser::cmdRegTblLoad&lt;br /&gt;
| {OpCode[1]} {AccessMode[1]} {Destination[1]} {Offset[3]} {Index[1]}&lt;br /&gt;
OpCode: One Byte, 0xDC &lt;br /&gt;
AccessMode: Determines how the sequence accesses the table. &lt;br /&gt;
Destination: 24-bit offset of table&lt;br /&gt;
Index: Register target index into table&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DD&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DE&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DF&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| E0&lt;br /&gt;
| JASSeqParser::cmdTempo&lt;br /&gt;
| {OpCode[1]} {Unknown[1]} {BPM[1]}&amp;lt;br /&amp;gt;OpCode: one byte, E0.&amp;lt;br /&amp;gt;Unknown: one byte with unknown range and purpose.&amp;lt;br /&amp;gt;BPM: one byte with range 0x00 through 0xFF. 0x78 = 120, F0 = 240.&lt;br /&gt;
| E0 00 90&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;E0: OpCode&amp;lt;br /&amp;gt;00: Unknown&amp;lt;br /&amp;gt;90: BPM 144&lt;br /&gt;
| Defines the tempo (playback speed) of the BMS file.&lt;br /&gt;
|-&lt;br /&gt;
| E1&lt;br /&gt;
| JASSeqParser::cmdBankPrg&lt;br /&gt;
| {OpCode[1]} {Bank[1]} {Program[1]}&amp;lt;br /&amp;gt;OpCode: one byte, E1.&amp;lt;br /&amp;gt;Bank: one byte with range 0x00 through 0xFF. This byte represents a WSYS ID.&amp;lt;br /&amp;gt;Program: one byte ranging from 0x00 through 0xFF. This byte represents a LIST entry in the IBNK belonging to the defined WSYS ID.&lt;br /&gt;
| E1 01 0F&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;E1: OpCode&amp;lt;br /&amp;gt;01: WSYS ID 1&amp;lt;br /&amp;gt;0F: IBNK LIST entry 15&amp;lt;br /&amp;gt;(01 0F is the percussion set for Yoshi Drums)&lt;br /&gt;
| Defines/changes patch and bank to be played on the target channel. A combination of E2 and E3.&lt;br /&gt;
|-&lt;br /&gt;
| E2&lt;br /&gt;
| JASSeqParser::cmdBank&lt;br /&gt;
| {OpCode[1]} {Bank[1]}&amp;lt;br /&amp;gt;OpCode: one byte, E2.&amp;lt;br /&amp;gt;Bank: one byte with range 0x00 through 0xFF. This byte represents a WSYS ID.&lt;br /&gt;
| E2 53&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;E2: OpCode&amp;lt;br /&amp;gt;53: WSYS ID 83&amp;lt;br /&amp;gt;(This bank holds sounds for Megahammer)&lt;br /&gt;
| Defines/changes the WSYS/IBNK (bank) whose sounds are to be used in a channel.&amp;lt;/br&amp;gt;&lt;br /&gt;
Timing Channel: If the track is on a channel for timing and chord usage, this command instead defines the ID of the note scale to be used from the [[CIT (File Format)|CIT]].&lt;br /&gt;
|-&lt;br /&gt;
| E3&lt;br /&gt;
| JASSeqParser::cmdPrg&lt;br /&gt;
| {OpCode[1]} {Program[1]}&amp;lt;br /&amp;gt;OpCode: one byte, E3.&amp;lt;br /&amp;gt;Program: one byte with range 0x00 through 0xFF. This byte represents a LIST entry in the [[IBNK]] belonging to the defined WSYS ID.&lt;br /&gt;
| E3 0B&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;E3: OpCode&amp;lt;br /&amp;gt;0B: IBNK LIST entry 11&amp;lt;br /&amp;gt;(In relation to Megahammer, this Program holds movement related sounds)&lt;br /&gt;
| Defines the Instrument Patch / Keyboard of an [[IBNK]] (bank). If no E2 Bank Select Command was used before, it will default to Bank 0.&amp;lt;/br&amp;gt;&lt;br /&gt;
Timing Channel: If the track is on a channel for timing and chord usage, this command instead defines the ID of the chord to be used from the [[CIT (File Format)|CIT]].&lt;br /&gt;
|-&lt;br /&gt;
| E4&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| E5&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| E6&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| E7&lt;br /&gt;
| JASSeqParser::cmdEnvScaleSet&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| E8&lt;br /&gt;
| JASSeqParser::cmdEnvSet&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| E9&lt;br /&gt;
| JASSeqParser::cmdSimpleADSR&lt;br /&gt;
| {OpCode[1]} {Attack[2]} {Sustain[2]} {Decay[2]} {Amplitude[2]} {Release[2]}&amp;lt;br/&amp;gt;OpCode: one byte, E9.&amp;lt;br/&amp;gt;Attack: two bytes with range 0x0000 through 0x7FFF. Define the duration of fade-in in ticks.&amp;lt;br/&amp;gt;Sustain: two bytes with range 0x0000 through 0x7FFF. Define the duration for how long the wave is kept at maximum amplitude in ticks.&amp;lt;br/&amp;gt;Decay: two bytes with range 0x0000 through 0x7FFF. Define the duration of fade between maximum and controlled amplitude in ticks.&amp;lt;br/&amp;gt;Amplitude: two bytes with range 0x0000 through 0x7FFF. Define the volume of the wave for the 2nd sustain duration.&amp;lt;br/&amp;gt;Release: two bytes with range 0x0000 through 0x7FFF. Define the duration of fade-out in ticks.&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;If Amplitude is set to 0x7FFF, Sustain and Decay won&#039;t have an audible effect to the wave.&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;The Attack, Decay and Release operations affect the volume of the wave linearly.&lt;br /&gt;
| E9 00 80 01 00 00 80 5F FF 00 3C&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;E9: OpCode&amp;lt;br/&amp;gt;00 80: Attack (fade-in) for 128 ticks&amp;lt;br/&amp;gt;01 00: Sustain for 256 ticks&amp;lt;br/&amp;gt;00 80: Decay for 128 ticks&amp;lt;br/&amp;gt;5F FF: Amplitude of 75% compared to maximum&amp;lt;br/&amp;gt;00 3C: Release (fade-out) for 60 ticks&lt;br /&gt;
| Perform ADSR operations on a key. Must be placed before the actual key presses. [https://cdn.discordapp.com/attachments/1361554635369873490/1376201837237239899/image.png?ex=68347756&amp;amp;is=683325d6&amp;amp;hm=10661c473bb1ecb6187a17baafbc22c7d8af0a59cb0ceb87d7c85f42a8fee54c See this image for a visual representation of the ADSR operations].&lt;br /&gt;
|-&lt;br /&gt;
| EA&lt;br /&gt;
| JASSeqParser::cmdBusConnect&lt;br /&gt;
| {OpCode[1]} {Unknown[1]} {Unknown[1]} {Unknown[1]}&amp;lt;br /&amp;gt;OpCode: one byte, EA.&amp;lt;br /&amp;gt;Unknown: one byte with unknown range and purpose.&lt;br /&gt;
| EA 00 FF FF&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;EA: OpCode&amp;lt;br /&amp;gt;00: Unknown&amp;lt;br /&amp;gt;FF: Unknown&amp;lt;br /&amp;gt;FF: Unknown&lt;br /&gt;
| Unknown purpose, only seen in SC.&lt;br /&gt;
|-&lt;br /&gt;
| EB&lt;br /&gt;
| JASSeqParser::cmdIIRCutOff&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {Cutoff[1]}&amp;lt;br/&amp;gt;Sets the track&#039;s IIR filter parameters to values derived from the Cutoff value via a lookup table.&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;Cutoff: one byte in the range 0-127. The IIR filter parameters are derived from this value.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| EC&lt;br /&gt;
| JASSeqParser::cmdIIRSet&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {Param1[2]} {Param2[2]} {Param3[2]} {Param4[2]}&amp;lt;br/&amp;gt;Sets the track&#039;s IIR filter parameters to the four parameter values, which are interpreted as signed 16-bit integers.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| ED&lt;br /&gt;
| JASSeqParser::cmdFIRSet&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {Pointer[3]}&amp;lt;br/&amp;gt;Reads a FIR parameter table (8 two-byte signed integer values = 16 bytes) at the given Pointer and sets the track&#039;s FIR filter parameters to these values.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| EE&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| EF&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F0&lt;br /&gt;
| JASSeqParser::cmdWait&lt;br /&gt;
| {OpCode[1]} {WaitTime[n]}&amp;lt;br /&amp;gt;OpCode: one byte, 0xF0.&amp;lt;br /&amp;gt;WaitTime: one or more bytes with range 0x00 through 0xFF. If the leading byte is 0x80 (bit 7 = 1) or greater, another following byte will be taken into account. Time is measured in ticks here.&lt;br /&gt;
| F0 60 (96 Ticks)&amp;lt;br /&amp;gt;F0 81 56 (214 Ticks)&amp;lt;br /&amp;gt;F0 83 81 30 (49328 Ticks)&lt;br /&gt;
| Creates a delay, used to define the length of a Note or gap between Notes.&lt;br /&gt;
|-&lt;br /&gt;
| F1&lt;br /&gt;
| JASSeqParser::cmdWaitByte&lt;br /&gt;
| {OpCode[1]} {WaitTime[1]}&lt;br /&gt;
Waits for WaitTime ticks&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F2&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F3&lt;br /&gt;
| JASSeqParser::cmdSetIntTable&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F4&lt;br /&gt;
| JASSeqParser::cmdSetInterrupt&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F5&lt;br /&gt;
| JASSeqParser::cmdDisInterrupt&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F6&lt;br /&gt;
| JASSeqParser::cmdRetI&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F7&lt;br /&gt;
| JASSeqParser::cmdClrI&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F8&lt;br /&gt;
| JASSeqParser::cmdIntTimer&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F9&lt;br /&gt;
| JASSeqParser::cmdSyncCPU&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| FA&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| FB&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| FC&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| FD&lt;br /&gt;
| JASSeqParser::cmdPrintf&lt;br /&gt;
| {OpCode[1]} {Message[n]} {NullTerminator[1]}&amp;lt;br /&amp;gt;OpCode: one byte, FD.&amp;lt;br /&amp;gt;Message: ASCII string of undefined length, ending with &amp;lt;code&amp;gt;\n&amp;lt;/code&amp;gt;.&amp;lt;br /&amp;gt;NullTerminator: one byte, 00.&lt;br /&gt;
| FD 48 65 6C 6C 6F 5C 6E 00&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;FD: OpCode&amp;lt;br /&amp;gt;48 65 6C 6C 6F 5C 6E: &amp;quot;Hello\n&amp;quot;&amp;lt;br /&amp;gt;00: Null-terminator&lt;br /&gt;
| Prints a specified message to OSReport.&lt;br /&gt;
|-&lt;br /&gt;
| FE&lt;br /&gt;
| JASSeqParser::cmdNop&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| FF&lt;br /&gt;
| JASSeqParser::cmdFinish&lt;br /&gt;
| {OpCode[1]}&amp;lt;br /&amp;gt;OpCode: one byte, 0xFF.&lt;br /&gt;
| &lt;br /&gt;
| Stops execution of a Track.&lt;br /&gt;
|-&lt;br /&gt;
| B000&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B001&lt;br /&gt;
| JASSeqParser::cmdDump&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Trivia ==&lt;br /&gt;
* Many BMS filenames contain the suffix &#039;&#039;midi_cnv&#039;&#039;. This could indicate that Midis were first converted to a (perhaps text-based) CNV file, which was then converted to the BMS format. A similar situation applies to Nintendo&#039;s SDK tool for converting the Nintendo DS&#039;s SSEQ sequence format, which first converts Midis to a text-based SMFT format, which is then converted to the final SSEQ format.&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
[https://github.com/magcius/vgmtrans VGMTrans Fork] (analyses and converts BMS to MIDI)&amp;lt;br&amp;gt;&lt;br /&gt;
[https://cdn.discordapp.com/attachments/421356154795458570/1291660143758413824/BMS_DEC.zip?ex=6719f440&amp;amp;is=6718a2c0&amp;amp;hm=f44c5197a070f30a00283858942f9e4ae5066034862eba006f8abe87a228a6aa&amp;amp; BMS_DEC] (converts BMS to MIDI)&amp;lt;br&amp;gt;&lt;br /&gt;
[https://github.com/XAYRGA/JaiSeqX JaiSeqX] (playback for JAudio1 and JAudio2 BMS files)&lt;/div&gt;</summary>
		<author><name>RavuAlHemio</name></author>
	</entry>
	<entry>
		<id>https://www.lumasworkshop.com/w/index.php?title=BMS_(File_Format)&amp;diff=1051</id>
		<title>BMS (File Format)</title>
		<link rel="alternate" type="text/html" href="https://www.lumasworkshop.com/w/index.php?title=BMS_(File_Format)&amp;diff=1051"/>
		<updated>2026-07-05T21:24:37Z</updated>

		<summary type="html">&lt;p&gt;RavuAlHemio: /* Data */ parseRegCommand: RegBits is encoded MSB first&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:File formats]]&lt;br /&gt;
== File Format ==&lt;br /&gt;
BMS files are &#039;&#039;&#039;B&#039;&#039;&#039;inary &#039;&#039;&#039;M&#039;&#039;&#039;usic &#039;&#039;&#039;S&#039;&#039;&#039;equences that store commands for the audio engine to play notes, similar to the MIDI file format.&lt;br /&gt;
&lt;br /&gt;
== Structure ==&lt;br /&gt;
BMS consists of pure assembly code, where each track containing events such as notes, patch changes, etc. is an independent executor thread with opcodes to execute. &lt;br /&gt;
In contrast to Midi, events are read linearly per channel in a data stream and interpreted byte by byte. This means that multiple tracks within the same channel cannot be played back synchronously and would therefore have to be baked onto one track. However, BMS tracks can jump or call to different places in the file, e.g. to loop the song or to ensure a very high storage efficiency.&lt;br /&gt;
&lt;br /&gt;
The game&#039;s audio engine can only play up to 16 tracks at a time - very similar to MIDI with its 16 channels.&lt;br /&gt;
&lt;br /&gt;
BMS also includes extended MIDI operations, such as more powerful versions of controllers, with fade-in capability, and higher resolution control values. However, no song in either Galaxy game makes use of this.&lt;br /&gt;
&lt;br /&gt;
=== Filestructure ===&lt;br /&gt;
There are no headers or filesize checks. The file usually starts with the following:&lt;br /&gt;
*&#039;&#039;&#039;Global Track / Tempo Track&#039;&#039;&#039; BMS always starts (very similary to Midi&#039;s &amp;quot;Tempo Track&amp;quot; or &amp;quot;Conductor Track&amp;quot;) directly with track containing Meta-Events, which only contains global control data, typically:&lt;br /&gt;
**Pulses per Quarter Note (PPQN) set&lt;br /&gt;
**Tempo (BPM)&lt;br /&gt;
**Looping commands (to keep BPM changes synchronized during the song if necessary)&lt;br /&gt;
**OpenTrack command that starts playing the following track&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Channel Specific Track&#039;&#039;&#039;  a kind of management track for channel/Main Track definitions&lt;br /&gt;
**Usally contains &#039;&#039;&#039;C1&#039;&#039;&#039; OpenTrack events for each executor track (channel). For some unknown reason, the exact same looping and duration events from the global track need to be repeated here, otherwise some events such as pitchwheel will not work in the song.&lt;br /&gt;
&lt;br /&gt;
== Data ==&lt;br /&gt;
BMS files contain raw instructions for the audio engine without any headers or filesize checks. Each instruction (OpCode) stands for its own function in the engine. The following table lists all JAudio2 OpCodes that have functions in SMG2:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! OpCode&lt;br /&gt;
! Function (SMG/SMG2)&lt;br /&gt;
! Usage&lt;br /&gt;
! Example&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 00&amp;lt;br /&amp;gt;01&amp;lt;br /&amp;gt;02&amp;lt;br /&amp;gt;...&amp;lt;br /&amp;gt;7D&amp;lt;br /&amp;gt;7E&amp;lt;br /&amp;gt;7F&lt;br /&gt;
| JASSeqParser::parseNoteOn&lt;br /&gt;
| {OpCode[1]} {Voice[1]} {Velocity[1]} {Wait[n]}&amp;lt;br /&amp;gt;OpCode: one byte with range 0x00 through 0x7F. 0x00 = C-1, 0x3C = C4 (middle C), 0x7F = G9.&amp;lt;br /&amp;gt;Voice: one byte with range 0x01 through 0x07 (needs testing/verification). Each Voice can only hold one Note.&amp;lt;br /&amp;gt;Velocity: one byte with range 0x00 through 0x7F. 0x00 = 0, 0x7F = 127.&amp;lt;br /&amp;gt;Wait: variable length, only present for Midi Gate notes (Voice is not 1 - 7).&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;If the Voice is not 1 - 7, the game will treat this note as a Midi Gate note, and will expect that the Wait value is present. The Wait value is one or more bytes with range 0x00 through 0xFF; each time the byte is 0x80 or greater (i.e. bit 7 = 1), another following byte will be taken into account. If the Wait value is 0x00, the game waits until the note has finished; otherwise, it waits the number of ticks specified in the Wait value.&lt;br /&gt;
| 64 02 68&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;64: Key E4&amp;lt;br /&amp;gt;02: Voice 2&amp;lt;br /&amp;gt;68: Velocity 104&lt;br /&gt;
| Starts playing a Note with the previously defined Instrument (see E1, E2 and E3).&lt;br /&gt;
|-&lt;br /&gt;
| 80&lt;br /&gt;
| JASSeqParser::cmdWaitByte&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Seems to do nothing based on the code.&lt;br /&gt;
|-&lt;br /&gt;
| 81&amp;lt;br /&amp;gt;...&amp;lt;br /&amp;gt;87&lt;br /&gt;
| JASSeqParser::parseNoteOff&lt;br /&gt;
| {OpCode[1]}&amp;lt;br /&amp;gt;OpCode: one byte with range 0x81 through 0x87. 0x81 = Close Voice 1, 0x87 = Close Voice 7.&lt;br /&gt;
| 81: Stop voice ID 1&lt;br /&gt;
| Stops playing a Note.&lt;br /&gt;
|-&lt;br /&gt;
| 88&amp;lt;br /&amp;gt;...&amp;lt;br /&amp;gt;8F&lt;br /&gt;
| Unknown&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 90&amp;lt;br /&amp;gt;...&amp;lt;br /&amp;gt;9F&lt;br /&gt;
| JASSeqParser::parseRegCommand&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {RegBits[1]} {TargetOpCode[1]} {TargetParams[n]}&amp;lt;br/&amp;gt;Triggers TargetOpCode while replacing some of its fixed parameters with register value lookups.&amp;lt;br/&amp;gt;Taking the lowest 3 bits of OpCode and adding 1 defines how many parameters TargetOpCode has (90 = 1 parameter, 91 = 2 parameters, ..., 97 = 8 parameters, 98 = 1 parameter, 99 = 2 parameters, ..., 9F = 8 parameters). For each parameter, if the corresponding bit in RegBits (MSB first) is set, the parameter type is changed to a register read. (For example, if RegBits = 160 = 0b10100000, the first and the third parameter are changed to register reads.) Finally, TargetOpCode is performed with TargetParams.&amp;lt;br/&amp;gt;TargetOpCode must be at least A0.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A0&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A1&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A2&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A3&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A4&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A5&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A6&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A7&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A8&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A9&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| AA&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| AB&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| AC&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| AD&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| AE&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| AF&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B0&lt;br /&gt;
| Extended Opcode Indicator&lt;br /&gt;
| See B000 or B001.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B1&lt;br /&gt;
| JASSeqParser::cmdNoteOn&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B2&lt;br /&gt;
| JASSeqParser::cmdNoteOff&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B3&lt;br /&gt;
| JASSeqParser::cmdNote&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B4&lt;br /&gt;
| JASSeqParser::cmdSetLastNote&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B5&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B6&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B7&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B8&lt;br /&gt;
| JASSeqParser::cmdParamE&lt;br /&gt;
| {OpCode[1]} {Target[1]} {Parameter[1]}&amp;lt;br/&amp;gt;OpCode: one byte, B8.&amp;lt;br/&amp;gt;Target: one byte with range 0x00 through 0x03.&amp;lt;br/&amp;gt;Parameter: one byte with range 0x00 through 0xFF (Int8), whichs purpose depends on the target:&lt;br /&gt;
* Target 0: Volume. 0x7F = Full volume (100%), 0x00 = Silent (0%). 0x80 through 0xFF are treated the same as silence (0%).&lt;br /&gt;
* Target 1: Pitch. Adding one (0x01) or subtracting one (0xFF) increases/decreases pitch by one key, like from D#4 to E4.&lt;br /&gt;
* Target 2: Reverb. 0x7F = Strong reverb, 0x00 = no reverb. 0x80 through 0xFF are treated the same as no reverb.&lt;br /&gt;
* Target 3: Panning. 0x7F = right channel, 0x00 = center, 0x80 = left channel.&lt;br /&gt;
| B8 00 64&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;B8: OpCode&amp;lt;br/&amp;gt;00: Target (Volume)&amp;lt;br/&amp;gt;64: ~78% volume&lt;br /&gt;
| Allows different operations onto the music track&lt;br /&gt;
|-&lt;br /&gt;
| B9&lt;br /&gt;
| JASSeqParser::cmdParamI&lt;br /&gt;
| {OpCode[1]} {Target[1]} {Parameter[2]}&amp;lt;br/&amp;gt;OpCode: one byte, B9.&amp;lt;br/&amp;gt;Target: one byte with range 0x00 through 0x03.&amp;lt;br/&amp;gt;Parameter: two bytes with range 0x0000 through 0xFFFF (Int16), whichs purpose depends on the target:&lt;br /&gt;
* Target 0: Volume. 0x7FFF = Full volume (100%), 0x0000 = Silent (0%). 0x8000 through 0xFFFF are treated the same as silence (0%).&lt;br /&gt;
* Target 1: Pitch. Adding one (0x0100) or subtracting one (0xFF00) increases/decreases pitch by one key, like from D#4 to E4. Values inbetween can be used for fine-tuning.&lt;br /&gt;
* Target 2: Reverb. 0x7FFF = Strong reverb, 0x0000 = no reverb. 0x8000 through 0xFFFF are treated the same as no reverb.&lt;br /&gt;
* Target 3: Panning. 0x7FFF = right channel, 0x0000 = center, 0x8000 = left channel.&lt;br /&gt;
| B9 01 04 00&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;B9: OpCode&amp;lt;br/&amp;gt;01: Target (Pitch)&amp;lt;br/&amp;gt;04 00: Pitch of 4 keys&lt;br /&gt;
| Allows different operations with higher precision onto the music track&lt;br /&gt;
|-&lt;br /&gt;
| BA&lt;br /&gt;
| JASSeqParser::cmdParamEI&lt;br /&gt;
| {OpCode[1]} {Target[1]} {Parameter[1]} {Fade time[2]}&amp;lt;br/&amp;gt;OpCode: one byte, BA.&amp;lt;br/&amp;gt;Target: one byte with range 0x00 through 0x03.&amp;lt;br/&amp;gt;Parameter: one byte with range 0x00 through 0xFF (Int8), whichs purpose depends on the target:&lt;br /&gt;
* Target 0: Volume. 0x7F = Full volume (100%), 0x00 = Silent (0%). 0x80 through 0xFF are treated the same as silence (0%).&lt;br /&gt;
* Target 1: Pitch. Adding one (0x01) or subtracting one (0xFF) increases/decreases pitch by one key, like from D#4 to E4.&lt;br /&gt;
* Target 2: Reverb. 0x7F = Strong reverb, 0x00 = no reverb. 0x80 through 0xFF are treated the same as no reverb.&lt;br /&gt;
* Target 3: Panning. 0x7F = right channel, 0x00 = center, 0x80 = left channel.&lt;br /&gt;
Fade time: two bytes with range 0x0000 through 0xFFFF. The amount of time in ticks until the Parameter value is met.&lt;br /&gt;
| BA 02 22 01 68&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;BA: OpCode&amp;lt;br/&amp;gt;02: Target (Reverb)&amp;lt;br/&amp;gt;22: Reverb of strength 34&amp;lt;br/&amp;gt;01 68: 360 Ticks&lt;br /&gt;
| Allows different operations with fade time onto the music track&lt;br /&gt;
|-&lt;br /&gt;
| BB&lt;br /&gt;
| JASSeqParser::cmdParamII&lt;br /&gt;
| {OpCode[1]} {Target[1]} {Parameter[2]} {Fade time[2]}&amp;lt;br/&amp;gt;OpCode: one byte, BB.&amp;lt;br/&amp;gt;Target: one byte with range 0x00 through 0x03.&amp;lt;br/&amp;gt;Parameter: two bytes with range 0x0000 through 0xFFFF (Int16), whichs purpose depends on the target:&lt;br /&gt;
* Target 0: Volume. 0x7FFF = Full volume (100%), 0x0000 = Silent (0%). 0x8000 through 0xFFFF are treated the same as silence (0%).&lt;br /&gt;
* Target 1: Pitch. Adding one (0x0100) or subtracting one (0xFF00) increases/decreases pitch by one key, like from D#4 to E4. Values inbetween can be used for fine-tuning.&lt;br /&gt;
* Target 2: Reverb. 0x7FFF = Strong reverb, 0x0000 = no reverb. 0x8000 through 0xFFFF are treated the same as no reverb.&lt;br /&gt;
* Target 3: Panning. 0x7FFF = right channel, 0x0000 = center, 0x8000 = left channel.&lt;br /&gt;
Fade time: two bytes with range 0x0000 through 0xFFFF. The amount of time in ticks until the Parameter value is met.&lt;br /&gt;
| BA 03 7F FF 02 00&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;BB: OpCode&amp;lt;br/&amp;gt;03: Target (Panning)&amp;lt;br/&amp;gt;7F FF: Panned to right channel&amp;lt;br/&amp;gt;02 00: 512 Ticks&lt;br /&gt;
| Allows different operations with higher precision and fade time onto the music track&lt;br /&gt;
|-&lt;br /&gt;
| BC&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| BD&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| BE&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| BF&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| C0&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| C1&lt;br /&gt;
| JASSeqParser::cmdOpenTrack&lt;br /&gt;
| {OpCode[1]} {ChannelNumber[1]} {TrackPointer[3]}&amp;lt;br /&amp;gt;OpCode: one byte, C1.&amp;lt;br /&amp;gt;ChannelNumber: one byte with range 0x00 through 0x0F. 0x00 = Channel 0, 0x0F = Channel 15.&amp;lt;br /&amp;gt;TrackPointer: three bytes with range 0x000000 through 0xFFFFFF. Defines a start offset in the file to play.&lt;br /&gt;
| C1 04 05 B4 73&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;C1: OpCode&amp;lt;br /&amp;gt;04: Channel 4&amp;lt;br /&amp;gt;05 B4 73: Offset to track&lt;br /&gt;
| Starts playing a certain track on a certain channel. Channel 15 is usually reserved for Yoshi Drums. [[SMR.szs#BGM_parameters|If enabled in the BGM parameter table in SMR.szs]], channel 0 can be used for timing and chords usage that do not play any instruments from the sound bank.&lt;br /&gt;
|-&lt;br /&gt;
| C2&lt;br /&gt;
| JASSeqParser::cmdCloseTrack&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| C3&lt;br /&gt;
| JASSeqParser::cmdCall&lt;br /&gt;
| {OpCode[1]} {Pointer[3]}&amp;lt;br /&amp;gt;OpCode: one byte, C3.&amp;lt;br /&amp;gt;Pointer: three bytes with range 0x000000 through 0xFFFFFF. Defines an offset in the file.&lt;br /&gt;
| C3 00 00 40&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;C3: OpCode&amp;lt;br /&amp;gt;00 00 40: Offset&lt;br /&gt;
| Redirects execution to the defined offset. Execution can return with C5.&lt;br /&gt;
|-&lt;br /&gt;
| C4&lt;br /&gt;
| JASSeqParser::cmdCallF&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| C5&lt;br /&gt;
| JASSeqParser::cmdRet&lt;br /&gt;
| {OpCode[1]}&amp;lt;br /&amp;gt;OpCode: one byte, C5.&lt;br /&gt;
| &lt;br /&gt;
| Returns redirected execution (like from C3) to the initial call.&lt;br /&gt;
|-&lt;br /&gt;
| C6&lt;br /&gt;
| JASSeqParser::cmdRetF&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| C7&lt;br /&gt;
| JASSeqParser::cmdJmp&lt;br /&gt;
| {OpCode[1]} {Pointer[3]}&amp;lt;br /&amp;gt;OpCode: one byte, C7.&amp;lt;br /&amp;gt;Pointer: three bytes with range 0x000000 through 0xFFFFFF. Defines an offset in the file.&lt;br /&gt;
| C7 08 02 34&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;C7: OpCode&amp;lt;br /&amp;gt;08 02 34: Offset&lt;br /&gt;
| Redirects execution to the defined offset, used for Loops.&lt;br /&gt;
|-&lt;br /&gt;
| C8&lt;br /&gt;
| JASSeqParser::cmdJmpF&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| C9&lt;br /&gt;
| JASSeqParser::cmdJmpTable&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CA&lt;br /&gt;
| JASSeqParser::cmdCallTable&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CB&lt;br /&gt;
| JASSeqParser::cmdLoopS&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CC&lt;br /&gt;
| JASSeqParser::cmdLoopE&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CD&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CE&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CF&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D0&lt;br /&gt;
| JASSeqParser::cmdReadPort&lt;br /&gt;
| {OpCode[1]} {Source[1]} {Destination[1]}&lt;br /&gt;
Opcode: One byte, D0&lt;br /&gt;
Source: One byte, 0-15 , source port &lt;br /&gt;
Destination: One byte, 0-32, destination register&lt;br /&gt;
| &lt;br /&gt;
| Imports the value from sequence port Source and writes it to destination register &#039;Destination&#039;, the value is also written to register 3&lt;br /&gt;
|-&lt;br /&gt;
| D1&lt;br /&gt;
| JASSeqParser::cmdWritePort&lt;br /&gt;
| {OpCode[1]} {Source[1]} {Destination[1]}&lt;br /&gt;
Opcode: One byte, D1&lt;br /&gt;
Source: One byte, source register, 0-32&lt;br /&gt;
Destination: One Byte, destination port, 0-15&lt;br /&gt;
| &lt;br /&gt;
| Writes the value in register &#039;Source&#039; and saves it to register 3, as well as port &#039;Destination&#039;&lt;br /&gt;
|-&lt;br /&gt;
| D2&lt;br /&gt;
| JASSeqParser::cmdCheckPortImport&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D3&lt;br /&gt;
| JASSeqParser::cmdCheckPortExport&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D4&lt;br /&gt;
| JASSeqParser::cmdParentWritePort&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {Port[1]} {Register[1]}&amp;lt;br/&amp;gt;Reads the value from this track&#039;s Register (0-32) and writes it to the parent track&#039;s Port (0-15).&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D5&lt;br /&gt;
| JASSeqParser::cmdChildWritePort&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {ChildAndPort[1]} {Register[1]}&amp;lt;br/&amp;gt;Reads the value from this track&#039;s Register (0-32) and writes it to the child track&#039;s port given by ChildAndPort. The top 4 bits of ChildAndPort (0-15) represent the number of the child track, the bottom 4 bits (0-15) the port.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D6&lt;br /&gt;
| JASSeqParser::cmdParentReadPort&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {Port[1]} {Register[1]}&amp;lt;br/&amp;gt;Reads the value from the parent track&#039;s Port (0-15) and writes it to this track&#039;s Register (0-32).&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D7&lt;br /&gt;
| JASSeqParser::cmdChildReadPort&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {ChildAndPort[1]} {Register[1]}&amp;lt;br/&amp;gt;Reads the value from the child track&#039;s port given by ChildAndPort and writes it to this track&#039;s Register. The top 4 bits of ChildAndPort (0-15) represent the number of the child track, the bottom 4 bits (0-15) the port.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D8&lt;br /&gt;
| JASSeqParser::cmdRegLoad&lt;br /&gt;
| {OpCode[1]} {Setting[1]} {Unknown[1]} {Variable[1]}&amp;lt;br /&amp;gt;OpCode: one byte, D8.&amp;lt;br /&amp;gt;Setting: one byte with unknown range. Different bytes will trigger different effects:&amp;lt;br /&amp;gt;- 0x62: set PPQN (seen in BMS)&amp;lt;br /&amp;gt;- 0x6B: set PPQN (seen in SC)&amp;lt;br /&amp;gt;Unknown: one byte with unknown range and purpose.&amp;lt;br /&amp;gt;Variable: one byte with different range and purpose depending on the Setting byte.&lt;br /&gt;
| D8 62 00 78&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;D8: OpCode&amp;lt;br /&amp;gt;62: set PPQN&amp;lt;br /&amp;gt;00: Unknown&amp;lt;br /&amp;gt;78: PPQN 120&lt;br /&gt;
| Different purposes.&lt;br /&gt;
|-&lt;br /&gt;
| D9&lt;br /&gt;
| JASSeqParser::cmdReg&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {RegOp[1]} {Register[1]} {Value[2]}&amp;lt;br/&amp;gt;Reads a value from Register (0-32), performs RegOp with Value on it, then stores the result into Register. Values for RegOp are:&amp;lt;br/&amp;gt;- 0: do nothing&amp;lt;br/&amp;gt;- 1: Read(Register) + Value&amp;lt;br/&amp;gt;- 2: Read(Register) - Value&amp;lt;br/&amp;gt;- 3: Read(Register) - Value, but store result into register 3 instead of Register&amp;lt;br/&amp;gt;- 4: Read(Register) × Value, but store result into register 33 instead of Register&amp;lt;br/&amp;gt;- 5: Read(Register) AND Value (bitwise)&amp;lt;br/&amp;gt;- 6: Read(Register) OR Value (bitwise)&amp;lt;br/&amp;gt;- 7: Read(Register) XOR Value (bitwise)&amp;lt;br/&amp;gt;- 8: a random number 0 &amp;amp;leq; n &amp;amp;lt; Value&amp;lt;br/&amp;gt;- 9: Read(Register) SHL Value (bitshift left)&amp;lt;br/&amp;gt;- 10: Read(Register) SHR Value (bitshift right)&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DA&lt;br /&gt;
| JASSeqParser::cmdReg&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {RegOp[1]} {Register[1]} {OtherRegister[1]}&amp;lt;br/&amp;gt;Performs the same operation as D9, except the value to the operation is not specified directly, but read from OtherRegister (0-32).&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DB&lt;br /&gt;
| JASSeqParser::cmdRegUni&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DC&lt;br /&gt;
| JASSeqParser::cmdRegTblLoad&lt;br /&gt;
| {OpCode[1]} {AccessMode[1]} {Destination[1]} {Offset[3]} {Index[1]}&lt;br /&gt;
OpCode: One Byte, 0xDC &lt;br /&gt;
AccessMode: Determines how the sequence accesses the table. &lt;br /&gt;
Destination: 24-bit offset of table&lt;br /&gt;
Index: Register target index into table&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DD&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DE&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DF&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| E0&lt;br /&gt;
| JASSeqParser::cmdTempo&lt;br /&gt;
| {OpCode[1]} {Unknown[1]} {BPM[1]}&amp;lt;br /&amp;gt;OpCode: one byte, E0.&amp;lt;br /&amp;gt;Unknown: one byte with unknown range and purpose.&amp;lt;br /&amp;gt;BPM: one byte with range 0x00 through 0xFF. 0x78 = 120, F0 = 240.&lt;br /&gt;
| E0 00 90&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;E0: OpCode&amp;lt;br /&amp;gt;00: Unknown&amp;lt;br /&amp;gt;90: BPM 144&lt;br /&gt;
| Defines the tempo (playback speed) of the BMS file.&lt;br /&gt;
|-&lt;br /&gt;
| E1&lt;br /&gt;
| JASSeqParser::cmdBankPrg&lt;br /&gt;
| {OpCode[1]} {Bank[1]} {Program[1]}&amp;lt;br /&amp;gt;OpCode: one byte, E1.&amp;lt;br /&amp;gt;Bank: one byte with range 0x00 through 0xFF. This byte represents a WSYS ID.&amp;lt;br /&amp;gt;Program: one byte ranging from 0x00 through 0xFF. This byte represents a LIST entry in the IBNK belonging to the defined WSYS ID.&lt;br /&gt;
| E1 01 0F&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;E1: OpCode&amp;lt;br /&amp;gt;01: WSYS ID 1&amp;lt;br /&amp;gt;0F: IBNK LIST entry 15&amp;lt;br /&amp;gt;(01 0F is the percussion set for Yoshi Drums)&lt;br /&gt;
| Defines/changes patch and bank to be played on the target channel. A combination of E2 and E3.&lt;br /&gt;
|-&lt;br /&gt;
| E2&lt;br /&gt;
| JASSeqParser::cmdBank&lt;br /&gt;
| {OpCode[1]} {Bank[1]}&amp;lt;br /&amp;gt;OpCode: one byte, E2.&amp;lt;br /&amp;gt;Bank: one byte with range 0x00 through 0xFF. This byte represents a WSYS ID.&lt;br /&gt;
| E2 53&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;E2: OpCode&amp;lt;br /&amp;gt;53: WSYS ID 83&amp;lt;br /&amp;gt;(This bank holds sounds for Megahammer)&lt;br /&gt;
| Defines/changes the WSYS/IBNK (bank) whose sounds are to be used in a channel.&amp;lt;/br&amp;gt;&lt;br /&gt;
Timing Channel: If the track is on a channel for timing and chord usage, this command instead defines the ID of the note scale to be used from the [[CIT (File Format)|CIT]].&lt;br /&gt;
|-&lt;br /&gt;
| E3&lt;br /&gt;
| JASSeqParser::cmdPrg&lt;br /&gt;
| {OpCode[1]} {Program[1]}&amp;lt;br /&amp;gt;OpCode: one byte, E3.&amp;lt;br /&amp;gt;Program: one byte with range 0x00 through 0xFF. This byte represents a LIST entry in the [[IBNK]] belonging to the defined WSYS ID.&lt;br /&gt;
| E3 0B&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;E3: OpCode&amp;lt;br /&amp;gt;0B: IBNK LIST entry 11&amp;lt;br /&amp;gt;(In relation to Megahammer, this Program holds movement related sounds)&lt;br /&gt;
| Defines the Instrument Patch / Keyboard of an [[IBNK]] (bank). If no E2 Bank Select Command was used before, it will default to Bank 0.&amp;lt;/br&amp;gt;&lt;br /&gt;
Timing Channel: If the track is on a channel for timing and chord usage, this command instead defines the ID of the chord to be used from the [[CIT (File Format)|CIT]].&lt;br /&gt;
|-&lt;br /&gt;
| E4&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| E5&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| E6&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| E7&lt;br /&gt;
| JASSeqParser::cmdEnvScaleSet&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| E8&lt;br /&gt;
| JASSeqParser::cmdEnvSet&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| E9&lt;br /&gt;
| JASSeqParser::cmdSimpleADSR&lt;br /&gt;
| {OpCode[1]} {Attack[2]} {Sustain[2]} {Decay[2]} {Amplitude[2]} {Release[2]}&amp;lt;br/&amp;gt;OpCode: one byte, E9.&amp;lt;br/&amp;gt;Attack: two bytes with range 0x0000 through 0x7FFF. Define the duration of fade-in in ticks.&amp;lt;br/&amp;gt;Sustain: two bytes with range 0x0000 through 0x7FFF. Define the duration for how long the wave is kept at maximum amplitude in ticks.&amp;lt;br/&amp;gt;Decay: two bytes with range 0x0000 through 0x7FFF. Define the duration of fade between maximum and controlled amplitude in ticks.&amp;lt;br/&amp;gt;Amplitude: two bytes with range 0x0000 through 0x7FFF. Define the volume of the wave for the 2nd sustain duration.&amp;lt;br/&amp;gt;Release: two bytes with range 0x0000 through 0x7FFF. Define the duration of fade-out in ticks.&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;If Amplitude is set to 0x7FFF, Sustain and Decay won&#039;t have an audible effect to the wave.&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;The Attack, Decay and Release operations affect the volume of the wave linearly.&lt;br /&gt;
| E9 00 80 01 00 00 80 5F FF 00 3C&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;E9: OpCode&amp;lt;br/&amp;gt;00 80: Attack (fade-in) for 128 ticks&amp;lt;br/&amp;gt;01 00: Sustain for 256 ticks&amp;lt;br/&amp;gt;00 80: Decay for 128 ticks&amp;lt;br/&amp;gt;5F FF: Amplitude of 75% compared to maximum&amp;lt;br/&amp;gt;00 3C: Release (fade-out) for 60 ticks&lt;br /&gt;
| Perform ADSR operations on a key. Must be placed before the actual key presses. [https://cdn.discordapp.com/attachments/1361554635369873490/1376201837237239899/image.png?ex=68347756&amp;amp;is=683325d6&amp;amp;hm=10661c473bb1ecb6187a17baafbc22c7d8af0a59cb0ceb87d7c85f42a8fee54c See this image for a visual representation of the ADSR operations].&lt;br /&gt;
|-&lt;br /&gt;
| EA&lt;br /&gt;
| JASSeqParser::cmdBusConnect&lt;br /&gt;
| {OpCode[1]} {Unknown[1]} {Unknown[1]} {Unknown[1]}&amp;lt;br /&amp;gt;OpCode: one byte, EA.&amp;lt;br /&amp;gt;Unknown: one byte with unknown range and purpose.&lt;br /&gt;
| EA 00 FF FF&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;EA: OpCode&amp;lt;br /&amp;gt;00: Unknown&amp;lt;br /&amp;gt;FF: Unknown&amp;lt;br /&amp;gt;FF: Unknown&lt;br /&gt;
| Unknown purpose, only seen in SC.&lt;br /&gt;
|-&lt;br /&gt;
| EB&lt;br /&gt;
| JASSeqParser::cmdIIRCutOff&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {Cutoff[1]}&amp;lt;br/&amp;gt;Sets the track&#039;s IIR filter parameters to values derived from the Cutoff value via a lookup table.&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;Cutoff: one byte in the range 0-127. The IIR filter parameters are derived from this value.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| EC&lt;br /&gt;
| JASSeqParser::cmdIIRSet&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {Param1[2]} {Param2[2]} {Param3[2]} {Param4[2]}&amp;lt;br/&amp;gt;Sets the track&#039;s IIR filter parameters to the four parameter values, which are interpreted as signed 16-bit integers.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| ED&lt;br /&gt;
| JASSeqParser::cmdFIRSet&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {Pointer[3]}&amp;lt;br/&amp;gt;Reads a FIR parameter table (8 two-byte signed integer values = 16 bytes) at the given Pointer and sets the track&#039;s FIR filter parameters to these values.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| EE&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| EF&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F0&lt;br /&gt;
| JASSeqParser::cmdWait&lt;br /&gt;
| {OpCode[1]} {WaitTime[n]}&amp;lt;br /&amp;gt;OpCode: one byte, 0xF0.&amp;lt;br /&amp;gt;WaitTime: one or more bytes with range 0x00 through 0xFF. If the leading byte is 0x80 (bit 7 = 1) or greater, another following byte will be taken into account. Time is measured in ticks here.&lt;br /&gt;
| F0 60 (96 Ticks)&amp;lt;br /&amp;gt;F0 81 56 (214 Ticks)&amp;lt;br /&amp;gt;F0 83 81 30 (49328 Ticks)&lt;br /&gt;
| Creates a delay, used to define the length of a Note or gap between Notes.&lt;br /&gt;
|-&lt;br /&gt;
| F1&lt;br /&gt;
| JASSeqParser::cmdWaitByte&lt;br /&gt;
| {OpCode[1]} {WaitTime[1]}&lt;br /&gt;
Waits for WaitTime ticks&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F2&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F3&lt;br /&gt;
| JASSeqParser::cmdSetIntTable&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F4&lt;br /&gt;
| JASSeqParser::cmdSetInterrupt&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F5&lt;br /&gt;
| JASSeqParser::cmdDisInterrupt&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F6&lt;br /&gt;
| JASSeqParser::cmdRetI&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F7&lt;br /&gt;
| JASSeqParser::cmdClrI&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F8&lt;br /&gt;
| JASSeqParser::cmdIntTimer&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F9&lt;br /&gt;
| JASSeqParser::cmdSyncCPU&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| FA&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| FB&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| FC&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| FD&lt;br /&gt;
| JASSeqParser::cmdPrintf&lt;br /&gt;
| {OpCode[1]} {Message[n]} {NullTerminator[1]}&amp;lt;br /&amp;gt;OpCode: one byte, FD.&amp;lt;br /&amp;gt;Message: ASCII string of undefined length, ending with &amp;lt;code&amp;gt;\n&amp;lt;/code&amp;gt;.&amp;lt;br /&amp;gt;NullTerminator: one byte, 00.&lt;br /&gt;
| FD 48 65 6C 6C 6F 5C 6E 00&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;FD: OpCode&amp;lt;br /&amp;gt;48 65 6C 6C 6F 5C 6E: &amp;quot;Hello\n&amp;quot;&amp;lt;br /&amp;gt;00: Null-terminator&lt;br /&gt;
| Prints a specified message to OSReport.&lt;br /&gt;
|-&lt;br /&gt;
| FE&lt;br /&gt;
| JASSeqParser::cmdNop&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| FF&lt;br /&gt;
| JASSeqParser::cmdFinish&lt;br /&gt;
| {OpCode[1]}&amp;lt;br /&amp;gt;OpCode: one byte, 0xFF.&lt;br /&gt;
| &lt;br /&gt;
| Stops execution of a Track.&lt;br /&gt;
|-&lt;br /&gt;
| B000&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B001&lt;br /&gt;
| JASSeqParser::cmdDump&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Trivia ==&lt;br /&gt;
* Many BMS filenames contain the suffix &#039;&#039;midi_cnv&#039;&#039;. This could indicate that Midis were first converted to a (perhaps text-based) CNV file, which was then converted to the BMS format. A similar situation applies to Nintendo&#039;s SDK tool for converting the Nintendo DS&#039;s SSEQ sequence format, which first converts Midis to a text-based SMFT format, which is then converted to the final SSEQ format.&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
[https://github.com/magcius/vgmtrans VGMTrans Fork] (analyses and converts BMS to MIDI)&amp;lt;br&amp;gt;&lt;br /&gt;
[https://cdn.discordapp.com/attachments/421356154795458570/1291660143758413824/BMS_DEC.zip?ex=6719f440&amp;amp;is=6718a2c0&amp;amp;hm=f44c5197a070f30a00283858942f9e4ae5066034862eba006f8abe87a228a6aa&amp;amp; BMS_DEC] (converts BMS to MIDI)&amp;lt;br&amp;gt;&lt;br /&gt;
[https://github.com/XAYRGA/JaiSeqX JaiSeqX] (playback for JAudio1 and JAudio2 BMS files)&lt;/div&gt;</summary>
		<author><name>RavuAlHemio</name></author>
	</entry>
	<entry>
		<id>https://www.lumasworkshop.com/w/index.php?title=BMS_(File_Format)&amp;diff=1050</id>
		<title>BMS (File Format)</title>
		<link rel="alternate" type="text/html" href="https://www.lumasworkshop.com/w/index.php?title=BMS_(File_Format)&amp;diff=1050"/>
		<updated>2026-07-05T21:20:38Z</updated>

		<summary type="html">&lt;p&gt;RavuAlHemio: /* Data */ parseRegCommand: only bottom 3 bits from OpCode are relevant&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:File formats]]&lt;br /&gt;
== File Format ==&lt;br /&gt;
BMS files are &#039;&#039;&#039;B&#039;&#039;&#039;inary &#039;&#039;&#039;M&#039;&#039;&#039;usic &#039;&#039;&#039;S&#039;&#039;&#039;equences that store commands for the audio engine to play notes, similar to the MIDI file format.&lt;br /&gt;
&lt;br /&gt;
== Structure ==&lt;br /&gt;
BMS consists of pure assembly code, where each track containing events such as notes, patch changes, etc. is an independent executor thread with opcodes to execute. &lt;br /&gt;
In contrast to Midi, events are read linearly per channel in a data stream and interpreted byte by byte. This means that multiple tracks within the same channel cannot be played back synchronously and would therefore have to be baked onto one track. However, BMS tracks can jump or call to different places in the file, e.g. to loop the song or to ensure a very high storage efficiency.&lt;br /&gt;
&lt;br /&gt;
The game&#039;s audio engine can only play up to 16 tracks at a time - very similar to MIDI with its 16 channels.&lt;br /&gt;
&lt;br /&gt;
BMS also includes extended MIDI operations, such as more powerful versions of controllers, with fade-in capability, and higher resolution control values. However, no song in either Galaxy game makes use of this.&lt;br /&gt;
&lt;br /&gt;
=== Filestructure ===&lt;br /&gt;
There are no headers or filesize checks. The file usually starts with the following:&lt;br /&gt;
*&#039;&#039;&#039;Global Track / Tempo Track&#039;&#039;&#039; BMS always starts (very similary to Midi&#039;s &amp;quot;Tempo Track&amp;quot; or &amp;quot;Conductor Track&amp;quot;) directly with track containing Meta-Events, which only contains global control data, typically:&lt;br /&gt;
**Pulses per Quarter Note (PPQN) set&lt;br /&gt;
**Tempo (BPM)&lt;br /&gt;
**Looping commands (to keep BPM changes synchronized during the song if necessary)&lt;br /&gt;
**OpenTrack command that starts playing the following track&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Channel Specific Track&#039;&#039;&#039;  a kind of management track for channel/Main Track definitions&lt;br /&gt;
**Usally contains &#039;&#039;&#039;C1&#039;&#039;&#039; OpenTrack events for each executor track (channel). For some unknown reason, the exact same looping and duration events from the global track need to be repeated here, otherwise some events such as pitchwheel will not work in the song.&lt;br /&gt;
&lt;br /&gt;
== Data ==&lt;br /&gt;
BMS files contain raw instructions for the audio engine without any headers or filesize checks. Each instruction (OpCode) stands for its own function in the engine. The following table lists all JAudio2 OpCodes that have functions in SMG2:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! OpCode&lt;br /&gt;
! Function (SMG/SMG2)&lt;br /&gt;
! Usage&lt;br /&gt;
! Example&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 00&amp;lt;br /&amp;gt;01&amp;lt;br /&amp;gt;02&amp;lt;br /&amp;gt;...&amp;lt;br /&amp;gt;7D&amp;lt;br /&amp;gt;7E&amp;lt;br /&amp;gt;7F&lt;br /&gt;
| JASSeqParser::parseNoteOn&lt;br /&gt;
| {OpCode[1]} {Voice[1]} {Velocity[1]} {Wait[n]}&amp;lt;br /&amp;gt;OpCode: one byte with range 0x00 through 0x7F. 0x00 = C-1, 0x3C = C4 (middle C), 0x7F = G9.&amp;lt;br /&amp;gt;Voice: one byte with range 0x01 through 0x07 (needs testing/verification). Each Voice can only hold one Note.&amp;lt;br /&amp;gt;Velocity: one byte with range 0x00 through 0x7F. 0x00 = 0, 0x7F = 127.&amp;lt;br /&amp;gt;Wait: variable length, only present for Midi Gate notes (Voice is not 1 - 7).&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;If the Voice is not 1 - 7, the game will treat this note as a Midi Gate note, and will expect that the Wait value is present. The Wait value is one or more bytes with range 0x00 through 0xFF; each time the byte is 0x80 or greater (i.e. bit 7 = 1), another following byte will be taken into account. If the Wait value is 0x00, the game waits until the note has finished; otherwise, it waits the number of ticks specified in the Wait value.&lt;br /&gt;
| 64 02 68&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;64: Key E4&amp;lt;br /&amp;gt;02: Voice 2&amp;lt;br /&amp;gt;68: Velocity 104&lt;br /&gt;
| Starts playing a Note with the previously defined Instrument (see E1, E2 and E3).&lt;br /&gt;
|-&lt;br /&gt;
| 80&lt;br /&gt;
| JASSeqParser::cmdWaitByte&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Seems to do nothing based on the code.&lt;br /&gt;
|-&lt;br /&gt;
| 81&amp;lt;br /&amp;gt;...&amp;lt;br /&amp;gt;87&lt;br /&gt;
| JASSeqParser::parseNoteOff&lt;br /&gt;
| {OpCode[1]}&amp;lt;br /&amp;gt;OpCode: one byte with range 0x81 through 0x87. 0x81 = Close Voice 1, 0x87 = Close Voice 7.&lt;br /&gt;
| 81: Stop voice ID 1&lt;br /&gt;
| Stops playing a Note.&lt;br /&gt;
|-&lt;br /&gt;
| 88&amp;lt;br /&amp;gt;...&amp;lt;br /&amp;gt;8F&lt;br /&gt;
| Unknown&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 90&amp;lt;br /&amp;gt;...&amp;lt;br /&amp;gt;9F&lt;br /&gt;
| JASSeqParser::parseRegCommand&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {RegBits[1]} {TargetOpCode[1]} {TargetParams[n]}&amp;lt;br/&amp;gt;Triggers TargetOpCode while replacing some of its fixed parameters with register value lookups.&amp;lt;br/&amp;gt;Taking the lowest 3 bits of OpCode and adding 1 defines how many parameters TargetOpCode has (90 = 1 parameter, 91 = 2 parameters, ..., 97 = 8 parameters, 98 = 1 parameter, 99 = 2 parameters, ..., 9F = 8 parameters). For each parameter, if the corresponding bit in RegBits is set, the parameter type is changed to a register read. (For example, if RegBits = 5 = 0b00000101, the first and the third parameter are changed to register reads.) Finally, TargetOpCode is performed with TargetParams.&amp;lt;br/&amp;gt;TargetOpCode must be at least A0.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A0&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A1&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A2&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A3&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A4&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A5&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A6&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A7&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A8&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A9&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| AA&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| AB&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| AC&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| AD&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| AE&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| AF&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B0&lt;br /&gt;
| Extended Opcode Indicator&lt;br /&gt;
| See B000 or B001.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B1&lt;br /&gt;
| JASSeqParser::cmdNoteOn&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B2&lt;br /&gt;
| JASSeqParser::cmdNoteOff&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B3&lt;br /&gt;
| JASSeqParser::cmdNote&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B4&lt;br /&gt;
| JASSeqParser::cmdSetLastNote&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B5&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B6&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B7&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B8&lt;br /&gt;
| JASSeqParser::cmdParamE&lt;br /&gt;
| {OpCode[1]} {Target[1]} {Parameter[1]}&amp;lt;br/&amp;gt;OpCode: one byte, B8.&amp;lt;br/&amp;gt;Target: one byte with range 0x00 through 0x03.&amp;lt;br/&amp;gt;Parameter: one byte with range 0x00 through 0xFF (Int8), whichs purpose depends on the target:&lt;br /&gt;
* Target 0: Volume. 0x7F = Full volume (100%), 0x00 = Silent (0%). 0x80 through 0xFF are treated the same as silence (0%).&lt;br /&gt;
* Target 1: Pitch. Adding one (0x01) or subtracting one (0xFF) increases/decreases pitch by one key, like from D#4 to E4.&lt;br /&gt;
* Target 2: Reverb. 0x7F = Strong reverb, 0x00 = no reverb. 0x80 through 0xFF are treated the same as no reverb.&lt;br /&gt;
* Target 3: Panning. 0x7F = right channel, 0x00 = center, 0x80 = left channel.&lt;br /&gt;
| B8 00 64&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;B8: OpCode&amp;lt;br/&amp;gt;00: Target (Volume)&amp;lt;br/&amp;gt;64: ~78% volume&lt;br /&gt;
| Allows different operations onto the music track&lt;br /&gt;
|-&lt;br /&gt;
| B9&lt;br /&gt;
| JASSeqParser::cmdParamI&lt;br /&gt;
| {OpCode[1]} {Target[1]} {Parameter[2]}&amp;lt;br/&amp;gt;OpCode: one byte, B9.&amp;lt;br/&amp;gt;Target: one byte with range 0x00 through 0x03.&amp;lt;br/&amp;gt;Parameter: two bytes with range 0x0000 through 0xFFFF (Int16), whichs purpose depends on the target:&lt;br /&gt;
* Target 0: Volume. 0x7FFF = Full volume (100%), 0x0000 = Silent (0%). 0x8000 through 0xFFFF are treated the same as silence (0%).&lt;br /&gt;
* Target 1: Pitch. Adding one (0x0100) or subtracting one (0xFF00) increases/decreases pitch by one key, like from D#4 to E4. Values inbetween can be used for fine-tuning.&lt;br /&gt;
* Target 2: Reverb. 0x7FFF = Strong reverb, 0x0000 = no reverb. 0x8000 through 0xFFFF are treated the same as no reverb.&lt;br /&gt;
* Target 3: Panning. 0x7FFF = right channel, 0x0000 = center, 0x8000 = left channel.&lt;br /&gt;
| B9 01 04 00&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;B9: OpCode&amp;lt;br/&amp;gt;01: Target (Pitch)&amp;lt;br/&amp;gt;04 00: Pitch of 4 keys&lt;br /&gt;
| Allows different operations with higher precision onto the music track&lt;br /&gt;
|-&lt;br /&gt;
| BA&lt;br /&gt;
| JASSeqParser::cmdParamEI&lt;br /&gt;
| {OpCode[1]} {Target[1]} {Parameter[1]} {Fade time[2]}&amp;lt;br/&amp;gt;OpCode: one byte, BA.&amp;lt;br/&amp;gt;Target: one byte with range 0x00 through 0x03.&amp;lt;br/&amp;gt;Parameter: one byte with range 0x00 through 0xFF (Int8), whichs purpose depends on the target:&lt;br /&gt;
* Target 0: Volume. 0x7F = Full volume (100%), 0x00 = Silent (0%). 0x80 through 0xFF are treated the same as silence (0%).&lt;br /&gt;
* Target 1: Pitch. Adding one (0x01) or subtracting one (0xFF) increases/decreases pitch by one key, like from D#4 to E4.&lt;br /&gt;
* Target 2: Reverb. 0x7F = Strong reverb, 0x00 = no reverb. 0x80 through 0xFF are treated the same as no reverb.&lt;br /&gt;
* Target 3: Panning. 0x7F = right channel, 0x00 = center, 0x80 = left channel.&lt;br /&gt;
Fade time: two bytes with range 0x0000 through 0xFFFF. The amount of time in ticks until the Parameter value is met.&lt;br /&gt;
| BA 02 22 01 68&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;BA: OpCode&amp;lt;br/&amp;gt;02: Target (Reverb)&amp;lt;br/&amp;gt;22: Reverb of strength 34&amp;lt;br/&amp;gt;01 68: 360 Ticks&lt;br /&gt;
| Allows different operations with fade time onto the music track&lt;br /&gt;
|-&lt;br /&gt;
| BB&lt;br /&gt;
| JASSeqParser::cmdParamII&lt;br /&gt;
| {OpCode[1]} {Target[1]} {Parameter[2]} {Fade time[2]}&amp;lt;br/&amp;gt;OpCode: one byte, BB.&amp;lt;br/&amp;gt;Target: one byte with range 0x00 through 0x03.&amp;lt;br/&amp;gt;Parameter: two bytes with range 0x0000 through 0xFFFF (Int16), whichs purpose depends on the target:&lt;br /&gt;
* Target 0: Volume. 0x7FFF = Full volume (100%), 0x0000 = Silent (0%). 0x8000 through 0xFFFF are treated the same as silence (0%).&lt;br /&gt;
* Target 1: Pitch. Adding one (0x0100) or subtracting one (0xFF00) increases/decreases pitch by one key, like from D#4 to E4. Values inbetween can be used for fine-tuning.&lt;br /&gt;
* Target 2: Reverb. 0x7FFF = Strong reverb, 0x0000 = no reverb. 0x8000 through 0xFFFF are treated the same as no reverb.&lt;br /&gt;
* Target 3: Panning. 0x7FFF = right channel, 0x0000 = center, 0x8000 = left channel.&lt;br /&gt;
Fade time: two bytes with range 0x0000 through 0xFFFF. The amount of time in ticks until the Parameter value is met.&lt;br /&gt;
| BA 03 7F FF 02 00&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;BB: OpCode&amp;lt;br/&amp;gt;03: Target (Panning)&amp;lt;br/&amp;gt;7F FF: Panned to right channel&amp;lt;br/&amp;gt;02 00: 512 Ticks&lt;br /&gt;
| Allows different operations with higher precision and fade time onto the music track&lt;br /&gt;
|-&lt;br /&gt;
| BC&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| BD&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| BE&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| BF&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| C0&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| C1&lt;br /&gt;
| JASSeqParser::cmdOpenTrack&lt;br /&gt;
| {OpCode[1]} {ChannelNumber[1]} {TrackPointer[3]}&amp;lt;br /&amp;gt;OpCode: one byte, C1.&amp;lt;br /&amp;gt;ChannelNumber: one byte with range 0x00 through 0x0F. 0x00 = Channel 0, 0x0F = Channel 15.&amp;lt;br /&amp;gt;TrackPointer: three bytes with range 0x000000 through 0xFFFFFF. Defines a start offset in the file to play.&lt;br /&gt;
| C1 04 05 B4 73&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;C1: OpCode&amp;lt;br /&amp;gt;04: Channel 4&amp;lt;br /&amp;gt;05 B4 73: Offset to track&lt;br /&gt;
| Starts playing a certain track on a certain channel. Channel 15 is usually reserved for Yoshi Drums. [[SMR.szs#BGM_parameters|If enabled in the BGM parameter table in SMR.szs]], channel 0 can be used for timing and chords usage that do not play any instruments from the sound bank.&lt;br /&gt;
|-&lt;br /&gt;
| C2&lt;br /&gt;
| JASSeqParser::cmdCloseTrack&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| C3&lt;br /&gt;
| JASSeqParser::cmdCall&lt;br /&gt;
| {OpCode[1]} {Pointer[3]}&amp;lt;br /&amp;gt;OpCode: one byte, C3.&amp;lt;br /&amp;gt;Pointer: three bytes with range 0x000000 through 0xFFFFFF. Defines an offset in the file.&lt;br /&gt;
| C3 00 00 40&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;C3: OpCode&amp;lt;br /&amp;gt;00 00 40: Offset&lt;br /&gt;
| Redirects execution to the defined offset. Execution can return with C5.&lt;br /&gt;
|-&lt;br /&gt;
| C4&lt;br /&gt;
| JASSeqParser::cmdCallF&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| C5&lt;br /&gt;
| JASSeqParser::cmdRet&lt;br /&gt;
| {OpCode[1]}&amp;lt;br /&amp;gt;OpCode: one byte, C5.&lt;br /&gt;
| &lt;br /&gt;
| Returns redirected execution (like from C3) to the initial call.&lt;br /&gt;
|-&lt;br /&gt;
| C6&lt;br /&gt;
| JASSeqParser::cmdRetF&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| C7&lt;br /&gt;
| JASSeqParser::cmdJmp&lt;br /&gt;
| {OpCode[1]} {Pointer[3]}&amp;lt;br /&amp;gt;OpCode: one byte, C7.&amp;lt;br /&amp;gt;Pointer: three bytes with range 0x000000 through 0xFFFFFF. Defines an offset in the file.&lt;br /&gt;
| C7 08 02 34&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;C7: OpCode&amp;lt;br /&amp;gt;08 02 34: Offset&lt;br /&gt;
| Redirects execution to the defined offset, used for Loops.&lt;br /&gt;
|-&lt;br /&gt;
| C8&lt;br /&gt;
| JASSeqParser::cmdJmpF&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| C9&lt;br /&gt;
| JASSeqParser::cmdJmpTable&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CA&lt;br /&gt;
| JASSeqParser::cmdCallTable&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CB&lt;br /&gt;
| JASSeqParser::cmdLoopS&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CC&lt;br /&gt;
| JASSeqParser::cmdLoopE&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CD&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CE&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CF&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D0&lt;br /&gt;
| JASSeqParser::cmdReadPort&lt;br /&gt;
| {OpCode[1]} {Source[1]} {Destination[1]}&lt;br /&gt;
Opcode: One byte, D0&lt;br /&gt;
Source: One byte, 0-15 , source port &lt;br /&gt;
Destination: One byte, 0-32, destination register&lt;br /&gt;
| &lt;br /&gt;
| Imports the value from sequence port Source and writes it to destination register &#039;Destination&#039;, the value is also written to register 3&lt;br /&gt;
|-&lt;br /&gt;
| D1&lt;br /&gt;
| JASSeqParser::cmdWritePort&lt;br /&gt;
| {OpCode[1]} {Source[1]} {Destination[1]}&lt;br /&gt;
Opcode: One byte, D1&lt;br /&gt;
Source: One byte, source register, 0-32&lt;br /&gt;
Destination: One Byte, destination port, 0-15&lt;br /&gt;
| &lt;br /&gt;
| Writes the value in register &#039;Source&#039; and saves it to register 3, as well as port &#039;Destination&#039;&lt;br /&gt;
|-&lt;br /&gt;
| D2&lt;br /&gt;
| JASSeqParser::cmdCheckPortImport&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D3&lt;br /&gt;
| JASSeqParser::cmdCheckPortExport&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D4&lt;br /&gt;
| JASSeqParser::cmdParentWritePort&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {Port[1]} {Register[1]}&amp;lt;br/&amp;gt;Reads the value from this track&#039;s Register (0-32) and writes it to the parent track&#039;s Port (0-15).&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D5&lt;br /&gt;
| JASSeqParser::cmdChildWritePort&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {ChildAndPort[1]} {Register[1]}&amp;lt;br/&amp;gt;Reads the value from this track&#039;s Register (0-32) and writes it to the child track&#039;s port given by ChildAndPort. The top 4 bits of ChildAndPort (0-15) represent the number of the child track, the bottom 4 bits (0-15) the port.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D6&lt;br /&gt;
| JASSeqParser::cmdParentReadPort&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {Port[1]} {Register[1]}&amp;lt;br/&amp;gt;Reads the value from the parent track&#039;s Port (0-15) and writes it to this track&#039;s Register (0-32).&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D7&lt;br /&gt;
| JASSeqParser::cmdChildReadPort&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {ChildAndPort[1]} {Register[1]}&amp;lt;br/&amp;gt;Reads the value from the child track&#039;s port given by ChildAndPort and writes it to this track&#039;s Register. The top 4 bits of ChildAndPort (0-15) represent the number of the child track, the bottom 4 bits (0-15) the port.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D8&lt;br /&gt;
| JASSeqParser::cmdRegLoad&lt;br /&gt;
| {OpCode[1]} {Setting[1]} {Unknown[1]} {Variable[1]}&amp;lt;br /&amp;gt;OpCode: one byte, D8.&amp;lt;br /&amp;gt;Setting: one byte with unknown range. Different bytes will trigger different effects:&amp;lt;br /&amp;gt;- 0x62: set PPQN (seen in BMS)&amp;lt;br /&amp;gt;- 0x6B: set PPQN (seen in SC)&amp;lt;br /&amp;gt;Unknown: one byte with unknown range and purpose.&amp;lt;br /&amp;gt;Variable: one byte with different range and purpose depending on the Setting byte.&lt;br /&gt;
| D8 62 00 78&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;D8: OpCode&amp;lt;br /&amp;gt;62: set PPQN&amp;lt;br /&amp;gt;00: Unknown&amp;lt;br /&amp;gt;78: PPQN 120&lt;br /&gt;
| Different purposes.&lt;br /&gt;
|-&lt;br /&gt;
| D9&lt;br /&gt;
| JASSeqParser::cmdReg&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {RegOp[1]} {Register[1]} {Value[2]}&amp;lt;br/&amp;gt;Reads a value from Register (0-32), performs RegOp with Value on it, then stores the result into Register. Values for RegOp are:&amp;lt;br/&amp;gt;- 0: do nothing&amp;lt;br/&amp;gt;- 1: Read(Register) + Value&amp;lt;br/&amp;gt;- 2: Read(Register) - Value&amp;lt;br/&amp;gt;- 3: Read(Register) - Value, but store result into register 3 instead of Register&amp;lt;br/&amp;gt;- 4: Read(Register) × Value, but store result into register 33 instead of Register&amp;lt;br/&amp;gt;- 5: Read(Register) AND Value (bitwise)&amp;lt;br/&amp;gt;- 6: Read(Register) OR Value (bitwise)&amp;lt;br/&amp;gt;- 7: Read(Register) XOR Value (bitwise)&amp;lt;br/&amp;gt;- 8: a random number 0 &amp;amp;leq; n &amp;amp;lt; Value&amp;lt;br/&amp;gt;- 9: Read(Register) SHL Value (bitshift left)&amp;lt;br/&amp;gt;- 10: Read(Register) SHR Value (bitshift right)&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DA&lt;br /&gt;
| JASSeqParser::cmdReg&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {RegOp[1]} {Register[1]} {OtherRegister[1]}&amp;lt;br/&amp;gt;Performs the same operation as D9, except the value to the operation is not specified directly, but read from OtherRegister (0-32).&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DB&lt;br /&gt;
| JASSeqParser::cmdRegUni&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DC&lt;br /&gt;
| JASSeqParser::cmdRegTblLoad&lt;br /&gt;
| {OpCode[1]} {AccessMode[1]} {Destination[1]} {Offset[3]} {Index[1]}&lt;br /&gt;
OpCode: One Byte, 0xDC &lt;br /&gt;
AccessMode: Determines how the sequence accesses the table. &lt;br /&gt;
Destination: 24-bit offset of table&lt;br /&gt;
Index: Register target index into table&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DD&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DE&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DF&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| E0&lt;br /&gt;
| JASSeqParser::cmdTempo&lt;br /&gt;
| {OpCode[1]} {Unknown[1]} {BPM[1]}&amp;lt;br /&amp;gt;OpCode: one byte, E0.&amp;lt;br /&amp;gt;Unknown: one byte with unknown range and purpose.&amp;lt;br /&amp;gt;BPM: one byte with range 0x00 through 0xFF. 0x78 = 120, F0 = 240.&lt;br /&gt;
| E0 00 90&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;E0: OpCode&amp;lt;br /&amp;gt;00: Unknown&amp;lt;br /&amp;gt;90: BPM 144&lt;br /&gt;
| Defines the tempo (playback speed) of the BMS file.&lt;br /&gt;
|-&lt;br /&gt;
| E1&lt;br /&gt;
| JASSeqParser::cmdBankPrg&lt;br /&gt;
| {OpCode[1]} {Bank[1]} {Program[1]}&amp;lt;br /&amp;gt;OpCode: one byte, E1.&amp;lt;br /&amp;gt;Bank: one byte with range 0x00 through 0xFF. This byte represents a WSYS ID.&amp;lt;br /&amp;gt;Program: one byte ranging from 0x00 through 0xFF. This byte represents a LIST entry in the IBNK belonging to the defined WSYS ID.&lt;br /&gt;
| E1 01 0F&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;E1: OpCode&amp;lt;br /&amp;gt;01: WSYS ID 1&amp;lt;br /&amp;gt;0F: IBNK LIST entry 15&amp;lt;br /&amp;gt;(01 0F is the percussion set for Yoshi Drums)&lt;br /&gt;
| Defines/changes patch and bank to be played on the target channel. A combination of E2 and E3.&lt;br /&gt;
|-&lt;br /&gt;
| E2&lt;br /&gt;
| JASSeqParser::cmdBank&lt;br /&gt;
| {OpCode[1]} {Bank[1]}&amp;lt;br /&amp;gt;OpCode: one byte, E2.&amp;lt;br /&amp;gt;Bank: one byte with range 0x00 through 0xFF. This byte represents a WSYS ID.&lt;br /&gt;
| E2 53&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;E2: OpCode&amp;lt;br /&amp;gt;53: WSYS ID 83&amp;lt;br /&amp;gt;(This bank holds sounds for Megahammer)&lt;br /&gt;
| Defines/changes the WSYS/IBNK (bank) whose sounds are to be used in a channel.&amp;lt;/br&amp;gt;&lt;br /&gt;
Timing Channel: If the track is on a channel for timing and chord usage, this command instead defines the ID of the note scale to be used from the [[CIT (File Format)|CIT]].&lt;br /&gt;
|-&lt;br /&gt;
| E3&lt;br /&gt;
| JASSeqParser::cmdPrg&lt;br /&gt;
| {OpCode[1]} {Program[1]}&amp;lt;br /&amp;gt;OpCode: one byte, E3.&amp;lt;br /&amp;gt;Program: one byte with range 0x00 through 0xFF. This byte represents a LIST entry in the [[IBNK]] belonging to the defined WSYS ID.&lt;br /&gt;
| E3 0B&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;E3: OpCode&amp;lt;br /&amp;gt;0B: IBNK LIST entry 11&amp;lt;br /&amp;gt;(In relation to Megahammer, this Program holds movement related sounds)&lt;br /&gt;
| Defines the Instrument Patch / Keyboard of an [[IBNK]] (bank). If no E2 Bank Select Command was used before, it will default to Bank 0.&amp;lt;/br&amp;gt;&lt;br /&gt;
Timing Channel: If the track is on a channel for timing and chord usage, this command instead defines the ID of the chord to be used from the [[CIT (File Format)|CIT]].&lt;br /&gt;
|-&lt;br /&gt;
| E4&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| E5&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| E6&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| E7&lt;br /&gt;
| JASSeqParser::cmdEnvScaleSet&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| E8&lt;br /&gt;
| JASSeqParser::cmdEnvSet&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| E9&lt;br /&gt;
| JASSeqParser::cmdSimpleADSR&lt;br /&gt;
| {OpCode[1]} {Attack[2]} {Sustain[2]} {Decay[2]} {Amplitude[2]} {Release[2]}&amp;lt;br/&amp;gt;OpCode: one byte, E9.&amp;lt;br/&amp;gt;Attack: two bytes with range 0x0000 through 0x7FFF. Define the duration of fade-in in ticks.&amp;lt;br/&amp;gt;Sustain: two bytes with range 0x0000 through 0x7FFF. Define the duration for how long the wave is kept at maximum amplitude in ticks.&amp;lt;br/&amp;gt;Decay: two bytes with range 0x0000 through 0x7FFF. Define the duration of fade between maximum and controlled amplitude in ticks.&amp;lt;br/&amp;gt;Amplitude: two bytes with range 0x0000 through 0x7FFF. Define the volume of the wave for the 2nd sustain duration.&amp;lt;br/&amp;gt;Release: two bytes with range 0x0000 through 0x7FFF. Define the duration of fade-out in ticks.&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;If Amplitude is set to 0x7FFF, Sustain and Decay won&#039;t have an audible effect to the wave.&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;The Attack, Decay and Release operations affect the volume of the wave linearly.&lt;br /&gt;
| E9 00 80 01 00 00 80 5F FF 00 3C&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;E9: OpCode&amp;lt;br/&amp;gt;00 80: Attack (fade-in) for 128 ticks&amp;lt;br/&amp;gt;01 00: Sustain for 256 ticks&amp;lt;br/&amp;gt;00 80: Decay for 128 ticks&amp;lt;br/&amp;gt;5F FF: Amplitude of 75% compared to maximum&amp;lt;br/&amp;gt;00 3C: Release (fade-out) for 60 ticks&lt;br /&gt;
| Perform ADSR operations on a key. Must be placed before the actual key presses. [https://cdn.discordapp.com/attachments/1361554635369873490/1376201837237239899/image.png?ex=68347756&amp;amp;is=683325d6&amp;amp;hm=10661c473bb1ecb6187a17baafbc22c7d8af0a59cb0ceb87d7c85f42a8fee54c See this image for a visual representation of the ADSR operations].&lt;br /&gt;
|-&lt;br /&gt;
| EA&lt;br /&gt;
| JASSeqParser::cmdBusConnect&lt;br /&gt;
| {OpCode[1]} {Unknown[1]} {Unknown[1]} {Unknown[1]}&amp;lt;br /&amp;gt;OpCode: one byte, EA.&amp;lt;br /&amp;gt;Unknown: one byte with unknown range and purpose.&lt;br /&gt;
| EA 00 FF FF&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;EA: OpCode&amp;lt;br /&amp;gt;00: Unknown&amp;lt;br /&amp;gt;FF: Unknown&amp;lt;br /&amp;gt;FF: Unknown&lt;br /&gt;
| Unknown purpose, only seen in SC.&lt;br /&gt;
|-&lt;br /&gt;
| EB&lt;br /&gt;
| JASSeqParser::cmdIIRCutOff&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {Cutoff[1]}&amp;lt;br/&amp;gt;Sets the track&#039;s IIR filter parameters to values derived from the Cutoff value via a lookup table.&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;Cutoff: one byte in the range 0-127. The IIR filter parameters are derived from this value.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| EC&lt;br /&gt;
| JASSeqParser::cmdIIRSet&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {Param1[2]} {Param2[2]} {Param3[2]} {Param4[2]}&amp;lt;br/&amp;gt;Sets the track&#039;s IIR filter parameters to the four parameter values, which are interpreted as signed 16-bit integers.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| ED&lt;br /&gt;
| JASSeqParser::cmdFIRSet&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {Pointer[3]}&amp;lt;br/&amp;gt;Reads a FIR parameter table (8 two-byte signed integer values = 16 bytes) at the given Pointer and sets the track&#039;s FIR filter parameters to these values.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| EE&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| EF&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F0&lt;br /&gt;
| JASSeqParser::cmdWait&lt;br /&gt;
| {OpCode[1]} {WaitTime[n]}&amp;lt;br /&amp;gt;OpCode: one byte, 0xF0.&amp;lt;br /&amp;gt;WaitTime: one or more bytes with range 0x00 through 0xFF. If the leading byte is 0x80 (bit 7 = 1) or greater, another following byte will be taken into account. Time is measured in ticks here.&lt;br /&gt;
| F0 60 (96 Ticks)&amp;lt;br /&amp;gt;F0 81 56 (214 Ticks)&amp;lt;br /&amp;gt;F0 83 81 30 (49328 Ticks)&lt;br /&gt;
| Creates a delay, used to define the length of a Note or gap between Notes.&lt;br /&gt;
|-&lt;br /&gt;
| F1&lt;br /&gt;
| JASSeqParser::cmdWaitByte&lt;br /&gt;
| {OpCode[1]} {WaitTime[1]}&lt;br /&gt;
Waits for WaitTime ticks&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F2&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F3&lt;br /&gt;
| JASSeqParser::cmdSetIntTable&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F4&lt;br /&gt;
| JASSeqParser::cmdSetInterrupt&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F5&lt;br /&gt;
| JASSeqParser::cmdDisInterrupt&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F6&lt;br /&gt;
| JASSeqParser::cmdRetI&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F7&lt;br /&gt;
| JASSeqParser::cmdClrI&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F8&lt;br /&gt;
| JASSeqParser::cmdIntTimer&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F9&lt;br /&gt;
| JASSeqParser::cmdSyncCPU&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| FA&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| FB&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| FC&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| FD&lt;br /&gt;
| JASSeqParser::cmdPrintf&lt;br /&gt;
| {OpCode[1]} {Message[n]} {NullTerminator[1]}&amp;lt;br /&amp;gt;OpCode: one byte, FD.&amp;lt;br /&amp;gt;Message: ASCII string of undefined length, ending with &amp;lt;code&amp;gt;\n&amp;lt;/code&amp;gt;.&amp;lt;br /&amp;gt;NullTerminator: one byte, 00.&lt;br /&gt;
| FD 48 65 6C 6C 6F 5C 6E 00&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;FD: OpCode&amp;lt;br /&amp;gt;48 65 6C 6C 6F 5C 6E: &amp;quot;Hello\n&amp;quot;&amp;lt;br /&amp;gt;00: Null-terminator&lt;br /&gt;
| Prints a specified message to OSReport.&lt;br /&gt;
|-&lt;br /&gt;
| FE&lt;br /&gt;
| JASSeqParser::cmdNop&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| FF&lt;br /&gt;
| JASSeqParser::cmdFinish&lt;br /&gt;
| {OpCode[1]}&amp;lt;br /&amp;gt;OpCode: one byte, 0xFF.&lt;br /&gt;
| &lt;br /&gt;
| Stops execution of a Track.&lt;br /&gt;
|-&lt;br /&gt;
| B000&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B001&lt;br /&gt;
| JASSeqParser::cmdDump&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Trivia ==&lt;br /&gt;
* Many BMS filenames contain the suffix &#039;&#039;midi_cnv&#039;&#039;. This could indicate that Midis were first converted to a (perhaps text-based) CNV file, which was then converted to the BMS format. A similar situation applies to Nintendo&#039;s SDK tool for converting the Nintendo DS&#039;s SSEQ sequence format, which first converts Midis to a text-based SMFT format, which is then converted to the final SSEQ format.&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
[https://github.com/magcius/vgmtrans VGMTrans Fork] (analyses and converts BMS to MIDI)&amp;lt;br&amp;gt;&lt;br /&gt;
[https://cdn.discordapp.com/attachments/421356154795458570/1291660143758413824/BMS_DEC.zip?ex=6719f440&amp;amp;is=6718a2c0&amp;amp;hm=f44c5197a070f30a00283858942f9e4ae5066034862eba006f8abe87a228a6aa&amp;amp; BMS_DEC] (converts BMS to MIDI)&amp;lt;br&amp;gt;&lt;br /&gt;
[https://github.com/XAYRGA/JaiSeqX JaiSeqX] (playback for JAudio1 and JAudio2 BMS files)&lt;/div&gt;</summary>
		<author><name>RavuAlHemio</name></author>
	</entry>
	<entry>
		<id>https://www.lumasworkshop.com/w/index.php?title=BMS_(File_Format)&amp;diff=1049</id>
		<title>BMS (File Format)</title>
		<link rel="alternate" type="text/html" href="https://www.lumasworkshop.com/w/index.php?title=BMS_(File_Format)&amp;diff=1049"/>
		<updated>2026-07-05T14:52:43Z</updated>

		<summary type="html">&lt;p&gt;RavuAlHemio: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:File formats]]&lt;br /&gt;
== File Format ==&lt;br /&gt;
BMS files are &#039;&#039;&#039;B&#039;&#039;&#039;inary &#039;&#039;&#039;M&#039;&#039;&#039;usic &#039;&#039;&#039;S&#039;&#039;&#039;equences that store commands for the audio engine to play notes, similar to the MIDI file format.&lt;br /&gt;
&lt;br /&gt;
== Structure ==&lt;br /&gt;
BMS consists of pure assembly code, where each track containing events such as notes, patch changes, etc. is an independent executor thread with opcodes to execute. &lt;br /&gt;
In contrast to Midi, events are read linearly per channel in a data stream and interpreted byte by byte. This means that multiple tracks within the same channel cannot be played back synchronously and would therefore have to be baked onto one track. However, BMS tracks can jump or call to different places in the file, e.g. to loop the song or to ensure a very high storage efficiency.&lt;br /&gt;
&lt;br /&gt;
The game&#039;s audio engine can only play up to 16 tracks at a time - very similar to MIDI with its 16 channels.&lt;br /&gt;
&lt;br /&gt;
BMS also includes extended MIDI operations, such as more powerful versions of controllers, with fade-in capability, and higher resolution control values. However, no song in either Galaxy game makes use of this.&lt;br /&gt;
&lt;br /&gt;
=== Filestructure ===&lt;br /&gt;
There are no headers or filesize checks. The file usually starts with the following:&lt;br /&gt;
*&#039;&#039;&#039;Global Track / Tempo Track&#039;&#039;&#039; BMS always starts (very similary to Midi&#039;s &amp;quot;Tempo Track&amp;quot; or &amp;quot;Conductor Track&amp;quot;) directly with track containing Meta-Events, which only contains global control data, typically:&lt;br /&gt;
**Pulses per Quarter Note (PPQN) set&lt;br /&gt;
**Tempo (BPM)&lt;br /&gt;
**Looping commands (to keep BPM changes synchronized during the song if necessary)&lt;br /&gt;
**OpenTrack command that starts playing the following track&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Channel Specific Track&#039;&#039;&#039;  a kind of management track for channel/Main Track definitions&lt;br /&gt;
**Usally contains &#039;&#039;&#039;C1&#039;&#039;&#039; OpenTrack events for each executor track (channel). For some unknown reason, the exact same looping and duration events from the global track need to be repeated here, otherwise some events such as pitchwheel will not work in the song.&lt;br /&gt;
&lt;br /&gt;
== Data ==&lt;br /&gt;
BMS files contain raw instructions for the audio engine without any headers or filesize checks. Each instruction (OpCode) stands for its own function in the engine. The following table lists all JAudio2 OpCodes that have functions in SMG2:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! OpCode&lt;br /&gt;
! Function (SMG/SMG2)&lt;br /&gt;
! Usage&lt;br /&gt;
! Example&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 00&amp;lt;br /&amp;gt;01&amp;lt;br /&amp;gt;02&amp;lt;br /&amp;gt;...&amp;lt;br /&amp;gt;7D&amp;lt;br /&amp;gt;7E&amp;lt;br /&amp;gt;7F&lt;br /&gt;
| JASSeqParser::parseNoteOn&lt;br /&gt;
| {OpCode[1]} {Voice[1]} {Velocity[1]} {Wait[n]}&amp;lt;br /&amp;gt;OpCode: one byte with range 0x00 through 0x7F. 0x00 = C-1, 0x3C = C4 (middle C), 0x7F = G9.&amp;lt;br /&amp;gt;Voice: one byte with range 0x01 through 0x07 (needs testing/verification). Each Voice can only hold one Note.&amp;lt;br /&amp;gt;Velocity: one byte with range 0x00 through 0x7F. 0x00 = 0, 0x7F = 127.&amp;lt;br /&amp;gt;Wait: variable length, only present for Midi Gate notes (Voice is not 1 - 7).&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;If the Voice is not 1 - 7, the game will treat this note as a Midi Gate note, and will expect that the Wait value is present. The Wait value is one or more bytes with range 0x00 through 0xFF; each time the byte is 0x80 or greater (i.e. bit 7 = 1), another following byte will be taken into account. If the Wait value is 0x00, the game waits until the note has finished; otherwise, it waits the number of ticks specified in the Wait value.&lt;br /&gt;
| 64 02 68&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;64: Key E4&amp;lt;br /&amp;gt;02: Voice 2&amp;lt;br /&amp;gt;68: Velocity 104&lt;br /&gt;
| Starts playing a Note with the previously defined Instrument (see E1, E2 and E3).&lt;br /&gt;
|-&lt;br /&gt;
| 80&lt;br /&gt;
| JASSeqParser::cmdWaitByte&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Seems to do nothing based on the code.&lt;br /&gt;
|-&lt;br /&gt;
| 81&amp;lt;br /&amp;gt;...&amp;lt;br /&amp;gt;87&lt;br /&gt;
| JASSeqParser::parseNoteOff&lt;br /&gt;
| {OpCode[1]}&amp;lt;br /&amp;gt;OpCode: one byte with range 0x81 through 0x87. 0x81 = Close Voice 1, 0x87 = Close Voice 7.&lt;br /&gt;
| 81: Stop voice ID 1&lt;br /&gt;
| Stops playing a Note.&lt;br /&gt;
|-&lt;br /&gt;
| 88&amp;lt;br /&amp;gt;...&amp;lt;br /&amp;gt;8F&lt;br /&gt;
| Unknown&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 90&amp;lt;br /&amp;gt;...&amp;lt;br /&amp;gt;9F&lt;br /&gt;
| JASSeqParser::parseRegCommand&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {RegBits[1]} {TargetOpCode[1]} {TargetParams[n]}&amp;lt;br/&amp;gt;Triggers TargetOpCode while replacing some of its fixed parameters with register value lookups.&amp;lt;br/&amp;gt;OpCode selects how many parameters TargetOpCode has (90 = 1 parameter, 91 = 2 parameters, ..., 9F = 16 parameters). For each parameter, if the corresponding bit in RegBits is set, the parameter type is changed to a register read. (For example, if RegBits = 5 = 0b00000101, the first and the third parameter are changed to register reads.) Finally, TargetOpCode is performed with TargetParams.&amp;lt;br/&amp;gt;TargetOpCode must be at least A0.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A0&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A1&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A2&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A3&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A4&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A5&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A6&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A7&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A8&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A9&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| AA&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| AB&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| AC&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| AD&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| AE&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| AF&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B0&lt;br /&gt;
| Extended Opcode Indicator&lt;br /&gt;
| See B000 or B001.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B1&lt;br /&gt;
| JASSeqParser::cmdNoteOn&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B2&lt;br /&gt;
| JASSeqParser::cmdNoteOff&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B3&lt;br /&gt;
| JASSeqParser::cmdNote&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B4&lt;br /&gt;
| JASSeqParser::cmdSetLastNote&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B5&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B6&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B7&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B8&lt;br /&gt;
| JASSeqParser::cmdParamE&lt;br /&gt;
| {OpCode[1]} {Target[1]} {Parameter[1]}&amp;lt;br/&amp;gt;OpCode: one byte, B8.&amp;lt;br/&amp;gt;Target: one byte with range 0x00 through 0x03.&amp;lt;br/&amp;gt;Parameter: one byte with range 0x00 through 0xFF (Int8), whichs purpose depends on the target:&lt;br /&gt;
* Target 0: Volume. 0x7F = Full volume (100%), 0x00 = Silent (0%). 0x80 through 0xFF are treated the same as silence (0%).&lt;br /&gt;
* Target 1: Pitch. Adding one (0x01) or subtracting one (0xFF) increases/decreases pitch by one key, like from D#4 to E4.&lt;br /&gt;
* Target 2: Reverb. 0x7F = Strong reverb, 0x00 = no reverb. 0x80 through 0xFF are treated the same as no reverb.&lt;br /&gt;
* Target 3: Panning. 0x7F = right channel, 0x00 = center, 0x80 = left channel.&lt;br /&gt;
| B8 00 64&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;B8: OpCode&amp;lt;br/&amp;gt;00: Target (Volume)&amp;lt;br/&amp;gt;64: ~78% volume&lt;br /&gt;
| Allows different operations onto the music track&lt;br /&gt;
|-&lt;br /&gt;
| B9&lt;br /&gt;
| JASSeqParser::cmdParamI&lt;br /&gt;
| {OpCode[1]} {Target[1]} {Parameter[2]}&amp;lt;br/&amp;gt;OpCode: one byte, B9.&amp;lt;br/&amp;gt;Target: one byte with range 0x00 through 0x03.&amp;lt;br/&amp;gt;Parameter: two bytes with range 0x0000 through 0xFFFF (Int16), whichs purpose depends on the target:&lt;br /&gt;
* Target 0: Volume. 0x7FFF = Full volume (100%), 0x0000 = Silent (0%). 0x8000 through 0xFFFF are treated the same as silence (0%).&lt;br /&gt;
* Target 1: Pitch. Adding one (0x0100) or subtracting one (0xFF00) increases/decreases pitch by one key, like from D#4 to E4. Values inbetween can be used for fine-tuning.&lt;br /&gt;
* Target 2: Reverb. 0x7FFF = Strong reverb, 0x0000 = no reverb. 0x8000 through 0xFFFF are treated the same as no reverb.&lt;br /&gt;
* Target 3: Panning. 0x7FFF = right channel, 0x0000 = center, 0x8000 = left channel.&lt;br /&gt;
| B9 01 04 00&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;B9: OpCode&amp;lt;br/&amp;gt;01: Target (Pitch)&amp;lt;br/&amp;gt;04 00: Pitch of 4 keys&lt;br /&gt;
| Allows different operations with higher precision onto the music track&lt;br /&gt;
|-&lt;br /&gt;
| BA&lt;br /&gt;
| JASSeqParser::cmdParamEI&lt;br /&gt;
| {OpCode[1]} {Target[1]} {Parameter[1]} {Fade time[2]}&amp;lt;br/&amp;gt;OpCode: one byte, BA.&amp;lt;br/&amp;gt;Target: one byte with range 0x00 through 0x03.&amp;lt;br/&amp;gt;Parameter: one byte with range 0x00 through 0xFF (Int8), whichs purpose depends on the target:&lt;br /&gt;
* Target 0: Volume. 0x7F = Full volume (100%), 0x00 = Silent (0%). 0x80 through 0xFF are treated the same as silence (0%).&lt;br /&gt;
* Target 1: Pitch. Adding one (0x01) or subtracting one (0xFF) increases/decreases pitch by one key, like from D#4 to E4.&lt;br /&gt;
* Target 2: Reverb. 0x7F = Strong reverb, 0x00 = no reverb. 0x80 through 0xFF are treated the same as no reverb.&lt;br /&gt;
* Target 3: Panning. 0x7F = right channel, 0x00 = center, 0x80 = left channel.&lt;br /&gt;
Fade time: two bytes with range 0x0000 through 0xFFFF. The amount of time in ticks until the Parameter value is met.&lt;br /&gt;
| BA 02 22 01 68&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;BA: OpCode&amp;lt;br/&amp;gt;02: Target (Reverb)&amp;lt;br/&amp;gt;22: Reverb of strength 34&amp;lt;br/&amp;gt;01 68: 360 Ticks&lt;br /&gt;
| Allows different operations with fade time onto the music track&lt;br /&gt;
|-&lt;br /&gt;
| BB&lt;br /&gt;
| JASSeqParser::cmdParamII&lt;br /&gt;
| {OpCode[1]} {Target[1]} {Parameter[2]} {Fade time[2]}&amp;lt;br/&amp;gt;OpCode: one byte, BB.&amp;lt;br/&amp;gt;Target: one byte with range 0x00 through 0x03.&amp;lt;br/&amp;gt;Parameter: two bytes with range 0x0000 through 0xFFFF (Int16), whichs purpose depends on the target:&lt;br /&gt;
* Target 0: Volume. 0x7FFF = Full volume (100%), 0x0000 = Silent (0%). 0x8000 through 0xFFFF are treated the same as silence (0%).&lt;br /&gt;
* Target 1: Pitch. Adding one (0x0100) or subtracting one (0xFF00) increases/decreases pitch by one key, like from D#4 to E4. Values inbetween can be used for fine-tuning.&lt;br /&gt;
* Target 2: Reverb. 0x7FFF = Strong reverb, 0x0000 = no reverb. 0x8000 through 0xFFFF are treated the same as no reverb.&lt;br /&gt;
* Target 3: Panning. 0x7FFF = right channel, 0x0000 = center, 0x8000 = left channel.&lt;br /&gt;
Fade time: two bytes with range 0x0000 through 0xFFFF. The amount of time in ticks until the Parameter value is met.&lt;br /&gt;
| BA 03 7F FF 02 00&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;BB: OpCode&amp;lt;br/&amp;gt;03: Target (Panning)&amp;lt;br/&amp;gt;7F FF: Panned to right channel&amp;lt;br/&amp;gt;02 00: 512 Ticks&lt;br /&gt;
| Allows different operations with higher precision and fade time onto the music track&lt;br /&gt;
|-&lt;br /&gt;
| BC&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| BD&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| BE&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| BF&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| C0&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| C1&lt;br /&gt;
| JASSeqParser::cmdOpenTrack&lt;br /&gt;
| {OpCode[1]} {ChannelNumber[1]} {TrackPointer[3]}&amp;lt;br /&amp;gt;OpCode: one byte, C1.&amp;lt;br /&amp;gt;ChannelNumber: one byte with range 0x00 through 0x0F. 0x00 = Channel 0, 0x0F = Channel 15.&amp;lt;br /&amp;gt;TrackPointer: three bytes with range 0x000000 through 0xFFFFFF. Defines a start offset in the file to play.&lt;br /&gt;
| C1 04 05 B4 73&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;C1: OpCode&amp;lt;br /&amp;gt;04: Channel 4&amp;lt;br /&amp;gt;05 B4 73: Offset to track&lt;br /&gt;
| Starts playing a certain track on a certain channel. Channel 15 is usually reserved for Yoshi Drums. [[SMR.szs#BGM_parameters|If enabled in the BGM parameter table in SMR.szs]], channel 0 can be used for timing and chords usage that do not play any instruments from the sound bank.&lt;br /&gt;
|-&lt;br /&gt;
| C2&lt;br /&gt;
| JASSeqParser::cmdCloseTrack&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| C3&lt;br /&gt;
| JASSeqParser::cmdCall&lt;br /&gt;
| {OpCode[1]} {Pointer[3]}&amp;lt;br /&amp;gt;OpCode: one byte, C3.&amp;lt;br /&amp;gt;Pointer: three bytes with range 0x000000 through 0xFFFFFF. Defines an offset in the file.&lt;br /&gt;
| C3 00 00 40&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;C3: OpCode&amp;lt;br /&amp;gt;00 00 40: Offset&lt;br /&gt;
| Redirects execution to the defined offset. Execution can return with C5.&lt;br /&gt;
|-&lt;br /&gt;
| C4&lt;br /&gt;
| JASSeqParser::cmdCallF&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| C5&lt;br /&gt;
| JASSeqParser::cmdRet&lt;br /&gt;
| {OpCode[1]}&amp;lt;br /&amp;gt;OpCode: one byte, C5.&lt;br /&gt;
| &lt;br /&gt;
| Returns redirected execution (like from C3) to the initial call.&lt;br /&gt;
|-&lt;br /&gt;
| C6&lt;br /&gt;
| JASSeqParser::cmdRetF&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| C7&lt;br /&gt;
| JASSeqParser::cmdJmp&lt;br /&gt;
| {OpCode[1]} {Pointer[3]}&amp;lt;br /&amp;gt;OpCode: one byte, C7.&amp;lt;br /&amp;gt;Pointer: three bytes with range 0x000000 through 0xFFFFFF. Defines an offset in the file.&lt;br /&gt;
| C7 08 02 34&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;C7: OpCode&amp;lt;br /&amp;gt;08 02 34: Offset&lt;br /&gt;
| Redirects execution to the defined offset, used for Loops.&lt;br /&gt;
|-&lt;br /&gt;
| C8&lt;br /&gt;
| JASSeqParser::cmdJmpF&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| C9&lt;br /&gt;
| JASSeqParser::cmdJmpTable&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CA&lt;br /&gt;
| JASSeqParser::cmdCallTable&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CB&lt;br /&gt;
| JASSeqParser::cmdLoopS&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CC&lt;br /&gt;
| JASSeqParser::cmdLoopE&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CD&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CE&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CF&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D0&lt;br /&gt;
| JASSeqParser::cmdReadPort&lt;br /&gt;
| {OpCode[1]} {Source[1]} {Destination[1]}&lt;br /&gt;
Opcode: One byte, D0&lt;br /&gt;
Source: One byte, 0-15 , source port &lt;br /&gt;
Destination: One byte, 0-32, destination register&lt;br /&gt;
| &lt;br /&gt;
| Imports the value from sequence port Source and writes it to destination register &#039;Destination&#039;, the value is also written to register 3&lt;br /&gt;
|-&lt;br /&gt;
| D1&lt;br /&gt;
| JASSeqParser::cmdWritePort&lt;br /&gt;
| {OpCode[1]} {Source[1]} {Destination[1]}&lt;br /&gt;
Opcode: One byte, D1&lt;br /&gt;
Source: One byte, source register, 0-32&lt;br /&gt;
Destination: One Byte, destination port, 0-15&lt;br /&gt;
| &lt;br /&gt;
| Writes the value in register &#039;Source&#039; and saves it to register 3, as well as port &#039;Destination&#039;&lt;br /&gt;
|-&lt;br /&gt;
| D2&lt;br /&gt;
| JASSeqParser::cmdCheckPortImport&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D3&lt;br /&gt;
| JASSeqParser::cmdCheckPortExport&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D4&lt;br /&gt;
| JASSeqParser::cmdParentWritePort&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {Port[1]} {Register[1]}&amp;lt;br/&amp;gt;Reads the value from this track&#039;s Register (0-32) and writes it to the parent track&#039;s Port (0-15).&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D5&lt;br /&gt;
| JASSeqParser::cmdChildWritePort&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {ChildAndPort[1]} {Register[1]}&amp;lt;br/&amp;gt;Reads the value from this track&#039;s Register (0-32) and writes it to the child track&#039;s port given by ChildAndPort. The top 4 bits of ChildAndPort (0-15) represent the number of the child track, the bottom 4 bits (0-15) the port.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D6&lt;br /&gt;
| JASSeqParser::cmdParentReadPort&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {Port[1]} {Register[1]}&amp;lt;br/&amp;gt;Reads the value from the parent track&#039;s Port (0-15) and writes it to this track&#039;s Register (0-32).&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D7&lt;br /&gt;
| JASSeqParser::cmdChildReadPort&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {ChildAndPort[1]} {Register[1]}&amp;lt;br/&amp;gt;Reads the value from the child track&#039;s port given by ChildAndPort and writes it to this track&#039;s Register. The top 4 bits of ChildAndPort (0-15) represent the number of the child track, the bottom 4 bits (0-15) the port.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D8&lt;br /&gt;
| JASSeqParser::cmdRegLoad&lt;br /&gt;
| {OpCode[1]} {Setting[1]} {Unknown[1]} {Variable[1]}&amp;lt;br /&amp;gt;OpCode: one byte, D8.&amp;lt;br /&amp;gt;Setting: one byte with unknown range. Different bytes will trigger different effects:&amp;lt;br /&amp;gt;- 0x62: set PPQN (seen in BMS)&amp;lt;br /&amp;gt;- 0x6B: set PPQN (seen in SC)&amp;lt;br /&amp;gt;Unknown: one byte with unknown range and purpose.&amp;lt;br /&amp;gt;Variable: one byte with different range and purpose depending on the Setting byte.&lt;br /&gt;
| D8 62 00 78&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;D8: OpCode&amp;lt;br /&amp;gt;62: set PPQN&amp;lt;br /&amp;gt;00: Unknown&amp;lt;br /&amp;gt;78: PPQN 120&lt;br /&gt;
| Different purposes.&lt;br /&gt;
|-&lt;br /&gt;
| D9&lt;br /&gt;
| JASSeqParser::cmdReg&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {RegOp[1]} {Register[1]} {Value[2]}&amp;lt;br/&amp;gt;Reads a value from Register (0-32), performs RegOp with Value on it, then stores the result into Register. Values for RegOp are:&amp;lt;br/&amp;gt;- 0: do nothing&amp;lt;br/&amp;gt;- 1: Read(Register) + Value&amp;lt;br/&amp;gt;- 2: Read(Register) - Value&amp;lt;br/&amp;gt;- 3: Read(Register) - Value, but store result into register 3 instead of Register&amp;lt;br/&amp;gt;- 4: Read(Register) × Value, but store result into register 33 instead of Register&amp;lt;br/&amp;gt;- 5: Read(Register) AND Value (bitwise)&amp;lt;br/&amp;gt;- 6: Read(Register) OR Value (bitwise)&amp;lt;br/&amp;gt;- 7: Read(Register) XOR Value (bitwise)&amp;lt;br/&amp;gt;- 8: a random number 0 &amp;amp;leq; n &amp;amp;lt; Value&amp;lt;br/&amp;gt;- 9: Read(Register) SHL Value (bitshift left)&amp;lt;br/&amp;gt;- 10: Read(Register) SHR Value (bitshift right)&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DA&lt;br /&gt;
| JASSeqParser::cmdReg&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {RegOp[1]} {Register[1]} {OtherRegister[1]}&amp;lt;br/&amp;gt;Performs the same operation as D9, except the value to the operation is not specified directly, but read from OtherRegister (0-32).&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DB&lt;br /&gt;
| JASSeqParser::cmdRegUni&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DC&lt;br /&gt;
| JASSeqParser::cmdRegTblLoad&lt;br /&gt;
| {OpCode[1]} {AccessMode[1]} {Destination[1]} {Offset[3]} {Index[1]}&lt;br /&gt;
OpCode: One Byte, 0xDC &lt;br /&gt;
AccessMode: Determines how the sequence accesses the table. &lt;br /&gt;
Destination: 24-bit offset of table&lt;br /&gt;
Index: Register target index into table&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DD&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DE&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DF&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| E0&lt;br /&gt;
| JASSeqParser::cmdTempo&lt;br /&gt;
| {OpCode[1]} {Unknown[1]} {BPM[1]}&amp;lt;br /&amp;gt;OpCode: one byte, E0.&amp;lt;br /&amp;gt;Unknown: one byte with unknown range and purpose.&amp;lt;br /&amp;gt;BPM: one byte with range 0x00 through 0xFF. 0x78 = 120, F0 = 240.&lt;br /&gt;
| E0 00 90&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;E0: OpCode&amp;lt;br /&amp;gt;00: Unknown&amp;lt;br /&amp;gt;90: BPM 144&lt;br /&gt;
| Defines the tempo (playback speed) of the BMS file.&lt;br /&gt;
|-&lt;br /&gt;
| E1&lt;br /&gt;
| JASSeqParser::cmdBankPrg&lt;br /&gt;
| {OpCode[1]} {Bank[1]} {Program[1]}&amp;lt;br /&amp;gt;OpCode: one byte, E1.&amp;lt;br /&amp;gt;Bank: one byte with range 0x00 through 0xFF. This byte represents a WSYS ID.&amp;lt;br /&amp;gt;Program: one byte ranging from 0x00 through 0xFF. This byte represents a LIST entry in the IBNK belonging to the defined WSYS ID.&lt;br /&gt;
| E1 01 0F&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;E1: OpCode&amp;lt;br /&amp;gt;01: WSYS ID 1&amp;lt;br /&amp;gt;0F: IBNK LIST entry 15&amp;lt;br /&amp;gt;(01 0F is the percussion set for Yoshi Drums)&lt;br /&gt;
| Defines/changes patch and bank to be played on the target channel. A combination of E2 and E3.&lt;br /&gt;
|-&lt;br /&gt;
| E2&lt;br /&gt;
| JASSeqParser::cmdBank&lt;br /&gt;
| {OpCode[1]} {Bank[1]}&amp;lt;br /&amp;gt;OpCode: one byte, E2.&amp;lt;br /&amp;gt;Bank: one byte with range 0x00 through 0xFF. This byte represents a WSYS ID.&lt;br /&gt;
| E2 53&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;E2: OpCode&amp;lt;br /&amp;gt;53: WSYS ID 83&amp;lt;br /&amp;gt;(This bank holds sounds for Megahammer)&lt;br /&gt;
| Defines/changes the WSYS/IBNK (bank) whose sounds are to be used in a channel.&amp;lt;/br&amp;gt;&lt;br /&gt;
Timing Channel: If the track is on a channel for timing and chord usage, this command instead defines the ID of the note scale to be used from the [[CIT (File Format)|CIT]].&lt;br /&gt;
|-&lt;br /&gt;
| E3&lt;br /&gt;
| JASSeqParser::cmdPrg&lt;br /&gt;
| {OpCode[1]} {Program[1]}&amp;lt;br /&amp;gt;OpCode: one byte, E3.&amp;lt;br /&amp;gt;Program: one byte with range 0x00 through 0xFF. This byte represents a LIST entry in the [[IBNK]] belonging to the defined WSYS ID.&lt;br /&gt;
| E3 0B&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;E3: OpCode&amp;lt;br /&amp;gt;0B: IBNK LIST entry 11&amp;lt;br /&amp;gt;(In relation to Megahammer, this Program holds movement related sounds)&lt;br /&gt;
| Defines the Instrument Patch / Keyboard of an [[IBNK]] (bank). If no E2 Bank Select Command was used before, it will default to Bank 0.&amp;lt;/br&amp;gt;&lt;br /&gt;
Timing Channel: If the track is on a channel for timing and chord usage, this command instead defines the ID of the chord to be used from the [[CIT (File Format)|CIT]].&lt;br /&gt;
|-&lt;br /&gt;
| E4&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| E5&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| E6&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| E7&lt;br /&gt;
| JASSeqParser::cmdEnvScaleSet&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| E8&lt;br /&gt;
| JASSeqParser::cmdEnvSet&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| E9&lt;br /&gt;
| JASSeqParser::cmdSimpleADSR&lt;br /&gt;
| {OpCode[1]} {Attack[2]} {Sustain[2]} {Decay[2]} {Amplitude[2]} {Release[2]}&amp;lt;br/&amp;gt;OpCode: one byte, E9.&amp;lt;br/&amp;gt;Attack: two bytes with range 0x0000 through 0x7FFF. Define the duration of fade-in in ticks.&amp;lt;br/&amp;gt;Sustain: two bytes with range 0x0000 through 0x7FFF. Define the duration for how long the wave is kept at maximum amplitude in ticks.&amp;lt;br/&amp;gt;Decay: two bytes with range 0x0000 through 0x7FFF. Define the duration of fade between maximum and controlled amplitude in ticks.&amp;lt;br/&amp;gt;Amplitude: two bytes with range 0x0000 through 0x7FFF. Define the volume of the wave for the 2nd sustain duration.&amp;lt;br/&amp;gt;Release: two bytes with range 0x0000 through 0x7FFF. Define the duration of fade-out in ticks.&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;If Amplitude is set to 0x7FFF, Sustain and Decay won&#039;t have an audible effect to the wave.&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;The Attack, Decay and Release operations affect the volume of the wave linearly.&lt;br /&gt;
| E9 00 80 01 00 00 80 5F FF 00 3C&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;E9: OpCode&amp;lt;br/&amp;gt;00 80: Attack (fade-in) for 128 ticks&amp;lt;br/&amp;gt;01 00: Sustain for 256 ticks&amp;lt;br/&amp;gt;00 80: Decay for 128 ticks&amp;lt;br/&amp;gt;5F FF: Amplitude of 75% compared to maximum&amp;lt;br/&amp;gt;00 3C: Release (fade-out) for 60 ticks&lt;br /&gt;
| Perform ADSR operations on a key. Must be placed before the actual key presses. [https://cdn.discordapp.com/attachments/1361554635369873490/1376201837237239899/image.png?ex=68347756&amp;amp;is=683325d6&amp;amp;hm=10661c473bb1ecb6187a17baafbc22c7d8af0a59cb0ceb87d7c85f42a8fee54c See this image for a visual representation of the ADSR operations].&lt;br /&gt;
|-&lt;br /&gt;
| EA&lt;br /&gt;
| JASSeqParser::cmdBusConnect&lt;br /&gt;
| {OpCode[1]} {Unknown[1]} {Unknown[1]} {Unknown[1]}&amp;lt;br /&amp;gt;OpCode: one byte, EA.&amp;lt;br /&amp;gt;Unknown: one byte with unknown range and purpose.&lt;br /&gt;
| EA 00 FF FF&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;EA: OpCode&amp;lt;br /&amp;gt;00: Unknown&amp;lt;br /&amp;gt;FF: Unknown&amp;lt;br /&amp;gt;FF: Unknown&lt;br /&gt;
| Unknown purpose, only seen in SC.&lt;br /&gt;
|-&lt;br /&gt;
| EB&lt;br /&gt;
| JASSeqParser::cmdIIRCutOff&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {Cutoff[1]}&amp;lt;br/&amp;gt;Sets the track&#039;s IIR filter parameters to values derived from the Cutoff value via a lookup table.&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;Cutoff: one byte in the range 0-127. The IIR filter parameters are derived from this value.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| EC&lt;br /&gt;
| JASSeqParser::cmdIIRSet&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {Param1[2]} {Param2[2]} {Param3[2]} {Param4[2]}&amp;lt;br/&amp;gt;Sets the track&#039;s IIR filter parameters to the four parameter values, which are interpreted as signed 16-bit integers.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| ED&lt;br /&gt;
| JASSeqParser::cmdFIRSet&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {Pointer[3]}&amp;lt;br/&amp;gt;Reads a FIR parameter table (8 two-byte signed integer values = 16 bytes) at the given Pointer and sets the track&#039;s FIR filter parameters to these values.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| EE&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| EF&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F0&lt;br /&gt;
| JASSeqParser::cmdWait&lt;br /&gt;
| {OpCode[1]} {WaitTime[n]}&amp;lt;br /&amp;gt;OpCode: one byte, 0xF0.&amp;lt;br /&amp;gt;WaitTime: one or more bytes with range 0x00 through 0xFF. If the leading byte is 0x80 (bit 7 = 1) or greater, another following byte will be taken into account. Time is measured in ticks here.&lt;br /&gt;
| F0 60 (96 Ticks)&amp;lt;br /&amp;gt;F0 81 56 (214 Ticks)&amp;lt;br /&amp;gt;F0 83 81 30 (49328 Ticks)&lt;br /&gt;
| Creates a delay, used to define the length of a Note or gap between Notes.&lt;br /&gt;
|-&lt;br /&gt;
| F1&lt;br /&gt;
| JASSeqParser::cmdWaitByte&lt;br /&gt;
| {OpCode[1]} {WaitTime[1]}&lt;br /&gt;
Waits for WaitTime ticks&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F2&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F3&lt;br /&gt;
| JASSeqParser::cmdSetIntTable&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F4&lt;br /&gt;
| JASSeqParser::cmdSetInterrupt&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F5&lt;br /&gt;
| JASSeqParser::cmdDisInterrupt&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F6&lt;br /&gt;
| JASSeqParser::cmdRetI&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F7&lt;br /&gt;
| JASSeqParser::cmdClrI&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F8&lt;br /&gt;
| JASSeqParser::cmdIntTimer&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F9&lt;br /&gt;
| JASSeqParser::cmdSyncCPU&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| FA&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| FB&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| FC&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| FD&lt;br /&gt;
| JASSeqParser::cmdPrintf&lt;br /&gt;
| {OpCode[1]} {Message[n]} {NullTerminator[1]}&amp;lt;br /&amp;gt;OpCode: one byte, FD.&amp;lt;br /&amp;gt;Message: ASCII string of undefined length, ending with &amp;lt;code&amp;gt;\n&amp;lt;/code&amp;gt;.&amp;lt;br /&amp;gt;NullTerminator: one byte, 00.&lt;br /&gt;
| FD 48 65 6C 6C 6F 5C 6E 00&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;FD: OpCode&amp;lt;br /&amp;gt;48 65 6C 6C 6F 5C 6E: &amp;quot;Hello\n&amp;quot;&amp;lt;br /&amp;gt;00: Null-terminator&lt;br /&gt;
| Prints a specified message to OSReport.&lt;br /&gt;
|-&lt;br /&gt;
| FE&lt;br /&gt;
| JASSeqParser::cmdNop&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| FF&lt;br /&gt;
| JASSeqParser::cmdFinish&lt;br /&gt;
| {OpCode[1]}&amp;lt;br /&amp;gt;OpCode: one byte, 0xFF.&lt;br /&gt;
| &lt;br /&gt;
| Stops execution of a Track.&lt;br /&gt;
|-&lt;br /&gt;
| B000&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B001&lt;br /&gt;
| JASSeqParser::cmdDump&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Trivia ==&lt;br /&gt;
* Many BMS filenames contain the suffix &#039;&#039;midi_cnv&#039;&#039;. This could indicate that Midis were first converted to a (perhaps text-based) CNV file, which was then converted to the BMS format. A similar situation applies to Nintendo&#039;s SDK tool for converting the Nintendo DS&#039;s SSEQ sequence format, which first converts Midis to a text-based SMFT format, which is then converted to the final SSEQ format.&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
[https://github.com/magcius/vgmtrans VGMTrans Fork] (analyses and converts BMS to MIDI)&amp;lt;br&amp;gt;&lt;br /&gt;
[https://cdn.discordapp.com/attachments/421356154795458570/1291660143758413824/BMS_DEC.zip?ex=6719f440&amp;amp;is=6718a2c0&amp;amp;hm=f44c5197a070f30a00283858942f9e4ae5066034862eba006f8abe87a228a6aa&amp;amp; BMS_DEC] (converts BMS to MIDI)&amp;lt;br&amp;gt;&lt;br /&gt;
[https://github.com/XAYRGA/JaiSeqX JaiSeqX] (playback for JAudio1 and JAudio2 BMS files)&lt;/div&gt;</summary>
		<author><name>RavuAlHemio</name></author>
	</entry>
	<entry>
		<id>https://www.lumasworkshop.com/w/index.php?title=BMS_(File_Format)&amp;diff=1048</id>
		<title>BMS (File Format)</title>
		<link rel="alternate" type="text/html" href="https://www.lumasworkshop.com/w/index.php?title=BMS_(File_Format)&amp;diff=1048"/>
		<updated>2026-07-05T14:45:39Z</updated>

		<summary type="html">&lt;p&gt;RavuAlHemio: document parseRegCommand&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:File formats]]&lt;br /&gt;
== File Format ==&lt;br /&gt;
BMS files are &#039;&#039;&#039;B&#039;&#039;&#039;inary &#039;&#039;&#039;M&#039;&#039;&#039;usic &#039;&#039;&#039;S&#039;&#039;&#039;equences that store commands for the audio engine to play notes, similar to the MIDI file format.&lt;br /&gt;
&lt;br /&gt;
== Structure ==&lt;br /&gt;
BMS consists of pure assembly code, where each track containing events such as notes, patch changes, etc. is an independent executor thread with opcodes to execute. &lt;br /&gt;
In contrast to Midi, events are read linearly per channel in a data stream and interpreted byte by byte. This means that multiple tracks within the same channel cannot be played back synchronously and would therefore have to be baked onto one track. However, BMS tracks can jump or call to different places in the file, e.g. to loop the song or to ensure a very high storage efficiency.&lt;br /&gt;
&lt;br /&gt;
The game&#039;s audio engine can only play up to 16 tracks at a time - very similar to MIDI with its 16 channels.&lt;br /&gt;
&lt;br /&gt;
BMS also includes extended MIDI operations, such as more powerful versions of controllers, with fade-in capability, and higher resolution control values. However, no song in either Galaxy game makes use of this.&lt;br /&gt;
&lt;br /&gt;
=== Filestructure ===&lt;br /&gt;
There are no headers or filesize checks. The file usually starts with the following:&lt;br /&gt;
*&#039;&#039;&#039;Global Track / Tempo Track&#039;&#039;&#039; BMS always starts (very similary to Midi&#039;s &amp;quot;Tempo Track&amp;quot; or &amp;quot;Conductor Track&amp;quot;) directly with track containing Meta-Events, which only contains global control data, typically:&lt;br /&gt;
**Pulses per Quarter Note (PPQN) set&lt;br /&gt;
**Tempo (BPM)&lt;br /&gt;
**Looping commands (to keep BPM changes synchronized during the song if necessary)&lt;br /&gt;
**OpenTrack command that starts playing the following track&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Channel Specific Track&#039;&#039;&#039;  a kind of management track for channel/Main Track definitions&lt;br /&gt;
**Usally contains &#039;&#039;&#039;C1&#039;&#039;&#039; OpenTrack events for each executor track (channel). For some unknown reason, the exact same looping and duration events from the global track need to be repeated here, otherwise some events such as pitchwheel will not work in the song.&lt;br /&gt;
&lt;br /&gt;
== Data ==&lt;br /&gt;
BMS files contain raw instructions for the audio engine without any headers or filesize checks. Each instruction (OpCode) stands for its own function in the engine. The following table lists all JAudio2 OpCodes that have functions in SMG2:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! OpCode&lt;br /&gt;
! Function (SMG/SMG2)&lt;br /&gt;
! Usage&lt;br /&gt;
! Example&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 00&amp;lt;br /&amp;gt;01&amp;lt;br /&amp;gt;02&amp;lt;br /&amp;gt;...&amp;lt;br /&amp;gt;7D&amp;lt;br /&amp;gt;7E&amp;lt;br /&amp;gt;7F&lt;br /&gt;
| JASSeqParser::parseNoteOn&lt;br /&gt;
| {OpCode[1]} {Voice[1]} {Velocity[1]} {Wait[n]}&amp;lt;br /&amp;gt;OpCode: one byte with range 0x00 through 0x7F. 0x00 = C-1, 0x3C = C4 (middle C), 0x7F = G9.&amp;lt;br /&amp;gt;Voice: one byte with range 0x01 through 0x07 (needs testing/verification). Each Voice can only hold one Note.&amp;lt;br /&amp;gt;Velocity: one byte with range 0x00 through 0x7F. 0x00 = 0, 0x7F = 127.&amp;lt;br /&amp;gt;Wait: variable length, only present for Midi Gate notes (Voice is not 1 - 7).&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;If the Voice is not 1 - 7, the game will treat this note as a Midi Gate note, and will expect that the Wait value is present. The Wait value is one or more bytes with range 0x00 through 0xFF; each time the byte is 0x80 or greater (i.e. bit 7 = 1), another following byte will be taken into account. If the Wait value is 0x00, the game waits until the note has finished; otherwise, it waits the number of ticks specified in the Wait value.&lt;br /&gt;
| 64 02 68&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;64: Key E4&amp;lt;br /&amp;gt;02: Voice 2&amp;lt;br /&amp;gt;68: Velocity 104&lt;br /&gt;
| Starts playing a Note with the previously defined Instrument (see E1, E2 and E3).&lt;br /&gt;
|-&lt;br /&gt;
| 80&lt;br /&gt;
| JASSeqParser::cmdWaitByte&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Seems to do nothing based on the code.&lt;br /&gt;
|-&lt;br /&gt;
| 81&amp;lt;br /&amp;gt;...&amp;lt;br /&amp;gt;87&lt;br /&gt;
| JASSeqParser::parseNoteOff&lt;br /&gt;
| {OpCode[1]}&amp;lt;br /&amp;gt;OpCode: one byte with range 0x81 through 0x87. 0x81 = Close Voice 1, 0x87 = Close Voice 7.&lt;br /&gt;
| 81: Stop voice ID 1&lt;br /&gt;
| Stops playing a Note.&lt;br /&gt;
|-&lt;br /&gt;
| 88&amp;lt;br /&amp;gt;...&amp;lt;br /&amp;gt;8F&lt;br /&gt;
| Unknown&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 90&amp;lt;br /&amp;gt;...&amp;lt;br /&amp;gt;9F&lt;br /&gt;
| JASSeqParser::parseRegCommand&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {RegBits[1]} {TargetOpCode[1]} {TargetParams[n]}&amp;lt;br/&amp;gt;Triggers TargetOpCode while replacing some of its fixed parameters with register value lookups.&amp;lt;br/&amp;gt;OpCode selects how many parameters TargetOpCode has (90 = 1 parameter, 91 = 2 parameters, ..., 9F = 16 parameters). For each parameter, if the corresponding bit in RegBits is set, the parameter type is changed to a register read. (For example, if RegBits = 5 = 0b00000101, the first and the third parameter are changed to register reads.) Finally, TargetOpCode is performed with TargetParams.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A0&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A1&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A2&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A3&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A4&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A5&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A6&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A7&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A8&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A9&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| AA&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| AB&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| AC&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| AD&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| AE&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| AF&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B0&lt;br /&gt;
| Extended Opcode Indicator&lt;br /&gt;
| See B000 or B001.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B1&lt;br /&gt;
| JASSeqParser::cmdNoteOn&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B2&lt;br /&gt;
| JASSeqParser::cmdNoteOff&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B3&lt;br /&gt;
| JASSeqParser::cmdNote&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B4&lt;br /&gt;
| JASSeqParser::cmdSetLastNote&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B5&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B6&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B7&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B8&lt;br /&gt;
| JASSeqParser::cmdParamE&lt;br /&gt;
| {OpCode[1]} {Target[1]} {Parameter[1]}&amp;lt;br/&amp;gt;OpCode: one byte, B8.&amp;lt;br/&amp;gt;Target: one byte with range 0x00 through 0x03.&amp;lt;br/&amp;gt;Parameter: one byte with range 0x00 through 0xFF (Int8), whichs purpose depends on the target:&lt;br /&gt;
* Target 0: Volume. 0x7F = Full volume (100%), 0x00 = Silent (0%). 0x80 through 0xFF are treated the same as silence (0%).&lt;br /&gt;
* Target 1: Pitch. Adding one (0x01) or subtracting one (0xFF) increases/decreases pitch by one key, like from D#4 to E4.&lt;br /&gt;
* Target 2: Reverb. 0x7F = Strong reverb, 0x00 = no reverb. 0x80 through 0xFF are treated the same as no reverb.&lt;br /&gt;
* Target 3: Panning. 0x7F = right channel, 0x00 = center, 0x80 = left channel.&lt;br /&gt;
| B8 00 64&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;B8: OpCode&amp;lt;br/&amp;gt;00: Target (Volume)&amp;lt;br/&amp;gt;64: ~78% volume&lt;br /&gt;
| Allows different operations onto the music track&lt;br /&gt;
|-&lt;br /&gt;
| B9&lt;br /&gt;
| JASSeqParser::cmdParamI&lt;br /&gt;
| {OpCode[1]} {Target[1]} {Parameter[2]}&amp;lt;br/&amp;gt;OpCode: one byte, B9.&amp;lt;br/&amp;gt;Target: one byte with range 0x00 through 0x03.&amp;lt;br/&amp;gt;Parameter: two bytes with range 0x0000 through 0xFFFF (Int16), whichs purpose depends on the target:&lt;br /&gt;
* Target 0: Volume. 0x7FFF = Full volume (100%), 0x0000 = Silent (0%). 0x8000 through 0xFFFF are treated the same as silence (0%).&lt;br /&gt;
* Target 1: Pitch. Adding one (0x0100) or subtracting one (0xFF00) increases/decreases pitch by one key, like from D#4 to E4. Values inbetween can be used for fine-tuning.&lt;br /&gt;
* Target 2: Reverb. 0x7FFF = Strong reverb, 0x0000 = no reverb. 0x8000 through 0xFFFF are treated the same as no reverb.&lt;br /&gt;
* Target 3: Panning. 0x7FFF = right channel, 0x0000 = center, 0x8000 = left channel.&lt;br /&gt;
| B9 01 04 00&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;B9: OpCode&amp;lt;br/&amp;gt;01: Target (Pitch)&amp;lt;br/&amp;gt;04 00: Pitch of 4 keys&lt;br /&gt;
| Allows different operations with higher precision onto the music track&lt;br /&gt;
|-&lt;br /&gt;
| BA&lt;br /&gt;
| JASSeqParser::cmdParamEI&lt;br /&gt;
| {OpCode[1]} {Target[1]} {Parameter[1]} {Fade time[2]}&amp;lt;br/&amp;gt;OpCode: one byte, BA.&amp;lt;br/&amp;gt;Target: one byte with range 0x00 through 0x03.&amp;lt;br/&amp;gt;Parameter: one byte with range 0x00 through 0xFF (Int8), whichs purpose depends on the target:&lt;br /&gt;
* Target 0: Volume. 0x7F = Full volume (100%), 0x00 = Silent (0%). 0x80 through 0xFF are treated the same as silence (0%).&lt;br /&gt;
* Target 1: Pitch. Adding one (0x01) or subtracting one (0xFF) increases/decreases pitch by one key, like from D#4 to E4.&lt;br /&gt;
* Target 2: Reverb. 0x7F = Strong reverb, 0x00 = no reverb. 0x80 through 0xFF are treated the same as no reverb.&lt;br /&gt;
* Target 3: Panning. 0x7F = right channel, 0x00 = center, 0x80 = left channel.&lt;br /&gt;
Fade time: two bytes with range 0x0000 through 0xFFFF. The amount of time in ticks until the Parameter value is met.&lt;br /&gt;
| BA 02 22 01 68&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;BA: OpCode&amp;lt;br/&amp;gt;02: Target (Reverb)&amp;lt;br/&amp;gt;22: Reverb of strength 34&amp;lt;br/&amp;gt;01 68: 360 Ticks&lt;br /&gt;
| Allows different operations with fade time onto the music track&lt;br /&gt;
|-&lt;br /&gt;
| BB&lt;br /&gt;
| JASSeqParser::cmdParamII&lt;br /&gt;
| {OpCode[1]} {Target[1]} {Parameter[2]} {Fade time[2]}&amp;lt;br/&amp;gt;OpCode: one byte, BB.&amp;lt;br/&amp;gt;Target: one byte with range 0x00 through 0x03.&amp;lt;br/&amp;gt;Parameter: two bytes with range 0x0000 through 0xFFFF (Int16), whichs purpose depends on the target:&lt;br /&gt;
* Target 0: Volume. 0x7FFF = Full volume (100%), 0x0000 = Silent (0%). 0x8000 through 0xFFFF are treated the same as silence (0%).&lt;br /&gt;
* Target 1: Pitch. Adding one (0x0100) or subtracting one (0xFF00) increases/decreases pitch by one key, like from D#4 to E4. Values inbetween can be used for fine-tuning.&lt;br /&gt;
* Target 2: Reverb. 0x7FFF = Strong reverb, 0x0000 = no reverb. 0x8000 through 0xFFFF are treated the same as no reverb.&lt;br /&gt;
* Target 3: Panning. 0x7FFF = right channel, 0x0000 = center, 0x8000 = left channel.&lt;br /&gt;
Fade time: two bytes with range 0x0000 through 0xFFFF. The amount of time in ticks until the Parameter value is met.&lt;br /&gt;
| BA 03 7F FF 02 00&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;BB: OpCode&amp;lt;br/&amp;gt;03: Target (Panning)&amp;lt;br/&amp;gt;7F FF: Panned to right channel&amp;lt;br/&amp;gt;02 00: 512 Ticks&lt;br /&gt;
| Allows different operations with higher precision and fade time onto the music track&lt;br /&gt;
|-&lt;br /&gt;
| BC&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| BD&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| BE&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| BF&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| C0&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| C1&lt;br /&gt;
| JASSeqParser::cmdOpenTrack&lt;br /&gt;
| {OpCode[1]} {ChannelNumber[1]} {TrackPointer[3]}&amp;lt;br /&amp;gt;OpCode: one byte, C1.&amp;lt;br /&amp;gt;ChannelNumber: one byte with range 0x00 through 0x0F. 0x00 = Channel 0, 0x0F = Channel 15.&amp;lt;br /&amp;gt;TrackPointer: three bytes with range 0x000000 through 0xFFFFFF. Defines a start offset in the file to play.&lt;br /&gt;
| C1 04 05 B4 73&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;C1: OpCode&amp;lt;br /&amp;gt;04: Channel 4&amp;lt;br /&amp;gt;05 B4 73: Offset to track&lt;br /&gt;
| Starts playing a certain track on a certain channel. Channel 15 is usually reserved for Yoshi Drums. [[SMR.szs#BGM_parameters|If enabled in the BGM parameter table in SMR.szs]], channel 0 can be used for timing and chords usage that do not play any instruments from the sound bank.&lt;br /&gt;
|-&lt;br /&gt;
| C2&lt;br /&gt;
| JASSeqParser::cmdCloseTrack&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| C3&lt;br /&gt;
| JASSeqParser::cmdCall&lt;br /&gt;
| {OpCode[1]} {Pointer[3]}&amp;lt;br /&amp;gt;OpCode: one byte, C3.&amp;lt;br /&amp;gt;Pointer: three bytes with range 0x000000 through 0xFFFFFF. Defines an offset in the file.&lt;br /&gt;
| C3 00 00 40&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;C3: OpCode&amp;lt;br /&amp;gt;00 00 40: Offset&lt;br /&gt;
| Redirects execution to the defined offset. Execution can return with C5.&lt;br /&gt;
|-&lt;br /&gt;
| C4&lt;br /&gt;
| JASSeqParser::cmdCallF&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| C5&lt;br /&gt;
| JASSeqParser::cmdRet&lt;br /&gt;
| {OpCode[1]}&amp;lt;br /&amp;gt;OpCode: one byte, C5.&lt;br /&gt;
| &lt;br /&gt;
| Returns redirected execution (like from C3) to the initial call.&lt;br /&gt;
|-&lt;br /&gt;
| C6&lt;br /&gt;
| JASSeqParser::cmdRetF&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| C7&lt;br /&gt;
| JASSeqParser::cmdJmp&lt;br /&gt;
| {OpCode[1]} {Pointer[3]}&amp;lt;br /&amp;gt;OpCode: one byte, C7.&amp;lt;br /&amp;gt;Pointer: three bytes with range 0x000000 through 0xFFFFFF. Defines an offset in the file.&lt;br /&gt;
| C7 08 02 34&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;C7: OpCode&amp;lt;br /&amp;gt;08 02 34: Offset&lt;br /&gt;
| Redirects execution to the defined offset, used for Loops.&lt;br /&gt;
|-&lt;br /&gt;
| C8&lt;br /&gt;
| JASSeqParser::cmdJmpF&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| C9&lt;br /&gt;
| JASSeqParser::cmdJmpTable&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CA&lt;br /&gt;
| JASSeqParser::cmdCallTable&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CB&lt;br /&gt;
| JASSeqParser::cmdLoopS&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CC&lt;br /&gt;
| JASSeqParser::cmdLoopE&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CD&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CE&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CF&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D0&lt;br /&gt;
| JASSeqParser::cmdReadPort&lt;br /&gt;
| {OpCode[1]} {Source[1]} {Destination[1]}&lt;br /&gt;
Opcode: One byte, D0&lt;br /&gt;
Source: One byte, 0-15 , source port &lt;br /&gt;
Destination: One byte, 0-32, destination register&lt;br /&gt;
| &lt;br /&gt;
| Imports the value from sequence port Source and writes it to destination register &#039;Destination&#039;, the value is also written to register 3&lt;br /&gt;
|-&lt;br /&gt;
| D1&lt;br /&gt;
| JASSeqParser::cmdWritePort&lt;br /&gt;
| {OpCode[1]} {Source[1]} {Destination[1]}&lt;br /&gt;
Opcode: One byte, D1&lt;br /&gt;
Source: One byte, source register, 0-32&lt;br /&gt;
Destination: One Byte, destination port, 0-15&lt;br /&gt;
| &lt;br /&gt;
| Writes the value in register &#039;Source&#039; and saves it to register 3, as well as port &#039;Destination&#039;&lt;br /&gt;
|-&lt;br /&gt;
| D2&lt;br /&gt;
| JASSeqParser::cmdCheckPortImport&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D3&lt;br /&gt;
| JASSeqParser::cmdCheckPortExport&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D4&lt;br /&gt;
| JASSeqParser::cmdParentWritePort&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {Port[1]} {Register[1]}&amp;lt;br/&amp;gt;Reads the value from this track&#039;s Register (0-32) and writes it to the parent track&#039;s Port (0-15).&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D5&lt;br /&gt;
| JASSeqParser::cmdChildWritePort&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {ChildAndPort[1]} {Register[1]}&amp;lt;br/&amp;gt;Reads the value from this track&#039;s Register (0-32) and writes it to the child track&#039;s port given by ChildAndPort. The top 4 bits of ChildAndPort (0-15) represent the number of the child track, the bottom 4 bits (0-15) the port.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D6&lt;br /&gt;
| JASSeqParser::cmdParentReadPort&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {Port[1]} {Register[1]}&amp;lt;br/&amp;gt;Reads the value from the parent track&#039;s Port (0-15) and writes it to this track&#039;s Register (0-32).&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D7&lt;br /&gt;
| JASSeqParser::cmdChildReadPort&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {ChildAndPort[1]} {Register[1]}&amp;lt;br/&amp;gt;Reads the value from the child track&#039;s port given by ChildAndPort and writes it to this track&#039;s Register. The top 4 bits of ChildAndPort (0-15) represent the number of the child track, the bottom 4 bits (0-15) the port.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D8&lt;br /&gt;
| JASSeqParser::cmdRegLoad&lt;br /&gt;
| {OpCode[1]} {Setting[1]} {Unknown[1]} {Variable[1]}&amp;lt;br /&amp;gt;OpCode: one byte, D8.&amp;lt;br /&amp;gt;Setting: one byte with unknown range. Different bytes will trigger different effects:&amp;lt;br /&amp;gt;- 0x62: set PPQN (seen in BMS)&amp;lt;br /&amp;gt;- 0x6B: set PPQN (seen in SC)&amp;lt;br /&amp;gt;Unknown: one byte with unknown range and purpose.&amp;lt;br /&amp;gt;Variable: one byte with different range and purpose depending on the Setting byte.&lt;br /&gt;
| D8 62 00 78&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;D8: OpCode&amp;lt;br /&amp;gt;62: set PPQN&amp;lt;br /&amp;gt;00: Unknown&amp;lt;br /&amp;gt;78: PPQN 120&lt;br /&gt;
| Different purposes.&lt;br /&gt;
|-&lt;br /&gt;
| D9&lt;br /&gt;
| JASSeqParser::cmdReg&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {RegOp[1]} {Register[1]} {Value[2]}&amp;lt;br/&amp;gt;Reads a value from Register (0-32), performs RegOp with Value on it, then stores the result into Register. Values for RegOp are:&amp;lt;br/&amp;gt;- 0: do nothing&amp;lt;br/&amp;gt;- 1: Read(Register) + Value&amp;lt;br/&amp;gt;- 2: Read(Register) - Value&amp;lt;br/&amp;gt;- 3: Read(Register) - Value, but store result into register 3 instead of Register&amp;lt;br/&amp;gt;- 4: Read(Register) × Value, but store result into register 33 instead of Register&amp;lt;br/&amp;gt;- 5: Read(Register) AND Value (bitwise)&amp;lt;br/&amp;gt;- 6: Read(Register) OR Value (bitwise)&amp;lt;br/&amp;gt;- 7: Read(Register) XOR Value (bitwise)&amp;lt;br/&amp;gt;- 8: a random number 0 &amp;amp;leq; n &amp;amp;lt; Value&amp;lt;br/&amp;gt;- 9: Read(Register) SHL Value (bitshift left)&amp;lt;br/&amp;gt;- 10: Read(Register) SHR Value (bitshift right)&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DA&lt;br /&gt;
| JASSeqParser::cmdReg&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {RegOp[1]} {Register[1]} {OtherRegister[1]}&amp;lt;br/&amp;gt;Performs the same operation as D9, except the value to the operation is not specified directly, but read from OtherRegister (0-32).&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DB&lt;br /&gt;
| JASSeqParser::cmdRegUni&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DC&lt;br /&gt;
| JASSeqParser::cmdRegTblLoad&lt;br /&gt;
| {OpCode[1]} {AccessMode[1]} {Destination[1]} {Offset[3]} {Index[1]}&lt;br /&gt;
OpCode: One Byte, 0xDC &lt;br /&gt;
AccessMode: Determines how the sequence accesses the table. &lt;br /&gt;
Destination: 24-bit offset of table&lt;br /&gt;
Index: Register target index into table&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DD&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DE&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DF&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| E0&lt;br /&gt;
| JASSeqParser::cmdTempo&lt;br /&gt;
| {OpCode[1]} {Unknown[1]} {BPM[1]}&amp;lt;br /&amp;gt;OpCode: one byte, E0.&amp;lt;br /&amp;gt;Unknown: one byte with unknown range and purpose.&amp;lt;br /&amp;gt;BPM: one byte with range 0x00 through 0xFF. 0x78 = 120, F0 = 240.&lt;br /&gt;
| E0 00 90&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;E0: OpCode&amp;lt;br /&amp;gt;00: Unknown&amp;lt;br /&amp;gt;90: BPM 144&lt;br /&gt;
| Defines the tempo (playback speed) of the BMS file.&lt;br /&gt;
|-&lt;br /&gt;
| E1&lt;br /&gt;
| JASSeqParser::cmdBankPrg&lt;br /&gt;
| {OpCode[1]} {Bank[1]} {Program[1]}&amp;lt;br /&amp;gt;OpCode: one byte, E1.&amp;lt;br /&amp;gt;Bank: one byte with range 0x00 through 0xFF. This byte represents a WSYS ID.&amp;lt;br /&amp;gt;Program: one byte ranging from 0x00 through 0xFF. This byte represents a LIST entry in the IBNK belonging to the defined WSYS ID.&lt;br /&gt;
| E1 01 0F&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;E1: OpCode&amp;lt;br /&amp;gt;01: WSYS ID 1&amp;lt;br /&amp;gt;0F: IBNK LIST entry 15&amp;lt;br /&amp;gt;(01 0F is the percussion set for Yoshi Drums)&lt;br /&gt;
| Defines/changes patch and bank to be played on the target channel. A combination of E2 and E3.&lt;br /&gt;
|-&lt;br /&gt;
| E2&lt;br /&gt;
| JASSeqParser::cmdBank&lt;br /&gt;
| {OpCode[1]} {Bank[1]}&amp;lt;br /&amp;gt;OpCode: one byte, E2.&amp;lt;br /&amp;gt;Bank: one byte with range 0x00 through 0xFF. This byte represents a WSYS ID.&lt;br /&gt;
| E2 53&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;E2: OpCode&amp;lt;br /&amp;gt;53: WSYS ID 83&amp;lt;br /&amp;gt;(This bank holds sounds for Megahammer)&lt;br /&gt;
| Defines/changes the WSYS/IBNK (bank) whose sounds are to be used in a channel.&amp;lt;/br&amp;gt;&lt;br /&gt;
Timing Channel: If the track is on a channel for timing and chord usage, this command instead defines the ID of the note scale to be used from the [[CIT (File Format)|CIT]].&lt;br /&gt;
|-&lt;br /&gt;
| E3&lt;br /&gt;
| JASSeqParser::cmdPrg&lt;br /&gt;
| {OpCode[1]} {Program[1]}&amp;lt;br /&amp;gt;OpCode: one byte, E3.&amp;lt;br /&amp;gt;Program: one byte with range 0x00 through 0xFF. This byte represents a LIST entry in the [[IBNK]] belonging to the defined WSYS ID.&lt;br /&gt;
| E3 0B&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;E3: OpCode&amp;lt;br /&amp;gt;0B: IBNK LIST entry 11&amp;lt;br /&amp;gt;(In relation to Megahammer, this Program holds movement related sounds)&lt;br /&gt;
| Defines the Instrument Patch / Keyboard of an [[IBNK]] (bank). If no E2 Bank Select Command was used before, it will default to Bank 0.&amp;lt;/br&amp;gt;&lt;br /&gt;
Timing Channel: If the track is on a channel for timing and chord usage, this command instead defines the ID of the chord to be used from the [[CIT (File Format)|CIT]].&lt;br /&gt;
|-&lt;br /&gt;
| E4&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| E5&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| E6&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| E7&lt;br /&gt;
| JASSeqParser::cmdEnvScaleSet&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| E8&lt;br /&gt;
| JASSeqParser::cmdEnvSet&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| E9&lt;br /&gt;
| JASSeqParser::cmdSimpleADSR&lt;br /&gt;
| {OpCode[1]} {Attack[2]} {Sustain[2]} {Decay[2]} {Amplitude[2]} {Release[2]}&amp;lt;br/&amp;gt;OpCode: one byte, E9.&amp;lt;br/&amp;gt;Attack: two bytes with range 0x0000 through 0x7FFF. Define the duration of fade-in in ticks.&amp;lt;br/&amp;gt;Sustain: two bytes with range 0x0000 through 0x7FFF. Define the duration for how long the wave is kept at maximum amplitude in ticks.&amp;lt;br/&amp;gt;Decay: two bytes with range 0x0000 through 0x7FFF. Define the duration of fade between maximum and controlled amplitude in ticks.&amp;lt;br/&amp;gt;Amplitude: two bytes with range 0x0000 through 0x7FFF. Define the volume of the wave for the 2nd sustain duration.&amp;lt;br/&amp;gt;Release: two bytes with range 0x0000 through 0x7FFF. Define the duration of fade-out in ticks.&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;If Amplitude is set to 0x7FFF, Sustain and Decay won&#039;t have an audible effect to the wave.&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;The Attack, Decay and Release operations affect the volume of the wave linearly.&lt;br /&gt;
| E9 00 80 01 00 00 80 5F FF 00 3C&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;E9: OpCode&amp;lt;br/&amp;gt;00 80: Attack (fade-in) for 128 ticks&amp;lt;br/&amp;gt;01 00: Sustain for 256 ticks&amp;lt;br/&amp;gt;00 80: Decay for 128 ticks&amp;lt;br/&amp;gt;5F FF: Amplitude of 75% compared to maximum&amp;lt;br/&amp;gt;00 3C: Release (fade-out) for 60 ticks&lt;br /&gt;
| Perform ADSR operations on a key. Must be placed before the actual key presses. [https://cdn.discordapp.com/attachments/1361554635369873490/1376201837237239899/image.png?ex=68347756&amp;amp;is=683325d6&amp;amp;hm=10661c473bb1ecb6187a17baafbc22c7d8af0a59cb0ceb87d7c85f42a8fee54c See this image for a visual representation of the ADSR operations].&lt;br /&gt;
|-&lt;br /&gt;
| EA&lt;br /&gt;
| JASSeqParser::cmdBusConnect&lt;br /&gt;
| {OpCode[1]} {Unknown[1]} {Unknown[1]} {Unknown[1]}&amp;lt;br /&amp;gt;OpCode: one byte, EA.&amp;lt;br /&amp;gt;Unknown: one byte with unknown range and purpose.&lt;br /&gt;
| EA 00 FF FF&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;EA: OpCode&amp;lt;br /&amp;gt;00: Unknown&amp;lt;br /&amp;gt;FF: Unknown&amp;lt;br /&amp;gt;FF: Unknown&lt;br /&gt;
| Unknown purpose, only seen in SC.&lt;br /&gt;
|-&lt;br /&gt;
| EB&lt;br /&gt;
| JASSeqParser::cmdIIRCutOff&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {Cutoff[1]}&amp;lt;br/&amp;gt;Sets the track&#039;s IIR filter parameters to values derived from the Cutoff value via a lookup table.&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;Cutoff: one byte in the range 0-127. The IIR filter parameters are derived from this value.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| EC&lt;br /&gt;
| JASSeqParser::cmdIIRSet&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {Param1[2]} {Param2[2]} {Param3[2]} {Param4[2]}&amp;lt;br/&amp;gt;Sets the track&#039;s IIR filter parameters to the four parameter values, which are interpreted as signed 16-bit integers.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| ED&lt;br /&gt;
| JASSeqParser::cmdFIRSet&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {Pointer[3]}&amp;lt;br/&amp;gt;Reads a FIR parameter table (8 two-byte signed integer values = 16 bytes) at the given Pointer and sets the track&#039;s FIR filter parameters to these values.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| EE&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| EF&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F0&lt;br /&gt;
| JASSeqParser::cmdWait&lt;br /&gt;
| {OpCode[1]} {WaitTime[n]}&amp;lt;br /&amp;gt;OpCode: one byte, 0xF0.&amp;lt;br /&amp;gt;WaitTime: one or more bytes with range 0x00 through 0xFF. If the leading byte is 0x80 (bit 7 = 1) or greater, another following byte will be taken into account. Time is measured in ticks here.&lt;br /&gt;
| F0 60 (96 Ticks)&amp;lt;br /&amp;gt;F0 81 56 (214 Ticks)&amp;lt;br /&amp;gt;F0 83 81 30 (49328 Ticks)&lt;br /&gt;
| Creates a delay, used to define the length of a Note or gap between Notes.&lt;br /&gt;
|-&lt;br /&gt;
| F1&lt;br /&gt;
| JASSeqParser::cmdWaitByte&lt;br /&gt;
| {OpCode[1]} {WaitTime[1]}&lt;br /&gt;
Waits for WaitTime ticks&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F2&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F3&lt;br /&gt;
| JASSeqParser::cmdSetIntTable&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F4&lt;br /&gt;
| JASSeqParser::cmdSetInterrupt&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F5&lt;br /&gt;
| JASSeqParser::cmdDisInterrupt&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F6&lt;br /&gt;
| JASSeqParser::cmdRetI&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F7&lt;br /&gt;
| JASSeqParser::cmdClrI&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F8&lt;br /&gt;
| JASSeqParser::cmdIntTimer&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F9&lt;br /&gt;
| JASSeqParser::cmdSyncCPU&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| FA&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| FB&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| FC&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| FD&lt;br /&gt;
| JASSeqParser::cmdPrintf&lt;br /&gt;
| {OpCode[1]} {Message[n]} {NullTerminator[1]}&amp;lt;br /&amp;gt;OpCode: one byte, FD.&amp;lt;br /&amp;gt;Message: ASCII string of undefined length, ending with &amp;lt;code&amp;gt;\n&amp;lt;/code&amp;gt;.&amp;lt;br /&amp;gt;NullTerminator: one byte, 00.&lt;br /&gt;
| FD 48 65 6C 6C 6F 5C 6E 00&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;FD: OpCode&amp;lt;br /&amp;gt;48 65 6C 6C 6F 5C 6E: &amp;quot;Hello\n&amp;quot;&amp;lt;br /&amp;gt;00: Null-terminator&lt;br /&gt;
| Prints a specified message to OSReport.&lt;br /&gt;
|-&lt;br /&gt;
| FE&lt;br /&gt;
| JASSeqParser::cmdNop&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| FF&lt;br /&gt;
| JASSeqParser::cmdFinish&lt;br /&gt;
| {OpCode[1]}&amp;lt;br /&amp;gt;OpCode: one byte, 0xFF.&lt;br /&gt;
| &lt;br /&gt;
| Stops execution of a Track.&lt;br /&gt;
|-&lt;br /&gt;
| B000&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B001&lt;br /&gt;
| JASSeqParser::cmdDump&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Trivia ==&lt;br /&gt;
* Many BMS filenames contain the suffix &#039;&#039;midi_cnv&#039;&#039;. This could indicate that Midis were first converted to a (perhaps text-based) CNV file, which was then converted to the BMS format. A similar situation applies to Nintendo&#039;s SDK tool for converting the Nintendo DS&#039;s SSEQ sequence format, which first converts Midis to a text-based SMFT format, which is then converted to the final SSEQ format.&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
[https://github.com/magcius/vgmtrans VGMTrans Fork] (analyses and converts BMS to MIDI)&amp;lt;br&amp;gt;&lt;br /&gt;
[https://cdn.discordapp.com/attachments/421356154795458570/1291660143758413824/BMS_DEC.zip?ex=6719f440&amp;amp;is=6718a2c0&amp;amp;hm=f44c5197a070f30a00283858942f9e4ae5066034862eba006f8abe87a228a6aa&amp;amp; BMS_DEC] (converts BMS to MIDI)&amp;lt;br&amp;gt;&lt;br /&gt;
[https://github.com/XAYRGA/JaiSeqX JaiSeqX] (playback for JAudio1 and JAudio2 BMS files)&lt;/div&gt;</summary>
		<author><name>RavuAlHemio</name></author>
	</entry>
	<entry>
		<id>https://www.lumasworkshop.com/w/index.php?title=BMS_(File_Format)&amp;diff=1047</id>
		<title>BMS (File Format)</title>
		<link rel="alternate" type="text/html" href="https://www.lumasworkshop.com/w/index.php?title=BMS_(File_Format)&amp;diff=1047"/>
		<updated>2026-07-05T09:26:23Z</updated>

		<summary type="html">&lt;p&gt;RavuAlHemio: document cmdReg&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:File formats]]&lt;br /&gt;
== File Format ==&lt;br /&gt;
BMS files are &#039;&#039;&#039;B&#039;&#039;&#039;inary &#039;&#039;&#039;M&#039;&#039;&#039;usic &#039;&#039;&#039;S&#039;&#039;&#039;equences that store commands for the audio engine to play notes, similar to the MIDI file format.&lt;br /&gt;
&lt;br /&gt;
== Structure ==&lt;br /&gt;
BMS consists of pure assembly code, where each track containing events such as notes, patch changes, etc. is an independent executor thread with opcodes to execute. &lt;br /&gt;
In contrast to Midi, events are read linearly per channel in a data stream and interpreted byte by byte. This means that multiple tracks within the same channel cannot be played back synchronously and would therefore have to be baked onto one track. However, BMS tracks can jump or call to different places in the file, e.g. to loop the song or to ensure a very high storage efficiency.&lt;br /&gt;
&lt;br /&gt;
The game&#039;s audio engine can only play up to 16 tracks at a time - very similar to MIDI with its 16 channels.&lt;br /&gt;
&lt;br /&gt;
BMS also includes extended MIDI operations, such as more powerful versions of controllers, with fade-in capability, and higher resolution control values. However, no song in either Galaxy game makes use of this.&lt;br /&gt;
&lt;br /&gt;
=== Filestructure ===&lt;br /&gt;
There are no headers or filesize checks. The file usually starts with the following:&lt;br /&gt;
*&#039;&#039;&#039;Global Track / Tempo Track&#039;&#039;&#039; BMS always starts (very similary to Midi&#039;s &amp;quot;Tempo Track&amp;quot; or &amp;quot;Conductor Track&amp;quot;) directly with track containing Meta-Events, which only contains global control data, typically:&lt;br /&gt;
**Pulses per Quarter Note (PPQN) set&lt;br /&gt;
**Tempo (BPM)&lt;br /&gt;
**Looping commands (to keep BPM changes synchronized during the song if necessary)&lt;br /&gt;
**OpenTrack command that starts playing the following track&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Channel Specific Track&#039;&#039;&#039;  a kind of management track for channel/Main Track definitions&lt;br /&gt;
**Usally contains &#039;&#039;&#039;C1&#039;&#039;&#039; OpenTrack events for each executor track (channel). For some unknown reason, the exact same looping and duration events from the global track need to be repeated here, otherwise some events such as pitchwheel will not work in the song.&lt;br /&gt;
&lt;br /&gt;
== Data ==&lt;br /&gt;
BMS files contain raw instructions for the audio engine without any headers or filesize checks. Each instruction (OpCode) stands for its own function in the engine. The following table lists all JAudio2 OpCodes that have functions in SMG2:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! OpCode&lt;br /&gt;
! Function (SMG/SMG2)&lt;br /&gt;
! Usage&lt;br /&gt;
! Example&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 00&amp;lt;br /&amp;gt;01&amp;lt;br /&amp;gt;02&amp;lt;br /&amp;gt;...&amp;lt;br /&amp;gt;7D&amp;lt;br /&amp;gt;7E&amp;lt;br /&amp;gt;7F&lt;br /&gt;
| JASSeqParser::parseNoteOn&lt;br /&gt;
| {OpCode[1]} {Voice[1]} {Velocity[1]} {Wait[n]}&amp;lt;br /&amp;gt;OpCode: one byte with range 0x00 through 0x7F. 0x00 = C-1, 0x3C = C4 (middle C), 0x7F = G9.&amp;lt;br /&amp;gt;Voice: one byte with range 0x01 through 0x07 (needs testing/verification). Each Voice can only hold one Note.&amp;lt;br /&amp;gt;Velocity: one byte with range 0x00 through 0x7F. 0x00 = 0, 0x7F = 127.&amp;lt;br /&amp;gt;Wait: variable length, only present for Midi Gate notes (Voice is not 1 - 7).&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;If the Voice is not 1 - 7, the game will treat this note as a Midi Gate note, and will expect that the Wait value is present. The Wait value is one or more bytes with range 0x00 through 0xFF; each time the byte is 0x80 or greater (i.e. bit 7 = 1), another following byte will be taken into account. If the Wait value is 0x00, the game waits until the note has finished; otherwise, it waits the number of ticks specified in the Wait value.&lt;br /&gt;
| 64 02 68&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;64: Key E4&amp;lt;br /&amp;gt;02: Voice 2&amp;lt;br /&amp;gt;68: Velocity 104&lt;br /&gt;
| Starts playing a Note with the previously defined Instrument (see E1, E2 and E3).&lt;br /&gt;
|-&lt;br /&gt;
| 80&lt;br /&gt;
| JASSeqParser::cmdWaitByte&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Seems to do nothing based on the code.&lt;br /&gt;
|-&lt;br /&gt;
| 81&amp;lt;br /&amp;gt;...&amp;lt;br /&amp;gt;87&lt;br /&gt;
| JASSeqParser::parseNoteOff&lt;br /&gt;
| {OpCode[1]}&amp;lt;br /&amp;gt;OpCode: one byte with range 0x81 through 0x87. 0x81 = Close Voice 1, 0x87 = Close Voice 7.&lt;br /&gt;
| 81: Stop voice ID 1&lt;br /&gt;
| Stops playing a Note.&lt;br /&gt;
|-&lt;br /&gt;
| 88&amp;lt;br /&amp;gt;...&amp;lt;br /&amp;gt;8F&lt;br /&gt;
| Unknown&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 90&amp;lt;br /&amp;gt;...&amp;lt;br /&amp;gt;9F&lt;br /&gt;
| Unknown&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A0&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A1&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A2&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A3&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A4&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A5&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A6&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A7&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A8&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A9&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| AA&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| AB&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| AC&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| AD&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| AE&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| AF&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B0&lt;br /&gt;
| Extended Opcode Indicator&lt;br /&gt;
| See B000 or B001.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B1&lt;br /&gt;
| JASSeqParser::cmdNoteOn&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B2&lt;br /&gt;
| JASSeqParser::cmdNoteOff&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B3&lt;br /&gt;
| JASSeqParser::cmdNote&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B4&lt;br /&gt;
| JASSeqParser::cmdSetLastNote&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B5&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B6&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B7&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B8&lt;br /&gt;
| JASSeqParser::cmdParamE&lt;br /&gt;
| {OpCode[1]} {Target[1]} {Parameter[1]}&amp;lt;br/&amp;gt;OpCode: one byte, B8.&amp;lt;br/&amp;gt;Target: one byte with range 0x00 through 0x03.&amp;lt;br/&amp;gt;Parameter: one byte with range 0x00 through 0xFF (Int8), whichs purpose depends on the target:&lt;br /&gt;
* Target 0: Volume. 0x7F = Full volume (100%), 0x00 = Silent (0%). 0x80 through 0xFF are treated the same as silence (0%).&lt;br /&gt;
* Target 1: Pitch. Adding one (0x01) or subtracting one (0xFF) increases/decreases pitch by one key, like from D#4 to E4.&lt;br /&gt;
* Target 2: Reverb. 0x7F = Strong reverb, 0x00 = no reverb. 0x80 through 0xFF are treated the same as no reverb.&lt;br /&gt;
* Target 3: Panning. 0x7F = right channel, 0x00 = center, 0x80 = left channel.&lt;br /&gt;
| B8 00 64&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;B8: OpCode&amp;lt;br/&amp;gt;00: Target (Volume)&amp;lt;br/&amp;gt;64: ~78% volume&lt;br /&gt;
| Allows different operations onto the music track&lt;br /&gt;
|-&lt;br /&gt;
| B9&lt;br /&gt;
| JASSeqParser::cmdParamI&lt;br /&gt;
| {OpCode[1]} {Target[1]} {Parameter[2]}&amp;lt;br/&amp;gt;OpCode: one byte, B9.&amp;lt;br/&amp;gt;Target: one byte with range 0x00 through 0x03.&amp;lt;br/&amp;gt;Parameter: two bytes with range 0x0000 through 0xFFFF (Int16), whichs purpose depends on the target:&lt;br /&gt;
* Target 0: Volume. 0x7FFF = Full volume (100%), 0x0000 = Silent (0%). 0x8000 through 0xFFFF are treated the same as silence (0%).&lt;br /&gt;
* Target 1: Pitch. Adding one (0x0100) or subtracting one (0xFF00) increases/decreases pitch by one key, like from D#4 to E4. Values inbetween can be used for fine-tuning.&lt;br /&gt;
* Target 2: Reverb. 0x7FFF = Strong reverb, 0x0000 = no reverb. 0x8000 through 0xFFFF are treated the same as no reverb.&lt;br /&gt;
* Target 3: Panning. 0x7FFF = right channel, 0x0000 = center, 0x8000 = left channel.&lt;br /&gt;
| B9 01 04 00&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;B9: OpCode&amp;lt;br/&amp;gt;01: Target (Pitch)&amp;lt;br/&amp;gt;04 00: Pitch of 4 keys&lt;br /&gt;
| Allows different operations with higher precision onto the music track&lt;br /&gt;
|-&lt;br /&gt;
| BA&lt;br /&gt;
| JASSeqParser::cmdParamEI&lt;br /&gt;
| {OpCode[1]} {Target[1]} {Parameter[1]} {Fade time[2]}&amp;lt;br/&amp;gt;OpCode: one byte, BA.&amp;lt;br/&amp;gt;Target: one byte with range 0x00 through 0x03.&amp;lt;br/&amp;gt;Parameter: one byte with range 0x00 through 0xFF (Int8), whichs purpose depends on the target:&lt;br /&gt;
* Target 0: Volume. 0x7F = Full volume (100%), 0x00 = Silent (0%). 0x80 through 0xFF are treated the same as silence (0%).&lt;br /&gt;
* Target 1: Pitch. Adding one (0x01) or subtracting one (0xFF) increases/decreases pitch by one key, like from D#4 to E4.&lt;br /&gt;
* Target 2: Reverb. 0x7F = Strong reverb, 0x00 = no reverb. 0x80 through 0xFF are treated the same as no reverb.&lt;br /&gt;
* Target 3: Panning. 0x7F = right channel, 0x00 = center, 0x80 = left channel.&lt;br /&gt;
Fade time: two bytes with range 0x0000 through 0xFFFF. The amount of time in ticks until the Parameter value is met.&lt;br /&gt;
| BA 02 22 01 68&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;BA: OpCode&amp;lt;br/&amp;gt;02: Target (Reverb)&amp;lt;br/&amp;gt;22: Reverb of strength 34&amp;lt;br/&amp;gt;01 68: 360 Ticks&lt;br /&gt;
| Allows different operations with fade time onto the music track&lt;br /&gt;
|-&lt;br /&gt;
| BB&lt;br /&gt;
| JASSeqParser::cmdParamII&lt;br /&gt;
| {OpCode[1]} {Target[1]} {Parameter[2]} {Fade time[2]}&amp;lt;br/&amp;gt;OpCode: one byte, BB.&amp;lt;br/&amp;gt;Target: one byte with range 0x00 through 0x03.&amp;lt;br/&amp;gt;Parameter: two bytes with range 0x0000 through 0xFFFF (Int16), whichs purpose depends on the target:&lt;br /&gt;
* Target 0: Volume. 0x7FFF = Full volume (100%), 0x0000 = Silent (0%). 0x8000 through 0xFFFF are treated the same as silence (0%).&lt;br /&gt;
* Target 1: Pitch. Adding one (0x0100) or subtracting one (0xFF00) increases/decreases pitch by one key, like from D#4 to E4. Values inbetween can be used for fine-tuning.&lt;br /&gt;
* Target 2: Reverb. 0x7FFF = Strong reverb, 0x0000 = no reverb. 0x8000 through 0xFFFF are treated the same as no reverb.&lt;br /&gt;
* Target 3: Panning. 0x7FFF = right channel, 0x0000 = center, 0x8000 = left channel.&lt;br /&gt;
Fade time: two bytes with range 0x0000 through 0xFFFF. The amount of time in ticks until the Parameter value is met.&lt;br /&gt;
| BA 03 7F FF 02 00&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;BB: OpCode&amp;lt;br/&amp;gt;03: Target (Panning)&amp;lt;br/&amp;gt;7F FF: Panned to right channel&amp;lt;br/&amp;gt;02 00: 512 Ticks&lt;br /&gt;
| Allows different operations with higher precision and fade time onto the music track&lt;br /&gt;
|-&lt;br /&gt;
| BC&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| BD&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| BE&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| BF&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| C0&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| C1&lt;br /&gt;
| JASSeqParser::cmdOpenTrack&lt;br /&gt;
| {OpCode[1]} {ChannelNumber[1]} {TrackPointer[3]}&amp;lt;br /&amp;gt;OpCode: one byte, C1.&amp;lt;br /&amp;gt;ChannelNumber: one byte with range 0x00 through 0x0F. 0x00 = Channel 0, 0x0F = Channel 15.&amp;lt;br /&amp;gt;TrackPointer: three bytes with range 0x000000 through 0xFFFFFF. Defines a start offset in the file to play.&lt;br /&gt;
| C1 04 05 B4 73&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;C1: OpCode&amp;lt;br /&amp;gt;04: Channel 4&amp;lt;br /&amp;gt;05 B4 73: Offset to track&lt;br /&gt;
| Starts playing a certain track on a certain channel. Channel 15 is usually reserved for Yoshi Drums. [[SMR.szs#BGM_parameters|If enabled in the BGM parameter table in SMR.szs]], channel 0 can be used for timing and chords usage that do not play any instruments from the sound bank.&lt;br /&gt;
|-&lt;br /&gt;
| C2&lt;br /&gt;
| JASSeqParser::cmdCloseTrack&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| C3&lt;br /&gt;
| JASSeqParser::cmdCall&lt;br /&gt;
| {OpCode[1]} {Pointer[3]}&amp;lt;br /&amp;gt;OpCode: one byte, C3.&amp;lt;br /&amp;gt;Pointer: three bytes with range 0x000000 through 0xFFFFFF. Defines an offset in the file.&lt;br /&gt;
| C3 00 00 40&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;C3: OpCode&amp;lt;br /&amp;gt;00 00 40: Offset&lt;br /&gt;
| Redirects execution to the defined offset. Execution can return with C5.&lt;br /&gt;
|-&lt;br /&gt;
| C4&lt;br /&gt;
| JASSeqParser::cmdCallF&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| C5&lt;br /&gt;
| JASSeqParser::cmdRet&lt;br /&gt;
| {OpCode[1]}&amp;lt;br /&amp;gt;OpCode: one byte, C5.&lt;br /&gt;
| &lt;br /&gt;
| Returns redirected execution (like from C3) to the initial call.&lt;br /&gt;
|-&lt;br /&gt;
| C6&lt;br /&gt;
| JASSeqParser::cmdRetF&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| C7&lt;br /&gt;
| JASSeqParser::cmdJmp&lt;br /&gt;
| {OpCode[1]} {Pointer[3]}&amp;lt;br /&amp;gt;OpCode: one byte, C7.&amp;lt;br /&amp;gt;Pointer: three bytes with range 0x000000 through 0xFFFFFF. Defines an offset in the file.&lt;br /&gt;
| C7 08 02 34&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;C7: OpCode&amp;lt;br /&amp;gt;08 02 34: Offset&lt;br /&gt;
| Redirects execution to the defined offset, used for Loops.&lt;br /&gt;
|-&lt;br /&gt;
| C8&lt;br /&gt;
| JASSeqParser::cmdJmpF&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| C9&lt;br /&gt;
| JASSeqParser::cmdJmpTable&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CA&lt;br /&gt;
| JASSeqParser::cmdCallTable&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CB&lt;br /&gt;
| JASSeqParser::cmdLoopS&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CC&lt;br /&gt;
| JASSeqParser::cmdLoopE&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CD&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CE&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CF&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D0&lt;br /&gt;
| JASSeqParser::cmdReadPort&lt;br /&gt;
| {OpCode[1]} {Source[1]} {Destination[1]}&lt;br /&gt;
Opcode: One byte, D0&lt;br /&gt;
Source: One byte, 0-15 , source port &lt;br /&gt;
Destination: One byte, 0-32, destination register&lt;br /&gt;
| &lt;br /&gt;
| Imports the value from sequence port Source and writes it to destination register &#039;Destination&#039;, the value is also written to register 3&lt;br /&gt;
|-&lt;br /&gt;
| D1&lt;br /&gt;
| JASSeqParser::cmdWritePort&lt;br /&gt;
| {OpCode[1]} {Source[1]} {Destination[1]}&lt;br /&gt;
Opcode: One byte, D1&lt;br /&gt;
Source: One byte, source register, 0-32&lt;br /&gt;
Destination: One Byte, destination port, 0-15&lt;br /&gt;
| &lt;br /&gt;
| Writes the value in register &#039;Source&#039; and saves it to register 3, as well as port &#039;Destination&#039;&lt;br /&gt;
|-&lt;br /&gt;
| D2&lt;br /&gt;
| JASSeqParser::cmdCheckPortImport&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D3&lt;br /&gt;
| JASSeqParser::cmdCheckPortExport&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D4&lt;br /&gt;
| JASSeqParser::cmdParentWritePort&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {Port[1]} {Register[1]}&amp;lt;br/&amp;gt;Reads the value from this track&#039;s Register (0-32) and writes it to the parent track&#039;s Port (0-15).&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D5&lt;br /&gt;
| JASSeqParser::cmdChildWritePort&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {ChildAndPort[1]} {Register[1]}&amp;lt;br/&amp;gt;Reads the value from this track&#039;s Register (0-32) and writes it to the child track&#039;s port given by ChildAndPort. The top 4 bits of ChildAndPort (0-15) represent the number of the child track, the bottom 4 bits (0-15) the port.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D6&lt;br /&gt;
| JASSeqParser::cmdParentReadPort&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {Port[1]} {Register[1]}&amp;lt;br/&amp;gt;Reads the value from the parent track&#039;s Port (0-15) and writes it to this track&#039;s Register (0-32).&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D7&lt;br /&gt;
| JASSeqParser::cmdChildReadPort&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {ChildAndPort[1]} {Register[1]}&amp;lt;br/&amp;gt;Reads the value from the child track&#039;s port given by ChildAndPort and writes it to this track&#039;s Register. The top 4 bits of ChildAndPort (0-15) represent the number of the child track, the bottom 4 bits (0-15) the port.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D8&lt;br /&gt;
| JASSeqParser::cmdRegLoad&lt;br /&gt;
| {OpCode[1]} {Setting[1]} {Unknown[1]} {Variable[1]}&amp;lt;br /&amp;gt;OpCode: one byte, D8.&amp;lt;br /&amp;gt;Setting: one byte with unknown range. Different bytes will trigger different effects:&amp;lt;br /&amp;gt;- 0x62: set PPQN (seen in BMS)&amp;lt;br /&amp;gt;- 0x6B: set PPQN (seen in SC)&amp;lt;br /&amp;gt;Unknown: one byte with unknown range and purpose.&amp;lt;br /&amp;gt;Variable: one byte with different range and purpose depending on the Setting byte.&lt;br /&gt;
| D8 62 00 78&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;D8: OpCode&amp;lt;br /&amp;gt;62: set PPQN&amp;lt;br /&amp;gt;00: Unknown&amp;lt;br /&amp;gt;78: PPQN 120&lt;br /&gt;
| Different purposes.&lt;br /&gt;
|-&lt;br /&gt;
| D9&lt;br /&gt;
| JASSeqParser::cmdReg&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {RegOp[1]} {Register[1]} {Value[2]}&amp;lt;br/&amp;gt;Reads a value from Register (0-32), performs RegOp with Value on it, then stores the result into Register. Values for RegOp are:&amp;lt;br/&amp;gt;- 0: do nothing&amp;lt;br/&amp;gt;- 1: Read(Register) + Value&amp;lt;br/&amp;gt;- 2: Read(Register) - Value&amp;lt;br/&amp;gt;- 3: Read(Register) - Value, but store result into register 3 instead of Register&amp;lt;br/&amp;gt;- 4: Read(Register) × Value, but store result into register 33 instead of Register&amp;lt;br/&amp;gt;- 5: Read(Register) AND Value (bitwise)&amp;lt;br/&amp;gt;- 6: Read(Register) OR Value (bitwise)&amp;lt;br/&amp;gt;- 7: Read(Register) XOR Value (bitwise)&amp;lt;br/&amp;gt;- 8: a random number 0 &amp;amp;leq; n &amp;amp;lt; Value&amp;lt;br/&amp;gt;- 9: Read(Register) SHL Value (bitshift left)&amp;lt;br/&amp;gt;- 10: Read(Register) SHR Value (bitshift right)&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DA&lt;br /&gt;
| JASSeqParser::cmdReg&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {RegOp[1]} {Register[1]} {OtherRegister[1]}&amp;lt;br/&amp;gt;Performs the same operation as D9, except the value to the operation is not specified directly, but read from OtherRegister (0-32).&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DB&lt;br /&gt;
| JASSeqParser::cmdRegUni&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DC&lt;br /&gt;
| JASSeqParser::cmdRegTblLoad&lt;br /&gt;
| {OpCode[1]} {AccessMode[1]} {Destination[1]} {Offset[3]} {Index[1]}&lt;br /&gt;
OpCode: One Byte, 0xDC &lt;br /&gt;
AccessMode: Determines how the sequence accesses the table. &lt;br /&gt;
Destination: 24-bit offset of table&lt;br /&gt;
Index: Register target index into table&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DD&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DE&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DF&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| E0&lt;br /&gt;
| JASSeqParser::cmdTempo&lt;br /&gt;
| {OpCode[1]} {Unknown[1]} {BPM[1]}&amp;lt;br /&amp;gt;OpCode: one byte, E0.&amp;lt;br /&amp;gt;Unknown: one byte with unknown range and purpose.&amp;lt;br /&amp;gt;BPM: one byte with range 0x00 through 0xFF. 0x78 = 120, F0 = 240.&lt;br /&gt;
| E0 00 90&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;E0: OpCode&amp;lt;br /&amp;gt;00: Unknown&amp;lt;br /&amp;gt;90: BPM 144&lt;br /&gt;
| Defines the tempo (playback speed) of the BMS file.&lt;br /&gt;
|-&lt;br /&gt;
| E1&lt;br /&gt;
| JASSeqParser::cmdBankPrg&lt;br /&gt;
| {OpCode[1]} {Bank[1]} {Program[1]}&amp;lt;br /&amp;gt;OpCode: one byte, E1.&amp;lt;br /&amp;gt;Bank: one byte with range 0x00 through 0xFF. This byte represents a WSYS ID.&amp;lt;br /&amp;gt;Program: one byte ranging from 0x00 through 0xFF. This byte represents a LIST entry in the IBNK belonging to the defined WSYS ID.&lt;br /&gt;
| E1 01 0F&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;E1: OpCode&amp;lt;br /&amp;gt;01: WSYS ID 1&amp;lt;br /&amp;gt;0F: IBNK LIST entry 15&amp;lt;br /&amp;gt;(01 0F is the percussion set for Yoshi Drums)&lt;br /&gt;
| Defines/changes patch and bank to be played on the target channel. A combination of E2 and E3.&lt;br /&gt;
|-&lt;br /&gt;
| E2&lt;br /&gt;
| JASSeqParser::cmdBank&lt;br /&gt;
| {OpCode[1]} {Bank[1]}&amp;lt;br /&amp;gt;OpCode: one byte, E2.&amp;lt;br /&amp;gt;Bank: one byte with range 0x00 through 0xFF. This byte represents a WSYS ID.&lt;br /&gt;
| E2 53&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;E2: OpCode&amp;lt;br /&amp;gt;53: WSYS ID 83&amp;lt;br /&amp;gt;(This bank holds sounds for Megahammer)&lt;br /&gt;
| Defines/changes the WSYS/IBNK (bank) whose sounds are to be used in a channel.&amp;lt;/br&amp;gt;&lt;br /&gt;
Timing Channel: If the track is on a channel for timing and chord usage, this command instead defines the ID of the note scale to be used from the [[CIT (File Format)|CIT]].&lt;br /&gt;
|-&lt;br /&gt;
| E3&lt;br /&gt;
| JASSeqParser::cmdPrg&lt;br /&gt;
| {OpCode[1]} {Program[1]}&amp;lt;br /&amp;gt;OpCode: one byte, E3.&amp;lt;br /&amp;gt;Program: one byte with range 0x00 through 0xFF. This byte represents a LIST entry in the [[IBNK]] belonging to the defined WSYS ID.&lt;br /&gt;
| E3 0B&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;E3: OpCode&amp;lt;br /&amp;gt;0B: IBNK LIST entry 11&amp;lt;br /&amp;gt;(In relation to Megahammer, this Program holds movement related sounds)&lt;br /&gt;
| Defines the Instrument Patch / Keyboard of an [[IBNK]] (bank). If no E2 Bank Select Command was used before, it will default to Bank 0.&amp;lt;/br&amp;gt;&lt;br /&gt;
Timing Channel: If the track is on a channel for timing and chord usage, this command instead defines the ID of the chord to be used from the [[CIT (File Format)|CIT]].&lt;br /&gt;
|-&lt;br /&gt;
| E4&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| E5&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| E6&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| E7&lt;br /&gt;
| JASSeqParser::cmdEnvScaleSet&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| E8&lt;br /&gt;
| JASSeqParser::cmdEnvSet&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| E9&lt;br /&gt;
| JASSeqParser::cmdSimpleADSR&lt;br /&gt;
| {OpCode[1]} {Attack[2]} {Sustain[2]} {Decay[2]} {Amplitude[2]} {Release[2]}&amp;lt;br/&amp;gt;OpCode: one byte, E9.&amp;lt;br/&amp;gt;Attack: two bytes with range 0x0000 through 0x7FFF. Define the duration of fade-in in ticks.&amp;lt;br/&amp;gt;Sustain: two bytes with range 0x0000 through 0x7FFF. Define the duration for how long the wave is kept at maximum amplitude in ticks.&amp;lt;br/&amp;gt;Decay: two bytes with range 0x0000 through 0x7FFF. Define the duration of fade between maximum and controlled amplitude in ticks.&amp;lt;br/&amp;gt;Amplitude: two bytes with range 0x0000 through 0x7FFF. Define the volume of the wave for the 2nd sustain duration.&amp;lt;br/&amp;gt;Release: two bytes with range 0x0000 through 0x7FFF. Define the duration of fade-out in ticks.&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;If Amplitude is set to 0x7FFF, Sustain and Decay won&#039;t have an audible effect to the wave.&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;The Attack, Decay and Release operations affect the volume of the wave linearly.&lt;br /&gt;
| E9 00 80 01 00 00 80 5F FF 00 3C&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;E9: OpCode&amp;lt;br/&amp;gt;00 80: Attack (fade-in) for 128 ticks&amp;lt;br/&amp;gt;01 00: Sustain for 256 ticks&amp;lt;br/&amp;gt;00 80: Decay for 128 ticks&amp;lt;br/&amp;gt;5F FF: Amplitude of 75% compared to maximum&amp;lt;br/&amp;gt;00 3C: Release (fade-out) for 60 ticks&lt;br /&gt;
| Perform ADSR operations on a key. Must be placed before the actual key presses. [https://cdn.discordapp.com/attachments/1361554635369873490/1376201837237239899/image.png?ex=68347756&amp;amp;is=683325d6&amp;amp;hm=10661c473bb1ecb6187a17baafbc22c7d8af0a59cb0ceb87d7c85f42a8fee54c See this image for a visual representation of the ADSR operations].&lt;br /&gt;
|-&lt;br /&gt;
| EA&lt;br /&gt;
| JASSeqParser::cmdBusConnect&lt;br /&gt;
| {OpCode[1]} {Unknown[1]} {Unknown[1]} {Unknown[1]}&amp;lt;br /&amp;gt;OpCode: one byte, EA.&amp;lt;br /&amp;gt;Unknown: one byte with unknown range and purpose.&lt;br /&gt;
| EA 00 FF FF&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;EA: OpCode&amp;lt;br /&amp;gt;00: Unknown&amp;lt;br /&amp;gt;FF: Unknown&amp;lt;br /&amp;gt;FF: Unknown&lt;br /&gt;
| Unknown purpose, only seen in SC.&lt;br /&gt;
|-&lt;br /&gt;
| EB&lt;br /&gt;
| JASSeqParser::cmdIIRCutOff&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {Cutoff[1]}&amp;lt;br/&amp;gt;Sets the track&#039;s IIR filter parameters to values derived from the Cutoff value via a lookup table.&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;Cutoff: one byte in the range 0-127. The IIR filter parameters are derived from this value.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| EC&lt;br /&gt;
| JASSeqParser::cmdIIRSet&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {Param1[2]} {Param2[2]} {Param3[2]} {Param4[2]}&amp;lt;br/&amp;gt;Sets the track&#039;s IIR filter parameters to the four parameter values, which are interpreted as signed 16-bit integers.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| ED&lt;br /&gt;
| JASSeqParser::cmdFIRSet&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {Pointer[3]}&amp;lt;br/&amp;gt;Reads a FIR parameter table (8 two-byte signed integer values = 16 bytes) at the given Pointer and sets the track&#039;s FIR filter parameters to these values.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| EE&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| EF&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F0&lt;br /&gt;
| JASSeqParser::cmdWait&lt;br /&gt;
| {OpCode[1]} {WaitTime[n]}&amp;lt;br /&amp;gt;OpCode: one byte, 0xF0.&amp;lt;br /&amp;gt;WaitTime: one or more bytes with range 0x00 through 0xFF. If the leading byte is 0x80 (bit 7 = 1) or greater, another following byte will be taken into account. Time is measured in ticks here.&lt;br /&gt;
| F0 60 (96 Ticks)&amp;lt;br /&amp;gt;F0 81 56 (214 Ticks)&amp;lt;br /&amp;gt;F0 83 81 30 (49328 Ticks)&lt;br /&gt;
| Creates a delay, used to define the length of a Note or gap between Notes.&lt;br /&gt;
|-&lt;br /&gt;
| F1&lt;br /&gt;
| JASSeqParser::cmdWaitByte&lt;br /&gt;
| {OpCode[1]} {WaitTime[1]}&lt;br /&gt;
Waits for WaitTime ticks&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F2&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F3&lt;br /&gt;
| JASSeqParser::cmdSetIntTable&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F4&lt;br /&gt;
| JASSeqParser::cmdSetInterrupt&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F5&lt;br /&gt;
| JASSeqParser::cmdDisInterrupt&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F6&lt;br /&gt;
| JASSeqParser::cmdRetI&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F7&lt;br /&gt;
| JASSeqParser::cmdClrI&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F8&lt;br /&gt;
| JASSeqParser::cmdIntTimer&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F9&lt;br /&gt;
| JASSeqParser::cmdSyncCPU&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| FA&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| FB&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| FC&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| FD&lt;br /&gt;
| JASSeqParser::cmdPrintf&lt;br /&gt;
| {OpCode[1]} {Message[n]} {NullTerminator[1]}&amp;lt;br /&amp;gt;OpCode: one byte, FD.&amp;lt;br /&amp;gt;Message: ASCII string of undefined length, ending with &amp;lt;code&amp;gt;\n&amp;lt;/code&amp;gt;.&amp;lt;br /&amp;gt;NullTerminator: one byte, 00.&lt;br /&gt;
| FD 48 65 6C 6C 6F 5C 6E 00&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;FD: OpCode&amp;lt;br /&amp;gt;48 65 6C 6C 6F 5C 6E: &amp;quot;Hello\n&amp;quot;&amp;lt;br /&amp;gt;00: Null-terminator&lt;br /&gt;
| Prints a specified message to OSReport.&lt;br /&gt;
|-&lt;br /&gt;
| FE&lt;br /&gt;
| JASSeqParser::cmdNop&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| FF&lt;br /&gt;
| JASSeqParser::cmdFinish&lt;br /&gt;
| {OpCode[1]}&amp;lt;br /&amp;gt;OpCode: one byte, 0xFF.&lt;br /&gt;
| &lt;br /&gt;
| Stops execution of a Track.&lt;br /&gt;
|-&lt;br /&gt;
| B000&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B001&lt;br /&gt;
| JASSeqParser::cmdDump&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Trivia ==&lt;br /&gt;
* Many BMS filenames contain the suffix &#039;&#039;midi_cnv&#039;&#039;. This could indicate that Midis were first converted to a (perhaps text-based) CNV file, which was then converted to the BMS format. A similar situation applies to Nintendo&#039;s SDK tool for converting the Nintendo DS&#039;s SSEQ sequence format, which first converts Midis to a text-based SMFT format, which is then converted to the final SSEQ format.&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
[https://github.com/magcius/vgmtrans VGMTrans Fork] (analyses and converts BMS to MIDI)&amp;lt;br&amp;gt;&lt;br /&gt;
[https://cdn.discordapp.com/attachments/421356154795458570/1291660143758413824/BMS_DEC.zip?ex=6719f440&amp;amp;is=6718a2c0&amp;amp;hm=f44c5197a070f30a00283858942f9e4ae5066034862eba006f8abe87a228a6aa&amp;amp; BMS_DEC] (converts BMS to MIDI)&amp;lt;br&amp;gt;&lt;br /&gt;
[https://github.com/XAYRGA/JaiSeqX JaiSeqX] (playback for JAudio1 and JAudio2 BMS files)&lt;/div&gt;</summary>
		<author><name>RavuAlHemio</name></author>
	</entry>
	<entry>
		<id>https://www.lumasworkshop.com/w/index.php?title=BMS_(File_Format)&amp;diff=1046</id>
		<title>BMS (File Format)</title>
		<link rel="alternate" type="text/html" href="https://www.lumasworkshop.com/w/index.php?title=BMS_(File_Format)&amp;diff=1046"/>
		<updated>2026-07-05T09:13:30Z</updated>

		<summary type="html">&lt;p&gt;RavuAlHemio: /* Data */ clarify Port range in cmdParentWritePort&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:File formats]]&lt;br /&gt;
== File Format ==&lt;br /&gt;
BMS files are &#039;&#039;&#039;B&#039;&#039;&#039;inary &#039;&#039;&#039;M&#039;&#039;&#039;usic &#039;&#039;&#039;S&#039;&#039;&#039;equences that store commands for the audio engine to play notes, similar to the MIDI file format.&lt;br /&gt;
&lt;br /&gt;
== Structure ==&lt;br /&gt;
BMS consists of pure assembly code, where each track containing events such as notes, patch changes, etc. is an independent executor thread with opcodes to execute. &lt;br /&gt;
In contrast to Midi, events are read linearly per channel in a data stream and interpreted byte by byte. This means that multiple tracks within the same channel cannot be played back synchronously and would therefore have to be baked onto one track. However, BMS tracks can jump or call to different places in the file, e.g. to loop the song or to ensure a very high storage efficiency.&lt;br /&gt;
&lt;br /&gt;
The game&#039;s audio engine can only play up to 16 tracks at a time - very similar to MIDI with its 16 channels.&lt;br /&gt;
&lt;br /&gt;
BMS also includes extended MIDI operations, such as more powerful versions of controllers, with fade-in capability, and higher resolution control values. However, no song in either Galaxy game makes use of this.&lt;br /&gt;
&lt;br /&gt;
=== Filestructure ===&lt;br /&gt;
There are no headers or filesize checks. The file usually starts with the following:&lt;br /&gt;
*&#039;&#039;&#039;Global Track / Tempo Track&#039;&#039;&#039; BMS always starts (very similary to Midi&#039;s &amp;quot;Tempo Track&amp;quot; or &amp;quot;Conductor Track&amp;quot;) directly with track containing Meta-Events, which only contains global control data, typically:&lt;br /&gt;
**Pulses per Quarter Note (PPQN) set&lt;br /&gt;
**Tempo (BPM)&lt;br /&gt;
**Looping commands (to keep BPM changes synchronized during the song if necessary)&lt;br /&gt;
**OpenTrack command that starts playing the following track&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Channel Specific Track&#039;&#039;&#039;  a kind of management track for channel/Main Track definitions&lt;br /&gt;
**Usally contains &#039;&#039;&#039;C1&#039;&#039;&#039; OpenTrack events for each executor track (channel). For some unknown reason, the exact same looping and duration events from the global track need to be repeated here, otherwise some events such as pitchwheel will not work in the song.&lt;br /&gt;
&lt;br /&gt;
== Data ==&lt;br /&gt;
BMS files contain raw instructions for the audio engine without any headers or filesize checks. Each instruction (OpCode) stands for its own function in the engine. The following table lists all JAudio2 OpCodes that have functions in SMG2:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! OpCode&lt;br /&gt;
! Function (SMG/SMG2)&lt;br /&gt;
! Usage&lt;br /&gt;
! Example&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 00&amp;lt;br /&amp;gt;01&amp;lt;br /&amp;gt;02&amp;lt;br /&amp;gt;...&amp;lt;br /&amp;gt;7D&amp;lt;br /&amp;gt;7E&amp;lt;br /&amp;gt;7F&lt;br /&gt;
| JASSeqParser::parseNoteOn&lt;br /&gt;
| {OpCode[1]} {Voice[1]} {Velocity[1]} {Wait[n]}&amp;lt;br /&amp;gt;OpCode: one byte with range 0x00 through 0x7F. 0x00 = C-1, 0x3C = C4 (middle C), 0x7F = G9.&amp;lt;br /&amp;gt;Voice: one byte with range 0x01 through 0x07 (needs testing/verification). Each Voice can only hold one Note.&amp;lt;br /&amp;gt;Velocity: one byte with range 0x00 through 0x7F. 0x00 = 0, 0x7F = 127.&amp;lt;br /&amp;gt;Wait: variable length, only present for Midi Gate notes (Voice is not 1 - 7).&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;If the Voice is not 1 - 7, the game will treat this note as a Midi Gate note, and will expect that the Wait value is present. The Wait value is one or more bytes with range 0x00 through 0xFF; each time the byte is 0x80 or greater (i.e. bit 7 = 1), another following byte will be taken into account. If the Wait value is 0x00, the game waits until the note has finished; otherwise, it waits the number of ticks specified in the Wait value.&lt;br /&gt;
| 64 02 68&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;64: Key E4&amp;lt;br /&amp;gt;02: Voice 2&amp;lt;br /&amp;gt;68: Velocity 104&lt;br /&gt;
| Starts playing a Note with the previously defined Instrument (see E1, E2 and E3).&lt;br /&gt;
|-&lt;br /&gt;
| 80&lt;br /&gt;
| JASSeqParser::cmdWaitByte&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Seems to do nothing based on the code.&lt;br /&gt;
|-&lt;br /&gt;
| 81&amp;lt;br /&amp;gt;...&amp;lt;br /&amp;gt;87&lt;br /&gt;
| JASSeqParser::parseNoteOff&lt;br /&gt;
| {OpCode[1]}&amp;lt;br /&amp;gt;OpCode: one byte with range 0x81 through 0x87. 0x81 = Close Voice 1, 0x87 = Close Voice 7.&lt;br /&gt;
| 81: Stop voice ID 1&lt;br /&gt;
| Stops playing a Note.&lt;br /&gt;
|-&lt;br /&gt;
| 88&amp;lt;br /&amp;gt;...&amp;lt;br /&amp;gt;8F&lt;br /&gt;
| Unknown&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 90&amp;lt;br /&amp;gt;...&amp;lt;br /&amp;gt;9F&lt;br /&gt;
| Unknown&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A0&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A1&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A2&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A3&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A4&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A5&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A6&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A7&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A8&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A9&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| AA&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| AB&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| AC&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| AD&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| AE&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| AF&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B0&lt;br /&gt;
| Extended Opcode Indicator&lt;br /&gt;
| See B000 or B001.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B1&lt;br /&gt;
| JASSeqParser::cmdNoteOn&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B2&lt;br /&gt;
| JASSeqParser::cmdNoteOff&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B3&lt;br /&gt;
| JASSeqParser::cmdNote&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B4&lt;br /&gt;
| JASSeqParser::cmdSetLastNote&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B5&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B6&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B7&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B8&lt;br /&gt;
| JASSeqParser::cmdParamE&lt;br /&gt;
| {OpCode[1]} {Target[1]} {Parameter[1]}&amp;lt;br/&amp;gt;OpCode: one byte, B8.&amp;lt;br/&amp;gt;Target: one byte with range 0x00 through 0x03.&amp;lt;br/&amp;gt;Parameter: one byte with range 0x00 through 0xFF (Int8), whichs purpose depends on the target:&lt;br /&gt;
* Target 0: Volume. 0x7F = Full volume (100%), 0x00 = Silent (0%). 0x80 through 0xFF are treated the same as silence (0%).&lt;br /&gt;
* Target 1: Pitch. Adding one (0x01) or subtracting one (0xFF) increases/decreases pitch by one key, like from D#4 to E4.&lt;br /&gt;
* Target 2: Reverb. 0x7F = Strong reverb, 0x00 = no reverb. 0x80 through 0xFF are treated the same as no reverb.&lt;br /&gt;
* Target 3: Panning. 0x7F = right channel, 0x00 = center, 0x80 = left channel.&lt;br /&gt;
| B8 00 64&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;B8: OpCode&amp;lt;br/&amp;gt;00: Target (Volume)&amp;lt;br/&amp;gt;64: ~78% volume&lt;br /&gt;
| Allows different operations onto the music track&lt;br /&gt;
|-&lt;br /&gt;
| B9&lt;br /&gt;
| JASSeqParser::cmdParamI&lt;br /&gt;
| {OpCode[1]} {Target[1]} {Parameter[2]}&amp;lt;br/&amp;gt;OpCode: one byte, B9.&amp;lt;br/&amp;gt;Target: one byte with range 0x00 through 0x03.&amp;lt;br/&amp;gt;Parameter: two bytes with range 0x0000 through 0xFFFF (Int16), whichs purpose depends on the target:&lt;br /&gt;
* Target 0: Volume. 0x7FFF = Full volume (100%), 0x0000 = Silent (0%). 0x8000 through 0xFFFF are treated the same as silence (0%).&lt;br /&gt;
* Target 1: Pitch. Adding one (0x0100) or subtracting one (0xFF00) increases/decreases pitch by one key, like from D#4 to E4. Values inbetween can be used for fine-tuning.&lt;br /&gt;
* Target 2: Reverb. 0x7FFF = Strong reverb, 0x0000 = no reverb. 0x8000 through 0xFFFF are treated the same as no reverb.&lt;br /&gt;
* Target 3: Panning. 0x7FFF = right channel, 0x0000 = center, 0x8000 = left channel.&lt;br /&gt;
| B9 01 04 00&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;B9: OpCode&amp;lt;br/&amp;gt;01: Target (Pitch)&amp;lt;br/&amp;gt;04 00: Pitch of 4 keys&lt;br /&gt;
| Allows different operations with higher precision onto the music track&lt;br /&gt;
|-&lt;br /&gt;
| BA&lt;br /&gt;
| JASSeqParser::cmdParamEI&lt;br /&gt;
| {OpCode[1]} {Target[1]} {Parameter[1]} {Fade time[2]}&amp;lt;br/&amp;gt;OpCode: one byte, BA.&amp;lt;br/&amp;gt;Target: one byte with range 0x00 through 0x03.&amp;lt;br/&amp;gt;Parameter: one byte with range 0x00 through 0xFF (Int8), whichs purpose depends on the target:&lt;br /&gt;
* Target 0: Volume. 0x7F = Full volume (100%), 0x00 = Silent (0%). 0x80 through 0xFF are treated the same as silence (0%).&lt;br /&gt;
* Target 1: Pitch. Adding one (0x01) or subtracting one (0xFF) increases/decreases pitch by one key, like from D#4 to E4.&lt;br /&gt;
* Target 2: Reverb. 0x7F = Strong reverb, 0x00 = no reverb. 0x80 through 0xFF are treated the same as no reverb.&lt;br /&gt;
* Target 3: Panning. 0x7F = right channel, 0x00 = center, 0x80 = left channel.&lt;br /&gt;
Fade time: two bytes with range 0x0000 through 0xFFFF. The amount of time in ticks until the Parameter value is met.&lt;br /&gt;
| BA 02 22 01 68&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;BA: OpCode&amp;lt;br/&amp;gt;02: Target (Reverb)&amp;lt;br/&amp;gt;22: Reverb of strength 34&amp;lt;br/&amp;gt;01 68: 360 Ticks&lt;br /&gt;
| Allows different operations with fade time onto the music track&lt;br /&gt;
|-&lt;br /&gt;
| BB&lt;br /&gt;
| JASSeqParser::cmdParamII&lt;br /&gt;
| {OpCode[1]} {Target[1]} {Parameter[2]} {Fade time[2]}&amp;lt;br/&amp;gt;OpCode: one byte, BB.&amp;lt;br/&amp;gt;Target: one byte with range 0x00 through 0x03.&amp;lt;br/&amp;gt;Parameter: two bytes with range 0x0000 through 0xFFFF (Int16), whichs purpose depends on the target:&lt;br /&gt;
* Target 0: Volume. 0x7FFF = Full volume (100%), 0x0000 = Silent (0%). 0x8000 through 0xFFFF are treated the same as silence (0%).&lt;br /&gt;
* Target 1: Pitch. Adding one (0x0100) or subtracting one (0xFF00) increases/decreases pitch by one key, like from D#4 to E4. Values inbetween can be used for fine-tuning.&lt;br /&gt;
* Target 2: Reverb. 0x7FFF = Strong reverb, 0x0000 = no reverb. 0x8000 through 0xFFFF are treated the same as no reverb.&lt;br /&gt;
* Target 3: Panning. 0x7FFF = right channel, 0x0000 = center, 0x8000 = left channel.&lt;br /&gt;
Fade time: two bytes with range 0x0000 through 0xFFFF. The amount of time in ticks until the Parameter value is met.&lt;br /&gt;
| BA 03 7F FF 02 00&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;BB: OpCode&amp;lt;br/&amp;gt;03: Target (Panning)&amp;lt;br/&amp;gt;7F FF: Panned to right channel&amp;lt;br/&amp;gt;02 00: 512 Ticks&lt;br /&gt;
| Allows different operations with higher precision and fade time onto the music track&lt;br /&gt;
|-&lt;br /&gt;
| BC&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| BD&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| BE&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| BF&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| C0&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| C1&lt;br /&gt;
| JASSeqParser::cmdOpenTrack&lt;br /&gt;
| {OpCode[1]} {ChannelNumber[1]} {TrackPointer[3]}&amp;lt;br /&amp;gt;OpCode: one byte, C1.&amp;lt;br /&amp;gt;ChannelNumber: one byte with range 0x00 through 0x0F. 0x00 = Channel 0, 0x0F = Channel 15.&amp;lt;br /&amp;gt;TrackPointer: three bytes with range 0x000000 through 0xFFFFFF. Defines a start offset in the file to play.&lt;br /&gt;
| C1 04 05 B4 73&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;C1: OpCode&amp;lt;br /&amp;gt;04: Channel 4&amp;lt;br /&amp;gt;05 B4 73: Offset to track&lt;br /&gt;
| Starts playing a certain track on a certain channel. Channel 15 is usually reserved for Yoshi Drums. [[SMR.szs#BGM_parameters|If enabled in the BGM parameter table in SMR.szs]], channel 0 can be used for timing and chords usage that do not play any instruments from the sound bank.&lt;br /&gt;
|-&lt;br /&gt;
| C2&lt;br /&gt;
| JASSeqParser::cmdCloseTrack&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| C3&lt;br /&gt;
| JASSeqParser::cmdCall&lt;br /&gt;
| {OpCode[1]} {Pointer[3]}&amp;lt;br /&amp;gt;OpCode: one byte, C3.&amp;lt;br /&amp;gt;Pointer: three bytes with range 0x000000 through 0xFFFFFF. Defines an offset in the file.&lt;br /&gt;
| C3 00 00 40&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;C3: OpCode&amp;lt;br /&amp;gt;00 00 40: Offset&lt;br /&gt;
| Redirects execution to the defined offset. Execution can return with C5.&lt;br /&gt;
|-&lt;br /&gt;
| C4&lt;br /&gt;
| JASSeqParser::cmdCallF&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| C5&lt;br /&gt;
| JASSeqParser::cmdRet&lt;br /&gt;
| {OpCode[1]}&amp;lt;br /&amp;gt;OpCode: one byte, C5.&lt;br /&gt;
| &lt;br /&gt;
| Returns redirected execution (like from C3) to the initial call.&lt;br /&gt;
|-&lt;br /&gt;
| C6&lt;br /&gt;
| JASSeqParser::cmdRetF&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| C7&lt;br /&gt;
| JASSeqParser::cmdJmp&lt;br /&gt;
| {OpCode[1]} {Pointer[3]}&amp;lt;br /&amp;gt;OpCode: one byte, C7.&amp;lt;br /&amp;gt;Pointer: three bytes with range 0x000000 through 0xFFFFFF. Defines an offset in the file.&lt;br /&gt;
| C7 08 02 34&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;C7: OpCode&amp;lt;br /&amp;gt;08 02 34: Offset&lt;br /&gt;
| Redirects execution to the defined offset, used for Loops.&lt;br /&gt;
|-&lt;br /&gt;
| C8&lt;br /&gt;
| JASSeqParser::cmdJmpF&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| C9&lt;br /&gt;
| JASSeqParser::cmdJmpTable&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CA&lt;br /&gt;
| JASSeqParser::cmdCallTable&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CB&lt;br /&gt;
| JASSeqParser::cmdLoopS&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CC&lt;br /&gt;
| JASSeqParser::cmdLoopE&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CD&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CE&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CF&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D0&lt;br /&gt;
| JASSeqParser::cmdReadPort&lt;br /&gt;
| {OpCode[1]} {Source[1]} {Destination[1]}&lt;br /&gt;
Opcode: One byte, D0&lt;br /&gt;
Source: One byte, 0-15 , source port &lt;br /&gt;
Destination: One byte, 0-32, destination register&lt;br /&gt;
| &lt;br /&gt;
| Imports the value from sequence port Source and writes it to destination register &#039;Destination&#039;, the value is also written to register 3&lt;br /&gt;
|-&lt;br /&gt;
| D1&lt;br /&gt;
| JASSeqParser::cmdWritePort&lt;br /&gt;
| {OpCode[1]} {Source[1]} {Destination[1]}&lt;br /&gt;
Opcode: One byte, D1&lt;br /&gt;
Source: One byte, source register, 0-32&lt;br /&gt;
Destination: One Byte, destination port, 0-15&lt;br /&gt;
| &lt;br /&gt;
| Writes the value in register &#039;Source&#039; and saves it to register 3, as well as port &#039;Destination&#039;&lt;br /&gt;
|-&lt;br /&gt;
| D2&lt;br /&gt;
| JASSeqParser::cmdCheckPortImport&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D3&lt;br /&gt;
| JASSeqParser::cmdCheckPortExport&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D4&lt;br /&gt;
| JASSeqParser::cmdParentWritePort&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {Port[1]} {Register[1]}&amp;lt;br/&amp;gt;Reads the value from this track&#039;s Register (0-32) and writes it to the parent track&#039;s Port (0-15).&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D5&lt;br /&gt;
| JASSeqParser::cmdChildWritePort&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {ChildAndPort[1]} {Register[1]}&amp;lt;br/&amp;gt;Reads the value from this track&#039;s Register (0-32) and writes it to the child track&#039;s port given by ChildAndPort. The top 4 bits of ChildAndPort (0-15) represent the number of the child track, the bottom 4 bits (0-15) the port.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D6&lt;br /&gt;
| JASSeqParser::cmdParentReadPort&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {Port[1]} {Register[1]}&amp;lt;br/&amp;gt;Reads the value from the parent track&#039;s Port (0-15) and writes it to this track&#039;s Register (0-32).&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D7&lt;br /&gt;
| JASSeqParser::cmdChildReadPort&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {ChildAndPort[1]} {Register[1]}&amp;lt;br/&amp;gt;Reads the value from the child track&#039;s port given by ChildAndPort and writes it to this track&#039;s Register. The top 4 bits of ChildAndPort (0-15) represent the number of the child track, the bottom 4 bits (0-15) the port.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D8&lt;br /&gt;
| JASSeqParser::cmdRegLoad&lt;br /&gt;
| {OpCode[1]} {Setting[1]} {Unknown[1]} {Variable[1]}&amp;lt;br /&amp;gt;OpCode: one byte, D8.&amp;lt;br /&amp;gt;Setting: one byte with unknown range. Different bytes will trigger different effects:&amp;lt;br /&amp;gt;- 0x62: set PPQN (seen in BMS)&amp;lt;br /&amp;gt;- 0x6B: set PPQN (seen in SC)&amp;lt;br /&amp;gt;Unknown: one byte with unknown range and purpose.&amp;lt;br /&amp;gt;Variable: one byte with different range and purpose depending on the Setting byte.&lt;br /&gt;
| D8 62 00 78&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;D8: OpCode&amp;lt;br /&amp;gt;62: set PPQN&amp;lt;br /&amp;gt;00: Unknown&amp;lt;br /&amp;gt;78: PPQN 120&lt;br /&gt;
| Different purposes.&lt;br /&gt;
|-&lt;br /&gt;
| D9&lt;br /&gt;
| JASSeqParser::cmdReg&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DA&lt;br /&gt;
| JASSeqParser::cmdReg&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DB&lt;br /&gt;
| JASSeqParser::cmdRegUni&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DC&lt;br /&gt;
| JASSeqParser::cmdRegTblLoad&lt;br /&gt;
| {OpCode[1]} {AccessMode[1]} {Destination[1]} {Offset[3]} {Index[1]}&lt;br /&gt;
OpCode: One Byte, 0xDC &lt;br /&gt;
AccessMode: Determines how the sequence accesses the table. &lt;br /&gt;
Destination: 24-bit offset of table&lt;br /&gt;
Index: Register target index into table&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DD&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DE&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DF&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| E0&lt;br /&gt;
| JASSeqParser::cmdTempo&lt;br /&gt;
| {OpCode[1]} {Unknown[1]} {BPM[1]}&amp;lt;br /&amp;gt;OpCode: one byte, E0.&amp;lt;br /&amp;gt;Unknown: one byte with unknown range and purpose.&amp;lt;br /&amp;gt;BPM: one byte with range 0x00 through 0xFF. 0x78 = 120, F0 = 240.&lt;br /&gt;
| E0 00 90&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;E0: OpCode&amp;lt;br /&amp;gt;00: Unknown&amp;lt;br /&amp;gt;90: BPM 144&lt;br /&gt;
| Defines the tempo (playback speed) of the BMS file.&lt;br /&gt;
|-&lt;br /&gt;
| E1&lt;br /&gt;
| JASSeqParser::cmdBankPrg&lt;br /&gt;
| {OpCode[1]} {Bank[1]} {Program[1]}&amp;lt;br /&amp;gt;OpCode: one byte, E1.&amp;lt;br /&amp;gt;Bank: one byte with range 0x00 through 0xFF. This byte represents a WSYS ID.&amp;lt;br /&amp;gt;Program: one byte ranging from 0x00 through 0xFF. This byte represents a LIST entry in the IBNK belonging to the defined WSYS ID.&lt;br /&gt;
| E1 01 0F&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;E1: OpCode&amp;lt;br /&amp;gt;01: WSYS ID 1&amp;lt;br /&amp;gt;0F: IBNK LIST entry 15&amp;lt;br /&amp;gt;(01 0F is the percussion set for Yoshi Drums)&lt;br /&gt;
| Defines/changes patch and bank to be played on the target channel. A combination of E2 and E3.&lt;br /&gt;
|-&lt;br /&gt;
| E2&lt;br /&gt;
| JASSeqParser::cmdBank&lt;br /&gt;
| {OpCode[1]} {Bank[1]}&amp;lt;br /&amp;gt;OpCode: one byte, E2.&amp;lt;br /&amp;gt;Bank: one byte with range 0x00 through 0xFF. This byte represents a WSYS ID.&lt;br /&gt;
| E2 53&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;E2: OpCode&amp;lt;br /&amp;gt;53: WSYS ID 83&amp;lt;br /&amp;gt;(This bank holds sounds for Megahammer)&lt;br /&gt;
| Defines/changes the WSYS/IBNK (bank) whose sounds are to be used in a channel.&amp;lt;/br&amp;gt;&lt;br /&gt;
Timing Channel: If the track is on a channel for timing and chord usage, this command instead defines the ID of the note scale to be used from the [[CIT (File Format)|CIT]].&lt;br /&gt;
|-&lt;br /&gt;
| E3&lt;br /&gt;
| JASSeqParser::cmdPrg&lt;br /&gt;
| {OpCode[1]} {Program[1]}&amp;lt;br /&amp;gt;OpCode: one byte, E3.&amp;lt;br /&amp;gt;Program: one byte with range 0x00 through 0xFF. This byte represents a LIST entry in the [[IBNK]] belonging to the defined WSYS ID.&lt;br /&gt;
| E3 0B&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;E3: OpCode&amp;lt;br /&amp;gt;0B: IBNK LIST entry 11&amp;lt;br /&amp;gt;(In relation to Megahammer, this Program holds movement related sounds)&lt;br /&gt;
| Defines the Instrument Patch / Keyboard of an [[IBNK]] (bank). If no E2 Bank Select Command was used before, it will default to Bank 0.&amp;lt;/br&amp;gt;&lt;br /&gt;
Timing Channel: If the track is on a channel for timing and chord usage, this command instead defines the ID of the chord to be used from the [[CIT (File Format)|CIT]].&lt;br /&gt;
|-&lt;br /&gt;
| E4&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| E5&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| E6&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| E7&lt;br /&gt;
| JASSeqParser::cmdEnvScaleSet&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| E8&lt;br /&gt;
| JASSeqParser::cmdEnvSet&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| E9&lt;br /&gt;
| JASSeqParser::cmdSimpleADSR&lt;br /&gt;
| {OpCode[1]} {Attack[2]} {Sustain[2]} {Decay[2]} {Amplitude[2]} {Release[2]}&amp;lt;br/&amp;gt;OpCode: one byte, E9.&amp;lt;br/&amp;gt;Attack: two bytes with range 0x0000 through 0x7FFF. Define the duration of fade-in in ticks.&amp;lt;br/&amp;gt;Sustain: two bytes with range 0x0000 through 0x7FFF. Define the duration for how long the wave is kept at maximum amplitude in ticks.&amp;lt;br/&amp;gt;Decay: two bytes with range 0x0000 through 0x7FFF. Define the duration of fade between maximum and controlled amplitude in ticks.&amp;lt;br/&amp;gt;Amplitude: two bytes with range 0x0000 through 0x7FFF. Define the volume of the wave for the 2nd sustain duration.&amp;lt;br/&amp;gt;Release: two bytes with range 0x0000 through 0x7FFF. Define the duration of fade-out in ticks.&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;If Amplitude is set to 0x7FFF, Sustain and Decay won&#039;t have an audible effect to the wave.&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;The Attack, Decay and Release operations affect the volume of the wave linearly.&lt;br /&gt;
| E9 00 80 01 00 00 80 5F FF 00 3C&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;E9: OpCode&amp;lt;br/&amp;gt;00 80: Attack (fade-in) for 128 ticks&amp;lt;br/&amp;gt;01 00: Sustain for 256 ticks&amp;lt;br/&amp;gt;00 80: Decay for 128 ticks&amp;lt;br/&amp;gt;5F FF: Amplitude of 75% compared to maximum&amp;lt;br/&amp;gt;00 3C: Release (fade-out) for 60 ticks&lt;br /&gt;
| Perform ADSR operations on a key. Must be placed before the actual key presses. [https://cdn.discordapp.com/attachments/1361554635369873490/1376201837237239899/image.png?ex=68347756&amp;amp;is=683325d6&amp;amp;hm=10661c473bb1ecb6187a17baafbc22c7d8af0a59cb0ceb87d7c85f42a8fee54c See this image for a visual representation of the ADSR operations].&lt;br /&gt;
|-&lt;br /&gt;
| EA&lt;br /&gt;
| JASSeqParser::cmdBusConnect&lt;br /&gt;
| {OpCode[1]} {Unknown[1]} {Unknown[1]} {Unknown[1]}&amp;lt;br /&amp;gt;OpCode: one byte, EA.&amp;lt;br /&amp;gt;Unknown: one byte with unknown range and purpose.&lt;br /&gt;
| EA 00 FF FF&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;EA: OpCode&amp;lt;br /&amp;gt;00: Unknown&amp;lt;br /&amp;gt;FF: Unknown&amp;lt;br /&amp;gt;FF: Unknown&lt;br /&gt;
| Unknown purpose, only seen in SC.&lt;br /&gt;
|-&lt;br /&gt;
| EB&lt;br /&gt;
| JASSeqParser::cmdIIRCutOff&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {Cutoff[1]}&amp;lt;br/&amp;gt;Sets the track&#039;s IIR filter parameters to values derived from the Cutoff value via a lookup table.&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;Cutoff: one byte in the range 0-127. The IIR filter parameters are derived from this value.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| EC&lt;br /&gt;
| JASSeqParser::cmdIIRSet&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {Param1[2]} {Param2[2]} {Param3[2]} {Param4[2]}&amp;lt;br/&amp;gt;Sets the track&#039;s IIR filter parameters to the four parameter values, which are interpreted as signed 16-bit integers.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| ED&lt;br /&gt;
| JASSeqParser::cmdFIRSet&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {Pointer[3]}&amp;lt;br/&amp;gt;Reads a FIR parameter table (8 two-byte signed integer values = 16 bytes) at the given Pointer and sets the track&#039;s FIR filter parameters to these values.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| EE&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| EF&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F0&lt;br /&gt;
| JASSeqParser::cmdWait&lt;br /&gt;
| {OpCode[1]} {WaitTime[n]}&amp;lt;br /&amp;gt;OpCode: one byte, 0xF0.&amp;lt;br /&amp;gt;WaitTime: one or more bytes with range 0x00 through 0xFF. If the leading byte is 0x80 (bit 7 = 1) or greater, another following byte will be taken into account. Time is measured in ticks here.&lt;br /&gt;
| F0 60 (96 Ticks)&amp;lt;br /&amp;gt;F0 81 56 (214 Ticks)&amp;lt;br /&amp;gt;F0 83 81 30 (49328 Ticks)&lt;br /&gt;
| Creates a delay, used to define the length of a Note or gap between Notes.&lt;br /&gt;
|-&lt;br /&gt;
| F1&lt;br /&gt;
| JASSeqParser::cmdWaitByte&lt;br /&gt;
| {OpCode[1]} {WaitTime[1]}&lt;br /&gt;
Waits for WaitTime ticks&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F2&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F3&lt;br /&gt;
| JASSeqParser::cmdSetIntTable&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F4&lt;br /&gt;
| JASSeqParser::cmdSetInterrupt&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F5&lt;br /&gt;
| JASSeqParser::cmdDisInterrupt&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F6&lt;br /&gt;
| JASSeqParser::cmdRetI&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F7&lt;br /&gt;
| JASSeqParser::cmdClrI&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F8&lt;br /&gt;
| JASSeqParser::cmdIntTimer&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F9&lt;br /&gt;
| JASSeqParser::cmdSyncCPU&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| FA&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| FB&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| FC&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| FD&lt;br /&gt;
| JASSeqParser::cmdPrintf&lt;br /&gt;
| {OpCode[1]} {Message[n]} {NullTerminator[1]}&amp;lt;br /&amp;gt;OpCode: one byte, FD.&amp;lt;br /&amp;gt;Message: ASCII string of undefined length, ending with &amp;lt;code&amp;gt;\n&amp;lt;/code&amp;gt;.&amp;lt;br /&amp;gt;NullTerminator: one byte, 00.&lt;br /&gt;
| FD 48 65 6C 6C 6F 5C 6E 00&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;FD: OpCode&amp;lt;br /&amp;gt;48 65 6C 6C 6F 5C 6E: &amp;quot;Hello\n&amp;quot;&amp;lt;br /&amp;gt;00: Null-terminator&lt;br /&gt;
| Prints a specified message to OSReport.&lt;br /&gt;
|-&lt;br /&gt;
| FE&lt;br /&gt;
| JASSeqParser::cmdNop&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| FF&lt;br /&gt;
| JASSeqParser::cmdFinish&lt;br /&gt;
| {OpCode[1]}&amp;lt;br /&amp;gt;OpCode: one byte, 0xFF.&lt;br /&gt;
| &lt;br /&gt;
| Stops execution of a Track.&lt;br /&gt;
|-&lt;br /&gt;
| B000&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B001&lt;br /&gt;
| JASSeqParser::cmdDump&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Trivia ==&lt;br /&gt;
* Many BMS filenames contain the suffix &#039;&#039;midi_cnv&#039;&#039;. This could indicate that Midis were first converted to a (perhaps text-based) CNV file, which was then converted to the BMS format. A similar situation applies to Nintendo&#039;s SDK tool for converting the Nintendo DS&#039;s SSEQ sequence format, which first converts Midis to a text-based SMFT format, which is then converted to the final SSEQ format.&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
[https://github.com/magcius/vgmtrans VGMTrans Fork] (analyses and converts BMS to MIDI)&amp;lt;br&amp;gt;&lt;br /&gt;
[https://cdn.discordapp.com/attachments/421356154795458570/1291660143758413824/BMS_DEC.zip?ex=6719f440&amp;amp;is=6718a2c0&amp;amp;hm=f44c5197a070f30a00283858942f9e4ae5066034862eba006f8abe87a228a6aa&amp;amp; BMS_DEC] (converts BMS to MIDI)&amp;lt;br&amp;gt;&lt;br /&gt;
[https://github.com/XAYRGA/JaiSeqX JaiSeqX] (playback for JAudio1 and JAudio2 BMS files)&lt;/div&gt;</summary>
		<author><name>RavuAlHemio</name></author>
	</entry>
	<entry>
		<id>https://www.lumasworkshop.com/w/index.php?title=BMS_(File_Format)&amp;diff=1045</id>
		<title>BMS (File Format)</title>
		<link rel="alternate" type="text/html" href="https://www.lumasworkshop.com/w/index.php?title=BMS_(File_Format)&amp;diff=1045"/>
		<updated>2026-07-05T09:12:43Z</updated>

		<summary type="html">&lt;p&gt;RavuAlHemio: document cmd(Parent|Child)(Read|Write)Port&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:File formats]]&lt;br /&gt;
== File Format ==&lt;br /&gt;
BMS files are &#039;&#039;&#039;B&#039;&#039;&#039;inary &#039;&#039;&#039;M&#039;&#039;&#039;usic &#039;&#039;&#039;S&#039;&#039;&#039;equences that store commands for the audio engine to play notes, similar to the MIDI file format.&lt;br /&gt;
&lt;br /&gt;
== Structure ==&lt;br /&gt;
BMS consists of pure assembly code, where each track containing events such as notes, patch changes, etc. is an independent executor thread with opcodes to execute. &lt;br /&gt;
In contrast to Midi, events are read linearly per channel in a data stream and interpreted byte by byte. This means that multiple tracks within the same channel cannot be played back synchronously and would therefore have to be baked onto one track. However, BMS tracks can jump or call to different places in the file, e.g. to loop the song or to ensure a very high storage efficiency.&lt;br /&gt;
&lt;br /&gt;
The game&#039;s audio engine can only play up to 16 tracks at a time - very similar to MIDI with its 16 channels.&lt;br /&gt;
&lt;br /&gt;
BMS also includes extended MIDI operations, such as more powerful versions of controllers, with fade-in capability, and higher resolution control values. However, no song in either Galaxy game makes use of this.&lt;br /&gt;
&lt;br /&gt;
=== Filestructure ===&lt;br /&gt;
There are no headers or filesize checks. The file usually starts with the following:&lt;br /&gt;
*&#039;&#039;&#039;Global Track / Tempo Track&#039;&#039;&#039; BMS always starts (very similary to Midi&#039;s &amp;quot;Tempo Track&amp;quot; or &amp;quot;Conductor Track&amp;quot;) directly with track containing Meta-Events, which only contains global control data, typically:&lt;br /&gt;
**Pulses per Quarter Note (PPQN) set&lt;br /&gt;
**Tempo (BPM)&lt;br /&gt;
**Looping commands (to keep BPM changes synchronized during the song if necessary)&lt;br /&gt;
**OpenTrack command that starts playing the following track&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Channel Specific Track&#039;&#039;&#039;  a kind of management track for channel/Main Track definitions&lt;br /&gt;
**Usally contains &#039;&#039;&#039;C1&#039;&#039;&#039; OpenTrack events for each executor track (channel). For some unknown reason, the exact same looping and duration events from the global track need to be repeated here, otherwise some events such as pitchwheel will not work in the song.&lt;br /&gt;
&lt;br /&gt;
== Data ==&lt;br /&gt;
BMS files contain raw instructions for the audio engine without any headers or filesize checks. Each instruction (OpCode) stands for its own function in the engine. The following table lists all JAudio2 OpCodes that have functions in SMG2:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! OpCode&lt;br /&gt;
! Function (SMG/SMG2)&lt;br /&gt;
! Usage&lt;br /&gt;
! Example&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 00&amp;lt;br /&amp;gt;01&amp;lt;br /&amp;gt;02&amp;lt;br /&amp;gt;...&amp;lt;br /&amp;gt;7D&amp;lt;br /&amp;gt;7E&amp;lt;br /&amp;gt;7F&lt;br /&gt;
| JASSeqParser::parseNoteOn&lt;br /&gt;
| {OpCode[1]} {Voice[1]} {Velocity[1]} {Wait[n]}&amp;lt;br /&amp;gt;OpCode: one byte with range 0x00 through 0x7F. 0x00 = C-1, 0x3C = C4 (middle C), 0x7F = G9.&amp;lt;br /&amp;gt;Voice: one byte with range 0x01 through 0x07 (needs testing/verification). Each Voice can only hold one Note.&amp;lt;br /&amp;gt;Velocity: one byte with range 0x00 through 0x7F. 0x00 = 0, 0x7F = 127.&amp;lt;br /&amp;gt;Wait: variable length, only present for Midi Gate notes (Voice is not 1 - 7).&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;If the Voice is not 1 - 7, the game will treat this note as a Midi Gate note, and will expect that the Wait value is present. The Wait value is one or more bytes with range 0x00 through 0xFF; each time the byte is 0x80 or greater (i.e. bit 7 = 1), another following byte will be taken into account. If the Wait value is 0x00, the game waits until the note has finished; otherwise, it waits the number of ticks specified in the Wait value.&lt;br /&gt;
| 64 02 68&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;64: Key E4&amp;lt;br /&amp;gt;02: Voice 2&amp;lt;br /&amp;gt;68: Velocity 104&lt;br /&gt;
| Starts playing a Note with the previously defined Instrument (see E1, E2 and E3).&lt;br /&gt;
|-&lt;br /&gt;
| 80&lt;br /&gt;
| JASSeqParser::cmdWaitByte&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Seems to do nothing based on the code.&lt;br /&gt;
|-&lt;br /&gt;
| 81&amp;lt;br /&amp;gt;...&amp;lt;br /&amp;gt;87&lt;br /&gt;
| JASSeqParser::parseNoteOff&lt;br /&gt;
| {OpCode[1]}&amp;lt;br /&amp;gt;OpCode: one byte with range 0x81 through 0x87. 0x81 = Close Voice 1, 0x87 = Close Voice 7.&lt;br /&gt;
| 81: Stop voice ID 1&lt;br /&gt;
| Stops playing a Note.&lt;br /&gt;
|-&lt;br /&gt;
| 88&amp;lt;br /&amp;gt;...&amp;lt;br /&amp;gt;8F&lt;br /&gt;
| Unknown&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 90&amp;lt;br /&amp;gt;...&amp;lt;br /&amp;gt;9F&lt;br /&gt;
| Unknown&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A0&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A1&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A2&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A3&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A4&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A5&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A6&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A7&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A8&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A9&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| AA&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| AB&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| AC&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| AD&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| AE&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| AF&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B0&lt;br /&gt;
| Extended Opcode Indicator&lt;br /&gt;
| See B000 or B001.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B1&lt;br /&gt;
| JASSeqParser::cmdNoteOn&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B2&lt;br /&gt;
| JASSeqParser::cmdNoteOff&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B3&lt;br /&gt;
| JASSeqParser::cmdNote&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B4&lt;br /&gt;
| JASSeqParser::cmdSetLastNote&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B5&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B6&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B7&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B8&lt;br /&gt;
| JASSeqParser::cmdParamE&lt;br /&gt;
| {OpCode[1]} {Target[1]} {Parameter[1]}&amp;lt;br/&amp;gt;OpCode: one byte, B8.&amp;lt;br/&amp;gt;Target: one byte with range 0x00 through 0x03.&amp;lt;br/&amp;gt;Parameter: one byte with range 0x00 through 0xFF (Int8), whichs purpose depends on the target:&lt;br /&gt;
* Target 0: Volume. 0x7F = Full volume (100%), 0x00 = Silent (0%). 0x80 through 0xFF are treated the same as silence (0%).&lt;br /&gt;
* Target 1: Pitch. Adding one (0x01) or subtracting one (0xFF) increases/decreases pitch by one key, like from D#4 to E4.&lt;br /&gt;
* Target 2: Reverb. 0x7F = Strong reverb, 0x00 = no reverb. 0x80 through 0xFF are treated the same as no reverb.&lt;br /&gt;
* Target 3: Panning. 0x7F = right channel, 0x00 = center, 0x80 = left channel.&lt;br /&gt;
| B8 00 64&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;B8: OpCode&amp;lt;br/&amp;gt;00: Target (Volume)&amp;lt;br/&amp;gt;64: ~78% volume&lt;br /&gt;
| Allows different operations onto the music track&lt;br /&gt;
|-&lt;br /&gt;
| B9&lt;br /&gt;
| JASSeqParser::cmdParamI&lt;br /&gt;
| {OpCode[1]} {Target[1]} {Parameter[2]}&amp;lt;br/&amp;gt;OpCode: one byte, B9.&amp;lt;br/&amp;gt;Target: one byte with range 0x00 through 0x03.&amp;lt;br/&amp;gt;Parameter: two bytes with range 0x0000 through 0xFFFF (Int16), whichs purpose depends on the target:&lt;br /&gt;
* Target 0: Volume. 0x7FFF = Full volume (100%), 0x0000 = Silent (0%). 0x8000 through 0xFFFF are treated the same as silence (0%).&lt;br /&gt;
* Target 1: Pitch. Adding one (0x0100) or subtracting one (0xFF00) increases/decreases pitch by one key, like from D#4 to E4. Values inbetween can be used for fine-tuning.&lt;br /&gt;
* Target 2: Reverb. 0x7FFF = Strong reverb, 0x0000 = no reverb. 0x8000 through 0xFFFF are treated the same as no reverb.&lt;br /&gt;
* Target 3: Panning. 0x7FFF = right channel, 0x0000 = center, 0x8000 = left channel.&lt;br /&gt;
| B9 01 04 00&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;B9: OpCode&amp;lt;br/&amp;gt;01: Target (Pitch)&amp;lt;br/&amp;gt;04 00: Pitch of 4 keys&lt;br /&gt;
| Allows different operations with higher precision onto the music track&lt;br /&gt;
|-&lt;br /&gt;
| BA&lt;br /&gt;
| JASSeqParser::cmdParamEI&lt;br /&gt;
| {OpCode[1]} {Target[1]} {Parameter[1]} {Fade time[2]}&amp;lt;br/&amp;gt;OpCode: one byte, BA.&amp;lt;br/&amp;gt;Target: one byte with range 0x00 through 0x03.&amp;lt;br/&amp;gt;Parameter: one byte with range 0x00 through 0xFF (Int8), whichs purpose depends on the target:&lt;br /&gt;
* Target 0: Volume. 0x7F = Full volume (100%), 0x00 = Silent (0%). 0x80 through 0xFF are treated the same as silence (0%).&lt;br /&gt;
* Target 1: Pitch. Adding one (0x01) or subtracting one (0xFF) increases/decreases pitch by one key, like from D#4 to E4.&lt;br /&gt;
* Target 2: Reverb. 0x7F = Strong reverb, 0x00 = no reverb. 0x80 through 0xFF are treated the same as no reverb.&lt;br /&gt;
* Target 3: Panning. 0x7F = right channel, 0x00 = center, 0x80 = left channel.&lt;br /&gt;
Fade time: two bytes with range 0x0000 through 0xFFFF. The amount of time in ticks until the Parameter value is met.&lt;br /&gt;
| BA 02 22 01 68&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;BA: OpCode&amp;lt;br/&amp;gt;02: Target (Reverb)&amp;lt;br/&amp;gt;22: Reverb of strength 34&amp;lt;br/&amp;gt;01 68: 360 Ticks&lt;br /&gt;
| Allows different operations with fade time onto the music track&lt;br /&gt;
|-&lt;br /&gt;
| BB&lt;br /&gt;
| JASSeqParser::cmdParamII&lt;br /&gt;
| {OpCode[1]} {Target[1]} {Parameter[2]} {Fade time[2]}&amp;lt;br/&amp;gt;OpCode: one byte, BB.&amp;lt;br/&amp;gt;Target: one byte with range 0x00 through 0x03.&amp;lt;br/&amp;gt;Parameter: two bytes with range 0x0000 through 0xFFFF (Int16), whichs purpose depends on the target:&lt;br /&gt;
* Target 0: Volume. 0x7FFF = Full volume (100%), 0x0000 = Silent (0%). 0x8000 through 0xFFFF are treated the same as silence (0%).&lt;br /&gt;
* Target 1: Pitch. Adding one (0x0100) or subtracting one (0xFF00) increases/decreases pitch by one key, like from D#4 to E4. Values inbetween can be used for fine-tuning.&lt;br /&gt;
* Target 2: Reverb. 0x7FFF = Strong reverb, 0x0000 = no reverb. 0x8000 through 0xFFFF are treated the same as no reverb.&lt;br /&gt;
* Target 3: Panning. 0x7FFF = right channel, 0x0000 = center, 0x8000 = left channel.&lt;br /&gt;
Fade time: two bytes with range 0x0000 through 0xFFFF. The amount of time in ticks until the Parameter value is met.&lt;br /&gt;
| BA 03 7F FF 02 00&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;BB: OpCode&amp;lt;br/&amp;gt;03: Target (Panning)&amp;lt;br/&amp;gt;7F FF: Panned to right channel&amp;lt;br/&amp;gt;02 00: 512 Ticks&lt;br /&gt;
| Allows different operations with higher precision and fade time onto the music track&lt;br /&gt;
|-&lt;br /&gt;
| BC&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| BD&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| BE&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| BF&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| C0&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| C1&lt;br /&gt;
| JASSeqParser::cmdOpenTrack&lt;br /&gt;
| {OpCode[1]} {ChannelNumber[1]} {TrackPointer[3]}&amp;lt;br /&amp;gt;OpCode: one byte, C1.&amp;lt;br /&amp;gt;ChannelNumber: one byte with range 0x00 through 0x0F. 0x00 = Channel 0, 0x0F = Channel 15.&amp;lt;br /&amp;gt;TrackPointer: three bytes with range 0x000000 through 0xFFFFFF. Defines a start offset in the file to play.&lt;br /&gt;
| C1 04 05 B4 73&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;C1: OpCode&amp;lt;br /&amp;gt;04: Channel 4&amp;lt;br /&amp;gt;05 B4 73: Offset to track&lt;br /&gt;
| Starts playing a certain track on a certain channel. Channel 15 is usually reserved for Yoshi Drums. [[SMR.szs#BGM_parameters|If enabled in the BGM parameter table in SMR.szs]], channel 0 can be used for timing and chords usage that do not play any instruments from the sound bank.&lt;br /&gt;
|-&lt;br /&gt;
| C2&lt;br /&gt;
| JASSeqParser::cmdCloseTrack&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| C3&lt;br /&gt;
| JASSeqParser::cmdCall&lt;br /&gt;
| {OpCode[1]} {Pointer[3]}&amp;lt;br /&amp;gt;OpCode: one byte, C3.&amp;lt;br /&amp;gt;Pointer: three bytes with range 0x000000 through 0xFFFFFF. Defines an offset in the file.&lt;br /&gt;
| C3 00 00 40&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;C3: OpCode&amp;lt;br /&amp;gt;00 00 40: Offset&lt;br /&gt;
| Redirects execution to the defined offset. Execution can return with C5.&lt;br /&gt;
|-&lt;br /&gt;
| C4&lt;br /&gt;
| JASSeqParser::cmdCallF&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| C5&lt;br /&gt;
| JASSeqParser::cmdRet&lt;br /&gt;
| {OpCode[1]}&amp;lt;br /&amp;gt;OpCode: one byte, C5.&lt;br /&gt;
| &lt;br /&gt;
| Returns redirected execution (like from C3) to the initial call.&lt;br /&gt;
|-&lt;br /&gt;
| C6&lt;br /&gt;
| JASSeqParser::cmdRetF&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| C7&lt;br /&gt;
| JASSeqParser::cmdJmp&lt;br /&gt;
| {OpCode[1]} {Pointer[3]}&amp;lt;br /&amp;gt;OpCode: one byte, C7.&amp;lt;br /&amp;gt;Pointer: three bytes with range 0x000000 through 0xFFFFFF. Defines an offset in the file.&lt;br /&gt;
| C7 08 02 34&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;C7: OpCode&amp;lt;br /&amp;gt;08 02 34: Offset&lt;br /&gt;
| Redirects execution to the defined offset, used for Loops.&lt;br /&gt;
|-&lt;br /&gt;
| C8&lt;br /&gt;
| JASSeqParser::cmdJmpF&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| C9&lt;br /&gt;
| JASSeqParser::cmdJmpTable&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CA&lt;br /&gt;
| JASSeqParser::cmdCallTable&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CB&lt;br /&gt;
| JASSeqParser::cmdLoopS&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CC&lt;br /&gt;
| JASSeqParser::cmdLoopE&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CD&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CE&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CF&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D0&lt;br /&gt;
| JASSeqParser::cmdReadPort&lt;br /&gt;
| {OpCode[1]} {Source[1]} {Destination[1]}&lt;br /&gt;
Opcode: One byte, D0&lt;br /&gt;
Source: One byte, 0-15 , source port &lt;br /&gt;
Destination: One byte, 0-32, destination register&lt;br /&gt;
| &lt;br /&gt;
| Imports the value from sequence port Source and writes it to destination register &#039;Destination&#039;, the value is also written to register 3&lt;br /&gt;
|-&lt;br /&gt;
| D1&lt;br /&gt;
| JASSeqParser::cmdWritePort&lt;br /&gt;
| {OpCode[1]} {Source[1]} {Destination[1]}&lt;br /&gt;
Opcode: One byte, D1&lt;br /&gt;
Source: One byte, source register, 0-32&lt;br /&gt;
Destination: One Byte, destination port, 0-15&lt;br /&gt;
| &lt;br /&gt;
| Writes the value in register &#039;Source&#039; and saves it to register 3, as well as port &#039;Destination&#039;&lt;br /&gt;
|-&lt;br /&gt;
| D2&lt;br /&gt;
| JASSeqParser::cmdCheckPortImport&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D3&lt;br /&gt;
| JASSeqParser::cmdCheckPortExport&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D4&lt;br /&gt;
| JASSeqParser::cmdParentWritePort&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {Port[1]} {Register[1]}&amp;lt;br/&amp;gt;Reads the value from this track&#039;s Register (0-32) and writes it to the parent track&#039;s Port.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D5&lt;br /&gt;
| JASSeqParser::cmdChildWritePort&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {ChildAndPort[1]} {Register[1]}&amp;lt;br/&amp;gt;Reads the value from this track&#039;s Register (0-32) and writes it to the child track&#039;s port given by ChildAndPort. The top 4 bits of ChildAndPort (0-15) represent the number of the child track, the bottom 4 bits (0-15) the port.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D6&lt;br /&gt;
| JASSeqParser::cmdParentReadPort&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {Port[1]} {Register[1]}&amp;lt;br/&amp;gt;Reads the value from the parent track&#039;s Port (0-15) and writes it to this track&#039;s Register (0-32).&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D7&lt;br /&gt;
| JASSeqParser::cmdChildReadPort&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {ChildAndPort[1]} {Register[1]}&amp;lt;br/&amp;gt;Reads the value from the child track&#039;s port given by ChildAndPort and writes it to this track&#039;s Register. The top 4 bits of ChildAndPort (0-15) represent the number of the child track, the bottom 4 bits (0-15) the port.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D8&lt;br /&gt;
| JASSeqParser::cmdRegLoad&lt;br /&gt;
| {OpCode[1]} {Setting[1]} {Unknown[1]} {Variable[1]}&amp;lt;br /&amp;gt;OpCode: one byte, D8.&amp;lt;br /&amp;gt;Setting: one byte with unknown range. Different bytes will trigger different effects:&amp;lt;br /&amp;gt;- 0x62: set PPQN (seen in BMS)&amp;lt;br /&amp;gt;- 0x6B: set PPQN (seen in SC)&amp;lt;br /&amp;gt;Unknown: one byte with unknown range and purpose.&amp;lt;br /&amp;gt;Variable: one byte with different range and purpose depending on the Setting byte.&lt;br /&gt;
| D8 62 00 78&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;D8: OpCode&amp;lt;br /&amp;gt;62: set PPQN&amp;lt;br /&amp;gt;00: Unknown&amp;lt;br /&amp;gt;78: PPQN 120&lt;br /&gt;
| Different purposes.&lt;br /&gt;
|-&lt;br /&gt;
| D9&lt;br /&gt;
| JASSeqParser::cmdReg&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DA&lt;br /&gt;
| JASSeqParser::cmdReg&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DB&lt;br /&gt;
| JASSeqParser::cmdRegUni&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DC&lt;br /&gt;
| JASSeqParser::cmdRegTblLoad&lt;br /&gt;
| {OpCode[1]} {AccessMode[1]} {Destination[1]} {Offset[3]} {Index[1]}&lt;br /&gt;
OpCode: One Byte, 0xDC &lt;br /&gt;
AccessMode: Determines how the sequence accesses the table. &lt;br /&gt;
Destination: 24-bit offset of table&lt;br /&gt;
Index: Register target index into table&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DD&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DE&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DF&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| E0&lt;br /&gt;
| JASSeqParser::cmdTempo&lt;br /&gt;
| {OpCode[1]} {Unknown[1]} {BPM[1]}&amp;lt;br /&amp;gt;OpCode: one byte, E0.&amp;lt;br /&amp;gt;Unknown: one byte with unknown range and purpose.&amp;lt;br /&amp;gt;BPM: one byte with range 0x00 through 0xFF. 0x78 = 120, F0 = 240.&lt;br /&gt;
| E0 00 90&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;E0: OpCode&amp;lt;br /&amp;gt;00: Unknown&amp;lt;br /&amp;gt;90: BPM 144&lt;br /&gt;
| Defines the tempo (playback speed) of the BMS file.&lt;br /&gt;
|-&lt;br /&gt;
| E1&lt;br /&gt;
| JASSeqParser::cmdBankPrg&lt;br /&gt;
| {OpCode[1]} {Bank[1]} {Program[1]}&amp;lt;br /&amp;gt;OpCode: one byte, E1.&amp;lt;br /&amp;gt;Bank: one byte with range 0x00 through 0xFF. This byte represents a WSYS ID.&amp;lt;br /&amp;gt;Program: one byte ranging from 0x00 through 0xFF. This byte represents a LIST entry in the IBNK belonging to the defined WSYS ID.&lt;br /&gt;
| E1 01 0F&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;E1: OpCode&amp;lt;br /&amp;gt;01: WSYS ID 1&amp;lt;br /&amp;gt;0F: IBNK LIST entry 15&amp;lt;br /&amp;gt;(01 0F is the percussion set for Yoshi Drums)&lt;br /&gt;
| Defines/changes patch and bank to be played on the target channel. A combination of E2 and E3.&lt;br /&gt;
|-&lt;br /&gt;
| E2&lt;br /&gt;
| JASSeqParser::cmdBank&lt;br /&gt;
| {OpCode[1]} {Bank[1]}&amp;lt;br /&amp;gt;OpCode: one byte, E2.&amp;lt;br /&amp;gt;Bank: one byte with range 0x00 through 0xFF. This byte represents a WSYS ID.&lt;br /&gt;
| E2 53&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;E2: OpCode&amp;lt;br /&amp;gt;53: WSYS ID 83&amp;lt;br /&amp;gt;(This bank holds sounds for Megahammer)&lt;br /&gt;
| Defines/changes the WSYS/IBNK (bank) whose sounds are to be used in a channel.&amp;lt;/br&amp;gt;&lt;br /&gt;
Timing Channel: If the track is on a channel for timing and chord usage, this command instead defines the ID of the note scale to be used from the [[CIT (File Format)|CIT]].&lt;br /&gt;
|-&lt;br /&gt;
| E3&lt;br /&gt;
| JASSeqParser::cmdPrg&lt;br /&gt;
| {OpCode[1]} {Program[1]}&amp;lt;br /&amp;gt;OpCode: one byte, E3.&amp;lt;br /&amp;gt;Program: one byte with range 0x00 through 0xFF. This byte represents a LIST entry in the [[IBNK]] belonging to the defined WSYS ID.&lt;br /&gt;
| E3 0B&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;E3: OpCode&amp;lt;br /&amp;gt;0B: IBNK LIST entry 11&amp;lt;br /&amp;gt;(In relation to Megahammer, this Program holds movement related sounds)&lt;br /&gt;
| Defines the Instrument Patch / Keyboard of an [[IBNK]] (bank). If no E2 Bank Select Command was used before, it will default to Bank 0.&amp;lt;/br&amp;gt;&lt;br /&gt;
Timing Channel: If the track is on a channel for timing and chord usage, this command instead defines the ID of the chord to be used from the [[CIT (File Format)|CIT]].&lt;br /&gt;
|-&lt;br /&gt;
| E4&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| E5&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| E6&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| E7&lt;br /&gt;
| JASSeqParser::cmdEnvScaleSet&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| E8&lt;br /&gt;
| JASSeqParser::cmdEnvSet&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| E9&lt;br /&gt;
| JASSeqParser::cmdSimpleADSR&lt;br /&gt;
| {OpCode[1]} {Attack[2]} {Sustain[2]} {Decay[2]} {Amplitude[2]} {Release[2]}&amp;lt;br/&amp;gt;OpCode: one byte, E9.&amp;lt;br/&amp;gt;Attack: two bytes with range 0x0000 through 0x7FFF. Define the duration of fade-in in ticks.&amp;lt;br/&amp;gt;Sustain: two bytes with range 0x0000 through 0x7FFF. Define the duration for how long the wave is kept at maximum amplitude in ticks.&amp;lt;br/&amp;gt;Decay: two bytes with range 0x0000 through 0x7FFF. Define the duration of fade between maximum and controlled amplitude in ticks.&amp;lt;br/&amp;gt;Amplitude: two bytes with range 0x0000 through 0x7FFF. Define the volume of the wave for the 2nd sustain duration.&amp;lt;br/&amp;gt;Release: two bytes with range 0x0000 through 0x7FFF. Define the duration of fade-out in ticks.&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;If Amplitude is set to 0x7FFF, Sustain and Decay won&#039;t have an audible effect to the wave.&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;The Attack, Decay and Release operations affect the volume of the wave linearly.&lt;br /&gt;
| E9 00 80 01 00 00 80 5F FF 00 3C&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;E9: OpCode&amp;lt;br/&amp;gt;00 80: Attack (fade-in) for 128 ticks&amp;lt;br/&amp;gt;01 00: Sustain for 256 ticks&amp;lt;br/&amp;gt;00 80: Decay for 128 ticks&amp;lt;br/&amp;gt;5F FF: Amplitude of 75% compared to maximum&amp;lt;br/&amp;gt;00 3C: Release (fade-out) for 60 ticks&lt;br /&gt;
| Perform ADSR operations on a key. Must be placed before the actual key presses. [https://cdn.discordapp.com/attachments/1361554635369873490/1376201837237239899/image.png?ex=68347756&amp;amp;is=683325d6&amp;amp;hm=10661c473bb1ecb6187a17baafbc22c7d8af0a59cb0ceb87d7c85f42a8fee54c See this image for a visual representation of the ADSR operations].&lt;br /&gt;
|-&lt;br /&gt;
| EA&lt;br /&gt;
| JASSeqParser::cmdBusConnect&lt;br /&gt;
| {OpCode[1]} {Unknown[1]} {Unknown[1]} {Unknown[1]}&amp;lt;br /&amp;gt;OpCode: one byte, EA.&amp;lt;br /&amp;gt;Unknown: one byte with unknown range and purpose.&lt;br /&gt;
| EA 00 FF FF&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;EA: OpCode&amp;lt;br /&amp;gt;00: Unknown&amp;lt;br /&amp;gt;FF: Unknown&amp;lt;br /&amp;gt;FF: Unknown&lt;br /&gt;
| Unknown purpose, only seen in SC.&lt;br /&gt;
|-&lt;br /&gt;
| EB&lt;br /&gt;
| JASSeqParser::cmdIIRCutOff&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {Cutoff[1]}&amp;lt;br/&amp;gt;Sets the track&#039;s IIR filter parameters to values derived from the Cutoff value via a lookup table.&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;Cutoff: one byte in the range 0-127. The IIR filter parameters are derived from this value.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| EC&lt;br /&gt;
| JASSeqParser::cmdIIRSet&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {Param1[2]} {Param2[2]} {Param3[2]} {Param4[2]}&amp;lt;br/&amp;gt;Sets the track&#039;s IIR filter parameters to the four parameter values, which are interpreted as signed 16-bit integers.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| ED&lt;br /&gt;
| JASSeqParser::cmdFIRSet&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {Pointer[3]}&amp;lt;br/&amp;gt;Reads a FIR parameter table (8 two-byte signed integer values = 16 bytes) at the given Pointer and sets the track&#039;s FIR filter parameters to these values.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| EE&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| EF&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F0&lt;br /&gt;
| JASSeqParser::cmdWait&lt;br /&gt;
| {OpCode[1]} {WaitTime[n]}&amp;lt;br /&amp;gt;OpCode: one byte, 0xF0.&amp;lt;br /&amp;gt;WaitTime: one or more bytes with range 0x00 through 0xFF. If the leading byte is 0x80 (bit 7 = 1) or greater, another following byte will be taken into account. Time is measured in ticks here.&lt;br /&gt;
| F0 60 (96 Ticks)&amp;lt;br /&amp;gt;F0 81 56 (214 Ticks)&amp;lt;br /&amp;gt;F0 83 81 30 (49328 Ticks)&lt;br /&gt;
| Creates a delay, used to define the length of a Note or gap between Notes.&lt;br /&gt;
|-&lt;br /&gt;
| F1&lt;br /&gt;
| JASSeqParser::cmdWaitByte&lt;br /&gt;
| {OpCode[1]} {WaitTime[1]}&lt;br /&gt;
Waits for WaitTime ticks&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F2&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F3&lt;br /&gt;
| JASSeqParser::cmdSetIntTable&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F4&lt;br /&gt;
| JASSeqParser::cmdSetInterrupt&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F5&lt;br /&gt;
| JASSeqParser::cmdDisInterrupt&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F6&lt;br /&gt;
| JASSeqParser::cmdRetI&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F7&lt;br /&gt;
| JASSeqParser::cmdClrI&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F8&lt;br /&gt;
| JASSeqParser::cmdIntTimer&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F9&lt;br /&gt;
| JASSeqParser::cmdSyncCPU&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| FA&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| FB&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| FC&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| FD&lt;br /&gt;
| JASSeqParser::cmdPrintf&lt;br /&gt;
| {OpCode[1]} {Message[n]} {NullTerminator[1]}&amp;lt;br /&amp;gt;OpCode: one byte, FD.&amp;lt;br /&amp;gt;Message: ASCII string of undefined length, ending with &amp;lt;code&amp;gt;\n&amp;lt;/code&amp;gt;.&amp;lt;br /&amp;gt;NullTerminator: one byte, 00.&lt;br /&gt;
| FD 48 65 6C 6C 6F 5C 6E 00&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;FD: OpCode&amp;lt;br /&amp;gt;48 65 6C 6C 6F 5C 6E: &amp;quot;Hello\n&amp;quot;&amp;lt;br /&amp;gt;00: Null-terminator&lt;br /&gt;
| Prints a specified message to OSReport.&lt;br /&gt;
|-&lt;br /&gt;
| FE&lt;br /&gt;
| JASSeqParser::cmdNop&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| FF&lt;br /&gt;
| JASSeqParser::cmdFinish&lt;br /&gt;
| {OpCode[1]}&amp;lt;br /&amp;gt;OpCode: one byte, 0xFF.&lt;br /&gt;
| &lt;br /&gt;
| Stops execution of a Track.&lt;br /&gt;
|-&lt;br /&gt;
| B000&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B001&lt;br /&gt;
| JASSeqParser::cmdDump&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Trivia ==&lt;br /&gt;
* Many BMS filenames contain the suffix &#039;&#039;midi_cnv&#039;&#039;. This could indicate that Midis were first converted to a (perhaps text-based) CNV file, which was then converted to the BMS format. A similar situation applies to Nintendo&#039;s SDK tool for converting the Nintendo DS&#039;s SSEQ sequence format, which first converts Midis to a text-based SMFT format, which is then converted to the final SSEQ format.&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
[https://github.com/magcius/vgmtrans VGMTrans Fork] (analyses and converts BMS to MIDI)&amp;lt;br&amp;gt;&lt;br /&gt;
[https://cdn.discordapp.com/attachments/421356154795458570/1291660143758413824/BMS_DEC.zip?ex=6719f440&amp;amp;is=6718a2c0&amp;amp;hm=f44c5197a070f30a00283858942f9e4ae5066034862eba006f8abe87a228a6aa&amp;amp; BMS_DEC] (converts BMS to MIDI)&amp;lt;br&amp;gt;&lt;br /&gt;
[https://github.com/XAYRGA/JaiSeqX JaiSeqX] (playback for JAudio1 and JAudio2 BMS files)&lt;/div&gt;</summary>
		<author><name>RavuAlHemio</name></author>
	</entry>
	<entry>
		<id>https://www.lumasworkshop.com/w/index.php?title=BMS_(File_Format)&amp;diff=1044</id>
		<title>BMS (File Format)</title>
		<link rel="alternate" type="text/html" href="https://www.lumasworkshop.com/w/index.php?title=BMS_(File_Format)&amp;diff=1044"/>
		<updated>2026-07-05T08:45:21Z</updated>

		<summary type="html">&lt;p&gt;RavuAlHemio: document IIR and FIR commands&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:File formats]]&lt;br /&gt;
== File Format ==&lt;br /&gt;
BMS files are &#039;&#039;&#039;B&#039;&#039;&#039;inary &#039;&#039;&#039;M&#039;&#039;&#039;usic &#039;&#039;&#039;S&#039;&#039;&#039;equences that store commands for the audio engine to play notes, similar to the MIDI file format.&lt;br /&gt;
&lt;br /&gt;
== Structure ==&lt;br /&gt;
BMS consists of pure assembly code, where each track containing events such as notes, patch changes, etc. is an independent executor thread with opcodes to execute. &lt;br /&gt;
In contrast to Midi, events are read linearly per channel in a data stream and interpreted byte by byte. This means that multiple tracks within the same channel cannot be played back synchronously and would therefore have to be baked onto one track. However, BMS tracks can jump or call to different places in the file, e.g. to loop the song or to ensure a very high storage efficiency.&lt;br /&gt;
&lt;br /&gt;
The game&#039;s audio engine can only play up to 16 tracks at a time - very similar to MIDI with its 16 channels.&lt;br /&gt;
&lt;br /&gt;
BMS also includes extended MIDI operations, such as more powerful versions of controllers, with fade-in capability, and higher resolution control values. However, no song in either Galaxy game makes use of this.&lt;br /&gt;
&lt;br /&gt;
=== Filestructure ===&lt;br /&gt;
There are no headers or filesize checks. The file usually starts with the following:&lt;br /&gt;
*&#039;&#039;&#039;Global Track / Tempo Track&#039;&#039;&#039; BMS always starts (very similary to Midi&#039;s &amp;quot;Tempo Track&amp;quot; or &amp;quot;Conductor Track&amp;quot;) directly with track containing Meta-Events, which only contains global control data, typically:&lt;br /&gt;
**Pulses per Quarter Note (PPQN) set&lt;br /&gt;
**Tempo (BPM)&lt;br /&gt;
**Looping commands (to keep BPM changes synchronized during the song if necessary)&lt;br /&gt;
**OpenTrack command that starts playing the following track&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Channel Specific Track&#039;&#039;&#039;  a kind of management track for channel/Main Track definitions&lt;br /&gt;
**Usally contains &#039;&#039;&#039;C1&#039;&#039;&#039; OpenTrack events for each executor track (channel). For some unknown reason, the exact same looping and duration events from the global track need to be repeated here, otherwise some events such as pitchwheel will not work in the song.&lt;br /&gt;
&lt;br /&gt;
== Data ==&lt;br /&gt;
BMS files contain raw instructions for the audio engine without any headers or filesize checks. Each instruction (OpCode) stands for its own function in the engine. The following table lists all JAudio2 OpCodes that have functions in SMG2:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! OpCode&lt;br /&gt;
! Function (SMG/SMG2)&lt;br /&gt;
! Usage&lt;br /&gt;
! Example&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 00&amp;lt;br /&amp;gt;01&amp;lt;br /&amp;gt;02&amp;lt;br /&amp;gt;...&amp;lt;br /&amp;gt;7D&amp;lt;br /&amp;gt;7E&amp;lt;br /&amp;gt;7F&lt;br /&gt;
| JASSeqParser::parseNoteOn&lt;br /&gt;
| {OpCode[1]} {Voice[1]} {Velocity[1]} {Wait[n]}&amp;lt;br /&amp;gt;OpCode: one byte with range 0x00 through 0x7F. 0x00 = C-1, 0x3C = C4 (middle C), 0x7F = G9.&amp;lt;br /&amp;gt;Voice: one byte with range 0x01 through 0x07 (needs testing/verification). Each Voice can only hold one Note.&amp;lt;br /&amp;gt;Velocity: one byte with range 0x00 through 0x7F. 0x00 = 0, 0x7F = 127.&amp;lt;br /&amp;gt;Wait: variable length, only present for Midi Gate notes (Voice is not 1 - 7).&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;If the Voice is not 1 - 7, the game will treat this note as a Midi Gate note, and will expect that the Wait value is present. The Wait value is one or more bytes with range 0x00 through 0xFF; each time the byte is 0x80 or greater (i.e. bit 7 = 1), another following byte will be taken into account. If the Wait value is 0x00, the game waits until the note has finished; otherwise, it waits the number of ticks specified in the Wait value.&lt;br /&gt;
| 64 02 68&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;64: Key E4&amp;lt;br /&amp;gt;02: Voice 2&amp;lt;br /&amp;gt;68: Velocity 104&lt;br /&gt;
| Starts playing a Note with the previously defined Instrument (see E1, E2 and E3).&lt;br /&gt;
|-&lt;br /&gt;
| 80&lt;br /&gt;
| JASSeqParser::cmdWaitByte&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Seems to do nothing based on the code.&lt;br /&gt;
|-&lt;br /&gt;
| 81&amp;lt;br /&amp;gt;...&amp;lt;br /&amp;gt;87&lt;br /&gt;
| JASSeqParser::parseNoteOff&lt;br /&gt;
| {OpCode[1]}&amp;lt;br /&amp;gt;OpCode: one byte with range 0x81 through 0x87. 0x81 = Close Voice 1, 0x87 = Close Voice 7.&lt;br /&gt;
| 81: Stop voice ID 1&lt;br /&gt;
| Stops playing a Note.&lt;br /&gt;
|-&lt;br /&gt;
| 88&amp;lt;br /&amp;gt;...&amp;lt;br /&amp;gt;8F&lt;br /&gt;
| Unknown&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 90&amp;lt;br /&amp;gt;...&amp;lt;br /&amp;gt;9F&lt;br /&gt;
| Unknown&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A0&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A1&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A2&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A3&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A4&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A5&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A6&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A7&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A8&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A9&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| AA&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| AB&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| AC&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| AD&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| AE&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| AF&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B0&lt;br /&gt;
| Extended Opcode Indicator&lt;br /&gt;
| See B000 or B001.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B1&lt;br /&gt;
| JASSeqParser::cmdNoteOn&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B2&lt;br /&gt;
| JASSeqParser::cmdNoteOff&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B3&lt;br /&gt;
| JASSeqParser::cmdNote&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B4&lt;br /&gt;
| JASSeqParser::cmdSetLastNote&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B5&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B6&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B7&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B8&lt;br /&gt;
| JASSeqParser::cmdParamE&lt;br /&gt;
| {OpCode[1]} {Target[1]} {Parameter[1]}&amp;lt;br/&amp;gt;OpCode: one byte, B8.&amp;lt;br/&amp;gt;Target: one byte with range 0x00 through 0x03.&amp;lt;br/&amp;gt;Parameter: one byte with range 0x00 through 0xFF (Int8), whichs purpose depends on the target:&lt;br /&gt;
* Target 0: Volume. 0x7F = Full volume (100%), 0x00 = Silent (0%). 0x80 through 0xFF are treated the same as silence (0%).&lt;br /&gt;
* Target 1: Pitch. Adding one (0x01) or subtracting one (0xFF) increases/decreases pitch by one key, like from D#4 to E4.&lt;br /&gt;
* Target 2: Reverb. 0x7F = Strong reverb, 0x00 = no reverb. 0x80 through 0xFF are treated the same as no reverb.&lt;br /&gt;
* Target 3: Panning. 0x7F = right channel, 0x00 = center, 0x80 = left channel.&lt;br /&gt;
| B8 00 64&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;B8: OpCode&amp;lt;br/&amp;gt;00: Target (Volume)&amp;lt;br/&amp;gt;64: ~78% volume&lt;br /&gt;
| Allows different operations onto the music track&lt;br /&gt;
|-&lt;br /&gt;
| B9&lt;br /&gt;
| JASSeqParser::cmdParamI&lt;br /&gt;
| {OpCode[1]} {Target[1]} {Parameter[2]}&amp;lt;br/&amp;gt;OpCode: one byte, B9.&amp;lt;br/&amp;gt;Target: one byte with range 0x00 through 0x03.&amp;lt;br/&amp;gt;Parameter: two bytes with range 0x0000 through 0xFFFF (Int16), whichs purpose depends on the target:&lt;br /&gt;
* Target 0: Volume. 0x7FFF = Full volume (100%), 0x0000 = Silent (0%). 0x8000 through 0xFFFF are treated the same as silence (0%).&lt;br /&gt;
* Target 1: Pitch. Adding one (0x0100) or subtracting one (0xFF00) increases/decreases pitch by one key, like from D#4 to E4. Values inbetween can be used for fine-tuning.&lt;br /&gt;
* Target 2: Reverb. 0x7FFF = Strong reverb, 0x0000 = no reverb. 0x8000 through 0xFFFF are treated the same as no reverb.&lt;br /&gt;
* Target 3: Panning. 0x7FFF = right channel, 0x0000 = center, 0x8000 = left channel.&lt;br /&gt;
| B9 01 04 00&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;B9: OpCode&amp;lt;br/&amp;gt;01: Target (Pitch)&amp;lt;br/&amp;gt;04 00: Pitch of 4 keys&lt;br /&gt;
| Allows different operations with higher precision onto the music track&lt;br /&gt;
|-&lt;br /&gt;
| BA&lt;br /&gt;
| JASSeqParser::cmdParamEI&lt;br /&gt;
| {OpCode[1]} {Target[1]} {Parameter[1]} {Fade time[2]}&amp;lt;br/&amp;gt;OpCode: one byte, BA.&amp;lt;br/&amp;gt;Target: one byte with range 0x00 through 0x03.&amp;lt;br/&amp;gt;Parameter: one byte with range 0x00 through 0xFF (Int8), whichs purpose depends on the target:&lt;br /&gt;
* Target 0: Volume. 0x7F = Full volume (100%), 0x00 = Silent (0%). 0x80 through 0xFF are treated the same as silence (0%).&lt;br /&gt;
* Target 1: Pitch. Adding one (0x01) or subtracting one (0xFF) increases/decreases pitch by one key, like from D#4 to E4.&lt;br /&gt;
* Target 2: Reverb. 0x7F = Strong reverb, 0x00 = no reverb. 0x80 through 0xFF are treated the same as no reverb.&lt;br /&gt;
* Target 3: Panning. 0x7F = right channel, 0x00 = center, 0x80 = left channel.&lt;br /&gt;
Fade time: two bytes with range 0x0000 through 0xFFFF. The amount of time in ticks until the Parameter value is met.&lt;br /&gt;
| BA 02 22 01 68&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;BA: OpCode&amp;lt;br/&amp;gt;02: Target (Reverb)&amp;lt;br/&amp;gt;22: Reverb of strength 34&amp;lt;br/&amp;gt;01 68: 360 Ticks&lt;br /&gt;
| Allows different operations with fade time onto the music track&lt;br /&gt;
|-&lt;br /&gt;
| BB&lt;br /&gt;
| JASSeqParser::cmdParamII&lt;br /&gt;
| {OpCode[1]} {Target[1]} {Parameter[2]} {Fade time[2]}&amp;lt;br/&amp;gt;OpCode: one byte, BB.&amp;lt;br/&amp;gt;Target: one byte with range 0x00 through 0x03.&amp;lt;br/&amp;gt;Parameter: two bytes with range 0x0000 through 0xFFFF (Int16), whichs purpose depends on the target:&lt;br /&gt;
* Target 0: Volume. 0x7FFF = Full volume (100%), 0x0000 = Silent (0%). 0x8000 through 0xFFFF are treated the same as silence (0%).&lt;br /&gt;
* Target 1: Pitch. Adding one (0x0100) or subtracting one (0xFF00) increases/decreases pitch by one key, like from D#4 to E4. Values inbetween can be used for fine-tuning.&lt;br /&gt;
* Target 2: Reverb. 0x7FFF = Strong reverb, 0x0000 = no reverb. 0x8000 through 0xFFFF are treated the same as no reverb.&lt;br /&gt;
* Target 3: Panning. 0x7FFF = right channel, 0x0000 = center, 0x8000 = left channel.&lt;br /&gt;
Fade time: two bytes with range 0x0000 through 0xFFFF. The amount of time in ticks until the Parameter value is met.&lt;br /&gt;
| BA 03 7F FF 02 00&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;BB: OpCode&amp;lt;br/&amp;gt;03: Target (Panning)&amp;lt;br/&amp;gt;7F FF: Panned to right channel&amp;lt;br/&amp;gt;02 00: 512 Ticks&lt;br /&gt;
| Allows different operations with higher precision and fade time onto the music track&lt;br /&gt;
|-&lt;br /&gt;
| BC&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| BD&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| BE&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| BF&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| C0&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| C1&lt;br /&gt;
| JASSeqParser::cmdOpenTrack&lt;br /&gt;
| {OpCode[1]} {ChannelNumber[1]} {TrackPointer[3]}&amp;lt;br /&amp;gt;OpCode: one byte, C1.&amp;lt;br /&amp;gt;ChannelNumber: one byte with range 0x00 through 0x0F. 0x00 = Channel 0, 0x0F = Channel 15.&amp;lt;br /&amp;gt;TrackPointer: three bytes with range 0x000000 through 0xFFFFFF. Defines a start offset in the file to play.&lt;br /&gt;
| C1 04 05 B4 73&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;C1: OpCode&amp;lt;br /&amp;gt;04: Channel 4&amp;lt;br /&amp;gt;05 B4 73: Offset to track&lt;br /&gt;
| Starts playing a certain track on a certain channel. Channel 15 is usually reserved for Yoshi Drums. [[SMR.szs#BGM_parameters|If enabled in the BGM parameter table in SMR.szs]], channel 0 can be used for timing and chords usage that do not play any instruments from the sound bank.&lt;br /&gt;
|-&lt;br /&gt;
| C2&lt;br /&gt;
| JASSeqParser::cmdCloseTrack&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| C3&lt;br /&gt;
| JASSeqParser::cmdCall&lt;br /&gt;
| {OpCode[1]} {Pointer[3]}&amp;lt;br /&amp;gt;OpCode: one byte, C3.&amp;lt;br /&amp;gt;Pointer: three bytes with range 0x000000 through 0xFFFFFF. Defines an offset in the file.&lt;br /&gt;
| C3 00 00 40&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;C3: OpCode&amp;lt;br /&amp;gt;00 00 40: Offset&lt;br /&gt;
| Redirects execution to the defined offset. Execution can return with C5.&lt;br /&gt;
|-&lt;br /&gt;
| C4&lt;br /&gt;
| JASSeqParser::cmdCallF&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| C5&lt;br /&gt;
| JASSeqParser::cmdRet&lt;br /&gt;
| {OpCode[1]}&amp;lt;br /&amp;gt;OpCode: one byte, C5.&lt;br /&gt;
| &lt;br /&gt;
| Returns redirected execution (like from C3) to the initial call.&lt;br /&gt;
|-&lt;br /&gt;
| C6&lt;br /&gt;
| JASSeqParser::cmdRetF&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| C7&lt;br /&gt;
| JASSeqParser::cmdJmp&lt;br /&gt;
| {OpCode[1]} {Pointer[3]}&amp;lt;br /&amp;gt;OpCode: one byte, C7.&amp;lt;br /&amp;gt;Pointer: three bytes with range 0x000000 through 0xFFFFFF. Defines an offset in the file.&lt;br /&gt;
| C7 08 02 34&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;C7: OpCode&amp;lt;br /&amp;gt;08 02 34: Offset&lt;br /&gt;
| Redirects execution to the defined offset, used for Loops.&lt;br /&gt;
|-&lt;br /&gt;
| C8&lt;br /&gt;
| JASSeqParser::cmdJmpF&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| C9&lt;br /&gt;
| JASSeqParser::cmdJmpTable&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CA&lt;br /&gt;
| JASSeqParser::cmdCallTable&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CB&lt;br /&gt;
| JASSeqParser::cmdLoopS&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CC&lt;br /&gt;
| JASSeqParser::cmdLoopE&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CD&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CE&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CF&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D0&lt;br /&gt;
| JASSeqParser::cmdReadPort&lt;br /&gt;
| {OpCode[1]} {Source[1]} {Destination[1]}&lt;br /&gt;
Opcode: One byte, D0&lt;br /&gt;
Source: One byte, 0-15 , source port &lt;br /&gt;
Destination: One byte, 0-32, destination register&lt;br /&gt;
| &lt;br /&gt;
| Imports the value from sequence port Source and writes it to destination register &#039;Destination&#039;, the value is also written to register 3&lt;br /&gt;
|-&lt;br /&gt;
| D1&lt;br /&gt;
| JASSeqParser::cmdWritePort&lt;br /&gt;
| {OpCode[1]} {Source[1]} {Destination[1]}&lt;br /&gt;
Opcode: One byte, D1&lt;br /&gt;
Source: One byte, source register, 0-32&lt;br /&gt;
Destination: One Byte, destination port, 0-15&lt;br /&gt;
| &lt;br /&gt;
| Writes the value in register &#039;Source&#039; and saves it to register 3, as well as port &#039;Destination&#039;&lt;br /&gt;
|-&lt;br /&gt;
| D2&lt;br /&gt;
| JASSeqParser::cmdCheckPortImport&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D3&lt;br /&gt;
| JASSeqParser::cmdCheckPortExport&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D4&lt;br /&gt;
| JASSeqParser::cmdParentWritePort&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D5&lt;br /&gt;
| JASSeqParser::cmdChildWritePort&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D6&lt;br /&gt;
| JASSeqParser::cmdParentReadPort&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D7&lt;br /&gt;
| JASSeqParser::cmdChildReadPort&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D8&lt;br /&gt;
| JASSeqParser::cmdRegLoad&lt;br /&gt;
| {OpCode[1]} {Setting[1]} {Unknown[1]} {Variable[1]}&amp;lt;br /&amp;gt;OpCode: one byte, D8.&amp;lt;br /&amp;gt;Setting: one byte with unknown range. Different bytes will trigger different effects:&amp;lt;br /&amp;gt;- 0x62: set PPQN (seen in BMS)&amp;lt;br /&amp;gt;- 0x6B: set PPQN (seen in SC)&amp;lt;br /&amp;gt;Unknown: one byte with unknown range and purpose.&amp;lt;br /&amp;gt;Variable: one byte with different range and purpose depending on the Setting byte.&lt;br /&gt;
| D8 62 00 78&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;D8: OpCode&amp;lt;br /&amp;gt;62: set PPQN&amp;lt;br /&amp;gt;00: Unknown&amp;lt;br /&amp;gt;78: PPQN 120&lt;br /&gt;
| Different purposes.&lt;br /&gt;
|-&lt;br /&gt;
| D9&lt;br /&gt;
| JASSeqParser::cmdReg&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DA&lt;br /&gt;
| JASSeqParser::cmdReg&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DB&lt;br /&gt;
| JASSeqParser::cmdRegUni&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DC&lt;br /&gt;
| JASSeqParser::cmdRegTblLoad&lt;br /&gt;
| {OpCode[1]} {AccessMode[1]} {Destination[1]} {Offset[3]} {Index[1]}&lt;br /&gt;
OpCode: One Byte, 0xDC &lt;br /&gt;
AccessMode: Determines how the sequence accesses the table. &lt;br /&gt;
Destination: 24-bit offset of table&lt;br /&gt;
Index: Register target index into table&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DD&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DE&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DF&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| E0&lt;br /&gt;
| JASSeqParser::cmdTempo&lt;br /&gt;
| {OpCode[1]} {Unknown[1]} {BPM[1]}&amp;lt;br /&amp;gt;OpCode: one byte, E0.&amp;lt;br /&amp;gt;Unknown: one byte with unknown range and purpose.&amp;lt;br /&amp;gt;BPM: one byte with range 0x00 through 0xFF. 0x78 = 120, F0 = 240.&lt;br /&gt;
| E0 00 90&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;E0: OpCode&amp;lt;br /&amp;gt;00: Unknown&amp;lt;br /&amp;gt;90: BPM 144&lt;br /&gt;
| Defines the tempo (playback speed) of the BMS file.&lt;br /&gt;
|-&lt;br /&gt;
| E1&lt;br /&gt;
| JASSeqParser::cmdBankPrg&lt;br /&gt;
| {OpCode[1]} {Bank[1]} {Program[1]}&amp;lt;br /&amp;gt;OpCode: one byte, E1.&amp;lt;br /&amp;gt;Bank: one byte with range 0x00 through 0xFF. This byte represents a WSYS ID.&amp;lt;br /&amp;gt;Program: one byte ranging from 0x00 through 0xFF. This byte represents a LIST entry in the IBNK belonging to the defined WSYS ID.&lt;br /&gt;
| E1 01 0F&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;E1: OpCode&amp;lt;br /&amp;gt;01: WSYS ID 1&amp;lt;br /&amp;gt;0F: IBNK LIST entry 15&amp;lt;br /&amp;gt;(01 0F is the percussion set for Yoshi Drums)&lt;br /&gt;
| Defines/changes patch and bank to be played on the target channel. A combination of E2 and E3.&lt;br /&gt;
|-&lt;br /&gt;
| E2&lt;br /&gt;
| JASSeqParser::cmdBank&lt;br /&gt;
| {OpCode[1]} {Bank[1]}&amp;lt;br /&amp;gt;OpCode: one byte, E2.&amp;lt;br /&amp;gt;Bank: one byte with range 0x00 through 0xFF. This byte represents a WSYS ID.&lt;br /&gt;
| E2 53&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;E2: OpCode&amp;lt;br /&amp;gt;53: WSYS ID 83&amp;lt;br /&amp;gt;(This bank holds sounds for Megahammer)&lt;br /&gt;
| Defines/changes the WSYS/IBNK (bank) whose sounds are to be used in a channel.&amp;lt;/br&amp;gt;&lt;br /&gt;
Timing Channel: If the track is on a channel for timing and chord usage, this command instead defines the ID of the note scale to be used from the [[CIT (File Format)|CIT]].&lt;br /&gt;
|-&lt;br /&gt;
| E3&lt;br /&gt;
| JASSeqParser::cmdPrg&lt;br /&gt;
| {OpCode[1]} {Program[1]}&amp;lt;br /&amp;gt;OpCode: one byte, E3.&amp;lt;br /&amp;gt;Program: one byte with range 0x00 through 0xFF. This byte represents a LIST entry in the [[IBNK]] belonging to the defined WSYS ID.&lt;br /&gt;
| E3 0B&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;E3: OpCode&amp;lt;br /&amp;gt;0B: IBNK LIST entry 11&amp;lt;br /&amp;gt;(In relation to Megahammer, this Program holds movement related sounds)&lt;br /&gt;
| Defines the Instrument Patch / Keyboard of an [[IBNK]] (bank). If no E2 Bank Select Command was used before, it will default to Bank 0.&amp;lt;/br&amp;gt;&lt;br /&gt;
Timing Channel: If the track is on a channel for timing and chord usage, this command instead defines the ID of the chord to be used from the [[CIT (File Format)|CIT]].&lt;br /&gt;
|-&lt;br /&gt;
| E4&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| E5&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| E6&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| E7&lt;br /&gt;
| JASSeqParser::cmdEnvScaleSet&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| E8&lt;br /&gt;
| JASSeqParser::cmdEnvSet&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| E9&lt;br /&gt;
| JASSeqParser::cmdSimpleADSR&lt;br /&gt;
| {OpCode[1]} {Attack[2]} {Sustain[2]} {Decay[2]} {Amplitude[2]} {Release[2]}&amp;lt;br/&amp;gt;OpCode: one byte, E9.&amp;lt;br/&amp;gt;Attack: two bytes with range 0x0000 through 0x7FFF. Define the duration of fade-in in ticks.&amp;lt;br/&amp;gt;Sustain: two bytes with range 0x0000 through 0x7FFF. Define the duration for how long the wave is kept at maximum amplitude in ticks.&amp;lt;br/&amp;gt;Decay: two bytes with range 0x0000 through 0x7FFF. Define the duration of fade between maximum and controlled amplitude in ticks.&amp;lt;br/&amp;gt;Amplitude: two bytes with range 0x0000 through 0x7FFF. Define the volume of the wave for the 2nd sustain duration.&amp;lt;br/&amp;gt;Release: two bytes with range 0x0000 through 0x7FFF. Define the duration of fade-out in ticks.&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;If Amplitude is set to 0x7FFF, Sustain and Decay won&#039;t have an audible effect to the wave.&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;The Attack, Decay and Release operations affect the volume of the wave linearly.&lt;br /&gt;
| E9 00 80 01 00 00 80 5F FF 00 3C&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;E9: OpCode&amp;lt;br/&amp;gt;00 80: Attack (fade-in) for 128 ticks&amp;lt;br/&amp;gt;01 00: Sustain for 256 ticks&amp;lt;br/&amp;gt;00 80: Decay for 128 ticks&amp;lt;br/&amp;gt;5F FF: Amplitude of 75% compared to maximum&amp;lt;br/&amp;gt;00 3C: Release (fade-out) for 60 ticks&lt;br /&gt;
| Perform ADSR operations on a key. Must be placed before the actual key presses. [https://cdn.discordapp.com/attachments/1361554635369873490/1376201837237239899/image.png?ex=68347756&amp;amp;is=683325d6&amp;amp;hm=10661c473bb1ecb6187a17baafbc22c7d8af0a59cb0ceb87d7c85f42a8fee54c See this image for a visual representation of the ADSR operations].&lt;br /&gt;
|-&lt;br /&gt;
| EA&lt;br /&gt;
| JASSeqParser::cmdBusConnect&lt;br /&gt;
| {OpCode[1]} {Unknown[1]} {Unknown[1]} {Unknown[1]}&amp;lt;br /&amp;gt;OpCode: one byte, EA.&amp;lt;br /&amp;gt;Unknown: one byte with unknown range and purpose.&lt;br /&gt;
| EA 00 FF FF&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;EA: OpCode&amp;lt;br /&amp;gt;00: Unknown&amp;lt;br /&amp;gt;FF: Unknown&amp;lt;br /&amp;gt;FF: Unknown&lt;br /&gt;
| Unknown purpose, only seen in SC.&lt;br /&gt;
|-&lt;br /&gt;
| EB&lt;br /&gt;
| JASSeqParser::cmdIIRCutOff&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {Cutoff[1]}&amp;lt;br/&amp;gt;Sets the track&#039;s IIR filter parameters to values derived from the Cutoff value via a lookup table.&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;Cutoff: one byte in the range 0-127. The IIR filter parameters are derived from this value.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| EC&lt;br /&gt;
| JASSeqParser::cmdIIRSet&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {Param1[2]} {Param2[2]} {Param3[2]} {Param4[2]}&amp;lt;br/&amp;gt;Sets the track&#039;s IIR filter parameters to the four parameter values, which are interpreted as signed 16-bit integers.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| ED&lt;br /&gt;
| JASSeqParser::cmdFIRSet&lt;br /&gt;
| &#039;&#039;possibly unused in SMG&#039;&#039;&amp;lt;br/&amp;gt;{OpCode[1]} {Pointer[3]}&amp;lt;br/&amp;gt;Reads a FIR parameter table (8 two-byte signed integer values = 16 bytes) at the given Pointer and sets the track&#039;s FIR filter parameters to these values.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| EE&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| EF&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F0&lt;br /&gt;
| JASSeqParser::cmdWait&lt;br /&gt;
| {OpCode[1]} {WaitTime[n]}&amp;lt;br /&amp;gt;OpCode: one byte, 0xF0.&amp;lt;br /&amp;gt;WaitTime: one or more bytes with range 0x00 through 0xFF. If the leading byte is 0x80 (bit 7 = 1) or greater, another following byte will be taken into account. Time is measured in ticks here.&lt;br /&gt;
| F0 60 (96 Ticks)&amp;lt;br /&amp;gt;F0 81 56 (214 Ticks)&amp;lt;br /&amp;gt;F0 83 81 30 (49328 Ticks)&lt;br /&gt;
| Creates a delay, used to define the length of a Note or gap between Notes.&lt;br /&gt;
|-&lt;br /&gt;
| F1&lt;br /&gt;
| JASSeqParser::cmdWaitByte&lt;br /&gt;
| {OpCode[1]} {WaitTime[1]}&lt;br /&gt;
Waits for WaitTime ticks&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F2&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F3&lt;br /&gt;
| JASSeqParser::cmdSetIntTable&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F4&lt;br /&gt;
| JASSeqParser::cmdSetInterrupt&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F5&lt;br /&gt;
| JASSeqParser::cmdDisInterrupt&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F6&lt;br /&gt;
| JASSeqParser::cmdRetI&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F7&lt;br /&gt;
| JASSeqParser::cmdClrI&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F8&lt;br /&gt;
| JASSeqParser::cmdIntTimer&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F9&lt;br /&gt;
| JASSeqParser::cmdSyncCPU&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| FA&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| FB&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| FC&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| FD&lt;br /&gt;
| JASSeqParser::cmdPrintf&lt;br /&gt;
| {OpCode[1]} {Message[n]} {NullTerminator[1]}&amp;lt;br /&amp;gt;OpCode: one byte, FD.&amp;lt;br /&amp;gt;Message: ASCII string of undefined length, ending with &amp;lt;code&amp;gt;\n&amp;lt;/code&amp;gt;.&amp;lt;br /&amp;gt;NullTerminator: one byte, 00.&lt;br /&gt;
| FD 48 65 6C 6C 6F 5C 6E 00&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;FD: OpCode&amp;lt;br /&amp;gt;48 65 6C 6C 6F 5C 6E: &amp;quot;Hello\n&amp;quot;&amp;lt;br /&amp;gt;00: Null-terminator&lt;br /&gt;
| Prints a specified message to OSReport.&lt;br /&gt;
|-&lt;br /&gt;
| FE&lt;br /&gt;
| JASSeqParser::cmdNop&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| FF&lt;br /&gt;
| JASSeqParser::cmdFinish&lt;br /&gt;
| {OpCode[1]}&amp;lt;br /&amp;gt;OpCode: one byte, 0xFF.&lt;br /&gt;
| &lt;br /&gt;
| Stops execution of a Track.&lt;br /&gt;
|-&lt;br /&gt;
| B000&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B001&lt;br /&gt;
| JASSeqParser::cmdDump&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Trivia ==&lt;br /&gt;
* Many BMS filenames contain the suffix &#039;&#039;midi_cnv&#039;&#039;. This could indicate that Midis were first converted to a (perhaps text-based) CNV file, which was then converted to the BMS format. A similar situation applies to Nintendo&#039;s SDK tool for converting the Nintendo DS&#039;s SSEQ sequence format, which first converts Midis to a text-based SMFT format, which is then converted to the final SSEQ format.&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
[https://github.com/magcius/vgmtrans VGMTrans Fork] (analyses and converts BMS to MIDI)&amp;lt;br&amp;gt;&lt;br /&gt;
[https://cdn.discordapp.com/attachments/421356154795458570/1291660143758413824/BMS_DEC.zip?ex=6719f440&amp;amp;is=6718a2c0&amp;amp;hm=f44c5197a070f30a00283858942f9e4ae5066034862eba006f8abe87a228a6aa&amp;amp; BMS_DEC] (converts BMS to MIDI)&amp;lt;br&amp;gt;&lt;br /&gt;
[https://github.com/XAYRGA/JaiSeqX JaiSeqX] (playback for JAudio1 and JAudio2 BMS files)&lt;/div&gt;</summary>
		<author><name>RavuAlHemio</name></author>
	</entry>
	<entry>
		<id>https://www.lumasworkshop.com/w/index.php?title=BMS_(File_Format)&amp;diff=1043</id>
		<title>BMS (File Format)</title>
		<link rel="alternate" type="text/html" href="https://www.lumasworkshop.com/w/index.php?title=BMS_(File_Format)&amp;diff=1043"/>
		<updated>2026-07-05T08:23:27Z</updated>

		<summary type="html">&lt;p&gt;RavuAlHemio: /* Data */ parseNoteOn: describe additional Midi Gate value&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:File formats]]&lt;br /&gt;
== File Format ==&lt;br /&gt;
BMS files are &#039;&#039;&#039;B&#039;&#039;&#039;inary &#039;&#039;&#039;M&#039;&#039;&#039;usic &#039;&#039;&#039;S&#039;&#039;&#039;equences that store commands for the audio engine to play notes, similar to the MIDI file format.&lt;br /&gt;
&lt;br /&gt;
== Structure ==&lt;br /&gt;
BMS consists of pure assembly code, where each track containing events such as notes, patch changes, etc. is an independent executor thread with opcodes to execute. &lt;br /&gt;
In contrast to Midi, events are read linearly per channel in a data stream and interpreted byte by byte. This means that multiple tracks within the same channel cannot be played back synchronously and would therefore have to be baked onto one track. However, BMS tracks can jump or call to different places in the file, e.g. to loop the song or to ensure a very high storage efficiency.&lt;br /&gt;
&lt;br /&gt;
The game&#039;s audio engine can only play up to 16 tracks at a time - very similar to MIDI with its 16 channels.&lt;br /&gt;
&lt;br /&gt;
BMS also includes extended MIDI operations, such as more powerful versions of controllers, with fade-in capability, and higher resolution control values. However, no song in either Galaxy game makes use of this.&lt;br /&gt;
&lt;br /&gt;
=== Filestructure ===&lt;br /&gt;
There are no headers or filesize checks. The file usually starts with the following:&lt;br /&gt;
*&#039;&#039;&#039;Global Track / Tempo Track&#039;&#039;&#039; BMS always starts (very similary to Midi&#039;s &amp;quot;Tempo Track&amp;quot; or &amp;quot;Conductor Track&amp;quot;) directly with track containing Meta-Events, which only contains global control data, typically:&lt;br /&gt;
**Pulses per Quarter Note (PPQN) set&lt;br /&gt;
**Tempo (BPM)&lt;br /&gt;
**Looping commands (to keep BPM changes synchronized during the song if necessary)&lt;br /&gt;
**OpenTrack command that starts playing the following track&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Channel Specific Track&#039;&#039;&#039;  a kind of management track for channel/Main Track definitions&lt;br /&gt;
**Usally contains &#039;&#039;&#039;C1&#039;&#039;&#039; OpenTrack events for each executor track (channel). For some unknown reason, the exact same looping and duration events from the global track need to be repeated here, otherwise some events such as pitchwheel will not work in the song.&lt;br /&gt;
&lt;br /&gt;
== Data ==&lt;br /&gt;
BMS files contain raw instructions for the audio engine without any headers or filesize checks. Each instruction (OpCode) stands for its own function in the engine. The following table lists all JAudio2 OpCodes that have functions in SMG2:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! OpCode&lt;br /&gt;
! Function (SMG/SMG2)&lt;br /&gt;
! Usage&lt;br /&gt;
! Example&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 00&amp;lt;br /&amp;gt;01&amp;lt;br /&amp;gt;02&amp;lt;br /&amp;gt;...&amp;lt;br /&amp;gt;7D&amp;lt;br /&amp;gt;7E&amp;lt;br /&amp;gt;7F&lt;br /&gt;
| JASSeqParser::parseNoteOn&lt;br /&gt;
| {OpCode[1]} {Voice[1]} {Velocity[1]} {Wait[n]}&amp;lt;br /&amp;gt;OpCode: one byte with range 0x00 through 0x7F. 0x00 = C-1, 0x3C = C4 (middle C), 0x7F = G9.&amp;lt;br /&amp;gt;Voice: one byte with range 0x01 through 0x07 (needs testing/verification). Each Voice can only hold one Note.&amp;lt;br /&amp;gt;Velocity: one byte with range 0x00 through 0x7F. 0x00 = 0, 0x7F = 127.&amp;lt;br /&amp;gt;Wait: variable length, only present for Midi Gate notes (Voice is not 1 - 7).&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;If the Voice is not 1 - 7, the game will treat this note as a Midi Gate note, and will expect that the Wait value is present. The Wait value is one or more bytes with range 0x00 through 0xFF; each time the byte is 0x80 or greater (i.e. bit 7 = 1), another following byte will be taken into account. If the Wait value is 0x00, the game waits until the note has finished; otherwise, it waits the number of ticks specified in the Wait value.&lt;br /&gt;
| 64 02 68&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;64: Key E4&amp;lt;br /&amp;gt;02: Voice 2&amp;lt;br /&amp;gt;68: Velocity 104&lt;br /&gt;
| Starts playing a Note with the previously defined Instrument (see E1, E2 and E3).&lt;br /&gt;
|-&lt;br /&gt;
| 80&lt;br /&gt;
| JASSeqParser::cmdWaitByte&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Seems to do nothing based on the code.&lt;br /&gt;
|-&lt;br /&gt;
| 81&amp;lt;br /&amp;gt;...&amp;lt;br /&amp;gt;87&lt;br /&gt;
| JASSeqParser::parseNoteOff&lt;br /&gt;
| {OpCode[1]}&amp;lt;br /&amp;gt;OpCode: one byte with range 0x81 through 0x87. 0x81 = Close Voice 1, 0x87 = Close Voice 7.&lt;br /&gt;
| 81: Stop voice ID 1&lt;br /&gt;
| Stops playing a Note.&lt;br /&gt;
|-&lt;br /&gt;
| 88&amp;lt;br /&amp;gt;...&amp;lt;br /&amp;gt;8F&lt;br /&gt;
| Unknown&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 90&amp;lt;br /&amp;gt;...&amp;lt;br /&amp;gt;9F&lt;br /&gt;
| Unknown&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A0&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A1&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A2&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A3&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A4&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A5&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A6&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A7&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A8&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A9&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| AA&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| AB&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| AC&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| AD&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| AE&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| AF&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B0&lt;br /&gt;
| Extended Opcode Indicator&lt;br /&gt;
| See B000 or B001.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B1&lt;br /&gt;
| JASSeqParser::cmdNoteOn&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B2&lt;br /&gt;
| JASSeqParser::cmdNoteOff&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B3&lt;br /&gt;
| JASSeqParser::cmdNote&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B4&lt;br /&gt;
| JASSeqParser::cmdSetLastNote&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B5&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B6&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B7&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B8&lt;br /&gt;
| JASSeqParser::cmdParamE&lt;br /&gt;
| {OpCode[1]} {Target[1]} {Parameter[1]}&amp;lt;br/&amp;gt;OpCode: one byte, B8.&amp;lt;br/&amp;gt;Target: one byte with range 0x00 through 0x03.&amp;lt;br/&amp;gt;Parameter: one byte with range 0x00 through 0xFF (Int8), whichs purpose depends on the target:&lt;br /&gt;
* Target 0: Volume. 0x7F = Full volume (100%), 0x00 = Silent (0%). 0x80 through 0xFF are treated the same as silence (0%).&lt;br /&gt;
* Target 1: Pitch. Adding one (0x01) or subtracting one (0xFF) increases/decreases pitch by one key, like from D#4 to E4.&lt;br /&gt;
* Target 2: Reverb. 0x7F = Strong reverb, 0x00 = no reverb. 0x80 through 0xFF are treated the same as no reverb.&lt;br /&gt;
* Target 3: Panning. 0x7F = right channel, 0x00 = center, 0x80 = left channel.&lt;br /&gt;
| B8 00 64&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;B8: OpCode&amp;lt;br/&amp;gt;00: Target (Volume)&amp;lt;br/&amp;gt;64: ~78% volume&lt;br /&gt;
| Allows different operations onto the music track&lt;br /&gt;
|-&lt;br /&gt;
| B9&lt;br /&gt;
| JASSeqParser::cmdParamI&lt;br /&gt;
| {OpCode[1]} {Target[1]} {Parameter[2]}&amp;lt;br/&amp;gt;OpCode: one byte, B9.&amp;lt;br/&amp;gt;Target: one byte with range 0x00 through 0x03.&amp;lt;br/&amp;gt;Parameter: two bytes with range 0x0000 through 0xFFFF (Int16), whichs purpose depends on the target:&lt;br /&gt;
* Target 0: Volume. 0x7FFF = Full volume (100%), 0x0000 = Silent (0%). 0x8000 through 0xFFFF are treated the same as silence (0%).&lt;br /&gt;
* Target 1: Pitch. Adding one (0x0100) or subtracting one (0xFF00) increases/decreases pitch by one key, like from D#4 to E4. Values inbetween can be used for fine-tuning.&lt;br /&gt;
* Target 2: Reverb. 0x7FFF = Strong reverb, 0x0000 = no reverb. 0x8000 through 0xFFFF are treated the same as no reverb.&lt;br /&gt;
* Target 3: Panning. 0x7FFF = right channel, 0x0000 = center, 0x8000 = left channel.&lt;br /&gt;
| B9 01 04 00&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;B9: OpCode&amp;lt;br/&amp;gt;01: Target (Pitch)&amp;lt;br/&amp;gt;04 00: Pitch of 4 keys&lt;br /&gt;
| Allows different operations with higher precision onto the music track&lt;br /&gt;
|-&lt;br /&gt;
| BA&lt;br /&gt;
| JASSeqParser::cmdParamEI&lt;br /&gt;
| {OpCode[1]} {Target[1]} {Parameter[1]} {Fade time[2]}&amp;lt;br/&amp;gt;OpCode: one byte, BA.&amp;lt;br/&amp;gt;Target: one byte with range 0x00 through 0x03.&amp;lt;br/&amp;gt;Parameter: one byte with range 0x00 through 0xFF (Int8), whichs purpose depends on the target:&lt;br /&gt;
* Target 0: Volume. 0x7F = Full volume (100%), 0x00 = Silent (0%). 0x80 through 0xFF are treated the same as silence (0%).&lt;br /&gt;
* Target 1: Pitch. Adding one (0x01) or subtracting one (0xFF) increases/decreases pitch by one key, like from D#4 to E4.&lt;br /&gt;
* Target 2: Reverb. 0x7F = Strong reverb, 0x00 = no reverb. 0x80 through 0xFF are treated the same as no reverb.&lt;br /&gt;
* Target 3: Panning. 0x7F = right channel, 0x00 = center, 0x80 = left channel.&lt;br /&gt;
Fade time: two bytes with range 0x0000 through 0xFFFF. The amount of time in ticks until the Parameter value is met.&lt;br /&gt;
| BA 02 22 01 68&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;BA: OpCode&amp;lt;br/&amp;gt;02: Target (Reverb)&amp;lt;br/&amp;gt;22: Reverb of strength 34&amp;lt;br/&amp;gt;01 68: 360 Ticks&lt;br /&gt;
| Allows different operations with fade time onto the music track&lt;br /&gt;
|-&lt;br /&gt;
| BB&lt;br /&gt;
| JASSeqParser::cmdParamII&lt;br /&gt;
| {OpCode[1]} {Target[1]} {Parameter[2]} {Fade time[2]}&amp;lt;br/&amp;gt;OpCode: one byte, BB.&amp;lt;br/&amp;gt;Target: one byte with range 0x00 through 0x03.&amp;lt;br/&amp;gt;Parameter: two bytes with range 0x0000 through 0xFFFF (Int16), whichs purpose depends on the target:&lt;br /&gt;
* Target 0: Volume. 0x7FFF = Full volume (100%), 0x0000 = Silent (0%). 0x8000 through 0xFFFF are treated the same as silence (0%).&lt;br /&gt;
* Target 1: Pitch. Adding one (0x0100) or subtracting one (0xFF00) increases/decreases pitch by one key, like from D#4 to E4. Values inbetween can be used for fine-tuning.&lt;br /&gt;
* Target 2: Reverb. 0x7FFF = Strong reverb, 0x0000 = no reverb. 0x8000 through 0xFFFF are treated the same as no reverb.&lt;br /&gt;
* Target 3: Panning. 0x7FFF = right channel, 0x0000 = center, 0x8000 = left channel.&lt;br /&gt;
Fade time: two bytes with range 0x0000 through 0xFFFF. The amount of time in ticks until the Parameter value is met.&lt;br /&gt;
| BA 03 7F FF 02 00&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;BB: OpCode&amp;lt;br/&amp;gt;03: Target (Panning)&amp;lt;br/&amp;gt;7F FF: Panned to right channel&amp;lt;br/&amp;gt;02 00: 512 Ticks&lt;br /&gt;
| Allows different operations with higher precision and fade time onto the music track&lt;br /&gt;
|-&lt;br /&gt;
| BC&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| BD&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| BE&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| BF&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| C0&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| C1&lt;br /&gt;
| JASSeqParser::cmdOpenTrack&lt;br /&gt;
| {OpCode[1]} {ChannelNumber[1]} {TrackPointer[3]}&amp;lt;br /&amp;gt;OpCode: one byte, C1.&amp;lt;br /&amp;gt;ChannelNumber: one byte with range 0x00 through 0x0F. 0x00 = Channel 0, 0x0F = Channel 15.&amp;lt;br /&amp;gt;TrackPointer: three bytes with range 0x000000 through 0xFFFFFF. Defines a start offset in the file to play.&lt;br /&gt;
| C1 04 05 B4 73&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;C1: OpCode&amp;lt;br /&amp;gt;04: Channel 4&amp;lt;br /&amp;gt;05 B4 73: Offset to track&lt;br /&gt;
| Starts playing a certain track on a certain channel. Channel 15 is usually reserved for Yoshi Drums. [[SMR.szs#BGM_parameters|If enabled in the BGM parameter table in SMR.szs]], channel 0 can be used for timing and chords usage that do not play any instruments from the sound bank.&lt;br /&gt;
|-&lt;br /&gt;
| C2&lt;br /&gt;
| JASSeqParser::cmdCloseTrack&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| C3&lt;br /&gt;
| JASSeqParser::cmdCall&lt;br /&gt;
| {OpCode[1]} {Pointer[3]}&amp;lt;br /&amp;gt;OpCode: one byte, C3.&amp;lt;br /&amp;gt;Pointer: three bytes with range 0x000000 through 0xFFFFFF. Defines an offset in the file.&lt;br /&gt;
| C3 00 00 40&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;C3: OpCode&amp;lt;br /&amp;gt;00 00 40: Offset&lt;br /&gt;
| Redirects execution to the defined offset. Execution can return with C5.&lt;br /&gt;
|-&lt;br /&gt;
| C4&lt;br /&gt;
| JASSeqParser::cmdCallF&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| C5&lt;br /&gt;
| JASSeqParser::cmdRet&lt;br /&gt;
| {OpCode[1]}&amp;lt;br /&amp;gt;OpCode: one byte, C5.&lt;br /&gt;
| &lt;br /&gt;
| Returns redirected execution (like from C3) to the initial call.&lt;br /&gt;
|-&lt;br /&gt;
| C6&lt;br /&gt;
| JASSeqParser::cmdRetF&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| C7&lt;br /&gt;
| JASSeqParser::cmdJmp&lt;br /&gt;
| {OpCode[1]} {Pointer[3]}&amp;lt;br /&amp;gt;OpCode: one byte, C7.&amp;lt;br /&amp;gt;Pointer: three bytes with range 0x000000 through 0xFFFFFF. Defines an offset in the file.&lt;br /&gt;
| C7 08 02 34&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;C7: OpCode&amp;lt;br /&amp;gt;08 02 34: Offset&lt;br /&gt;
| Redirects execution to the defined offset, used for Loops.&lt;br /&gt;
|-&lt;br /&gt;
| C8&lt;br /&gt;
| JASSeqParser::cmdJmpF&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| C9&lt;br /&gt;
| JASSeqParser::cmdJmpTable&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CA&lt;br /&gt;
| JASSeqParser::cmdCallTable&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CB&lt;br /&gt;
| JASSeqParser::cmdLoopS&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CC&lt;br /&gt;
| JASSeqParser::cmdLoopE&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CD&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CE&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CF&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D0&lt;br /&gt;
| JASSeqParser::cmdReadPort&lt;br /&gt;
| {OpCode[1]} {Source[1]} {Destination[1]}&lt;br /&gt;
Opcode: One byte, D0&lt;br /&gt;
Source: One byte, 0-15 , source port &lt;br /&gt;
Destination: One byte, 0-32, destination register&lt;br /&gt;
| &lt;br /&gt;
| Imports the value from sequence port Source and writes it to destination register &#039;Destination&#039;, the value is also written to register 3&lt;br /&gt;
|-&lt;br /&gt;
| D1&lt;br /&gt;
| JASSeqParser::cmdWritePort&lt;br /&gt;
| {OpCode[1]} {Source[1]} {Destination[1]}&lt;br /&gt;
Opcode: One byte, D1&lt;br /&gt;
Source: One byte, source register, 0-32&lt;br /&gt;
Destination: One Byte, destination port, 0-15&lt;br /&gt;
| &lt;br /&gt;
| Writes the value in register &#039;Source&#039; and saves it to register 3, as well as port &#039;Destination&#039;&lt;br /&gt;
|-&lt;br /&gt;
| D2&lt;br /&gt;
| JASSeqParser::cmdCheckPortImport&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D3&lt;br /&gt;
| JASSeqParser::cmdCheckPortExport&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D4&lt;br /&gt;
| JASSeqParser::cmdParentWritePort&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D5&lt;br /&gt;
| JASSeqParser::cmdChildWritePort&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D6&lt;br /&gt;
| JASSeqParser::cmdParentReadPort&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D7&lt;br /&gt;
| JASSeqParser::cmdChildReadPort&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D8&lt;br /&gt;
| JASSeqParser::cmdRegLoad&lt;br /&gt;
| {OpCode[1]} {Setting[1]} {Unknown[1]} {Variable[1]}&amp;lt;br /&amp;gt;OpCode: one byte, D8.&amp;lt;br /&amp;gt;Setting: one byte with unknown range. Different bytes will trigger different effects:&amp;lt;br /&amp;gt;- 0x62: set PPQN (seen in BMS)&amp;lt;br /&amp;gt;- 0x6B: set PPQN (seen in SC)&amp;lt;br /&amp;gt;Unknown: one byte with unknown range and purpose.&amp;lt;br /&amp;gt;Variable: one byte with different range and purpose depending on the Setting byte.&lt;br /&gt;
| D8 62 00 78&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;D8: OpCode&amp;lt;br /&amp;gt;62: set PPQN&amp;lt;br /&amp;gt;00: Unknown&amp;lt;br /&amp;gt;78: PPQN 120&lt;br /&gt;
| Different purposes.&lt;br /&gt;
|-&lt;br /&gt;
| D9&lt;br /&gt;
| JASSeqParser::cmdReg&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DA&lt;br /&gt;
| JASSeqParser::cmdReg&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DB&lt;br /&gt;
| JASSeqParser::cmdRegUni&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DC&lt;br /&gt;
| JASSeqParser::cmdRegTblLoad&lt;br /&gt;
| {OpCode[1]} {AccessMode[1]} {Destination[1]} {Offset[3]} {Index[1]}&lt;br /&gt;
OpCode: One Byte, 0xDC &lt;br /&gt;
AccessMode: Determines how the sequence accesses the table. &lt;br /&gt;
Destination: 24-bit offset of table&lt;br /&gt;
Index: Register target index into table&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DD&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DE&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DF&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| E0&lt;br /&gt;
| JASSeqParser::cmdTempo&lt;br /&gt;
| {OpCode[1]} {Unknown[1]} {BPM[1]}&amp;lt;br /&amp;gt;OpCode: one byte, E0.&amp;lt;br /&amp;gt;Unknown: one byte with unknown range and purpose.&amp;lt;br /&amp;gt;BPM: one byte with range 0x00 through 0xFF. 0x78 = 120, F0 = 240.&lt;br /&gt;
| E0 00 90&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;E0: OpCode&amp;lt;br /&amp;gt;00: Unknown&amp;lt;br /&amp;gt;90: BPM 144&lt;br /&gt;
| Defines the tempo (playback speed) of the BMS file.&lt;br /&gt;
|-&lt;br /&gt;
| E1&lt;br /&gt;
| JASSeqParser::cmdBankPrg&lt;br /&gt;
| {OpCode[1]} {Bank[1]} {Program[1]}&amp;lt;br /&amp;gt;OpCode: one byte, E1.&amp;lt;br /&amp;gt;Bank: one byte with range 0x00 through 0xFF. This byte represents a WSYS ID.&amp;lt;br /&amp;gt;Program: one byte ranging from 0x00 through 0xFF. This byte represents a LIST entry in the IBNK belonging to the defined WSYS ID.&lt;br /&gt;
| E1 01 0F&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;E1: OpCode&amp;lt;br /&amp;gt;01: WSYS ID 1&amp;lt;br /&amp;gt;0F: IBNK LIST entry 15&amp;lt;br /&amp;gt;(01 0F is the percussion set for Yoshi Drums)&lt;br /&gt;
| Defines/changes patch and bank to be played on the target channel. A combination of E2 and E3.&lt;br /&gt;
|-&lt;br /&gt;
| E2&lt;br /&gt;
| JASSeqParser::cmdBank&lt;br /&gt;
| {OpCode[1]} {Bank[1]}&amp;lt;br /&amp;gt;OpCode: one byte, E2.&amp;lt;br /&amp;gt;Bank: one byte with range 0x00 through 0xFF. This byte represents a WSYS ID.&lt;br /&gt;
| E2 53&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;E2: OpCode&amp;lt;br /&amp;gt;53: WSYS ID 83&amp;lt;br /&amp;gt;(This bank holds sounds for Megahammer)&lt;br /&gt;
| Defines/changes the WSYS/IBNK (bank) whose sounds are to be used in a channel.&amp;lt;/br&amp;gt;&lt;br /&gt;
Timing Channel: If the track is on a channel for timing and chord usage, this command instead defines the ID of the note scale to be used from the [[CIT (File Format)|CIT]].&lt;br /&gt;
|-&lt;br /&gt;
| E3&lt;br /&gt;
| JASSeqParser::cmdPrg&lt;br /&gt;
| {OpCode[1]} {Program[1]}&amp;lt;br /&amp;gt;OpCode: one byte, E3.&amp;lt;br /&amp;gt;Program: one byte with range 0x00 through 0xFF. This byte represents a LIST entry in the [[IBNK]] belonging to the defined WSYS ID.&lt;br /&gt;
| E3 0B&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;E3: OpCode&amp;lt;br /&amp;gt;0B: IBNK LIST entry 11&amp;lt;br /&amp;gt;(In relation to Megahammer, this Program holds movement related sounds)&lt;br /&gt;
| Defines the Instrument Patch / Keyboard of an [[IBNK]] (bank). If no E2 Bank Select Command was used before, it will default to Bank 0.&amp;lt;/br&amp;gt;&lt;br /&gt;
Timing Channel: If the track is on a channel for timing and chord usage, this command instead defines the ID of the chord to be used from the [[CIT (File Format)|CIT]].&lt;br /&gt;
|-&lt;br /&gt;
| E4&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| E5&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| E6&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| E7&lt;br /&gt;
| JASSeqParser::cmdEnvScaleSet&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| E8&lt;br /&gt;
| JASSeqParser::cmdEnvSet&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| E9&lt;br /&gt;
| JASSeqParser::cmdSimpleADSR&lt;br /&gt;
| {OpCode[1]} {Attack[2]} {Sustain[2]} {Decay[2]} {Amplitude[2]} {Release[2]}&amp;lt;br/&amp;gt;OpCode: one byte, E9.&amp;lt;br/&amp;gt;Attack: two bytes with range 0x0000 through 0x7FFF. Define the duration of fade-in in ticks.&amp;lt;br/&amp;gt;Sustain: two bytes with range 0x0000 through 0x7FFF. Define the duration for how long the wave is kept at maximum amplitude in ticks.&amp;lt;br/&amp;gt;Decay: two bytes with range 0x0000 through 0x7FFF. Define the duration of fade between maximum and controlled amplitude in ticks.&amp;lt;br/&amp;gt;Amplitude: two bytes with range 0x0000 through 0x7FFF. Define the volume of the wave for the 2nd sustain duration.&amp;lt;br/&amp;gt;Release: two bytes with range 0x0000 through 0x7FFF. Define the duration of fade-out in ticks.&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;If Amplitude is set to 0x7FFF, Sustain and Decay won&#039;t have an audible effect to the wave.&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;The Attack, Decay and Release operations affect the volume of the wave linearly.&lt;br /&gt;
| E9 00 80 01 00 00 80 5F FF 00 3C&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;E9: OpCode&amp;lt;br/&amp;gt;00 80: Attack (fade-in) for 128 ticks&amp;lt;br/&amp;gt;01 00: Sustain for 256 ticks&amp;lt;br/&amp;gt;00 80: Decay for 128 ticks&amp;lt;br/&amp;gt;5F FF: Amplitude of 75% compared to maximum&amp;lt;br/&amp;gt;00 3C: Release (fade-out) for 60 ticks&lt;br /&gt;
| Perform ADSR operations on a key. Must be placed before the actual key presses. [https://cdn.discordapp.com/attachments/1361554635369873490/1376201837237239899/image.png?ex=68347756&amp;amp;is=683325d6&amp;amp;hm=10661c473bb1ecb6187a17baafbc22c7d8af0a59cb0ceb87d7c85f42a8fee54c See this image for a visual representation of the ADSR operations].&lt;br /&gt;
|-&lt;br /&gt;
| EA&lt;br /&gt;
| JASSeqParser::cmdBusConnect&lt;br /&gt;
| {OpCode[1]} {Unknown[1]} {Unknown[1]} {Unknown[1]}&amp;lt;br /&amp;gt;OpCode: one byte, EA.&amp;lt;br /&amp;gt;Unknown: one byte with unknown range and purpose.&lt;br /&gt;
| EA 00 FF FF&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;EA: OpCode&amp;lt;br /&amp;gt;00: Unknown&amp;lt;br /&amp;gt;FF: Unknown&amp;lt;br /&amp;gt;FF: Unknown&lt;br /&gt;
| Unknown purpose, only seen in SC.&lt;br /&gt;
|-&lt;br /&gt;
| EB&lt;br /&gt;
| JASSeqParser::cmdIIRCutOff&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| EC&lt;br /&gt;
| JASSeqParser::cmdIIRSet&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| ED&lt;br /&gt;
| JASSeqParser::cmdFIRSet&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| EE&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| EF&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F0&lt;br /&gt;
| JASSeqParser::cmdWait&lt;br /&gt;
| {OpCode[1]} {WaitTime[n]}&amp;lt;br /&amp;gt;OpCode: one byte, 0xF0.&amp;lt;br /&amp;gt;WaitTime: one or more bytes with range 0x00 through 0xFF. If the leading byte is 0x80 (bit 7 = 1) or greater, another following byte will be taken into account. Time is measured in ticks here.&lt;br /&gt;
| F0 60 (96 Ticks)&amp;lt;br /&amp;gt;F0 81 56 (214 Ticks)&amp;lt;br /&amp;gt;F0 83 81 30 (49328 Ticks)&lt;br /&gt;
| Creates a delay, used to define the length of a Note or gap between Notes.&lt;br /&gt;
|-&lt;br /&gt;
| F1&lt;br /&gt;
| JASSeqParser::cmdWaitByte&lt;br /&gt;
| {OpCode[1]} {WaitTime[1]}&lt;br /&gt;
Waits for WaitTime ticks&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F2&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F3&lt;br /&gt;
| JASSeqParser::cmdSetIntTable&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F4&lt;br /&gt;
| JASSeqParser::cmdSetInterrupt&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F5&lt;br /&gt;
| JASSeqParser::cmdDisInterrupt&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F6&lt;br /&gt;
| JASSeqParser::cmdRetI&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F7&lt;br /&gt;
| JASSeqParser::cmdClrI&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F8&lt;br /&gt;
| JASSeqParser::cmdIntTimer&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F9&lt;br /&gt;
| JASSeqParser::cmdSyncCPU&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| FA&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| FB&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| FC&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| FD&lt;br /&gt;
| JASSeqParser::cmdPrintf&lt;br /&gt;
| {OpCode[1]} {Message[n]} {NullTerminator[1]}&amp;lt;br /&amp;gt;OpCode: one byte, FD.&amp;lt;br /&amp;gt;Message: ASCII string of undefined length, ending with &amp;lt;code&amp;gt;\n&amp;lt;/code&amp;gt;.&amp;lt;br /&amp;gt;NullTerminator: one byte, 00.&lt;br /&gt;
| FD 48 65 6C 6C 6F 5C 6E 00&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;FD: OpCode&amp;lt;br /&amp;gt;48 65 6C 6C 6F 5C 6E: &amp;quot;Hello\n&amp;quot;&amp;lt;br /&amp;gt;00: Null-terminator&lt;br /&gt;
| Prints a specified message to OSReport.&lt;br /&gt;
|-&lt;br /&gt;
| FE&lt;br /&gt;
| JASSeqParser::cmdNop&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| FF&lt;br /&gt;
| JASSeqParser::cmdFinish&lt;br /&gt;
| {OpCode[1]}&amp;lt;br /&amp;gt;OpCode: one byte, 0xFF.&lt;br /&gt;
| &lt;br /&gt;
| Stops execution of a Track.&lt;br /&gt;
|-&lt;br /&gt;
| B000&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B001&lt;br /&gt;
| JASSeqParser::cmdDump&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Trivia ==&lt;br /&gt;
* Many BMS filenames contain the suffix &#039;&#039;midi_cnv&#039;&#039;. This could indicate that Midis were first converted to a (perhaps text-based) CNV file, which was then converted to the BMS format. A similar situation applies to Nintendo&#039;s SDK tool for converting the Nintendo DS&#039;s SSEQ sequence format, which first converts Midis to a text-based SMFT format, which is then converted to the final SSEQ format.&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
[https://github.com/magcius/vgmtrans VGMTrans Fork] (analyses and converts BMS to MIDI)&amp;lt;br&amp;gt;&lt;br /&gt;
[https://cdn.discordapp.com/attachments/421356154795458570/1291660143758413824/BMS_DEC.zip?ex=6719f440&amp;amp;is=6718a2c0&amp;amp;hm=f44c5197a070f30a00283858942f9e4ae5066034862eba006f8abe87a228a6aa&amp;amp; BMS_DEC] (converts BMS to MIDI)&amp;lt;br&amp;gt;&lt;br /&gt;
[https://github.com/XAYRGA/JaiSeqX JaiSeqX] (playback for JAudio1 and JAudio2 BMS files)&lt;/div&gt;</summary>
		<author><name>RavuAlHemio</name></author>
	</entry>
	<entry>
		<id>https://www.lumasworkshop.com/w/index.php?title=SMR.szs&amp;diff=1042</id>
		<title>SMR.szs</title>
		<link rel="alternate" type="text/html" href="https://www.lumasworkshop.com/w/index.php?title=SMR.szs&amp;diff=1042"/>
		<updated>2026-07-03T10:11:42Z</updated>

		<summary type="html">&lt;p&gt;RavuAlHemio: /* BSC offset table */ link to page on BMS data format&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Files]]&lt;br /&gt;
[[Category:Lists]]&lt;br /&gt;
{{WIP}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SMR.szs&#039;&#039;&#039; is a compressed &#039;&#039;&#039;BAA&#039;&#039;&#039; file (&#039;&#039;&#039;B&#039;&#039;&#039;inary &#039;&#039;&#039;A&#039;&#039;&#039;udio &#039;&#039;&#039;A&#039;&#039;&#039;rchive) which defines the game&#039;s sound system. It contains references to [[AST (File Format)|streamed]] and [[BMS (File Format)|sequenced]] music files as well as data for sound effects and instruments. It can be found in various JAudio games, however the specifications below mainly apply to &#039;&#039;Super Mario Galaxy&#039;&#039; and &#039;&#039;Super Mario Galaxy 2&#039;&#039;.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The following files are directly linked to SMR.szs:&lt;br /&gt;
* [[BgmParam|AudioRes/Info/BgmParam.arc]] (SMG2 only, overrides the BGM and STM volume parameter)&lt;br /&gt;
* [[CIT (File Format)|AudioRes/Info/JaiChord.arc]] (SMR.szs links BGM labels to CIT file IDs within this archive)&lt;br /&gt;
* [[BMS (File Format)|AudioRes/Seqs/JaiSeq.arc]] (SMR.szs links BGM labels to BMS file IDs within this archive)&lt;br /&gt;
* [[AST (File Format)|AudioRes/Stream/*.ast]] (SMR.szs links STM labels to AST files)&lt;br /&gt;
* [[AW (File Format)|AudioRes/Waves/*.aw]] (SMR.szs defines the contents of AW files)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following files are indirectly linked to SMR.szs:&lt;br /&gt;
* [[ActionSound|AudioRes/Info/ActionSound.arc]] (SMG2 only, links hardcoded triggers for all objects to sound effects in SMR.szs)&lt;br /&gt;
* AudioRes/Info/JaiMe.arc (References instruments from SMR.szs)&lt;br /&gt;
* [[BRS (File Format)|AudioRes/Info/JaiRemixSeq.arc]] (References instruments from SMR.szs)&lt;br /&gt;
* [[MultiBgmInfo|AudioRes/Info/MultiBgmInfo.arc]] (SMG2 only, connects MBGM labels to STM and BGM labels, allowing streamed and sequenced audio to play simultaneously)&lt;br /&gt;
* [[SoundIdToInstList|AudioRes/Info/SoundIdToInstList]] (SMG2 only, references Sound IDs and instruments from SMR.szs and allows loading AW files)&lt;br /&gt;
* AudioRes/Info/StageBgmInfo.arc (SMG2 only, controls the [[ScenarioBgmInfo|main music]] and [[StageBgmInfo|music changes]] for all stages)&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Header==&lt;br /&gt;
The header contains offsets to all files included in SMR.szs:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00&lt;br /&gt;
| Magic (0x4)&lt;br /&gt;
| &amp;lt;code&amp;gt;AA_&amp;lt;&amp;lt;/code&amp;gt; (0x41415F3C)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04&lt;br /&gt;
| Magic (0x4)&lt;br /&gt;
| &amp;lt;code&amp;gt;bst &amp;lt;/code&amp;gt; (0x62737420)&lt;br /&gt;
|-&lt;br /&gt;
| 0x08&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to [[SMR.szs#BST|BST]] section start&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to BST section end&lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
| Magic (0x4)&lt;br /&gt;
| &amp;lt;code&amp;gt;bstn&amp;lt;/code&amp;gt; (0x6273746E)&lt;br /&gt;
|-&lt;br /&gt;
| 0x14&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to [[SMR.szs#BSTN|BSTN]] section start&lt;br /&gt;
|-&lt;br /&gt;
| 0x18&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to BSTN section end&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C&lt;br /&gt;
| Magic (0x4)&lt;br /&gt;
| &amp;lt;code&amp;gt;bsc &amp;lt;/code&amp;gt; (0x62736320)&lt;br /&gt;
|-&lt;br /&gt;
| 0x20&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to [[SMR.szs#BSC|BSC]] section start&lt;br /&gt;
|-&lt;br /&gt;
| 0x24&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to BSC section end&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 + N * 0x10&lt;br /&gt;
| Magic (0x4)&lt;br /&gt;
| &amp;lt;code&amp;gt;ws  &amp;lt;/code&amp;gt; (0x77732020)&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 + N * 0x10 + 0x4&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| WSYS file ID (N)&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 + N * 0x10 + 0x8&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to [[SMR.szs#WSYS|WSYS]] file&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 + N * 0x10 + 0xC&lt;br /&gt;
| Bitfield (0x4)&lt;br /&gt;
| Allows for asynchronous AW file pre-loading upon game boot. 0xFFFFFFFF makes all AW files of the WSYS get loaded.&lt;br /&gt;
|-&lt;br /&gt;
| 0x38 + N * 0x10 + M * 0xC&lt;br /&gt;
| Magic (0x4)&lt;br /&gt;
| &amp;lt;code&amp;gt;bnk &amp;lt;/code&amp;gt; (0x626E6B20)&lt;br /&gt;
|-&lt;br /&gt;
| 0x38 + N * 0x10 + M * 0xC + 0x4&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| IBNK file ID (M)&lt;br /&gt;
|-&lt;br /&gt;
| 0x38 + N * 0x10 + M * 0xC + 0x8&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to [[SMR.szs#IBNK|IBNK]] file&lt;br /&gt;
|-&lt;br /&gt;
| 0x44 + N * 0x10 + M * 0xC&lt;br /&gt;
| Magic (0x4)&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;gt;_AA&amp;lt;/code&amp;gt; (0x3E5F4141)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==BST==&lt;br /&gt;
The &#039;&#039;&#039;B&#039;&#039;&#039;inary &#039;&#039;&#039;S&#039;&#039;&#039;ound &#039;&#039;&#039;T&#039;&#039;&#039;able contains parameters for all music and sound effects&lt;br /&gt;
===BST Header===&lt;br /&gt;
size: 0x20&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00&lt;br /&gt;
| Magic (0x4)&lt;br /&gt;
| &amp;lt;code&amp;gt;BST &amp;lt;/code&amp;gt; (0x42535420)&lt;br /&gt;
|-&lt;br /&gt;
| ?&lt;br /&gt;
| ?&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x08&lt;br /&gt;
| UInt8 (0x1) ?&lt;br /&gt;
| Unknown. 0x01 in SMG and SMG2&lt;br /&gt;
|-&lt;br /&gt;
| ?&lt;br /&gt;
| ?&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x0C&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to [[SMR.szs#BST main table|BST main table]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
| Padding (0x10)&lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===BST main table===&lt;br /&gt;
size: (N + 1) * 0x4&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Amount N of entries (3 in SMG and SMG2)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to [[SMR.szs#SE table|SE table]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x08&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to [[SMR.szs#BGM table|BGM table]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to [[SMR.szs#STREAM table|STREAM table]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===SE table===&lt;br /&gt;
size: (N + 1) * 0x4&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Amount N of entries (0xE in SMG and SMG2)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to SYSTEM table&lt;br /&gt;
|-&lt;br /&gt;
| 0x08&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to PLAYER_VOICE table&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to PLAYER_MOTION table&lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to BOSS_VOICE table&lt;br /&gt;
|-&lt;br /&gt;
| 0x14&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to BOSS_MOTION table&lt;br /&gt;
|-&lt;br /&gt;
| 0x18&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to OBJECT table&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to ATMOSPHERE table&lt;br /&gt;
|-&lt;br /&gt;
| 0x20&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to DEMO table&lt;br /&gt;
|-&lt;br /&gt;
| 0x24&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to ENEMY_VOICE table&lt;br /&gt;
|-&lt;br /&gt;
| 0x28&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to ENEMY_MOTION table&lt;br /&gt;
|-&lt;br /&gt;
| 0x2C&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to SUPPORTER_VOICE table&lt;br /&gt;
|-&lt;br /&gt;
| 0x30&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to SUPPORTER_MOTION table&lt;br /&gt;
|-&lt;br /&gt;
| 0x34&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to REMIX_SEQ table&lt;br /&gt;
|-&lt;br /&gt;
| 0x38&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to HOME_BUTTON_MENU table&lt;br /&gt;
|}&lt;br /&gt;
Each of the referenced tables are defined identically, see [[SMR.szs#SE parameter table|SE parameter table]].&lt;br /&gt;
&lt;br /&gt;
===BGM table===&lt;br /&gt;
size: (N + 1) * 0x4&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Amount N of entries (2 in SMG and SMG2)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to MAIN_BGM table&lt;br /&gt;
|-&lt;br /&gt;
| 0x08&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to MULTI_BGM table&lt;br /&gt;
|}&lt;br /&gt;
Each of the referenced tables are defined identically, see [[SMR.szs#BGM parameter table|BGM parameter table]].&lt;br /&gt;
&lt;br /&gt;
===STREAM table===&lt;br /&gt;
size: (N + 1) * 0x4&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Amount N of entries (1 in SMG and SMG2)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to [[SMR.szs#STREAM parameter table|STREAM parameter table]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===SE parameter table===&lt;br /&gt;
size: (N + 2) * 0x4&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Amount N of entries&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Padding?&lt;br /&gt;
|-&lt;br /&gt;
| 0x8 + N * 0x4&lt;br /&gt;
| UInt8 (0x1)&lt;br /&gt;
| Unknown. Always 0x50&lt;br /&gt;
|-&lt;br /&gt;
| 0x9 + N * 0x4&lt;br /&gt;
| UInt24 (0x3)&lt;br /&gt;
| Offset to [[SMR.szs#SE parameters|SE parameters]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====SE parameters====&lt;br /&gt;
size: 0x6 for each entry&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| UInt8 (0x1)&lt;br /&gt;
| Unknown&lt;br /&gt;
|-&lt;br /&gt;
| 0x1&lt;br /&gt;
| UInt8 (0x1)&lt;br /&gt;
| Volume. Can be overridden by [[BgmParam]] in SMG2.&lt;br /&gt;
|-&lt;br /&gt;
| 0x2&lt;br /&gt;
| UInt8 (0x1)&lt;br /&gt;
| Unknown&lt;br /&gt;
|-&lt;br /&gt;
| 0x3&lt;br /&gt;
| UInt8 (0x1)&lt;br /&gt;
| Unknown&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| UInt8 (0x1)&lt;br /&gt;
| Unknown&lt;br /&gt;
|-&lt;br /&gt;
| 0x5&lt;br /&gt;
| UInt8 (0x1)&lt;br /&gt;
| Unknown&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===BGM parameter table===&lt;br /&gt;
size: (N + 2) * 0x4&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Amount N of entries&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Padding?&lt;br /&gt;
|-&lt;br /&gt;
| 0x8 + N * 0x4&lt;br /&gt;
| UInt8 (0x1)&lt;br /&gt;
| Unknown. Always 0x60&lt;br /&gt;
|-&lt;br /&gt;
| 0x9 + N * 0x4&lt;br /&gt;
| UInt24 (0x3)&lt;br /&gt;
| Offset to [[SMR.szs#BGM parameters|BGM parameters]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====BGM parameters====&lt;br /&gt;
size: 0x8 for each entry&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Type&lt;br /&gt;
! Description for MAIN_BGM&lt;br /&gt;
! Description for MULTI_BGM&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| UInt8 (0x1)&lt;br /&gt;
| Unknown. Always 0x70&lt;br /&gt;
| Unknown. Always 0x70&lt;br /&gt;
|-&lt;br /&gt;
| 0x1&lt;br /&gt;
| UInt8 (0x1)&lt;br /&gt;
| Volume. Overridden by [[BgmParam]] in SMG2.&lt;br /&gt;
| Unknown. Always 0x78&lt;br /&gt;
|-&lt;br /&gt;
| 0x2&lt;br /&gt;
| UInt16 (0x2)&lt;br /&gt;
| JaiSeq.arc file ID. Must always be valid.&lt;br /&gt;
| Unknown. Always 0x0000&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| UInt16 (0x2)&lt;br /&gt;
| JaiChord.arc file ID. 0xFFFF if no JaiChord file is set.&lt;br /&gt;
| Unknown. Always 0xFFFF&lt;br /&gt;
|-&lt;br /&gt;
| 0x6&lt;br /&gt;
| UInt16 (0x2)&lt;br /&gt;
| JaiChord file check. 0x0000 if no, 0x0001 if yes.&lt;br /&gt;
| Unknown. Always 0x0000&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===STREAM parameter table===&lt;br /&gt;
size: (N + 2) * 0x4&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Amount N of entries&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Padding?&lt;br /&gt;
|-&lt;br /&gt;
| 0x8 + N * 0x4&lt;br /&gt;
| UInt8 (0x1)&lt;br /&gt;
| Unknown. Always 0x70&lt;br /&gt;
|-&lt;br /&gt;
| 0x9 + N * 0x4&lt;br /&gt;
| UInt24 (0x3)&lt;br /&gt;
| Offset to [[SMR.szs#STREAM parameters|STREAM parameters]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====STREAM parameters====&lt;br /&gt;
size: 0x8 for each entry&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| UInt8 (0x1)&lt;br /&gt;
| Unknown. Always 0x80&lt;br /&gt;
|-&lt;br /&gt;
| 0x1&lt;br /&gt;
| UInt8 (0x1)&lt;br /&gt;
| Volume. Overridden by [[BgmParam]] in SMG2.&lt;br /&gt;
|-&lt;br /&gt;
| 0x2&lt;br /&gt;
| UInt16 (0x2)&lt;br /&gt;
| Channel count. 0x000E for 2 channels, 0x00EE for 4 channels&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to null-terminated AST filename, relative to the root of the ISO. Example: &amp;lt;code&amp;gt;/AudioRes/Stream/smg2_ev_starchance_strm.ast&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The rest of the BST section is padded to the nearest 0x20.&lt;br /&gt;
&lt;br /&gt;
==BSTN==&lt;br /&gt;
The &#039;&#039;&#039;B&#039;&#039;&#039;inary &#039;&#039;&#039;S&#039;&#039;&#039;ound &#039;&#039;&#039;T&#039;&#039;&#039;able &#039;&#039;&#039;N&#039;&#039;&#039;ames section contains labels for all music and sound effects&lt;br /&gt;
===BSTN Header===&lt;br /&gt;
size: 0x20&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00&lt;br /&gt;
| Magic (0x4)&lt;br /&gt;
| &amp;lt;code&amp;gt;BSTN&amp;lt;/code&amp;gt; (0x4253544E)&lt;br /&gt;
|-&lt;br /&gt;
| ?&lt;br /&gt;
| ?&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x08&lt;br /&gt;
| UInt8 (0x1) ?&lt;br /&gt;
| Unknown. 0x01 in SMG and SMG2&lt;br /&gt;
|-&lt;br /&gt;
| ?&lt;br /&gt;
| ?&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x0C&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to [[SMR.szs#BSTN main table|BSTN main table]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
| Padding (0x10)&lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===BSTN main table===&lt;br /&gt;
size: (N + 1) * 0x4&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Amount N of entries (3 in SMG and SMG2)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to [[SMR.szs#SE names table|SE names table]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x08&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to [[SMR.szs#BGM names table|BGM names table]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to [[SMR.szs#STREAM names table|STREAM names table]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===SE names table===&lt;br /&gt;
size: (N + 2) * 0x4&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Amount N of entries (0xE in SMG and SMG2)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to null-terminated global Sound Effect name. Points to &amp;lt;code&amp;gt;SE&amp;lt;/code&amp;gt; in SMG and SMG2&lt;br /&gt;
|-&lt;br /&gt;
| 0x08&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to SYSTEM names table&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to PLAYER_VOICE names table&lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to PLAYER_MOTION names table&lt;br /&gt;
|-&lt;br /&gt;
| 0x14&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to BOSS_VOICE names table&lt;br /&gt;
|-&lt;br /&gt;
| 0x18&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to BOSS_MOTION names table&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to OBJECT names table&lt;br /&gt;
|-&lt;br /&gt;
| 0x20&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to ATMOSPHERE names table&lt;br /&gt;
|-&lt;br /&gt;
| 0x24&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to DEMO names table&lt;br /&gt;
|-&lt;br /&gt;
| 0x28&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to ENEMY_VOICE names table&lt;br /&gt;
|-&lt;br /&gt;
| 0x2C&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to ENEMY_MOTION names table&lt;br /&gt;
|-&lt;br /&gt;
| 0x30&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to SUPPORTER_VOICE names table&lt;br /&gt;
|-&lt;br /&gt;
| 0x34&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to SUPPORTER_MOTION names table&lt;br /&gt;
|-&lt;br /&gt;
| 0x38&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to REMIX_SEQ names table&lt;br /&gt;
|-&lt;br /&gt;
| 0x3C&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to HOME_BUTTON_MENU names table&lt;br /&gt;
|}&lt;br /&gt;
Each of the referenced tables are defined identically, see [[SMR.szs#SE name offset table|SE name offset table]].&lt;br /&gt;
&lt;br /&gt;
===BGM names table===&lt;br /&gt;
size: (N + 2) * 0x4&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Amount N of entries (2 in SMG and SMG2)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to null-terminated global Background Music name. Points to &amp;lt;code&amp;gt;BGM&amp;lt;/code&amp;gt; in SMG and SMG2&lt;br /&gt;
|-&lt;br /&gt;
| 0x08&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to MAIN_BGM names table&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to MULTI_BGM names table&lt;br /&gt;
|}&lt;br /&gt;
Each of the referenced tables are defined identically, see [[SMR.szs#BGM name offset table|BGM name offset table]].&lt;br /&gt;
&lt;br /&gt;
===STREAM names table===&lt;br /&gt;
size: (N + 2) * 0x4&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Amount N of entries (1 in SMG and SMG2)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to null-terminated global Stream Music name. Points to &amp;lt;code&amp;gt;STREAM&amp;lt;/code&amp;gt; in SMG and SMG2&lt;br /&gt;
|-&lt;br /&gt;
| 0x08&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to [[SMR.szs#STREAM name offset table|STREAM name offset table]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===SE name offset table===&lt;br /&gt;
size: (N + 2) * 0x4&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Amount N of entries&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to null-terminated Sound Effect category name. Examples: &amp;lt;code&amp;gt;SYSTEM&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PLAYER_VOICE&amp;lt;/code&amp;gt; etc.&lt;br /&gt;
|-&lt;br /&gt;
| 0x8 + N * 0x4&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to null-terminated Sound Effect name. Examples: &amp;lt;code&amp;gt;SE_SY_COIN&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SE_PV_JUMP_S&amp;lt;/code&amp;gt; etc.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===BGM name offset table===&lt;br /&gt;
size: (N + 2) * 0x4&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Amount N of entries&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to null-terminated Background Music category name, like &amp;lt;code&amp;gt;MAIN_BGM&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;MULTI_BGM&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x8 + N * 0x4&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to null-terminated Background Music name. Examples: &amp;lt;code&amp;gt;BGM_MISS&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MBGM_STAR_CHANCE&amp;lt;/code&amp;gt; etc.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===STREAM name offset table===&lt;br /&gt;
size: (N + 2) * 0x4&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Amount N of entries&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to null-terminated Stream Music category name. Simply &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; in SMG and SMG2&lt;br /&gt;
|-&lt;br /&gt;
| 0x8 + N * 0x4&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to null-terminated Stream Music name. Examples: &amp;lt;code&amp;gt;STM_STAR_CHANCE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;STM_SMG_GALAXY_01&amp;lt;/code&amp;gt; etc.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The rest of the BSTN section is padded to the nearest 0x20.&lt;br /&gt;
&lt;br /&gt;
==BSC==&lt;br /&gt;
The &#039;&#039;&#039;B&#039;&#039;&#039;inary &#039;&#039;&#039;S&#039;&#039;&#039;equence &#039;&#039;&#039;C&#039;&#039;&#039;ollection section (often referred to as &#039;&#039;&#039;SC section&#039;&#039;&#039;) defines the playback of all sound effects via [[BMS (File Format)|BMS]] data.&lt;br /&gt;
&lt;br /&gt;
===BSC Header===&lt;br /&gt;
size: N * 0x4 + 0x8&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00&lt;br /&gt;
| Magic (0x2)&lt;br /&gt;
| &amp;lt;code&amp;gt;SC&amp;lt;/code&amp;gt; (0x5343)&lt;br /&gt;
|-&lt;br /&gt;
| 0x02&lt;br /&gt;
| UInt16 (0x2)&lt;br /&gt;
| Amount N of sound categories (0x0E in SMG and SMG2)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| BSC section size&lt;br /&gt;
|- style=&amp;quot;vertical-align:bottom;&amp;quot;&lt;br /&gt;
| 0x08&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to SYSTEM offset table&lt;br /&gt;
|- style=&amp;quot;vertical-align:bottom;&amp;quot;&lt;br /&gt;
| 0x0C&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to PLAYER_VOICE offset table&lt;br /&gt;
|- style=&amp;quot;vertical-align:bottom;&amp;quot;&lt;br /&gt;
| 0x10&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to PLAYER_MOTION offset table&lt;br /&gt;
|- style=&amp;quot;vertical-align:bottom;&amp;quot;&lt;br /&gt;
| 0x14&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to BOSS_VOICE offset table&lt;br /&gt;
|- style=&amp;quot;vertical-align:bottom;&amp;quot;&lt;br /&gt;
| 0x18&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to BOSS_MOTION offset table&lt;br /&gt;
|- style=&amp;quot;vertical-align:bottom;&amp;quot;&lt;br /&gt;
| 0x1C&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to OBJECT offset table&lt;br /&gt;
|- style=&amp;quot;vertical-align:bottom;&amp;quot;&lt;br /&gt;
| 0x20&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to ATMOSPHERE offset table&lt;br /&gt;
|- style=&amp;quot;vertical-align:bottom;&amp;quot;&lt;br /&gt;
| 0x24&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to DEMO offset table&lt;br /&gt;
|- style=&amp;quot;vertical-align:bottom;&amp;quot;&lt;br /&gt;
| 0x28&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to ENEMY_VOICE offset table&lt;br /&gt;
|- style=&amp;quot;vertical-align:bottom;&amp;quot;&lt;br /&gt;
| 0x2C&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to ENEMY_MOTION offset table&lt;br /&gt;
|- style=&amp;quot;vertical-align:bottom;&amp;quot;&lt;br /&gt;
| 0x30&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to SUPPORTER_VOICE offset table&lt;br /&gt;
|- style=&amp;quot;vertical-align:bottom;&amp;quot;&lt;br /&gt;
| 0x34&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to SUPPORTER_MOTION offset table&lt;br /&gt;
|- style=&amp;quot;vertical-align:bottom;&amp;quot;&lt;br /&gt;
| 0x38&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to REMIX_SEQ offset table&lt;br /&gt;
|- style=&amp;quot;vertical-align:bottom;&amp;quot;&lt;br /&gt;
| 0x3C&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to HOME_BUTTON_MENU offset table&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Each of the referenced tables are defined identically, see [[SMR.szs#BSC offset table|BSC offset table]].&lt;br /&gt;
&lt;br /&gt;
===BSC offset table===&lt;br /&gt;
size: (N + 1) * 0x4&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Amount N of entries&lt;br /&gt;
|-&lt;br /&gt;
| 0x4 + N * 0x4&lt;br /&gt;
| UInt32 (0x4)&lt;br /&gt;
| Offset to [[BMS (File Format)|BMS data]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Inbetween tables is the BMS data that makes up all of the sound effects. The BSC section is basically structured like this:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! BSC&lt;br /&gt;
! Contents&lt;br /&gt;
|-&lt;br /&gt;
| BSC Header&lt;br /&gt;
| Offsets to [CATEGORY] offset tables&lt;br /&gt;
|-&lt;br /&gt;
| Main BMS controller&lt;br /&gt;
| BMS data thats mandatory for all sound effects. Its stored once at the beginning of the file to reduce filesize&lt;br /&gt;
|-&lt;br /&gt;
| [CATEGORY] offset table&lt;br /&gt;
| A table with offsets to BMS data for the first sound category (SYSTEM)&lt;br /&gt;
|-&lt;br /&gt;
| [CATEGORY] BMS data&lt;br /&gt;
| Raw BMS data defining the playback of each sound effect&lt;br /&gt;
|-&lt;br /&gt;
| [CATEGORY] offset table&lt;br /&gt;
| A table with offsets to BMS data for the second sound category (PLAYER_VOICE)&lt;br /&gt;
|-&lt;br /&gt;
| [CATEGORY] BMS data&lt;br /&gt;
| Raw BMS data defining the playback of each sound effect&lt;br /&gt;
|-&lt;br /&gt;
| ...&lt;br /&gt;
| ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===BSC optimizations===&lt;br /&gt;
Despite using the same data that BMS files use, the BSC section optimizes a lot of them. Here are some notable ones:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! BMS files&lt;br /&gt;
! BSC section&lt;br /&gt;
|-&lt;br /&gt;
| Use E2 + E3 to define an instrument. Takes 0x4 bytes in total&lt;br /&gt;
| Use E1 to define an instrument. Takes 0x3 bytes in total&lt;br /&gt;
|-&lt;br /&gt;
| Close all tracks with FF, even tracks that end with a C7 loop&lt;br /&gt;
| Omit use of FF when the last operation in a track is C7&lt;br /&gt;
|-&lt;br /&gt;
| Define playback speed with D8 and E0 for each BMS file individually&lt;br /&gt;
| Define playback speed with EA and D8 once. Every sound effect references this with a C3 jump, reducing the filesize by a lot as opposed to defining the playback speed individually for each sound effect&lt;br /&gt;
|-&lt;br /&gt;
| no equivalent&lt;br /&gt;
| All dummy sounds point to offset 0x6B, which holds FF instead of defining FF for all dummies individually&lt;br /&gt;
|-&lt;br /&gt;
| OpenTrack with voices 1-7, wait with F0 and shut voices with the 8X operator. Takes up 0x6 bytes minimum&lt;br /&gt;
| OpenTrack with voice 0, which enables a Midi gate. This only needs 0x4 bytes to define a sound/key and how long its supposed to last&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==WSYS==&lt;br /&gt;
&#039;&#039;&#039;W&#039;&#039;&#039;ave &#039;&#039;&#039;Sys&#039;&#039;&#039;tem. See [[WSYS]]&lt;br /&gt;
&lt;br /&gt;
==IBNK==&lt;br /&gt;
&#039;&#039;&#039;I&#039;&#039;&#039;nstrument &#039;&#039;&#039;B&#039;&#039;&#039;a&#039;&#039;&#039;nk&#039;&#039;&#039;. See [[IBNK]]&lt;br /&gt;
&lt;br /&gt;
==Editing SMR.szs==&lt;br /&gt;
&#039;&#039;&#039;The following section contains instructions for editing SMR.szs with the SoundModdingToolkit. They do not contain specifications for the file itself.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The tool [https://xayr.gay/tools/SoundModdingToolkit/ SoundModdingToolkit] can convert this file into a clear and readable file structure, so the structure of the file is shown on this page using the tool&#039;s converted structure.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Please note that only version 4.1.0 can edit the lists without any problems. Later versions can lead to problems such as muted songs.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===BGM===&lt;br /&gt;
====MAIN_BGM====&lt;br /&gt;
Found in &#039;&#039;SoundTable/BGM/libraries/MAIN_BGM.json&#039;&#039; &amp;lt;/br&amp;gt;&lt;br /&gt;
Defines the sequenced music. The music sequence files can be found in bms format in &#039;&#039;AudioRes/Seqs/JaiSeq.arc&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Name&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| unk1&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| unk2&lt;br /&gt;
| Volume (overridden by [[BgmParam]] in SMG2)&lt;br /&gt;
|-&lt;br /&gt;
| unk3&lt;br /&gt;
| File ID of the bms file in JaiSeq.arc to use (the filename is ignored)&lt;br /&gt;
|-&lt;br /&gt;
| unk4&lt;br /&gt;
| File ID of the cit file in JaiChord.arc to use (the filename is ignored)&amp;lt;/br&amp;gt;-1 = No CIT/chord&lt;br /&gt;
|-&lt;br /&gt;
| unk5&lt;br /&gt;
| Whether BMS channel 0 should be used for timing and chord usage for [[CIT (File Format)|chords]] or not..&amp;lt;/br&amp;gt;0 = False, 1 = True&lt;br /&gt;
|-&lt;br /&gt;
| type&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| mOffset&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| NameOffset&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| Internal mapping name for this sequence (e.g. &amp;quot;BGM_MISS&amp;quot;).&amp;lt;/br&amp;gt; This name can then be used in musiclists like [[ScenarioBgmInfo]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====MULTI_BGM====&lt;br /&gt;
Found in &#039;&#039;SoundTable/BGM/libraries/MULTI_BGM.json&#039;&#039; &amp;lt;/br&amp;gt;&lt;br /&gt;
Defines settings about Multi BGM such as its name. Multi BGM combines Stream (STM) and sequential Music (BGM). Which Music is set for each Multi BGM is defined in [[MultiBgmInfo]].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Name&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| unk1&lt;br /&gt;
| ? always 112&lt;br /&gt;
|-&lt;br /&gt;
| unk2&lt;br /&gt;
| ? always 120&lt;br /&gt;
|-&lt;br /&gt;
| unk3&lt;br /&gt;
| ? always 0&lt;br /&gt;
|-&lt;br /&gt;
| unk4&lt;br /&gt;
| ? always -1&lt;br /&gt;
|-&lt;br /&gt;
| unk5&lt;br /&gt;
| ? always 0&lt;br /&gt;
|-&lt;br /&gt;
| type&lt;br /&gt;
| ? always 96&lt;br /&gt;
|-&lt;br /&gt;
| mOffset&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| NameOffset&lt;br /&gt;
| ? always 0&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| Internal mapping name for this entry (e.g. &amp;quot;MBGM_STAR_CHANCE&amp;quot;) &amp;lt;/br&amp;gt; This name can then be used in musiclists like [[ScenarioBgmInfo]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===STREAM===&lt;br /&gt;
Found in &#039;&#039;SoundTable/STREAM/0.json&#039;&#039;&amp;lt;/br&amp;gt;&lt;br /&gt;
Defines the streamed ast audio files including its internal STM name as well as its filepath.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Name&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| unk1&lt;br /&gt;
| ? always 128&lt;br /&gt;
|-&lt;br /&gt;
| unk2&lt;br /&gt;
| Volume (overridden by [[BgmParam]] in SMG2)&lt;br /&gt;
|-&lt;br /&gt;
| streamType&lt;br /&gt;
| Stream Type&amp;lt;br /&amp;gt;14: Standard Stream (2 Channels)&amp;lt;br /&amp;gt;238: Multi Stream (4 Channels)&lt;br /&gt;
|-&lt;br /&gt;
| streamPath&lt;br /&gt;
| Filepath of the AST file to use (e.g. &amp;quot;/AudioRes/Stream/smg2_ev_starchance_strm.ast&amp;quot;)&lt;br /&gt;
|-&lt;br /&gt;
| type&lt;br /&gt;
| ? always 112&lt;br /&gt;
|-&lt;br /&gt;
| mOffset&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| NameOffset&lt;br /&gt;
| ? always 0&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| Internal mapping name for this song (e.g. &amp;quot;STM_STAR_CHANCE&amp;quot;) &amp;lt;/br&amp;gt; This name can then be used in musiclists like [[ScenarioBgmInfo]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===SE===&lt;br /&gt;
====AW====&lt;br /&gt;
Each aw. file is converted by the tool into a folder that has the ID of the aw file in its name, and besides the sound files converted in wav format, contains the following settings for each sound:&lt;br /&gt;
*&#039;&#039;&#039;manifest.json&#039;&#039;&#039; Contains the ID and name of the aw file&lt;br /&gt;
*&#039;&#039;&#039;wavetable.json&#039;&#039;&#039; Contains settings for each sound of the aw. file&lt;br /&gt;
&lt;br /&gt;
=====wavetable=====&lt;br /&gt;
Each entry starts with the name of the Wav file (e.g. &amp;quot;31&amp;quot;) followed by its settings:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Name&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| format&lt;br /&gt;
| ? always 0&lt;br /&gt;
|-&lt;br /&gt;
| key&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| sampleRate&lt;br /&gt;
| The sample rate at which the sound should be played. (e.g. &amp;quot;22050.0&amp;quot;)&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sampleCount&lt;br /&gt;
| Length of the sound in samples&lt;br /&gt;
|-&lt;br /&gt;
| loop&lt;br /&gt;
| Whether it should be looped or not&amp;lt;br /&amp;gt;&#039;&#039;&#039;true:&#039;&#039;&#039; loop&amp;lt;br /&amp;gt;&#039;&#039;&#039;false:&#039;&#039;&#039; do not loop&lt;br /&gt;
|-&lt;br /&gt;
| loop_start&lt;br /&gt;
| Loop Start position in samples.&lt;br /&gt;
|-&lt;br /&gt;
| loop_end&lt;br /&gt;
| Loop End position in samples.&lt;br /&gt;
|-&lt;br /&gt;
| last&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| penult&lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Libraries====&lt;br /&gt;
In &#039;&#039;SoundTable\SE\libraries\&#039;&#039; there are several libraries which contain settings for sounds with their internal assigned names.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Name&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| unk1&lt;br /&gt;
| ? always 128&lt;br /&gt;
|-&lt;br /&gt;
| unk2&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| unk3&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| unk4&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| unk5&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| unk6&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| type&lt;br /&gt;
| Always 80&lt;br /&gt;
|-&lt;br /&gt;
| mOffset&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| NameOffset&lt;br /&gt;
| ? Always 0&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| Internal Name of the soundeffect (e.g. &amp;quot;SE_SV_LV_YOSHI_FLUTTER&amp;quot;)&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>RavuAlHemio</name></author>
	</entry>
	<entry>
		<id>https://www.lumasworkshop.com/w/index.php?title=WSYS&amp;diff=1041</id>
		<title>WSYS</title>
		<link rel="alternate" type="text/html" href="https://www.lumasworkshop.com/w/index.php?title=WSYS&amp;diff=1041"/>
		<updated>2026-07-03T10:05:53Z</updated>

		<summary type="html">&lt;p&gt;RavuAlHemio: document WBCT as link between WSYS and SCNE&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;WSYS&#039;&#039;&#039; Wave System&lt;br /&gt;
&lt;br /&gt;
Internally, Wave System.&lt;br /&gt;
&lt;br /&gt;
This section contains all of the information required for decoding the [[AW_(File_Format)|AW file]] as well as other information for melodic tuning, root key, and other various parts of JAudio. &lt;br /&gt;
&lt;br /&gt;
WSYS format is consistent between engine versions, however some games do not make use of the waveCount bytes. If the wavecount int32 is missing in anything newer than twilight princess, the WSYS will not function correctly.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;WSYS Structure&amp;lt;/h1&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset                !! Type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;0x00&amp;lt;/center&amp;gt; || int32 || 0x57535953 &#039;WSYS&#039; || Magic &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;0x04&amp;lt;/center&amp;gt; || int32 || size || WSYS Size&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;0x08&amp;lt;/center&amp;gt; || int32 || wsysID || WSYS ID (This is how insts select the wsys)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;0x0C&amp;lt;/center&amp;gt; || int32 || waveCount || WSYS Wave Count&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;0x10&amp;lt;/center&amp;gt; || int32 || [[WSYS#WINF | WINF Pointer]] || WBINF&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;0x14&amp;lt;/center&amp;gt; || int32 || [[WSYS#WBCT | WBCT Pointer]] || WBCT&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
==WINF==&lt;br /&gt;
WINF is a pointer container. They point to the [[WSYS#WaveGroup|Wave Groups]].&lt;br /&gt;
&lt;br /&gt;
The ID&#039;s for every wave group are controlled by the [[WSYS#SCNE|SCNE]] object. They line up,  WaveGroup[1] uses WaveScenes[1]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset                !! Type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;0x00&amp;lt;/center&amp;gt; || int32 || 0x57494E46 &#039;WINF&#039; || Magic &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;0x04&amp;lt;/center&amp;gt; || int32 || waveGroupCount || Count of wavegroups&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;0x08&amp;lt;/center&amp;gt; ||  [[WSYS#WaveGroup|WaveGroup]]*[] (int32) || waveGroupPointers || Pointers to the individual wavegroups. &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
==WBCT==&lt;br /&gt;
WBCT is a container for pointers that point to [[WSYS#SCNE|SCNE]] objects.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset                !! Type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;0x00&amp;lt;/center&amp;gt; || int32 || 0x57424354 &#039;WBCT&#039; || Magic&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;0x04&amp;lt;/center&amp;gt; || int32 || -1 || unknown&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;0x08&amp;lt;/center&amp;gt; || int32 || sceneCount || Count of scenes&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;0x0C&amp;lt;/center&amp;gt; || [[WSYS#SCNE|SCNE]]*[] (int32) || scenePointers || Pointers to the individual scenes.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==SCNE==&lt;br /&gt;
SCNE is a pointer container as well. They point to the [[WSYS#C-DF|C-DF]] objects. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset                !! Type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;0x00&amp;lt;/center&amp;gt; || int32 || 0x53434E45 &#039;SCNE&#039; || Magic &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;0x04&amp;lt;/center&amp;gt; || int64 || padding || padding&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;0x0C&amp;lt;/center&amp;gt; || int32 || [[WSYS#C-DF|C-DF]]* || Pointer to C-DF&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;0x10&amp;lt;/center&amp;gt; || int32 || [[WSYS#C-DF|C-DF]]* || Pointer to C-EX &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;0x14&amp;lt;/center&amp;gt; || int32 || [[WSYS#C-DF|C-DF]]* || Pointer to C-ST&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Scene Waves==&lt;br /&gt;
&lt;br /&gt;
Note: The other sections C-ST, and C-EX point to to this category as well. They remain empty. Code for parsing them isn&#039;t even in the executables.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset                !! Type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;0x00&amp;lt;/center&amp;gt; || int32 || 0x432D4446 (&#039;C-DF&#039;) || Magic&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;0x04&amp;lt;/center&amp;gt; || int32 || wavesCount || Wave Count&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;0x08&amp;lt;/center&amp;gt; || int32 || [[WSYS#WAVEID|WAVEID]]*[] || Pointer array waveID&#039;s&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==WAVEID==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset                !! Type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;0x00&amp;lt;/center&amp;gt; || int16 || waveGroupID || Wave Group ID (Current WSYS)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;0x02&amp;lt;/center&amp;gt; || int16 || waveID || The ID assigned from this wave&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==WaveGroup==&lt;br /&gt;
SCNE is a pointer container as well. They point to the [[WSYS#C-DF|C-DF]] objects. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset                !! Type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;0x00&amp;lt;/center&amp;gt; || char[0x70] || archiveName || File Path for .AW&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;0x70&amp;lt;/center&amp;gt; || int32|| wavesCount || Wave Count&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;0x74&amp;lt;/center&amp;gt; || int32 || [[WSYS#WAVE|WAVE]]*[] || Pointer array of Waves&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==WAVE==&lt;br /&gt;
&lt;br /&gt;
Container format for Wave Information. This tells you where the ADPCM / PCM / whatever data starts inside of the .AW file for the current group and for what wave. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset                !! Type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;0x00&amp;lt;/center&amp;gt; || byte || 0x00 || unknown&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;0x01&amp;lt;/center&amp;gt; || byte || format || WaveFormat&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;0x02&amp;lt;/center&amp;gt; || byte || baseKey || Base Key&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;0x03&amp;lt;/center&amp;gt; || byte || 0x00 || unknown&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;0x04&amp;lt;/center&amp;gt; || float || sampleRate || Sample Rate&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;0x08&amp;lt;/center&amp;gt; || int32 || awOfsStart || AW Offset Start&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;0x0C&amp;lt;/center&amp;gt; || int32 || awOfsEnd || AW Length&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;0x10&amp;lt;/center&amp;gt; || int32(bool) || loop || Loop flags?&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;0x14&amp;lt;/center&amp;gt; || int32 || loopStartSample || Loop Start Sample&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;0x18&amp;lt;/center&amp;gt; || int32 || loopEndSample || Loop End Sample&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;0x20&amp;lt;/center&amp;gt; || int32 || sampleCount || Samples Count&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;0x24&amp;lt;/center&amp;gt; || short || pLast || ADPCM Loop Last Sample&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;center&amp;gt;0x26&amp;lt;/center&amp;gt; || short || pPenult || ADPCM Loop Penult Sample&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>RavuAlHemio</name></author>
	</entry>
</feed>