Command 0x06: Set default duration

Fixes the length of subsequent notes and rests (default duration mode).

Syntax

0x06, byte duration     // normal
0x06, ushort duration   // in 16-bit duration mode

Parameters

ParameterTypeContents
durationbyte / ushortNote length (ticks). A big-endian 16-bit value in 16-bit duration mode

Remarks

Fixes the length of subsequent note events and rest events to duration. In this mode, note events and rest events become 1-byte events with no length.
Use command 0x07 to cancel it.

If 16-bit duration mode (command 0x2B) is enabled, the argument becomes 2 bytes, big-endian (high byte first).

This command takes no time to process, and the following event is read within the same tick.

Note

  • Whether a default duration is in effect is determined only by the low byte. If, in 16-bit duration mode, you specify a value whose low byte is 0 ($0100, $0200, etc.), default duration mode is not entered and the length is read from note events.
  • When set with 8 bits, the high byte ($0130+x) is not changed. The high byte of a value previously set with 16 bits remains, so if you set it again with 8 bits after setting it with 16 bits, cancel it first with command 0x07.

See also

Structure of sequence data
Command 0x07
Command 0x2B
Command 0x80
Command 0x81