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
| Parameter | Type | Description |
|---|---|---|
| duration | byte / ushort | Note length (ticks). A big-endian 16-bit value in 16-bit duration mode |
Description
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 is 2 bytes, big-endian (high byte first).
This command takes no time to process; the following event is read within the same tick.
Note
- Whether a default duration is in effect is determined by the low byte alone. 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 lengths are read from note events.
- When setting with 8 bits, the high byte ($0130+x) is not changed. The high byte of a value previously set with 16 bits remains, so when setting again with 8 bits after setting with 16 bits, first cancel with command 0x07.
See also
Sequence data structure
Command 0x07
Command 0x2B
Command 0x80
Command 0x81