SFZ v1 Opcodes
Note that modulations such as (on)ccN, and vel2* opcodes are included in the pages describing the parameters they modulate.
Sound Source: Sample Playback #
| Opcode | Description | Type | Default | Range |
|---|---|---|---|---|
| count | The number of times the sample will be played. | integer | 0 | 0 to 4294967296 |
| delay | Region delay time. | float | 0 | 0 to 100 seconds |
| delay_ccN | Region delay time after MIDI continuous controller N messages are received. If the region receives a note-off message before delay time, the region won't play. | float | 0 | 0 to 100 seconds |
| delay_random | Region random delay time. | float | 0 | 0 to 100 seconds |
| end | The endpoint of the sample. | integer | 0 | 0 to 4294967296 sample units |
| loop_mode | Allows playing samples with loops defined in the unlooped mode. | string | no_loop for samples without a loop defined, loop_continuous for samples with defined loop(s). |
no_loop, one_shot, loop_continuous, loop_sustain |
| loop_start | The loop start point, in samples. | integer | 0 | 0 to 4294967296 |
| loop_end | The loop end point, in samples. | integer | 0 | 0 to 4294967296 |
| offset | The offset used to play the sample. | integer | 0 | 0 to 4294967296 sample units |
| offset_ccN | The offset used to play the sample according to last position of MIDI continuous controller N. | integer | 0 | 0 to 4294967296 sample units |
| offset_random | Random offset added to the region offset. | integer | 0 | 0 to 4294967296 sample units |
| sample | Defines which sample file the region will play. | string | N/A | N/A |
| sync_beats | Region playing synchronization to host position. | float | 0 | 0 to 32 beats |
| sync_offset | Region playing synchronization to host position offset. | float | 0 | 0 to 32 beats |
Instrument Settings: Voice Lifecycle #
| Opcode | Description | Type | Default | Range |
|---|---|---|---|---|
| group | Exclusive group number for this region. | integer | 0 | 0 to 4294967296 |
| off_by | Region off group. | integer | 0 | 0 to 4294967296 |
| off_mode | Region off mode. | string | fast | fast, normal, time |
| output | The stereo output number for this region. | integer | 0 | 0 to 1024 |
Region Logic: Key Mapping #
| Opcode | Description | Type | Default | Range |
|---|---|---|---|---|
| key | Equivalent to using lokey, hikey and pitch_keycenter and setting them all to the same note value. | integer | N/A | 0 to 127 |
| lokey | Determine the low boundary of a certain region. | integer | 0 | 0 to 127 |
| hikey | Determine the high boundary of a certain region. | integer | 127 | 0 to 127 |
| lovel | If a note with velocity value equal to or higher than lovel AND equal to or lower than hivel is played, the region will play. |
integer | 0 | 0 to 127 |
| hivel | If a note with velocity value equal to or higher than lovel AND equal to or lower than hivel is played, the region will play. |
integer | 127 | 0 to 127 |
Region Logic: MIDI Conditions #
| Opcode | Description | Type | Default | Range |
|---|---|---|---|---|
| lochan | If incoming notes have a MIDI channel between lochan and hichan, the region will play. |
integer | 1 | 1 to 16 |
| hichan | If incoming notes have a MIDI channel between lochan and hichan, the region will play. |
integer | 16 | 1 to 16 |
| loccN | Defines the range of the last MIDI controller N required for the region to play. | integer | 0 | 0 to 127 |
| hiccN | Defines the range of the last MIDI controller N required for the region to play. | integer | 127 | 0 to 127 |
| lobend | Defines the range of the last Pitch Bend message required for the region to play. | integer | -8192 | -8192 to 8192 |
| hibend | Defines the range of the last Pitch Bend message required for the region to play. | integer | 8192 | -8192 to 8192 |
| sw_lokey | Defines the range of the keyboard to be used as trigger selectors for the sw_last opcode. | integer | 0 | 0 to 127 |
| sw_hikey | Defines the range of the keyboard to be used as trigger selectors for the sw_last opcode. | integer | 127 | 0 to 127 |
| sw_last | Enables the region to play if the last key pressed in the range specified by sw_lokey and sw_hikey is equal to the sw_last value. |
integer | 0 | 0 to 127 |
| sw_down | Enables the region to play if the key equal to sw_down value is depressed. Key has to be in the range specified by sw_lokey and sw_hikey. |
integer | 0 | 0 to 127 |
| sw_up | Enables the region to play if the key equal to sw_up value is not depressed. |
integer | 0 | 0 to 127 |
| sw_previous | Previous note value. The region will play if last note-on message was equal to sw_previous value. |
integer | N/A | 0 to 127 |
| sw_vel | Allows overriding the velocity for the region with the velocity of the previous note. | string | current | current, previous |
Region Logic: Internal Conditions #
| Opcode | Description | Type | Default | Range |
|---|---|---|---|---|
| lobpm | Host tempo value. | float | 0 | 0 to 500 bpm |
| hibpm | Host tempo value. | float | 500 | 0 to 500 bpm |
| lochanaft | Defines the range of last Channel Aftertouch message required for the region to play. | integer | 0 | 0 to 127 |
| hichanaft | Defines the range of last Channel Aftertouch message required for the region to play. | integer | 127 | 0 to 127 |
| lopolyaft | Defines the range of last Polyphonic Aftertouch message required for the region to play. | integer | 0 | 0 to 127 |
| hipolyaft | Defines the range of last Polyphonic Aftertouch message required for the region to play. | integer | 127 | 0 to 127 |
| lorand | The region will play if the random number is equal to or higher than lorand, and lower than hirand. |
float | 0 | 0 to 1 |
| hirand | The region will play if the random number is equal to or higher than lorand, and lower than hirand. |
float | 1 | 0 to 1 |
| seq_length | Sequence length, used together with seq_position to use samples as round robins. | integer | 1 | 1 to 100 |
| seq_position | Sequence position. The region will play if the internal sequence counter is equal to seq_position. |
integer | 1 | 1 to 100 |
Region Logic: Triggers #
| Opcode | Description | Type | Default | Range |
|---|---|---|---|---|
| trigger | Sets the trigger which will be used for the sample to play. | string | attack | attack, release, first, legato, release_key |
| on_loccN | If a MIDI control message with a value between on_loccN and on_hiccN is received, the region will play. Default value is -1, it means unassigned. |
integer | -1 | 0 to 127 |
| on_hiccN | If a MIDI control message with a value between on_loccN and on_hiccN is received, the region will play. Default value is -1, it means unassigned. |
integer | -1 | 0 to 127 |
Performance Parameters: Amplifier #
| Opcode | Description | Type | Default | Range |
|---|---|---|---|---|
| pan | The panoramic position for the region. | float | 0 | -100 to 100 % |
| position | Only operational for stereo samples, position defines the position in the stereo field of a stereo signal, after channel mixing as defined in the width opcode. |
float | 0 | -100 to 100 % |
| volume | The volume for the region, in decibels. | float | 0 | -144 to 6 dB |
| gain_ccN | Gain applied on MIDI control N, in decibels. | float | 0 | -144 to 48 dB |
| width | Only operational for stereo samples, width defines the amount of channel mixing applied to play the sample. | float | 100 | -100 to 100 % |
| amp_keycenter | Center key for amplifier keyboard tracking. In this key, the amplifier keyboard tracking will have no effect. | integer | 60 | 0 to 127 |
| amp_keytrack | Amplifier keyboard tracking (change in amplitude per key) in decibels. | float | 0 | -96 to 12 dB |
| amp_veltrack | Amplifier velocity tracking, represents how much the amplitude changes with incoming note velocity. | float | 100 | -100 to 100 % |
| amp_velcurve_N | User-defined amplifier velocity curve. | float | Standard curve (see amp_veltrack) | 0 to 1 |
| amp_random | Random volume for the region, in decibels. | float | 0 | 0 to 24 dB |
| rt_decay | Applies only to regions that triggered through trigger=release. The volume decrease (in decibels) per seconds after the note has been attacked. | float | 0 | 0 to 200 dB |
| xf_cccurve | MIDI controllers crossfade curve for the region. | string | power | gain, power |
| xf_keycurve | Keyboard crossfade curve for the region. | string | power | gain, power |
| xf_velcurve | Velocity crossfade curve for the region. | string | power | gain, power |
| xfin_loccN | Fade in control based on MIDI CC. | integer | 0 | 0 to 127 |
| xfin_hiccN | Fade in control based on MIDI CC. | integer | 0 | 0 to 127 |
| xfout_loccN | Fade out control based on MIDI CC. | integer | 0 | 0 to 127 |
| xfout_hiccN | Fade out control based on MIDI CC. | integer | 0 | 0 to 127 |
| xfin_lokey | Fade in control based on MIDI note (keyboard position). | integer | 0 | 0 to 127 |
| xfin_hikey | Fade in control based on MIDI note (keyboard position). | integer | 0 | 0 to 127 |
| xfout_lokey | Fade out control based on MIDI note number (keyboard position). | integer | 127 | 0 to 127 |
| xfout_hikey | Fade out control based on MIDI note number (keyboard position). | integer | 127 | 0 to 127 |
| xfin_lovel | Fade in control based on velocity. | integer | 0 | 0 to 127 |
| xfin_hivel | Fade in control based on velocity. | integer | 0 | 0 to 127 |
| xfout_lovel | Fade out control, based on velocity. | integer | 127 | 0 to 127 |
| xfout_hivel | Fade out control, based on velocity. | integer | 127 | 0 to 127 |
Performance Parameters: EQ #
| Opcode | Description | Type | Default | Range |
|---|---|---|---|---|
| eqN_bw | Bandwidth of the equalizer band, in octaves. | float | 1 | 0.001 to 4 octaves |
| eqN_bwccX | float | 0 | -4 to 4 octaves | |
| eqN_freq | Frequency of the equalizer band, in Hertz. | float | eq1_freq=50 eq1_freq=500 eq1_freq=5000 |
0 to 30000 Hz |
| eqN_freqccX | float | 0 | -30000 to 30000 Hz | |
| eqN_vel2freq | Frequency change of the equalizer band with MIDI velocity, in Hertz. | float | 0 | -30000 to 30000 Hz |
| eqN_gain | Gain of the equalizer band, in decibels. | float | 0 | -96 to 24 dB |
| eqN_gainccX | float | 0 | -96 to 24 dB | |
| eqN_vel2gain | Gain change of the equalizer band with MIDI velocity, in decibels. | float | 0 | -96 to 24 dB |
Performance Parameters: Filter #
| Opcode | Description | Type | Default | Range |
|---|---|---|---|---|
| cutoff | Sets the cutoff frequency (Hz) of the filters. | float | filter disabled | 0 to SampleRate / 2 Hz |
| cutoff_ccN | The variation in the cutoff frequency when MIDI continuous controller N is received. | integer | 0 | -9600 to 9600 cents |
| cutoff_chanaft | The variation in the cutoff frequency when MIDI channel aftertouch messages are received, in cents. | integer | 0 | -9600 to 9600 cents |
| cutoff_polyaft | The variation in the cutoff frequency when MIDI polyphonic aftertouch messages are received, in cents. | integer | 0 | -9600 to 9600 cents |
| fil_keytrack | Filter keyboard tracking (change on cutoff for each key) in cents. | integer | 0 | 0 to 1200 cents |
| fil_keycenter | Center key for filter keyboard tracking. | integer | 60 | 0 to 127 |
| fil_random | Random value added to the filter cutoff for the region, in cents. | integer | 0 | 0 to 9600 cents |
| fil_type | Filter type. | string | lpf_2p | lpf_1p, hpf_1p, lpf_2p, hpf_2p, bpf_2p, brf_2p, bpf_1p, brf_1p, apf_1p, lpf_2p_sv, hpf_2p_sv, bpf_2p_sv, brf_2p_sv, pkf_2p, lpf_4p, hpf_4p, lpf_6p, hpf_6p, comb, pink, lsh, hsh, peq |
| fil_veltrack | Filter velocity tracking, the amount by which the cutoff changes with incoming note velocity, in cents. | integer | 0 | -9600 to 9600 cents |
| resonance | The filter cutoff resonance value, in decibels. | float | 0 | 0 to 40 dB |
Performance Parameters: Pitch #
| Opcode | Description | Type | Default | Range |
|---|---|---|---|---|
| bend_up | Pitch bend range when Bend Wheel or Joystick is moved up, in cents. | integer | 200 | -9600 to 9600 cents |
| bend_down | Pitch bend range when Bend Wheel or Joystick is moved down, in cents. | integer | -200 | -9600 to 9600 cents |
| bend_step | Pitch bend step, in cents. | integer | 1 | 1 to 1200 cents |
| pitch_keycenter | Root key for the sample. | integer | 60 | -127 to 127 |
| pitch_keytrack | Within the region, this value defines how much the pitch changes with every note. | integer | 100 | -1200 to 1200 |
| pitch_random | Random tuning for the region, in cents. | integer | 0 | 0 to 9600 cents |
| pitch_veltrack | Pitch velocity tracking, represents how much the pitch changes with incoming note velocity, in cents. | integer | 0 | -9600 to 9600 cents |
| transpose | The transposition value for this region which will be applied to the sample. | integer | 0 | -127 to 127 |
| tune | The fine tuning for the sample, in cents. | integer | 0 | -100 to 100 cents |
Modulation: Envelope Generators #
| Opcode | Description | Type | Default | Range |
|---|---|---|---|---|
| ampeg_attack | EG attack time. | float | 0 | 0 to 100 seconds |
| ampeg_attackccN | float | 0 | -100 to 100 seconds | |
| ampeg_vel2attack | Velocity effect on EG attack time. | float | 0 | -100 to 100 seconds |
| ampeg_decay | EG decay time. | float | 0 | 0 to 100 seconds |
| ampeg_decayccN | float | 0 | -100 to 100 | |
| ampeg_vel2decay | Velocity effect on pitch EG decay time. | float | 0 | -100 to 100 seconds |
| ampeg_delay | EG delay time. | float | 0 | 0 to 100 seconds |
| ampeg_delayccN | float | 0 | -100 to 100 | |
| ampeg_vel2delay | Velocity effect on EG delay time. | float | 0 | -100 to 100 seconds |
| ampeg_hold | EG hold time. | float | 0 | 0 to 100 seconds |
| ampeg_holdccN | float | 0 | -100 to 100 | |
| ampeg_vel2hold | Velocity effect on EG hold time. | float | 0 | -100 to 100 seconds |
| ampeg_release | EG release time (after note release). | float | 0 | 0 to 100 seconds |
| ampeg_releaseccN | float | 0 | -100 to 100 seconds | |
| ampeg_vel2release | Velocity effect on EG release time. | float | 0 | -100 to 100 seconds |
| ampeg_sustain | EG sustain level, in percentage. | float | 100 | 0 to 100 % |
| ampeg_sustainccN | float | 0 | -100 to 100 % | |
| ampeg_vel2sustain | Velocity effect on EG sustain level, in percentage. | float | 0 | -100 to 100 % |
| ampeg_start | Envelope start level, in percentage. | float | 0 | 0 to 100 % |
| ampeg_startccN | float | 0 | -100 to 100 seconds | |
| fileg_attack | EG attack time. | float | 0 | 0 to 100 seconds |
| fileg_vel2attack | Velocity effect on EG attack time. | float | 0 | -100 to 100 seconds |
| fileg_decay | EG decay time. | float | 0 | 0 to 100 seconds |
| fileg_vel2decay | Velocity effect on filter EG decay time. | float | 0 | -100 to 100 seconds |
| fileg_delay | EG delay time. | float | 0 | 0 to 100 seconds |
| fileg_vel2delay | Velocity effect on filter EG delay time. | float | 0 | -100 to 100 seconds |
| fileg_depth | Envelope depth. | integer | 0 | -12000 to 12000 cents |
| fileg_vel2depth | Velocity effect on EG depth, in cents for pitch or filter cutoff. | integer | 0 | -12000 to 12000 cents |
| fileg_hold | EG hold time. | float | 0 | 0 to 100 seconds |
| fileg_vel2hold | Velocity effect on EG hold time. | float | 0 | -100 to 100 seconds |
| fileg_release | EG release time (after note release). | float | 0 | 0 to 100 seconds |
| fileg_vel2release | Velocity effect on EG release time. | float | 0 | -100 to 100 seconds |
| fileg_start | Envelope start level, in percentage. | float | 0 | 0 to 100 % |
| fileg_sustain | EG sustain level, in percentage. | float | 0 | 0 to 100 % |
| fileg_vel2sustain | Velocity effect on EG sustain level, in percentage. | float | 0 | -100 to 100 % |
| pitcheg_attack | EG attack time. | float | 0 | 0 to 100 seconds |
| pitcheg_vel2attack | Velocity effect on EG attack time. | float | 0 | -100 to 100 seconds |
| pitcheg_decay | EG decay time. | float | 0 | 0 to 100 seconds |
| pitcheg_vel2decay | Velocity effect on filter EG decay time. | float | 0 | -100 to 100 seconds |
| pitcheg_delay | EG delay time. | float | 0 | 0 to 100 seconds |
| pitcheg_vel2delay | Velocity effect on filter EG delay time. | float | 0 | -100 to 100 seconds |
| pitcheg_depth | Envelope depth. | integer | 0 | -12000 to 12000 cents |
| pitcheg_vel2depth | Velocity effect on EG depth, in cents for pitch or filter cutoff. | integer | 0 | -12000 to 12000 cents |
| pitcheg_hold | EG hold time. | float | 0 | 0 to 100 seconds |
| pitcheg_vel2hold | Velocity effect on EG hold time. | float | 0 | -100 to 100 seconds |
| pitcheg_release | EG release time (after note release). | float | 0 | 0 to 100 seconds |
| pitcheg_vel2release | Velocity effect on EG release time. | float | 0 | -100 to 100 seconds |
| pitcheg_start | Envelope start level, in percentage. | float | 0 | 0 to 100 % |
| pitcheg_sustain | EG sustain level, in percentage. | float | 0 | 0 to 100 % |
| pitcheg_vel2sustain | Velocity effect on EG sustain level, in percentage. | float | 0 | -100 to 100 % |
Modulation: LFO #
| Opcode | Description | Type | Default | Range |
|---|---|---|---|---|
| amplfo_delay | The time before the LFO starts oscillating. | float | 0 | 0 to 100 seconds |
| amplfo_depth | LFO depth. | float | 0 | -10 to 10 dB |
| amplfo_depthccN | float | 0 | -10 to 10 dB | |
| amplfo_depthchanaft | LFO depth when channel aftertouch MIDI messages are received. | float | 0 | -10 to 10 dB |
| amplfo_depthpolyaft | LFO depth when polyphonic aftertouch MIDI messages are received. | float | 0 | -10 to 10 dB |
| amplfo_fade | LFO fade-in effect time. | float | 0 | 0 to 100 seconds |
| amplfo_freq | LFO frequency, in hertz. | float | 0 | 0 to 20 Hz |
| amplfo_freqccN | float | 0 | -200 to 200 Hz | |
| amplfo_freqchanaft | LFO frequency change when channel aftertouch MIDI messages are received, in Hertz. | float | 0 | -200 to 200 Hz |
| amplfo_freqpolyaft | LFO frequency change when polyphonic aftertouch MIDI messages are received, in Hertz. | float | 0 | -200 to 200 Hz |
| fillfo_delay | The time before the LFO starts oscillating. | float | 0 | 0 to 100 seconds |
| fillfo_depth | LFO depth. | float | 0 | -1200 to 1200 cents |
| fillfo_depthccN | float | 0 | -1200 to 1200 cents | |
| fillfo_depthchanaft | LFO depth when channel aftertouch MIDI messages are received. | float | 0 | -1200 to 1200 cents |
| fillfo_depthpolyaft | LFO depth when polyphonic aftertouch MIDI messages are received. | float | 0 | -1200 to 1200 cents |
| fillfo_fade | LFO fade-in effect time. | float | 0 | 0 to 100 seconds |
| fillfo_freq | LFO frequency, in hertz. | float | 0 | 0 to 20 Hz |
| fillfo_freqccN | float | 0 | -200 to 200 Hz | |
| fillfo_freqchanaft | LFO frequency change when channel aftertouch MIDI messages are received, in Hertz. | float | 0 | -200 to 200 Hz |
| fillfo_freqpolyaft | LFO frequency change when polyphonic aftertouch MIDI messages are received, in Hertz. | float | 0 | -200 to 200 Hz |
| pitchlfo_delay | The time before the LFO starts oscillating. | float | 0 | 0 to 100 seconds |
| pitchlfo_depth | LFO depth. | float | 0 | -1200 to 1200 cents |
| pitchlfo_depthccN | float | 0 | -1200 to 1200 cents | |
| pitchlfo_depthchanaft | LFO depth when channel aftertouch MIDI messages are received. | float | 0 | -1200 to 1200 cents |
| pitchlfo_depthpolyaft | LFO depth when polyphonic aftertouch MIDI messages are received. | float | 0 | -1200 to 1200 cents |
| pitchlfo_fade | LFO fade-in effect time. | float | 0 | 0 to 100 seconds |
| pitchlfo_freq | LFO frequency, in hertz. | float | 0 | 0 to 20 Hz |
| pitchlfo_freqccN | float | 0 | -200 to 200 Hz | |
| pitchlfo_freqchanaft | LFO frequency change when channel aftertouch MIDI messages are received, in Hertz. | float | 0 | -200 to 200 Hz |
| pitchlfo_freqpolyaft | LFO frequency change when polyphonic aftertouch MIDI messages are received, in Hertz. | float | 0 | -200 to 200 Hz |
Effects #
| Opcode | Description | Type | Default | Range |
|---|---|---|---|---|
| effect1 | Level of effect1 send, in percentage (reverb in Cakewalk sfz). | float | 0 | 0 to 100 % |
| effect2 | Level of effect2 send, in percentage (chorus in Cakewalk sfz). | float | 0 | 0 to 100 % |