Defines which sample file the region will play.
Possibly the most important opcode, this is the one that tells the sampler which sample file to actually play. This should include a relative file path from the folder where the SFZ file is.
In most cases, there will be a sample opcode in every region of an SFZ file, though not always.
If the sample file is not found, the player will ignore the whole region contents as there’s nothing to play. Long names and names with blank spaces and other special characters (excepting the = character) are allowed in the sample definition.
At the SFZ1 specification level, there is no information about what sample formats are supported. For SFZ2, however, the Cakewalk book specifies the following sample types are supported:
- WAV and AIFF formats of any sample rate (even 384k)
- Ogg Vorbis compressed samples
- FLAC support is not specified as mandatory, though FLAC was supported by Cakewalk Session Drummer, and is supported by ARIA
Getting the sample to play back at the correct pitch is not automatic, and generally can’t be done with the sample opcode alone, even if the file name includes pitch information. Assuming that the tune or transpose opcodes are not used to change the pitch, the sample will play unchanged in pitch when a note equal to the pitch_keycenter opcode value is played. If pitch_keycenter is not defined for the region, sample will play unchanged on note 60 (middle C). If pitch_keytrack is set to 0, the sample will also play unchanged in pitch, regardless of how pitch_keycenter is set. If the key opcode is used to define the range of the sample (instead of lokey, hikey and pitch_keycenter) the sample will also be unchanged in pitch.
Each engine can also support custom oscillators. For example, ARIA supports using this opcode for some basic synthesized sound waves such as:
sample=*sine sample=*saw sample=*square sample=*triangle sample=*tri sample=*noise sample=*silence
Tri is an alias for triangle. For cases where we don’t want to actually play a sample but want a region to exist and be played (for example, to mute other sounds when using group and off_by, the silence value can be very convenient.
Note that in this case the
* is a real character and not a wildcard.
Category: Sound Source, Sample Playback