You can make music in Volta with one line. Choose an instrument, write a few notes, and press Play. Then change one thing and hear what happens. No patch building, sample setup, or music notation is needed for these first sounds.
1. Play a phrase#
In Studio, create a new song and copy the whole example into Source. Choose Run to prepare it, then Play to start. In Reference, Run live (or Cmd/Ctrl+Enter in the example) plays the example's current code. On a public Reference page, use its audio player.
Listen for: four even notes, moving upward and back down.
tempo = 120bpm
timingVersion = 2
play "sine" "c4 e4 g4 e4"
Make it yours: replace g4 with b4. Run again to hear your edit. tempo sets beats per minute. timingVersion = 2 is optional: these are the default timing rules used throughout these guides. You can omit both for a one-line sketch, but keeping them makes a shared example's timing explicit.
Read play "sine" "c4 e4 g4 e4" as “play this instrument with these notes.” A note's number is its octave: c3 is lower than c4. Spaces divide a cycle equally. In the default meter, four notes make four equally spaced beats in a bar.
2. Change the instrument#
The eight built-in voices work immediately, without imports.
| Name | Character | A useful starting role |
|---|---|---|
"sine" | Pure and rounded | Simple tones, soft melodies |
"triangle" | Soft, with a little edge | Gentle leads and bass |
"saw" | Bright and buzzy | A starting point for filtering |
"square" | Hollow and woody | Retro leads |
"pluck" | Bright attack, short decay | Rhythmic melodic figures |
"pad" | Detuned, slow and sustained | Long notes and chords |
"bass" | Filtered, low and slightly gliding | Bass lines |
"keys" | Rounded attack with bright overtones | Melodies and harmony |
The "bass" instrument sounds one octave below its incoming notes. This is part of that preset's design. The plain oscillator voices have no filter until you add a cutoff control. The other four are small layered patches with their own filter and envelope choices.
Listen for: the stronger attack and shorter body of a pluck.
tempo = 120bpm
timingVersion = 2
play "pluck" "c4 e4 g4 e4"
Make it yours: try "keys", then "pad". For the pad, reduce the pattern to "c4 g4" so the slower attack has more time to develop.
3. Turn a knob in text#
A pipe, |>, reads as then. cutoff 800Hz sets filter brightness; release 200ms sets how long the sound fades after a note ends.
Listen for: a saw wave softened by a filter, with small gaps in the rhythm.
tempo = 120bpm
timingVersion = 2
play "saw" "c3 ~ eb3 g3"
|> cutoff 800Hz
|> resonance 2
|> release 200ms
Make it yours: change 800Hz to 2400Hz. The higher cutoff reveals more of the saw's bright overtones. ~ is a rest: it leaves time without a new note. The indented pipe lines continue the same track.
4. Add another part#
Each unindented play or sound line makes another track. Without an explicit song arrangement, all tracks play together. sound "bd sn" triggers samples; play "keys" "c4 e4" plays pitches on an instrument.
tempo = 120bpm
timingVersion = 2
play "keys" "c4 eb4 g4 bb4" |> release 200ms |> gainTrack 0.5
play "bass" "c3 ~ g3 ~" |> cutoff 600Hz |> gainTrack 0.6
sound "bd ~ sn ~" |> gain 0.5
Listen for: three parts with different jobs: melody, low end and pulse. Make it yours: add a rest to the melody. You can make room by removing notes as well as by lowering a level.
Name a part when you want to refer to it later: lead = play "keys" "c4 e4". Without a name, Volta uses track1, track2, and so on, skipping names already in use. Named tracks are convenient for the mixer and arrangement.
Knobs, values and units#
| Control | Write | Meaning |
|---|---|---|
| Filter cutoff | |> cutoff 1200Hz | A frequency; higher usually means brighter |
| Resonance | |> resonance 2 | Emphasis near the cutoff |
| Attack / decay / release | |> attack 20ms | An envelope time; seconds or milliseconds |
| Sustain | |> sustain 0.6 | The held level, not a time |
| Event strength | |> gain "1 0.5" | Strong and soft events; can change instrument tone |
| All-event strength | |> gainTrack 0.5 | Halves each event’s velocity; the patch decides how that affects sound |
| Per-note brightness | |> cutoff "400 1600"Hz | A frequency chosen at each note onset |
In tables, the pipe is the same |> you use in code. Symbols shows each command's supported arguments and defaults. Use Named options to make longer calls easier to read.
When you want more control#
Built-in voices are ordinary patches underneath. You can write your own with patch { … }, import a library instrument, or make a copy of an existing patch with with { … }. A library patch uses its imported name without quotation marks; it is not one of the eight built-in voice strings. See The standard library and Ready-made instruments.
On a play track, a recognized patch-field knob can set a constant, a macro expression, or a compatible signal. Supported numeric patterns are sampled at note onsets on their own timeline. A (name=value) event control or a merged control for the same name takes precedence over that track-wide lane.
Envelope-stage knobs edit an ADSR envelope and accept scalar or live values sampled at note-on. They do not accept per-event patterns. If a custom patch uses a different envelope shape, override ampEnv as a whole. Adding a helper field does not automatically make it audible: the patch must use that field in its sound. On a built-in voice an unknown knob name is an error that lists the voice's knobs, so a typo such as cutof cannot silently do nothing. An explicit out field owns the output chain and can bypass ordinary patch fields; see Voice signal flow.
Track commands keep their usual meanings. gain, pan, speed, push, warp and pitch are track lanes; reverb is an effect. Use knob "name" value for an explicit patch-field override. Patch knobs are for play tracks; a sound track uses sampler controls. For an enveloped or filtered sample instrument, put sample "name" inside a patch and use play.
A quoted pattern is accepted where Volta expects a pattern. !"…" is the explicit form and remains useful when writing reusable patterns or working in ambiguous contexts. Quoted sample names and other text arguments stay text. See Language reference for the detailed rules.
Next: Build a synth sound, Rhythm and groove, or When something does not sound right.