Command 0x0F: Vibrato

Sets vibrato with delay.

Syntax

0x0F, byte length, byte rate, sbyte depth, byte delay

Parameters

ParameterTypeDescription
lengthbyteTurnaround interval (number of steps)
ratebyteTime per step
depthsbytePitch change per step (sign is ignored)
delaybyteTime from key-on until vibrato starts

Description

On every key-on, enables a vibrato that varies the pitch in a triangle wave (effect enable flag bit1). The setting applies to all subsequent notes until cancelled with command 0x0E.

The vibrato works as follows.

  1. At key-on, make depth positive and initialize the number of steps until turnaround to length ÷ 2 (rounded down).
  2. Wait until the delay time has elapsed.
  3. Every rate, add depth to the pitch (1 step).
  4. When the number of steps until turnaround reaches 0, invert the sign of depth and reset the step count to length.

Therefore the pitch varies within ±(depth × length ÷ 2) around the original pitch. The change amount is added directly to the DSP pitch register value.
Effect times are counted in timer periods independent of tempo (about 7.5ms by default; changeable with command 0x2A). For details, see Sequence data structure.

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

Note

  • Specify 2 or more for length. If 1 is specified, the number of steps until the first turnaround becomes 0, and it does not turn around until 256 steps later.
  • If length is odd, the center of the variation is offset from the original pitch.
  • It changes the same pitch value as pitch bend, so if both are enabled their effects add up.

See also

Sequence data structure
Command 0x0D
Command 0x0E