Sounds
Every sound in claudius is real audio: synthesized in code (drum voices, the synth engine) or recorded (sampled instruments and drum machines from the sample packs, Apple Loops, your own files). There is no General MIDI and no neural audio. A sound name appears in two places:
- the words of an
s()pattern:s("bd*4, [~ cp]*2"); .s(name)on anote(),n(),chord()orseq()pattern:note("a1 c2").s("upright_bass").
claudius sounds renders every drum voice, synth preset and transition effect into out/sounds/ so you can hear
them; claudius-packs aliases lists every sampled-instrument name your installed packs answer to.
How a name is resolved
A number after the last colon is a variation (bd:3, tr808:sd:2); the rest is the name, colons
included (tr808:sd, vsco2:violins). When a track is made, each name is looked up in this order, and the first
match wins:
- With
.bank()set, the name is looked up in that bank only. - Drum names play the synthesized drum voices.
- Synth presets play the synth engine.
- The sample packs: sampled instruments (
rhodes,vsco2:violins) and kit sounds (tr808:sd). - Files: a name containing
/or ending in.wav,.mp3,.aif,.aiff,.flac,.caf,.m4a,.aac,.oggor.opus.
Anything else is an error that lists what exists:
blank("house");
track("x", s("bdd*4"));
Error: Runtime error: track 'x': unknown sound 'bdd' (drums: bd kick sd snare cp clap hh ch hat oh ohat rd ride cr crash lt mt ht tom rim rs sh shaker cb cowbell snap perc; synths: sub_bass 808 reese acid saw_bass pluck_bass organ_bass wobble log_drum pluck supersaw pad warm_pad stab epiano keys bell organ strings square_lead chip fm_bass rubber_bass moog_bass dist_bass deep_bass saw_lead pwm_lead whistle soft_lead glide_lead brass_lead fm_lead vox_lead solina glass_pad pwm_pad air_pad vowel_pad swell_pad tine_piano clav house_piano brass_stab rock_organ fm_marimba fm_kalimba harp_pluck mallet cowbell_lead; sampled: piano upright rhodes wurlitzer hammond string_ensemble violins cellos pizzicato brass trumpet flute harp marimba vibes kalimba upright_bass guitar choir sax ... (claudius-packs aliases)) (line 2, position 1)
Because drum names and synth presets come first, a few names play synthesis even when a recording by that name
exists. Ask for the recording by another name, or exactly as pack:instrument (claudius-packs instruments lists
them):
| name | plays | for the recording, write |
|---|---|---|
epiano | the FM electric piano synth | rhodes, wurlitzer |
keys | the FM keys synth | piano, upright |
organ | the drawbar organ synth | hammond, church_organ |
strings | the string-machine synth | string_ensemble, violins |
pad, warm_pad | the synth pads | synth_pad, new_age_pad, bowed_pad |
shaker, cowbell | the synthesized drum voices | vcsl:shaker, tr808:sh, tr808:cb |
lead is not a synth preset: it plays the sampled FreePats square lead. The synth leads are square_lead,
supersaw and the other synth presets.
Drum names
These names play the synthesized drum voices. Each one also decides the mixing role of its track,
wherever it appears in the name: bd:3 and tr909:bd are kicks, tr808:sd is a snare, vcsl:shaker a shaker.
| names | voice | role |
|---|---|---|
bd, kick | kick | kick |
sd, snare | snare | snare |
cp, clap | clap | clap |
hh, ch, hat | closed hi-hat | hat |
oh, ohat | open hi-hat | ohat |
rd, ride | ride | ride |
cr, crash | crash | crash |
lt, mt, ht, tom | tom (low 90 Hz, mid 130 Hz, high 180 Hz; tom is the default tuning) | tom |
rim, rs | rim shot | perc |
sh, shaker | shaker | shaker |
cb, cowbell | cowbell | perc |
snap | finger snap | perc |
perc | a tuned percussion hit | perc |
Synth presets
The synth engine has polyBLEP oscillators with unison and analog drift, state-variable and ladder filters, FM,
glide and drive. These are its factory presets; the role is what role_of assumes for a
pattern track.
| preset | sound | mono | assumed role |
|---|---|---|---|
sub_bass | a sine sub with a little drive | yes, tied notes | bass |
808 | a sine with a pitch drop, long decay and heavy drive; glides | yes | bass |
reese | two detuned saws and a saw an octave down, a slowly moving ladder filter; glides | yes | bass |
acid | one saw into a resonant ladder filter with a snappy envelope; velocity opens it; glides | yes | bass |
saw_bass | detuned saws and a square an octave down, filter envelope | yes | bass |
pluck_bass | square and saw with a short filter pluck | yes | bass |
organ_bass | three sine drawbars (fundamental, octave, two octaves) | yes | bass |
wobble | detuned saws and a square, ladder filter swept by a tempo-synced LFO | yes, tied notes | bass |
log_drum | a sine knocked into its note, a pitch drop and a woody FM click, dying away; glides a little | yes | bass, when named (amapiano’s) |
pluck | three detuned saws and a square an octave up, fast filter decay | no | by pitch |
supersaw | seven detuned saws plus three an octave down, delayed vibrato | no | by pitch |
pad | five saws and a triangle, slow attack, long release, slow filter drift | no | by pitch |
warm_pad | triangles and a pulse, slower and darker than pad | no | by pitch |
stab | detuned saws and a square, short with a filter snap | no | by pitch |
epiano | FM tine electric piano | no | by pitch |
keys | brighter FM keys with a shorter decay | no | by pitch |
bell | FM bell, long decay | no | by pitch |
organ | five sine drawbars, sustained | no | by pitch |
strings | five detuned saws, slow attack, delayed vibrato | no | by pitch |
square_lead | square and saw an octave up, vibrato; glides | yes | by pitch |
chip | a 25 % pulse, short | no | by pitch |
fm_bass | a sine whose FM brightness falls away fast, over a sub | yes | bass |
rubber_bass | a square and a sub through a resonant low-pass; glides | yes, tied notes | bass |
moog_bass | two saws and a square an octave down into a ladder filter; glides | yes, tied notes | bass |
dist_bass | detuned saws and a square, driven hard | yes | bass |
deep_bass | a triangle with a quiet octave and a sub, soft and round | yes, tied notes | bass |
saw_lead | three detuned saws and one an octave down, delayed vibrato; glides | yes, tied notes | by pitch |
pwm_lead | two pulses of different widths, beating; glides | yes, tied notes | by pitch |
whistle | a sine with a breath of noise and a wide vibrato; glides | yes, tied notes | by pitch |
soft_lead | a sine and a quiet triangle an octave up through a soft low-pass, slow to speak, a late vibrato; glides | yes, tied notes | by pitch |
glide_lead | the whine of G-funk: a sine and a quiet saw through a ladder filter, gliding a long way from note to note, a slow vibrato | yes, tied notes | by pitch |
brass_lead | saws whose filter swells open, as brass does | no | by pitch |
fm_lead | an FM lead that keeps some brightness as it holds; glides | yes, tied notes | by pitch |
vox_lead | saws through a drifting band-pass, like a vowel; glides | yes, tied notes | by pitch |
solina | a string machine: six saws and three an octave up, slow attack | no | by pitch |
glass_pad | FM with a slow attack and a long release, bright and glassy | no | by pitch |
pwm_pad | detuned pulses with a slow filter drift | no | by pitch |
air_pad | triangles and noise, very slow, breathy | no | by pitch |
vowel_pad | soft waves through a resonant low-pass, an “ah” | no | by pitch |
swell_pad | saws under a filter that sweeps slowly up and down | no | by pitch |
tine_piano | the bright FM electric piano of the 80s | no | by pitch |
clav | a narrow pulse through a band-pass, short and funky | no | by pitch |
house_piano | a bright FM piano with a short decay | no | by pitch |
brass_stab | detuned saws with a quick filter snap, short | no | by pitch |
rock_organ | drawbars through an overdriven amp, with a speaker’s wobble | no | by pitch |
fm_marimba | an FM bar, quick decay | no | by pitch |
fm_kalimba | an FM tine, plucked | no | by pitch |
harp_pluck | a triangle and a little saw, plucked with a filter decay | no | by pitch |
mallet | soft sines, a struck bar ringing out | no | by pitch |
cowbell_lead | the 808’s cowbell made to play a tune: two squares a little under a fifth apart through a band-pass, struck and dying fast | no | by pitch |
“By pitch” means a pattern track gets the role chords when it is a chord() pattern, bass when its median note
is below E3, and lead otherwise. Mono presets play one note at a time; with glide, overlapping notes slide (see
legato()).
Sampled instruments
With the default packs installed (claudius-packs install --defaults), these names play multi-sampled recordings
with velocity layers and round robins. Most have several aliases; claudius-packs aliases prints them all.
| family | names |
|---|---|
| pianos and keys | piano (Salamander grand), upright, rhodes, wurlitzer, cp80, pianet, fm_piano |
| organs | hammond, church_organ |
| strings | string_ensemble, violins, violas, cellos, contrabass, pizzicato, spiccato, solo_cello, solo_cello_pizz, erhu, erhu_short, erhu_sul_tasto, bowed_psaltery |
| brass and winds | brass, brass_stabs, trumpet, horn, trombone, tuba, woodwinds, flute, oboe, clarinet, bassoon, piccolo, sax, harmonica, ocarina |
| mallets and bells | harp, marimba, vibes, bowed_vibraphone, xylophone, glock, bells, hand_chimes, kalimba, balafon, steel_pan, hang, water_glasses, wine_glasses, timpani |
| bass and guitar | upright_bass, bass (electric), pick_bass, synth_bass, guitar (nylon), electric_guitar, jazz_guitar, dan_tranh, dan_tranh_tremolo |
| voices | choir, voice |
| synths, recorded | synth_pad, new_age_pad, bowed_pad, choir_pad, synth_strings, synth_brass, lead, clavisynth (Yamaha TX81Z) |
| percussion | bongo, conga, cajon, darbuka, frame_drum, slit_drum, tambourine, cabasa, claves, woodblock, agogo, guiro, triangle, sleigh_bells, vibraslap, mark_tree, claps, gong, suspended_cymbal, anvil, brake_drum, finger_cymbals, bell_tree, didgeridoo, tabla, stomp, chest, belly, heel |
| electronic one-shots | elec, glitch, mehackit, glitch_kit, glitch_kit_2, Sonic Pi’s names (elec_blip, bd_haus, hat_snap) |
| effects and textures | ambi (drones), vinyl, loop, tbd (pads), ocean_drum, flexatone, ratchet, siren, aliens, zaps, sirens, metal_hits, glass_breaks, cymbal_gongs, chains, bubbles, vibra_rings, nepalese_bells, glock_gliss |
pack:instrument names one exactly, in .s() or in an s() pattern: note("c4 e4").s("vsco2:violins"),
s("vcsl:shaker*8"). A name that is also a drum name plays the synthesized drum; name the pack for the recording:
s("snap clap").bank("body"), or s("body:snap").
The groups of one-shots (elec, zaps, glitch_kit …) hold their sounds as variations:
s("zaps:3"), s("glitch_kit").n("<0 5 12>"). Sonic Pi’s sounds also answer to their own names, s("vinyl_scratch")
being s("vinyl:3"). The hang plays only its own notes (A3 C4 D4 E4 F4 G4 A4 Bb4 C5 D5): the others ring along with
each one, so pitching it would put them in another scale.
Every recorded instrument has a playable range; notes outside it are pitched from the nearest sample, which sounds
stretched far from home. Songs that play instruments from packs whose licences ask for credit get a credits.txt in
their folder.
A sampled instrument name used without its pack installed is an unknown sound, and the error ends with
sampled instruments need packs: claudius-packs install --defaults. A session started with --synth-only (make,
evolve, serve, studio and mcp take it) plays no recordings at all: a sampled name ends its error with
sampled instruments are off in this session (--synth-only), and .bank("tr909") raises
bank 'tr909' plays sample packs, which are off in this session (--synth-only).
blank("lofi");
key("D minor");
track("keys", chord("<Dm9 Gm9>").voicing(50, 72).s("rhodes"));
track("bass", note("<d2 g1>").struct("x ~ ~ x ~ x ~ ~").s("upright_bass"));
track("bongos", s("~ bongo [~ bongo] bongo:2").gain(0.6));
Sampled percussion from the packs gets the perc role by itself.
Drum machines and kits
.bank(name) plays the drum names of an s() pattern on a recorded drum machine or kit from the sample packs:
| bank | aliases | what |
|---|---|---|
tr909 | 909 | Roland TR-909 |
tr808 | 808 | Roland TR-808 |
tr707 | 707 | Roland TR-707 |
muldjord | acoustic, acoustic_kit, rock_kit | a recorded acoustic kit |
uzu | the uzu drum kit | |
synthdrums | synth_drums | drums made on synthesizers after vintage analog kits |
sonicpi | sonic_pi | Sonic Pi’s kicks (bd), snares (sn), hats (hat) and rides, and its other groups |
body | body_percussion | body percussion: stomp, clap, snap, chest, belly, heel, cheek … |
Each kit has a subset of bd sd cp hh oh rd cr lt mt ht rim cb sh (the 909 has no shaker, the acoustic kit no
clap); names like kick and snare map to them. A name the bank does not have is an error:
blank("house");
track("drums", s("bd*4, bongo*2").bank("tr909"));
Error: Runtime error: track 'drums': no 'bongo' in bank 'tr909' (installed packs: salamander epianos jrhodes vsco2 vcsl tr808 tr909 tr707 uzu muldjord freepats doublebass growlybass voice sonicpi solocello erhu steelpan synthdrums body zamenhof miscellania; kits: tr909 tr808 tr707 acoustic uzu synthdrums sonicpi body) (line 2, position 1)
The bank applies to every word of the pattern. To mix kits, or a kit and a sampled instrument, in one pattern, name
each kit sound with its bank instead: s("tr909:bd*4, tr808:cp*2, bongo*2"). Strudel bank names (RolandTR909) work
as aliases, and Strudel sample maps added with claudius-packs add-map become banks too.
.bank("apple") cuts drum one-shots from installed Apple Loops (GarageBand or Logic content) instead. On a machine
without Apple Loops it falls back to the synthesized voices, without an error.
blank("house");
track("drums", s("bd*4, [~ cp]*2, [~ hh]*4").bank("tr909"));
Variations
A number after the last colon (bd:3, tr808:sd:2) or .n(n) picks variation n of a sound (0 is the
default):
- on a kit, the recording numbered n: the 909 has 126 kicks, the 808 has 25;
- on a synthesized drum, the same voice moved a few steps through its parameters (tuning, decay, tone …), the same way every time;
- a variation a recording does not have is an error (
no 'bd:200' in bank 'tr909').
blank("techno");
track("kick", s("bd*4").bank("tr909").n("<0 0 0 7>"));
Your own files
.s(path) plays an audio file as a sampler, on any note(), n() or chord() pattern:
track("vox", note("c4 ~ c4 [c4 c4]").s("/Users/me/Samples/vox.wav"));
c4plays the file as recorded; other notes play it faster or slower, like a sampler without time-stretch.- On a track whose role is not a drum role, each note is cut at its length plus 50 ms, so
legato()shapes it. - Paths cannot go inside a pattern string, so a file is set with
.s(), or withdrum_sound()for a drum lane of a generated song. - A missing file is an error:
track 'vox': /Users/me/Samples/vox.wav does not exist. - When claudius is shared beyond your computer (a server reached by others), it reads files only from its own
folders (saved songs, its caches, the sample packs, Apple Loops) and refuses others with
... is outside the folders this claudius may read.
To use a song or a loop as material, claudius chop cuts bar loops and drum one-shots from it into the user
library, and claudius make --sample <file> flips a recording into a new song. See
Remaking a song from audio.
Layered sounds
A bass in a modern track is rarely one sound. It is a rack of several playing the same notes, each doing one job:
a clean sine underneath for the weight, a distorted mid on top for the growl you hear on a phone, and a bright top
for the edge. Each is filtered to its own band of frequencies so they do not fight, compressed and distorted on its
own, and often only the sub ducks under the kick while the rest holds. rack() builds a track that way:
rack("bass", [
#{ sound: "sub_bass", band: [0, 100], duck: 0.8 },
#{ sound: "reese", band: [100, 1000], level: -2, fx: [#{ fx: "saturate", kind: "hard", drive_db: 12 }] },
#{ sound: "saw_lead", band: [1000, 0], level: -9, transpose: 12, fx: [#{ fx: "tremolo", beats: 0.25, depth: 0.7 }] },
]);
- Each layer plays the track’s notes with its
sound: a synth preset, a drum sound, a sampled instrument or a file, asdrum_sound()and a part’spresetname one (withbankfor a kit). band: [low, high]keeps only those frequencies, in Hz, 0 for no edge on that side. The edges are crossovers that let bands meeting at an edge add up to the whole again, without a bump or a dip there.levelis in dB against the other layers. Each is first made as loud as the rest over its band, so a sound’s own loudness does not set the balance:-9is a top nine decibels under the sub, as you hear it.pan(-1 to 1) andtranspose(semitones: 12 is an octave up) are the layer’s own.fold: [lowest, highest](MIDI notes, an octave apart at least) plays each of the track’s notes moved by whole octaves into them:fold: [28, 40]keeps a sub between E1 and E2, 41 to 82 Hz, wherever the line above it goes.duck(0 to 1) ducks that layer alone under the kick: the sub makes room for it while the growl holds.fxis the layer’s own chain, after its band. Atremoloor agatethere pulses that band alone, as a bass whose top flutters in sixteenths over a steady sub.
The bass-heavy genres stack their bass this way themselves. A trap, UK drill, phonk or hip hop song plays its 808
twice: once clean, and once through tape saturation kept to 300 Hz to 4.5 kHz, under a chorus that spreads it wide.
That grit is what headphones and a phone hear of a bass, and the clean 808 under it keeps its weight on a subwoofer.
Jungle, UK garage and grime give their bass the same grit from a tube saturator, and drum and bass a quieter one,
since its reese is gritty already. Future bass puts a clean sine sub under its bass, an octave down because that
bass sits high, ducking under the kick. Any other genre’s synth bass that has nothing under its note (an organ bass,
a pluck bass, a distorted bass, a wobble) and plays above E2 gets a sine sub under it, folded into the sub octave
(fold: [28, 40]) below 90 Hz and the bass above, the sub ducking half again as much as the bass: so the bass is felt
on a subwoofer and heard on a phone. A sine bass played that high is folded down itself. A bass with a sub of its own
(a deep bass, an FM, rubber or Moog bass, a reese), a recorded one and an 808 in the sub octave already play as they
are. The song’s script shows the rack, to change like any other.
The rack sums its layers before the track’s own effects (fx()) and its mix, so the track is still
one track: one row in the arrangement, one fader. It works on a part, a drum lane (a snare made of a snare, a clap
and a noise burst) or a pattern track’s sound, named by its label when the pattern plays several:
drum("snare", "....x.......x...");
rack("snare", [
#{ sound: "sd", band: [150, 6000] },
#{ sound: "cp", level: -4, pan: 0.2 },
#{ sound: "hh", band: [5000, 0], level: -10, fx: [#{ fx: "reverb", decay: 0.8, mix: 0.4 }] },
]);
One sound treated band by band works too, without layers: the band effect in a
parallel effect’s chains splits a track into bands to process each on its own:
fx("bass", [#{ fx: "parallel", dry: 0, chains: [
#{ amount: 1, fx: [#{ fx: "band", low_hz: 0, high_hz: 120 }] },
#{ amount: 1, fx: [#{ fx: "band", low_hz: 120, high_hz: 0 }, #{ fx: "saturate", kind: "fold", drive_db: 15 }] },
] }]);
Sounds you cannot set from a script
A script names sounds; it does not edit them. The synth presets’ parameters and the tuning and decay of a generated
song’s drum voices are set by the generator and changed by
evolution. A script can swap them for other sounds:
drum_sound() for a drum lane, part() for a generated
part’s preset. Pattern tracks can add filters, a bitcrusher and saturation (see
Track settings).