SFZ1 modulations
The set of modulations available under the SFZ1 specification is fixed, and there's a dedicated opcode for every possible modulation, including fairly esoteric ones such as using note velocity to modulate the hold stage of the pitch envelope.
If something is not described below, then modulating it is not possible under the SFZ1 specification, and will require using SFZ2 or possibly some extension opcodes.
Basic MIDI CC modulation
For background, see MIDI CC modulations and for examples, see SFZ 1 MIDI CC Examples.
Note Number and Velocity Tracking
Volume (amp), filter cutoff (fil) and pitch allow MIDI Note Number and Velocity
to be used to modulate the base opcode values using _keytrack and _veltrack respectively,
with the units matching the base opcode.
An example is given in "MIDI Note Number and Velocity tracking".
"vel2" velocity tracking
The three SFZ1 envelope generators (ampeg, fileg and pitcheg) along with the three SFZ1 equalizer bands (EQ1 to 3)
allow parameters to be modulated by the initial note on velocity using (target)_vel2(param) syntax.
This is explained in more detail, with examples, in "(target)_vel2(param) Velocity Tracking".
Controlled adjustment
Volume, filter and cutoff also each get an LFO and an envelope, for which separate pages exist with examples.
Random adjustment
Filter cutoff, delay, volume, offset and pitch
all support random adjustment by appending _random to the opcode.
For example, the following gives 1dB of headroom which is randomly boosted into:
volume=-1
amp_random=1
Cross fading
Cross fading can also be considered a form of modulation. This is where two overlapping voices are faded into one another. The overlapping voices can be controlled by:
In each case, there is a xfin_lo/xfin_hi and xfout_lo/xfout_hi pair for
ccN, key, vel.
An example of one note with two dynamic layers being cross faded:
<region>
sample=e4_ft_p.wav
xfin_locc1=0 xfin_hicc1=63
xfout_locc1=64 xfout_hicc1=127
<region>
sample=e4_ft_f.wav
xfin_locc1=64 xfin_hicc1=127
The xf_cccurve, xf_keycurve and xf_velcurve opcodes give the choice of two curves for each cross fade type:
- gain: Linear gain crossfade. This setting is best when crossfading phase-aligned material. Linear gain crossfades keep constant amplitude during the crossfade, preventing clipping.
- power: Equal-power RMS crossfade. This setting works better when mixing very different material, as a constant power level is kept during the crossfade.