From CloudModding TWW Wiki

BMS / JAISeq (Binary Musical Sequence)

The BMS / JAISeq system is a combination of several vCPU's to make music. As by it's name, it's a musical sequence. Most of its functionality is derived from MIDI, but it is fully Turing complete.

Each track is its own vCPU, meaning every track has its own Registers, Perf, Program counter, Delay, Voices, and runs completely independently to other tracks with the only common events being trackports / the timebase.

Each vCPU/Track has 7 voices.

The track will continue executing instructions until it hits a blocking (wait) command, blocking all other tracks while it does so. The function of waiting is not synchronous. Every track will have its delay register decremented with every tick

Opcodes

mnemonic Byte Arguments Description
NOTE_ON
0x00-0x79 byte voice, byte velocity Any bytes between 0x00 and 0x80 are NOTE_ON events. The first byte (the 0x00-0x80) is the MIDI note.
WAIT_8
0x80 byte ticks Waits for an int8 amount of ticks
NOTE_OFF
0x81-0x87 none Stops the voice for the track it was executed on, each track has 7 voices, so the voice is the lower nybble of the command
WAIT_16
0x88 short ticks Waits for an int16 amount of ticks
WAIT_VAR
0xCF vlq ticks Waits for vlq amount of ticks do {temp = reader.ReadByte(); vlq = (vlq << 7) | (temp & 0x7F); } while ((temp & 0x80) > 0);
OPEN_TRACK
0xC1 byte id, int24 address Opens a new track with the specified ID at the specified address

More to be added