Command 0x0F: Vibrato

Sets vibrato with delay.

Syntax

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

Parameters

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

Remarks

Enables a vibrato that changes the pitch in a triangle wave on every key on (effect enable flag bit1). The setting applies to all subsequent notes until it is canceled with command 0x0E.

The vibrato works as follows.

  1. On key on, depth is made positive and the number of steps until the turnaround is initialized 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 the 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 value of the DSP pitch register.
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

  • Specify a value of 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.
  • Since it changes the same pitch value as pitch bend, enabling both makes their effects add up.
  • On SE channel 5 (logical channel 13), changes to the pitch shift amount by CPU command $84 are also reflected at each vibrato step.

See also

Structure of sequence data
Command 0x0D
Command 0x0E