III. Reference
Reference
Everything the sampler takes, in one place: its params, as a song's lanes, a controller, and its file name them; the panel's other controls; its state in a song's file and in a program file; its limits; and its commands. The chapters before teach each one.
Params
| Name | Range | Default | Curve | For |
|---|---|---|---|---|
level | -60 dB to 6 dB | 0 dB | linear | each channel |
pan | -100% to 100% | 0% | linear | each channel |
muted | off / on | off | switch | each channel |
tune | -24 semitones to 24 semitones | 0 semitones | linear | each channel |
cutoff | 30 Hz to 20000 Hz | 20000 Hz | exponential | each channel |
resonance | 0% to 100% | 0% | linear | each channel |
filter_env | -6 octaves to 6 octaves | 0 octaves | linear | each channel |
key_follow | 0% to 100% | 0% | linear | each channel |
velocity_cutoff | 0% to 100% | 0% | linear | each channel |
attack | 0.001 s to 10 s | 0.001 s | exponential | each channel |
decay | 0.01 s to 30 s | 1 s | exponential | each channel |
sustain | 0% to 100% | 100% | linear | each channel |
release | 0.005 s to 30 s | 0.3 s | exponential | each channel |
filter_attack | 0.001 s to 10 s | 0.001 s | exponential | each channel |
filter_decay | 0.01 s to 30 s | 1 s | exponential | each channel |
filter_sustain | 0% to 100% | 100% | linear | each channel |
filter_release | 0.005 s to 30 s | 0.3 s | exponential | each channel |
lfo_rate | 0.05 Hz to 20 Hz | 5 Hz | exponential | each channel |
lfo_wave | triangle / square / random / noise | triangle | switch | each channel |
lfo_delay | 0 s to 5 s | 0 s | cube | each channel |
lfo_pitch | 0 semitones to 12 semitones | 0 semitones | cube | each channel |
lfo_cutoff | 0 octaves to 4 octaves | 0 octaves | cube | each channel |
lfo_level | 0% to 100% | 0% | cube | each channel |
velocity_level | 0% to 100% | 75% | linear | each channel |
grain | 16-bit / 12-bit | 16-bit | switch | each channel |
bend | -1 to 1 | 0 | linear | each channel |
repeat | off / 1/4 / 1/8 / 1/8T / 1/16 / 1/16T / 1/32 | off | switch | each channel |
levels | off / tune / velocity | off | switch | each channel |
levels_pad | 1 to 16 | 1 | linear, steps of 1 | each channel |
Every param is a channel's. level, pan, muted, bend, repeat,
levels, and levels_pad are the channel's own; the rest, from tune to
grain, are the sound of the program the channel plays, so turning one
turns it in the program (chapter 2). bend
is played by the pitch wheel, two semitones either way, and isn't saved.
A lane on a sampler's track names a param by its name, as cutoff
(lanes).
A controller's pages
| Page | Knobs 1 to 8 |
|---|---|
| 1 filter | cutoff, resonance, filter_env, key_follow, velocity_cutoff, tune, velocity_level, level |
| 2 filter env | filter_attack, filter_decay, filter_sustain, filter_release, attack, decay, sustain, release |
| 3 lfo | lfo_rate, lfo_wave, lfo_delay, lfo_pitch, lfo_cutoff, lfo_level, pan, level |
A controller's faders play the amplifier's envelope, attack, decay,
sustain, and release (chapter 18). The pads
are on the keys C2 to D♯3, pad 1 to pad 16
(chapter 4).
The panel's other controls
The controls that aren't params change the bank: a program, a keygroup, or a sample. They're the song's, saved with it, but no lane or controller reaches them.
| Page | Control | Range |
|---|---|---|
program |
voices |
1 to 16 |
program |
kg xfade |
on or off |
keygroups |
low key, high key |
C−1 to G9 |
keygroups |
tune |
−48 to 48 semitones, in hundredths |
keygroups |
level |
−60 to 24 dB |
keygroups |
pan |
−100 to 100 |
keygroups |
cutoff |
−8 to 8 octaves |
keygroups |
vel xfade |
on or off |
keygroups |
attack to release |
the program's, or as the amplifier's params |
keygroups |
a zone's sample | the bank's samples |
keygroups |
a zone's velocities | 0 to 127, its low and its high |
keygroups |
a zone's tune | −1200 to 1200 cents |
keygroups |
a zone's level | −60 to 24 dB |
samples |
root |
C−1 to G9 |
samples |
fine |
−100 to 100 cents |
samples |
gain |
−60 to 60 dB |
samples |
the mode | in release, until release, no loops, one shot |
samples |
start, end |
the sound's frames, shown in milliseconds and seconds |
samples |
fit |
off, or 1, 2, 4, 8, or 16 bars |
samples |
loop start, loop end |
the sound's frames |
samples |
crossfade |
0 to 96,000 frames, the loop's length, or its start |
samples |
plays |
hold, or 1 to 100 times |
record |
stereo |
on or off |
record |
bandwidth |
20 kHz or 10 kHz |
record |
pitch |
C−1 to G9 |
record |
length |
1 to 60 seconds |
record |
start at once |
on or off |
record |
threshold |
−60 to 0 dB |
record |
pre-trigger |
0 to 100 ms |
record |
gain |
−24 to 24 dB |
A slider drags across its width for its whole travel, the wheel nudges it
a hundredth of its travel or a step, and a double-click puts it back, a
keygroup's envelope to the program's. The record page's controls are the
panel's, for its takes, and the song doesn't keep them.
The sampler's state
A sampler's state, in its device in song.json, holds its channels, its
programs, and its samples. This one is a part of chapter 1's stutter song,
with a channel more:
{
"channels": [
{ "channel": 1, "program": 1 },
{ "channel": 2, "program": 2, "level": -6, "repeat": "1/16" }
],
"programs": [
{
"program": 1,
"name": "stutter",
"sound": { "release": 30 },
"keygroups": [{ "keys": "C-1 G9", "zones": [{ "sample": "phrase" }] }]
},
{ "program": 2, "file": "programs/piano.json" }
],
"samples": {
"phrase": {
"file": "loops/phrase.wav", "root": "C4", "end": 230400, "gain": 12, "mode": "until_release",
"loops": ["0 28800 0 4", "70150 96164 4800 hold"]
}
}
}
- Channels are a list, each with its
channel, 1 to 16, and theprogramit plays, 1 to 100; and its own params where they aren't their defaults:level,pan,muted,repeat,levels, andlevels_pad. A channel left out plays program 1 at its defaults. - Programs are a list, each an object with its
programnumber, or the next after the one before; itsname;polyphony, 1 to 16, andcrossfade,trueorfalse, the panel'svoicesandkg xfade; itssound, an object of params fromtunetograin, the rest at their defaults; and itskeygroups. A program may instead name a program file in the library withfile, or be just the file's name in the list; anamebesidefilerenames it in the song. - A keygroup has its
keys, one key or two, as"C2"or"A0 B0"; atunein semitones, alevelin dB, apan, and acutoffin octaves;velocity_fade,falsefor zones that layer; its ownattack,decay,sustain, andreleasewhere it has them; and itszones, up to four. - A zone names its
sample, and has itsvelocity, two numbers from 0 to 127, as"94 127", and atunein cents and alevelin dB. - Samples are an object, by name, 1 to 24 bytes. Each has its
file, its place in the library; itsroot, a key's name or number, andcents, the panel'sfine;startandend, in frames;gainin dB;mode, one ofin_release,until_release,none, andone_shot; and up to eightloops, each its start, its end, and its crossfade, in frames, and how many times it plays, orhold.
A switch's position is its name, as "12-bit" or "1/16", and muted is
true or false. Anything left out is at its default, and a sample's
cents left out is its file's own, if the file gives a root. Reading
checks every name and range, and a mistake names its line, as sample
phrase: a loop's crossfade is no longer than the loop, or the frames before
it.
A song saved from the window writes every program whole, with its keygroups, and every sample, a program named by a file among them, so the saved song no longer follows the file.
Program files
A program file is one program's object, as a song holds it, with the
samples it plays beside its keygroups, under samples. studio
import-sfz writes them, and so might you, to keep a program to use in
many songs. Its samples are named by their places in the library, as a
song's are.
A song names one in its programs, as { "program": 2, "file":
"programs/piano.json" }. On the samples page, a click on a program file
in the library loads it into the program the channel plays, in place of its
keygroups, named after the file if it has no name of its own.
Limits
| What | How many |
|---|---|
| Channels | 16 |
| Voices, all channels together | 16 |
| Programs | 100 |
| Keygroups, all programs together | 512 |
| Zones a keygroup | 4 |
| Samples a note plays | 8 |
| Samples | 256 |
| Loops a sample | 8 |
| A sample's name | 24 bytes |
| Sounds in the sample memory | 1024 |
| A file's name in the library | 200 bytes |
| Sample memory | 512 MB, or 1 MB to 64 GB with --sample-memory |
| A take | 60 seconds, with up to 100 ms before it |
| Devices in a song | 8 |
The command line
studio import-sfz INSTRUMENT.sfz PROGRAM.json [--name NAME]
studio --library DIR ... # name samples in another library folder
studio --sample-memory MB ... # a pool of another size, for every sampler
tools/fetch-samples.sh [LIBRARY] # fill the library: the piano, the sea, the break, two loops
import-sfz reads an SFZ in the library folder and writes a program file,
and says what it made, folded, and left out
(chapter 2). --library and --sample-memory go
with every command, the window's and render alike; the studio's
command line has the rest.
Next: chapter 19, every key, the studio's reference after its instruments: every key, every gesture of the mouse, and every mark the window draws.