VOLTAreference

Reference / Language and libraries

The standard library

Language and libraries

Open in the workbench →
On this page · 5 sections

Import reusable instruments, patterns and helpers, then adapt them to your own songs.

What it is#

A curated set of reusable patches, effect chains, and rhythm patterns that ship with Volta as plain .volta source. They live under a served /lib/ tree and are pulled into a song with ordinary imports, so a newcomer can reach for a tuned kick, acid bass, or hall reverb instead of hand-spelling every voice. The library needs no compiler support of its own — it is built entirely on Reuse sounds and patterns with imports, and it composes the primitive DSP builtins (sine/saw, reverb, pingpong, …) rather than replacing them.

Surface#

Library modules group reusable sounds and tools, each importable by name. A song imports the bindings it needs and wires them with play, |>, and pattern literals:

import "drums"  (kick, snare, hat)
import "bass"   (acid)
import "keys"   (pad)
import "fx"     (hall)
import "rhythm" (fourFloor, backbeat, offbeat)

kickTrack = play kick fourFloor
padTrack  = play pad  (!"c3 ab2 f2 g2" |> slow 2) |> hall

The modules and their public bindings (as shipped):

ModuleBindingsKind
drumskick, snare, clap, hat, rim, rideinstrument patches (plus priv body, an unexported helper)
modvibrato, triggeredVibrato, tremoloGain, duckGain, followerGain, psuSag, wobble, filterOpen, filterEnv, scoop, flutter, humanizePatch, duckedPatchControl recipes and patch transforms — Modulation recipes
basssub, reese, acidinstrument patches
creator_foundationsanchorKick, pocketSnare, linenHat, gatherClap, rootSub, relayBass, velvetKeys, willowPluck, contourPoly, haloPad, ribbonLead, weatherTexture60 original parameterized instruments, each exposing .voice and four independent knobs; the twelve pilot constructors listed here plus 48 additions, a complete dry tour and 12 Dance Fugues — Ready-made instruments
keyspad, pluck, epinstrument patches
pads31 pad presets across 7 families — warmAnalog, supersaw, pwm, hollowSquare, unisonWide, octaveStack, filterSweep, resonantSweep (analog) · stringMachine, cinematicStrings, octaveStrings (strings) · choir, vowelMorph, whisperAir (vocal) · glass, crystalShimmer, softBell, metallic (bell/FM) · synthBrass, softBrass (brass) · wavetableScan, multiLfoMotion, drone, ambientWash, noiseAir, perlinOrganic, chaos, swirl, granularPad (texture) · tapeLofi, darkSinister (character)pad-archetype instrument patches; shared bright/space/air knobs. granularPad is a note-pitched grains cloud (C1); a few pads carry a per-preset @knobs { … } snapshot (C6) restored on audition. Auditioned by the padtour preset.
leads30 synth-lead presets across 8 families — analog/subtractive (sawLead, squareLead, pwmLead, pulseReed, octaveLead, brassLead) · supersaw/trance (superLead, hoover, tranceLead, wideStab) · acid/resonant (acidLead, squelch, resoPluck, dirtyAcid) · FM/digital (fmLead, bellLead, metalLead, digiLead) · plucks (pluck, glassPluck, arpLead) · aggressive (screamLead, growlLead, fuzzLead, razor) · vocal/soft (fluteLead, vocalLead, softLead) · air (whistleLead, windLead)mono/topline instrument patches; shared bite/grit/wide knobs; mono/acid leads use glide + glideMode/glideCurve. The melodic counterpart to pads; auditioned by the leadtour preset.
circuits35 analog-character presets across 8 families — basses (modelD, acid303, rubber101, fmStab) · pads/strings (junoWash, solina, deckard, prophet5, airwave, warmChoir) · leads (luckyLead, moogLead, ms20, chime) · keys/plucks (fullTines, rhodesMk1, nylon, glassBell, grandStretch) · brass (obStab, jumpBrass) · circuit drums (boom808, punch909, snap808, hats606, handClap, analogTom) · fx/textures (filterOcean, sciZap, chaosDrone, tapeGhost) · hybrid (neoBass, grainPad, bowLead, morphPoly)classic-hardware emulations built on the "fatness stack" (as3340 chip character, soften, drift, tol, hiss, asymmetric drive bias, tube) + the era-correct filter topology (ladder/diode/korg35/svf) and chorus (bbd Juno modes / ensemble / the ensembleChorus triple-BBD wash on solina). Shared tone/warmth/age (the Vintage/Slop) knobs. as3340 character, adsr punch, tol, bbd modes and the circuit drums all render through the one engine on every target; the deeper, circuit-modeled cousin of vintage. Auditioned by the circuittour preset.
modal17 measured mode tables + a patch on each, across 5 families — struck metal (bell, handbell, tubular, gong, bronze — named so because plate is the built-in plate reverb) · tuned bars (marimba, xylophone, vibraphone, tine) · glass (glass, crystal, bowl) · membranes (membrane, timpani) · wood & pan (woodblock, claves, steelpan). Each body also exports its raw table as <name>Modes (bellModes, gongModes, …)a data library: [[ratio, T60, amp], …] tables from the acoustics literature (Fletcher & Rossing), ratio relative to the PLAYED pitch — so a bell's hum note is 0.5 and a tubular chime starts at 2 (its strike note is a missing fundamental). The tables are ordinary list values, so they compose with src |> body (freq pitch) gongModes; modalOf (sample "…") fits one from a recording instead. Shared hit/tone knobs. Auditioned by the modaltour preset.
kernelsClassic DSP laws as user-kernel recipes — softclip, diode, crossover, wavefold, crush, cheb2, cheb3 (waveshapers) · adaaClip, adaaTanh, clipAD, lncosh (anti-aliased clippers) · onepoleLp, onepoleHp, biquadLp, biquadHp, biquadBp (filters, RBJ cookbook via sampleRate) · dcblock, slewLim (utilities) · logistic (chaos) · fastExp, fastExp2, fastLn, fastLog2, fastSin, fastCos, fastTan, fastTanh (fast math) · polyBlep, polyBlep4, polyBlamp, blep4Mag, blamp4Mag, blPhasor, blSaw, blSquare, blPulse, blTri, syncSaw, oscStep, oscNext (band-limited oscillator helpers)apply with process / process2 (+ partial application: process2 (biquadLp 1200.0 0.9)); auditioned by the kernellab preset. Write a custom audio processor § The kernel stdlib.
dsplibeffect declarations written in the language — slew2, linkedComp, linkedComp2, darkEcho, fdnRoom, onePole, tptSvf, envFilter, zdfLadder, diffuser, dattorro, chorusLine, flangeLine, phase90, compressor, compressor2, fbComp, optoComp, brickLimit, transients, tapeSat, bitcrusher, bitcrusher2, ringereach takes a configuration record with literal defaults (darkEcho { feedback = 0.6 }, {} for all defaults); a macro passed for a parameter rides live in the kernel law
dspfastlinkedCompFast, compressorFast, transientsFast, phase90Fastthe dsplib laws of the same name on kernels' fast math instead of per-sample libm calls
spectrallibrobotize, whisperize, binShift, binShiftLocked, pitchShiftPV, pitchShiftLocked, specComp, specGateK, tiltK, freezeK, blurK, sustainKeffect … on track over spectralMap / spectralPolar per-bin STFT laws — Write a spectral effect
osclibpolySaw, polyPulse, polyTri, syncLead, fmPair, folder, ksPluck, noiseDrumoscillator declarations: a named source whose subject is the frequency, called polySaw (freq pitch) {} or piped freq pitch |> polySaw {}
vintageminimoog, juno, dx, hammond, jupiter, prophet, cs80classic-synth emulation patches
fxhall, room, plate, pingDelay, dub; filterMotion, autoWah, tremoloMotion, panMotion, velocityColor, filteredDuck, transientColor, delayMotion, grainMotion, colorGestureTrack transforms plus reusable audio effects — Modulation recipes
pedalsspaceEcho, spring, slapback (bus) · grit, warmth, dimension, phase90, flange, crush (voice)classic-effect emulations
kitsdrumKit(punch, tone), pop4(key)parameterized modules (a kit / a key-voiced progression)
machinestr808(tune, decay) — kick, snare, hat (per-note open), ohat, tomLo/tomMid/tomHi, rim, cowbell, clap, cymbal · tr909(punch, tone) — kick, snare, hat, ohat, clap, ride, crash · skins(tension, damping) — tom, timpani, gong, tablathe analog drum machines as parameterized modules over the circuit-modeled drum voices (Design a drum kit) — tuned defaults, gain staging, per-instance drive/snappy/tone macros (box.drive). skins wraps the mesh membranes, the one pitch-tracked kit. No sample anywhere. Auditioned by the machinetour preset.
harmonyChord/Quality/Interval types · transpose, parallelMinor, parallelMajor, invert, parallel, relative, leadingTone · choraleVoicing, openVoicing (voicing settings records) · canonfirst-class chord types + Chord -> Chord operators; canon delay semitones p stacks p with an imitated copy
rhythmfourFloor, backbeat, offbeat, sixteenths, clave, tresillo · rhythmKit(shift)pattern literals (all on c2) + a parameterized module re-triggering the same six at any register
devicesdevice presets for external gear (minilogue, …)MIDI-out device table — see Send MIDI to instruments
mira59 factory patches of MIRA, the modulation-first wavetable synth in synthtoys, by category — pad (miraRising, glassChoir, supernova, halo, lighthouse, dayForNight, tideTable, paperChoir) · pluck (droppedMarble, mothWings, wireHarp, cutGlass, kalimba, koto) · bass (tidalBass, eventHorizon, rubberBand, rubberAcid, reese, deepEnd) · lead (copperLead, vowelMachine, brassSection, acidRain, slideRule, theremin, whistler) · keys (sympathetic, reedOrgan, tapeWobble, feltPress, drawbars, funkClav) · texture (threeBodyProblem, aurora, deepField, windUp, cicadas) · sequence (clockwork, pulsar, staircase, morse, gatekeeper) · bell (bellTower, sonar, glassRain, gamelan, musicBox) · perc (kickLab, tinCan, hatTrick, snareWires, talkingDrum, laserTom) · fx (riser, radioDial, siren, weather, powerDown)each preset is a patch plus <preset>Fx : Track -> Track, its master chain (play droppedMarble p |> droppedMarbleFx). GENERATED by scripts/import-mira.mjs from MIRA's own patch list and signal chain, routes compiled in (LFOs, ORBIT, BOUNCE, step lane, envelopes, velocity, key, randomPerNote). Every knob stays live as on MIRA's panel: mira.<preset>.<key> under MIRA's keys (fCut, e1A, aPos, … — table in the module header), route depths mira.<preset>.depth.<src>.<key> (0.5 = none), steps …step1–step16, named macros mira.<preset>.<name> — 2 206 in all, defaulting to the patch. Module-wide mira.wheel, mira.press, mira.morph (the four two-scene patches). A switched-off block has no knob and glide time is fixed, as without a recompile in MIRA. Synced clocks and delays count cycles/beats, so they follow the song's tempo. Poly presets keep MIRA's 8 voices. Auditioned by the miratour preset.
electric_guitarsglasscoil, porchlight, hotwire, foundry, mercury, prism, switchblade, ferroglass; electricGuitar with .voice; five signal stages guitarHand, guitarWire, guitarPickup, guitarAmp, guitarCab; three settings records (glasscoilSettings, porchlightSettings, foundrySettings); the factory knobs themselves (leadHeat, leadWah, …) and the prismWireModes / prismGlassModes tables are exported tooEight native guitar instruments: clean/neck/lead/baritone, bowed, coupled glass, pulsar and tuned nonlinear feedback. Factory instances own five knobs; note parameters supply mute, harmonic and bend. The Pickup Test and five String / Current songs demonstrate them. Recipe, controls and measured acceptance: String Current 2026 09 09.
valve_guitarafterburn; valveGuitar with .voice; afterburnSettings, edgeSettings; stringTap, magneticPickup, valveRail, valveSag, valvePreamp, valvePower, closedBackCabSinging electric guitar: plucked waveguide, spatial pickup coloration, asymmetric tube stages, signal-responsive sag and a filtered cabinet. Five independent knobs and per-note bend, scoop, mute and vibrato; an optional active sustainer drives the string. Behavioral models, not calibrated hardware replicas. The Afterburn test and One Note Past Midnight demonstrate dry stages and selective tape echo. Afterburn 2026 09 09.
pulsarsvowel mouth, choir mouth, chrome edge, rubber jaw, glass fracture, particles rateSix portable Pulsar synthesis instruments with live controls and explicit safety ceilings; no sample banks
bowstringsviolin, viola, cello, bass (legato) and per instrument …Section, …Tremolo, …Tasto, …Ponticello, …Harmonic, …Sordino, …Spiccato, …ColLegno, …Pizz, …Portamento; the deluxe tier violinDeluxe … bassDeluxe and per instrument …DeluxeTutti, …DeluxeSection, …DeluxeTremolo, …DeluxeTasto, …DeluxePonticello, …DeluxeHarmonic, …DeluxeSordino, …DeluxePizz, …DeluxeColLegno, …DeluxeSpiccato; chamber, glassbow, undertow, ironbow; violinRing/violaRing/celloRing/bassRing, openStrings, …Open lists; bowedString and bowedDeluxe with .voice, offString, bowDefaults, the four …Settings and four …DeluxeSettings records and the tremolo/tasto/ponticello/harmonic/portamento/sordino/practiceMute/tutti transforms and seatedSynthesized strings: slurs and alternating bow strokes, a pressure-bite attack, one force-ratio dynamics control (knob, (dyn=…), (cresc=…)), touched harmonics ((touch=…)), articulations, pizzicato through each body, sympathetic open strings; the deluxe tier adds stereo high-detail bodies, stiffness, late humanised vibrato, smooth per-note glides, the left hand's finger noise, a per-note mute ((mute=…)), orchestral seats on the stereo pair and three-player sections. Auditions: bowlight, bowlight-deluxe; Strings, bells and resonating objects § The bowstrings library.
bowedobjectsmusicalSaw, glassHarmonica, wineGlass, bowedVibes, bowedCymbal, bowedBell, singingBowl (bowedModal) · bowedFilter, bowedBank, bowedComb, bowedWire (stickSlip in a feedback loop) · tables sawModes, harmonicaModes; every patch takes bowForce / bowSpeed (0..1, default 0.5)The string bow on things that are not strings (Strings, bells and resonating objects §1.13): a bent-blade saw whose bend follows the pitch (mono, legato glide, a blooming vibrato), a wet finger on glass, bows on the modal library's bar, plate and bell tables, and bows on resonant loops. Imports modal.
bowstringsviolin, viola, cello, bass (legato) and per instrument …Section, …Tremolo, …Tasto, …Ponticello, …Harmonic, …Sordino, …Spiccato, …ColLegno, …Pizz, …Portamento; the deluxe tier violinDeluxe … bassDeluxe and per instrument …DeluxeTutti, …DeluxeSection, …DeluxeTremolo, …DeluxeTasto, …DeluxePonticello, …DeluxeHarmonic, …DeluxeSordino, …DeluxePizz, …DeluxeColLegno, …DeluxeSpiccato; chamber, glassbow, undertow, ironbow; violinRing/violaRing/celloRing/bassRing, openStrings, …Open lists; bowedString and bowedDeluxe with .voice, offString, bowDefaults, the four …Settings and four …DeluxeSettings records and the tremolo/tasto/ponticello/harmonic/portamento/sordino/practiceMute/tutti transforms and seated; the pattern transforms ensemble (with ensembleDefaults), phraseArch (phraseArchDefaults), durationContrast and finalRitard (finalRitardDefaults); the hall seats violinStage, secondViolinStage, violaStage, celloStage, bassStage, soloistStage, staged and onStage (for stage / hallTail)Synthesized strings: slurs and alternating bow strokes, a pressure-bite attack, one force-ratio dynamics control (knob, (dyn=…), (cresc=…)), touched harmonics ((touch=…)), articulations, pizzicato through each body, sympathetic open strings; the deluxe tier adds stereo high-detail bodies, stiffness, late humanised vibrato, smooth per-note glides, the left hand's finger noise, a per-note mute ((mute=…)), orchestral seats on the stereo pair and three-player sections that follow a leader (per-stroke lateness and intonation draws; ensemble the full phase-correction model), with KTH phrasing rules; seats on a hall's stage (onStage). Auditions: bowlight, bowlight-deluxe, hall-seats; Strings, bells and resonating objects § The bowstrings library.
lantern-scoresubject1/subject2, subjectSulG1/subjectSulG2, answer1/answer2, counter1/counter2, inversion1/inversion2; the five fugal voices v1, v2, va, vc, cb (records of per-section bar lists) and their per-bar …Dyn loudness lists; texture layers (haloBars, wallBars, stopsBars, muteBars, pizzBars, subBars, gongBars, choirPat, …); helpers bars, rests, r, dynBars, up, wholeThe notes of a 52-bar D-minor fugue, data only (no instruments): each bar a 16-sixteenth !"…" cycle in the bowstrings bowing grammar. Shared by black-lantern-fugue (strings) and black-lantern-circuit (strings and electronics); the header carries the subject, answer and bar map.
folkstringshurdyGurdy (the keyed chanterelle), hurdyDrone (bourdon and mouche), trompette (the buzzing drone: one crank stroke per note, (coup=…) accents), violaDamore, hardanger, erhu, morinKhuur; folkFiddle and hurdyWheel with .voice, folkPath, damoreSettings, hardangerSettings, erhuSettings, morinSettingsFolk bowed strings on bowed: a hurdy-gurdy wheel (crank, tirant, coup knobs) with tangent-stopped chanterelle and a trompette whose dog buzzes on crank accents; the viola d'amore and Hardanger fiddle with ringing sympathetic strings (ring knob); the erhu's wide glides and membrane body; the morin khuur's horsehair. Demo: ashwheel; Strings, bells and resonating objects § The folkstrings library.
impossiblestringsmorphingFiddle, cellistFiddle, fiddleMorph turn; giantString; electricViolin, electricCello, magneticViolin, electricViolinFx, electricCelloFx; breathingString, glassString, roomCelloBowed instruments no workshop can build, on bowed's Stage 24 options: a violin whose body morphs into a cello's during a held stroke (bodyTo/bodyMorph), a 20 m string drone sounding three octaves below the written note (scale = "giant", a written A1 is 6.9 Hz), bridge-piezo and magnetic-pickup electrics with drive, chorus and a ping-pong delay chain (pickup), and resized bodies from a toy to a room (bodySize). Audition: the-twenty-metre-string; Strings, bells and resonating objects § The impossible strings.
worldbank61 Kontakt 8 world instruments autosampled into keymapped banks — plucked/struck (sitar, santur, oud, kanun, saz, tanbur, kora, balafon, ngoni, bolon, kalimba, tunedGongs, steelDrums, musicBox, harp, tornadoChimes, steelHandDrum, tumbi; …Soft velocity layers for sitar santur oud kanun kora balafon harp) · winds/bowed (bansuri, ney, persianNey, duduk, shakuhachi, kaval, zurna, shehnai, fulaFlute, kemence) · sustained (tanpura, harmonium, meStrings, meEnsemble, choir, choirMorph, strings, cellos, horns, brass, bowedCymbals, gongScrape) · percussion keyed twins (tablaKeys, dholKeys, darbukaKeys, dafKeys, riqKeys, djembeKeys, dununKeys, taikosKeys, timpaniKeys, …) + the iqa'at bool patterns maqsum/ayyub/malfufsample-backed instrument patches (sample "wb…" |> pitched ~C4); the plain hit form is sound "wbtabla:N". Needs the wb* banks in runtime/public/samples/ (recipe + hit tables: World Banks 2026 09 07). Auditioned by the worldtour preset; the live Kontakt twins are pluginPreset "wb <name>".
vis-materialsink, phosphor, glass, contour, paper (types InkCfg, PhosphorCfg, GlassCfg, ContourCfg, PaperCfg)visual materials: image or coverage → image, two or three named controls each, one feedback memory — Visual synthesis § Library. Auditioned by the vis-survey starter
vis-instrumentsglassDrum, inkLine, phosphorScope (types GlassDrumCfg, InkLineCfg, ScopeCfg)paired audio/visual instruments: a track name and an options record → VisualLayer, drawing that track's accepted notes (vis.emit) or its audio (vis.scan). Auditioned by vis-glass-drum, vis-ink-line, vis-phosphor-scope
sun_palette · museum_palette · quiet_paletteone album rack each: drums, basses, keys/textures, plus a single character macro (heat / color / warmth)sample- and circuit-backed instrument racks shared by an album's songs. They load sample banks, so a song that imports one needs those banks present
dc-sample-vaultthe patches and phrases of six original songs (lamplight, lampCall, …)a source vault with no tracks of its own: companion scores render its patch + phrase into bounceOf buffers and play only those
intro-tallymanperformancea finite-ending wrapper over the tallyman song, for the first-signal receiver

