Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

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 a note(), n(), chord() or seq() 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:

  1. With .bank() set, the name is looked up in that bank only.
  2. Drum names play the synthesized drum voices.
  3. Synth presets play the synth engine.
  4. The sample packs: sampled instruments (rhodes, vsco2:violins) and kit sounds (tr808:sd).
  5. Files: a name containing / or ending in .wav, .mp3, .aif, .aiff, .flac, .caf or .m4a.

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 pluck supersaw pad warm_pad stab epiano keys bell organ strings square_lead chip; 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):

nameplaysfor the recording, write
epianothe FM electric piano synthrhodes, wurlitzer
keysthe FM keys synthpiano, upright
organthe drawbar organ synthhammond, church_organ
stringsthe string-machine synthstring_ensemble, violins
pad, warm_padthe synth padssynth_pad, new_age_pad, bowed_pad
shaker, cowbellthe synthesized drum voicesvcsl: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.

namesvoicerole
bd, kickkickkick
sd, snaresnaresnare
cp, clapclapclap
hh, ch, hatclosed hi-hathat
oh, ohatopen hi-hatohat
rd, riderideride
cr, crashcrashcrash
lt, mt, ht, tomtom (low 90 Hz, mid 130 Hz, high 180 Hz; tom is the default tuning)tom
rim, rsrim shotperc
sh, shakershakershaker
cb, cowbellcowbellperc
snapfinger snapperc
perca tuned percussion hitperc

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.

presetsoundmonoassumed role
sub_bassa sine sub with a little driveyes, tied notesbass
808a sine with a pitch drop, long decay and heavy drive; glidesyesbass
reesetwo detuned saws and a saw an octave down, a slowly moving ladder filter; glidesyesbass
acidone saw into a resonant ladder filter with a snappy envelope; velocity opens it; glidesyesbass
saw_bassdetuned saws and a square an octave down, filter envelopeyesbass
pluck_basssquare and saw with a short filter pluckyesbass
organ_bassthree sine drawbars (fundamental, octave, two octaves)yesbass
wobbledetuned saws and a square, ladder filter swept by a tempo-synced LFOyes, tied notesbass
pluckthree detuned saws and a square an octave up, fast filter decaynoby pitch
supersawseven detuned saws plus three an octave down, delayed vibratonoby pitch
padfive saws and a triangle, slow attack, long release, slow filter driftnoby pitch
warm_padtriangles and a pulse, slower and darker than padnoby pitch
stabdetuned saws and a square, short with a filter snapnoby pitch
epianoFM tine electric pianonoby pitch
keysbrighter FM keys with a shorter decaynoby pitch
bellFM bell, long decaynoby pitch
organfive sine drawbars, sustainednoby pitch
stringsfive detuned saws, slow attack, delayed vibratonoby pitch
square_leadsquare and saw an octave up, vibrato; glidesyesby pitch
chipa 25 % pulse, shortnoby 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.

familynames
pianos and keyspiano (Salamander grand), upright, rhodes, wurlitzer, cp80, pianet, fm_piano
organshammond, church_organ
stringsstring_ensemble, violins, violas, cellos, contrabass, pizzicato, spiccato
brass and windsbrass, brass_stabs, trumpet, horn, trombone, tuba, woodwinds, flute, oboe, clarinet, bassoon, piccolo, sax, harmonica
mallets and bellsharp, marimba, vibes, xylophone, glock, bells, kalimba, timpani
bass and guitarupright_bass, bass (electric), pick_bass, synth_bass, guitar (nylon), electric_guitar, jazz_guitar
voiceschoir, voice
synths, recordedsynth_pad, new_age_pad, bowed_pad, choir_pad, synth_strings, synth_brass, lead
percussionbongo, conga, cajon, darbuka, frame_drum, tambourine, cabasa, claves, woodblock, agogo, guiro, triangle, sleigh_bells, vibraslap, mark_tree, claps, gong, suspended_cymbal

pack:instrument names one exactly, in .s() or in an s() pattern: note("c4 e4").s("vsco2:violins"), s("vcsl:shaker*8").

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:

bankaliaseswhat
tr909909Roland TR-909
tr808808Roland TR-808
tr707707Roland TR-707
muldjordacoustic, acoustic_kit, rock_kita recorded acoustic kit
uzuthe uzu drum kit

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; kits: tr909 tr808 tr707 acoustic uzu) (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"));
  • c4 plays 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 with drum_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.

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).