Command 0x0D: Vibrato (no delay)
Sets vibrato without delay.
Syntax
0x0D, byte length, byte rate, sbyte depth
Parameters
| Parameter | Type | Contents |
|---|---|---|
| length | byte | Turnaround interval (number of steps) |
| rate | byte | Time of one step |
| depth | sbyte | Pitch change per step (the sign is ignored) |
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.
- On key on, depth is made positive and the number of steps until the turnaround is initialized to length / 2 (rounded down).
- Every rate, depth is added to the pitch (1 step).
- When the number of steps until the turnaround reaches 0, the sign of depth is inverted and the step count is reset 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.
This is the same as command 0x0F with delay set to 0.
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 sound effect channel 5 (logical channel 13), changes to the pitch shift amount by CPU command $84 are also reflected at each vibrato step.