Notable surface facts:

  • Instruments may declare live knobs, namespaced by module (Macro Namespacing): the bass module ships bass.cutoff / bass.res macros (additive, default 0 — the voice is unchanged until you turn them up). Macro names are the one namespace the resolver qualifies, so two libraries never collide on a knob. drums (drums.punch), keys (keys.bright / keys.space), pads, leads, circuits, modal, mira, machines and the guitar modules declare knobs the same way (priv … = macro …); fx, pedals, vintage, rhythm and harmony declare none. To modulate any other field, still with-override at the call site.
  • Effects come in two families (Voice signal flow §5). Bus effects (reverb / echo) are track-transform lambdas applied with play … |> hall — they live once on the mixer bus so tails overlap note-to-note (fx, and the pedals bus row: spaceEcho, spring, slapback). Voice effects (drive / modulation — chorus, phaser, flanger, bitcrush, drive, fold) are signal lambdas applied inside a patch source — source = saw (freq pitch) |> grit; wrap these audio functions in audioFx to process a track or return persistently. The pedals voice row (grit, warmth, dimension, phase90, flange, crush) covers these.
  • vintage instruments lean on the voice's ZDF-ladder filter (the cutoff / resonance / filtEnv fields are Moog-style) plus source effects (unison supersaw, additive drawbars, fm operators, in-voice chorus / drive).
  • Rhythms trigger on c2, so a pattern drives any drum patch: play kick fourFloor. They are concrete pattern literals (including euclidean clave = !"c2(3,8)"), not pattern-combinator lambdas.
  • …and rhythmKit moves the whole set to another register. c2 is a kick's note; a snare wants c3 and a hat c5, and that single missing specialization is why 49 corpus songs re-type !"c2 ~ ~ ~ …" instead of importing it (Names and library imports §0.2). rhythm therefore also exports module rhythmKit(shift: Semitones), a Configurable library modules kit parameterized over the trigger register rather than a timbre: one application flattens into all six patterns transposed by shift, reached by qualified access — snares = rhythmKit { shift = 12 } then play snare snares.backbeat, play clap snares.backbeat. The register is named once on the application line instead of re-typed into every literal, and the fields are ordinary patterns, so tops.sixteenths |> degradeBy 0.5 still works. Pattern pipes, named offsets and reusable transforms now also work: shiftC3 = 12, then backbeat |> transpose shiftC3, or a helper up = \p -> p |> transpose 12. Use rhythmKit to choose one register for the whole kit; use a transform to vary a particular part. The rhythmlib preset (examples/songs/rhythmlib.volta) is the worked kit: an eight-track drum arrangement containing no note literal at all. Everything above rhythmKit in rhythm.volta is byte-frozen — an imported pattern's event source_offset points into that file, so inserting a line above the literals re-blesses the golden snapshot of every song that imports them.

