Command 0x08: Pitch bend (positive direction)

Sets a pitch bend. Uses the change amount as is.

Syntax

0x08, byte delay, byte interval, byte count, sbyte delta, byte reverse

Parameters

ParameterTypeContents
delaybyteTime until the first change (interval if 0)
intervalbyteInterval between changes
countbyteTotal number of changes
deltasbytePitch change per step
reversebyteNumber of initial changes applied with the sign inverted

Remarks

Enables a pitch bend that changes the pitch by a fixed amount at fixed intervals on every key on (effect enable flag bit0). The setting applies to all subsequent notes until it is canceled with command 0x0A.

The pitch bend works as follows.

  1. On key on, each counter is initialized.
  2. If delay is not 0, the first change is made when the delay time has elapsed. If delay is 0, the first change is made when the interval time has elapsed.
  3. After that, the pitch is changed every interval. For the first reverse changes, the change amount is applied with its sign inverted; after that, the change amount is applied as is.
  4. The pitch bend ends once the pitch has been changed count times (including the reverse times).

The change amount is added directly to the value of the DSP pitch register (14 bits, $1000 = original pitch), not to the note number. Therefore, for the same change amount, the higher the note, the smaller the change in musical pitch.
Effect times are counted in timer periods (12.5ms), which do not depend on the tempo. For details, see Structure of sequence data.

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

Note

  • If 0 is specified for count, the pitch changes 256 times.
  • Since it changes the same pitch value as vibrato, enabling both makes their effects add up.
  • On a BGM channel during an SE interrupt, no key on is performed, so the counters are not initialized.

See also

Structure of sequence data
Command 0x09
Command 0x0A
Command 0x26
Command 0x27