Live Coding in a Score
Every score has a live console: the language of Oscilla Live -- its synths, scopes, shapes and screen -- run line by line over the score, beside its cues. You write a line, run it, and it sounds; the sound draws itself (a scope, a phase portrait), shapes turn and scale with it, and the screen can fold, mirror and tint the lot, the score included. Nothing is compiled or restarted: every line changes what is already playing.
The Oscilla Live docs are the whole of the language and of playing it; this page is where it meets a score.
Start here
Open a project made for it: the live-coding demo opens with the console showing. In any project, Ctrl+Shift+L shows or hides the console.
Type these, one at a time, running each with Ctrl+Enter:
synth(uid:bass, wave:saw, freq:Pwhite(40, 90), dur:0.25, amp:0.15, sub:0.6)
gui(bass, size:1, view:xy, trail:1, palette:neon)
bass > rotate(follow(bass.t, 0, 360))
level(bass, 0.3, 8, exp3)
gate(bass, 0, 4)
A bass line and its octave below; it draws itself across the screen; the
drawing turns with the pitch; it sinks to a third of its level over eight
beats; then it lets go, and its sound dies away. gate(bass, 1) brings
it back. Ctrl+. stops everything.
Every time in a line is in beats, a second each at the default 60 bpm: see Time is counted in beats.
The section
| Shaping a sound live | level, gate, hush, hold -- turning a sound down, letting it go, stopping it, freezing its pattern |
| Sound | fuzz, sub, reverb, moving parameters, envelopes, patterns, microtones, random values you can keep |
| Seeing what is happening | meters, the machine's load, drawings that fade with the sound, recording |
| Visuals | the screen folded, mirrored, tiled, tinted -- and shapes thrown about |
| Keys | the console's keys, and the cheatsheet |
| Without Oscilla, and in rooms | live.html on any web host, and performers together through a relay |
And the longer pages:
- Live coding -- the whole tour: sound, image, linking them, the projector, a set in practice
- The live console -- the console itself: buffers, stashes, the cue browser, perform mode
A few habits
- Name every sound --
synth(uid:bass, ...). The name is how you reach it afterwards:level(bass, ...),gate(bass, 0),bass > rotate(...). The console names an unnamed one for you. - Run a line again to change it. A sound with the same name changes in
place -- except a
poly:one: Ctrl+Enter adds a voice, Ctrl+Alt+Enter gives the line to every voice (see Shaping). - Blocks. A line starting
#$heads a block; Ctrl+Enter on it runs the block, Tab folds it away. - Comment a line out and run it (Ctrl+Shift+/, then Ctrl+Enter): what it started stops.
Tip: use ← → or ↑ ↓ to navigate the docs