The studio preset is the worked tour — it imports drums, bass, keys, fx and rhythm and builds intro/main/lead/outro sections. See examples/songs/studio.volta.

How it's implemented#

  • Library source: examples/songs/ — one <module>.volta per row above (drums.volta, bass.volta, …). They are ordinary corpus files: golden_ir snapshots them, volta fmt checks them, and a song imports one by bare name because it sits in the same directory.
  • Which files are "the library": runtime/public/lib/index.json, a flat JSON array of the module stems above. It is both the browser's boot manifest and the list runtime/scripts/sync-assets.mjs copies out of the corpus into runtime/public/lib/ — so adding a module means editing that one array. The copies themselves are generated and gitignored; edit them and the next sync throws your edit away.
  • Loading: runtime/src/modules.ts — ModuleLibrary fetches /lib/index.json at boot, then each /lib/<path>.volta, and exposes the set as the bundle passed as compile's second argument (sources()). Imports resolve against this bundle exactly like any module (Reuse sounds and patterns with imports).
  • Historical browser adapters (removed 2026-08-10): the old workbench's reference panel line-scanned each loaded module for its header blurb and public (non-priv) bindings, presenting Standard library and Your modules sections, and cmd/ctrl-click on an import "name" jumped there. Those TypeScript files were deleted with the workbench; see git history. The Rust workbench uses ui/src/docsview.rs for the canonical language reference and compiler-backed editor navigation, and does not ship that module browser.
  • Compile test: compiler/src/lower/tests.rs (studio_song_compiles_against_the_standard_library) resolves, checks, and lowers examples/songs/studio.volta against the library bundle.

