The modulations available under SFZ2 are much more flexible than the fixed set specified by SFZ1. All SFZ1 modulations are still available under the SFZ2 spec, and will often be easier to use in cases such as envelopes where the standard AHDSR shape is all that’s needed.
The basic difference is that SFZ1 has three envelopes - one assigned to volume, one to pitch, and one to filter cutoff. There are also three LFOs, one for each of those modulation targets. SFZ2 can have an arbitraty number of envelopes and LFOs, with the ability to specify one or more modulation targets from a list. It is even possible for LFOs to modulate other LFOs and envelopes to modulate LFOs (but not for LFOs to modulate envelopes). In addition, SFZ2 envelopes can have an arbitrary number of points.
Additional MIDI CC modulation #
SFZ2 adds one more paramter which can be modulated with MIDI CC - stereo width. Also need to document pan_onccX and find out whether it’s SFZ1 or SFZ2 - currently not sure, needs testing.
For each LFO, an LFO number must be specified - lfo01, lfo02 etc. Each LFO has the following parameters:
lfoN_wave lfoN_freq_onccX lfoN_freq_stepccX lfoN_delay_onccX lfoN_fade_onccX lfoN_phase_onccX
Click on each link for a detailed description. Similarly to SFZ1 LFOs, there’s a frequency, a delay and a fade-in time. In addition, the waveform shape and initial phase can be specified and the LFO can be configured to run for a limited number of counts.
The frequency, delay, fade and initial phase can all be modulated by MIDI CC. There is no modulation for LFO depth - to control the depth of vibrato etc, use MIDI CC to modulate how much the LFO affects the desired target.
Available LFO targets #
The available modulation targets for LFOs are These destinations are added as a suffix to ‘lfoN_’. For example
makes LFO 01 affect pitch with a max depth of 100 cents.
would make LFO 03 add up to 1.3 Hertz to the frequency of LFO 01, with the amount modulated by MIDI CC 117.
The avaialble targets related to volume and stereo positioning are:
The targets for pitch modulation are:
The targets for filter modulation are cutoff and resonance, for both the first and second filter:
The modulations of the EQ bands are:
The following targets affect other LFOs:
Some Cakewalk instruments can also modulate the decim and bitred effects:
LFO examples #
Here is an example of how one LFO could be used to control both pitch vibrato and volume vibrato (tremolo) with the rate, pitch vibrato depth, tremolo depth, delay and fade each controlled by a separate MIDI CC parameter:
lfo01_pitch_oncc111=22 // Vibrato LFO lfo01_freq=2 lfo01_freq_oncc113=7 lfo01_delay_oncc114=0.500 lfo01_fade_oncc115=0.500 lfo01_volume=0 // This LFO also does tremolo lfo01_volume_oncc112=2
And an LFO which does just pitch vibrato, and has a second LFO modulating its rate to create some unsteadiness:
lfo01_pitch_oncc111=22 // Vibrato LFO lfo01_freq=2 lfo01_freq_oncc113=7 lfo01_delay_oncc114=0.500 lfo01_fade_oncc115=0.500 lfo2_freq_lfo1_oncc116=3 //Affect the rate of the other LFO for unsteady vibrato lfo02_wave=1 lfo02_freq=0.1 lfo02_freq_oncc116=0.9
For randomized humanization, the extended MIDI CC 135 can be used to randomize the initial phase and speed of the second LFO.
lfo01_pitch_oncc111=22 // Vibrato LFO lfo01_freq=2 lfo01_freq_oncc113=7 lfo01_delay_oncc114=0.500 lfo01_fade_oncc115=0.500 lfo2_freq_lfo1_oncc116=3 //Affect the rate of the other LFO for unsteady vibrato lfo02_wave=1 lfo02_freq=0.1 lfo02_freq_oncc116=0.8 lfo02_phase_oncc135=1 lfo02_freq_oncc135=0.2
SFZ2 envelopes are numbered and can have an arbitrary number of points, with the level at each point and its modulation set separately. The opcodes used to create these envelopes are:
Envelope targets #
Similarly to LFOs, envelopes have assignable modulation targets. These destinations are added as a suffix to ‘egN_’ - so, for example:
would have envelope 01 modulate pitch, with an envelope depth of 2400 cents.
These are the available targets related to amplitude and stereo positioning:
Targets for pitch:
Targets for filters:
Targets for EQ bands:
Targets for modulating LFOs:
These two need to be tested - are they for envelopes to modulate other envelopes?
Targets for modulating decim and bitred do not appear to have been included in the specification.
Example envelope #
Here is a simple pitch envelope which will start a note with a glide from up to an octave lower, with the depth and time modulated by MIDI CCs. The envelope will statt at a lower value at envelope point 0, and return the pitch to normal at envelope point 1.
eg01_sustain=1 //Pitch envelope setup for slides eg01_level0=1 eg01_level1=0 eg01_time0=0 eg01_time1=0 eg01_pitch_oncc100=-1200 eg01_time1_oncc101=1
Using LFOs and envelopes together #
Here is an example of using both an envelope and an LFO to modulate pitch, with common depth and delay parameters. The goal here is asymmetrical pitch vibrato - vibrato which does not go up and down around the original pitch, but instead only goes below it. This is idiomatic with saxophones, and is also how vibrato with certain types of non-floating guitar bridges works (string-bending vibrato is similar, of course, but in the other direction).
Shifting the phase of LFO01 will make the vibrato waveform start at the top. We also need to lower the pitch by the same amount as the vibrato depth. Using an envelope for this allows us to delay the onset of the vibrato (again, an important element of idiomatic saxophone vibrato) without a discontinuous jump in pitch.
lfo01_pitch_oncc111=20 //Saxy vibrato LFO - goes down from the main pitch lfo01_freq=2 lfo01_freq_oncc112=8 lfo01_phase=0.25 //To make it start at the top lfo01_delay_oncc116=1 eg01_pitch_oncc111=20 eg01_sustain=1 eg01_level0=0 eg01_level1=0 eg01_level2=-1 eg01_time0=0 eg01_time1=0 eg01_time1_oncc116=1 eg01_time2=0
Using SFZ1 and SFZ2 modulations together #
Both SFZ1 and SFZ2 modulations may be mixed freely. Indeed, it may be simpler to accomplish the above using the SFZ1 pitch envelope, as it is sufficient in this case, with the SFZ2 LFO. Setting the initial phase and modulating the delay with MIDI CC would not be possible with the SFZ1 pitch LFO.
lfo01_pitch_oncc111=20 //Saxy vibrato LFO - goes down from the main pitch lfo01_freq=2 lfo01_freq_oncc112=8 lfo01_phase=0.25 //To make it start at the top lfo01_delay_oncc116=1 pitcheg_delay_oncc116=1 //Pitch envelope to drop the central pitch when sax vibrato kicks in pitcheg_depth_oncc111=-20
SmoothccN and stepccN #
Most MIDI CC modulations, though not all, can have use smoothccN and stepccN. These work similarly to bend_smooth and bend_step.
SmoothccN adds “inertia” to a modulation, so quickly changing the MIDI CC value has a slower effect on the modulation target than it would normally. StepccN causes the modulation to happen in a discrete number of steps. Setting the number of steps to 1 would make the modulation an all-or-nothing control.
This is what’s possible under the SFZ2 specification. There are some additional modulations available as ARIA extensions, with amplitude_onccN being a very useful one.