What the library can and cannot carry#

The boundary is measured, not argued: a builtin can become a library function only if the library spelling compiles to the same masked IR — same events, payloads, articulation and graph, spans and the source-hashed seed stripped. compiler/tests/library_equivalence.rs is that test, with a row per candidate, and its 2026-09-22 verdict over the candidates Language Foundations P6 named is that one shape carries and four do not.

A pattern constructor carries. A pattern is an ordinary value, so naming one in a module and importing it changes nothing but the source offsets: all six of rhythm.volta's patterns are byte-identical to the literals they replace. That is why the rhythm module never needed a builtin.

Four kinds of builtin cannot move, each for a reason that is about the language and not about the function:

KindWhy it cannot moveExample
its content is a range or domain guaranteea user function cannot declare the unit or range its result carriesscale [0, 1] turns a −1…1 modulator into a 0–1 knob value; the arithmetic keeps Bipolar, and 141 corpus songs refuse the library spelling outright
it shares a subgrapha user function substitutes its argument instead of binding it, so every mention re-lowers the whole graph (21 nodes become 27) — and an immediately-applied inner lambda is substitution tooscale [400Hz, 400Hz + depth * 3000Hz] with a live depth
it reads a value the record view dropspatternData is the only door out of a pattern, it filters out every rest, and an Event has no chord_root/just_centsa library imitate detunes an adaptive c4:maj7
it orders or overloadsthe list algebra has no sort, and one name with two readings has no user-function counterpartinvertVoicing, dropVoicing and arp order a chord by pitch; chop is a pattern transform and a sample modifier

And even a function that passed every row could only be added, not moved: the compiler reads no .volta source, so no builtin is implemented by a library definition. An import "m" (scale) does take the bare name over for that one file, which is the only shadowing that exists.

Notes & limits#

  • Flat namespace. One module per concern — the Reuse sounds and patterns with imports namespace is flat and re-export is not built, so there is no lib/all aggregate or nested lib/drums/909.
  • Live macro control is namespaced. The macro-naming question is settled: the resolver qualifies each library's macro names by module path (bass.cutoff), so two imported instruments never collide (Macro Namespacing). Which modules are knobbed is listed under Notable surface facts above.
  • Concrete rhythms only. A rhythm of lambdas (every, swing shapes) awaits lambda pattern transforms; the shipped set is concrete literals, plus the rhythmKit register parameterization above.
  • No stdlib versioning. A saved draft that imports a library can break if the library changes — Reuse sounds and patterns with imports punts on versioning and the stdlib is the first place that bites. Planned extensions (more instruments, effects, and rhythms) and the open core-vs-library boundary questions live in The standard library / ideas.md.

The Moving Parts preset demonstrates the mod controls and the same fx.filterMotion helper in a voice, track insert and return; see Modulation recipes.