Live

gui(...) --- The Look of a uid

Everything the live console makes carries a uid: a sound's box (the scope of synth s3, the waveform of audio a1) or a made shape (sh1). gui() reaches it by that name, to put it somewhere else or make it look different. The uid comes first, on its own.

Syntax

gui(s3, size:1) // fill the screen gui(s3, size:[1, 0.3], at:[0.5, 0.2]) // full width, a strip near the top gui(s3, stroke:#ff2a6d, width:3) // the trace gui(s3, fill:#000, border:#0ff, opacity:0.6) gui(sh1, fill:#f60, at:[0.7, 0.4], size:0.2) gui(s3, view:polar) gui(a1, view:spectrum)

gui(uid:s3, …) works too.

Parameters

param description
size A fraction of the screen (the band between the top bar and the transport): 1 fills it, 0.5 is half. [w, h] gives width and height apart. A shape takes one number, of the band's shorter side, as shape() does.
at [x, y]: its centre, 0..1 across and 0..1 down the same band. One number is both: at:0.5 is [0.5, 0.5], the middle.
cell A cell of the stage's grid (grid()): cell:4 counted along the rows from 1, [col, row], free (an empty one, at random), any, or a pattern (Pseq(1, 3, 2, inf): the next each run). A box fills its cell, a shape takes 0.8 of its shorter side; with cell:, size: and at: are shares of the cell.
across, down With cell:: how many cells it spans, across and down (default 1).
stroke The colour of the line that is drawn: a scope's trace, a waveform's, a shape's outline. color: and colour: are the same.
width That line's width in screen pixels -- or a follow(): width:follow(bass.low, 0.5, 40), thick with the bass in it, thin without.
fill The box's background (a shape's fill). In view:ridge / waterfall, what the lines are filled with; none for see-through lines.
border The box's outline.
blend How the box and what is drawn in it mix with what is under it: difference (flips what it crosses: white over white is black, over black is white), exclusion, screen (adds light), multiply (adds ink), overlay, lighten, darken, color-dodge, color-burn, hard-light, soft-light, hue, saturation, color, luminosity; normal or 0 back. Kept on the box for every voice drawn in it. On a shape, a cluster or a text the same.
opacity 0..1, the box and what is drawn in it -- or follow(...): opacity:follow(noise.fader) fades the drawing with the sound's level.
blur Pixels of softness on this one alone (screen(blur:) is the whole stage): the box and every trace in it, its trail too -- or follow(...): blur:follow(s3.level, 12, 0) is a smudge when quiet, sharp when loud. On a shape, a cluster or a drawing the whole of it; 0 takes it off. (On a text, blur: is its arrival -- text().)
effects screen()'s effects on this one alone, same names and units: hue:, invert:, contrast:, saturate:, bright:, pixel:, warp: (with grain:), split: -- and on a sound's box kaleido: (with turn:), mirror: (x, y, xy), tile:, about the box's own middle. Each a number or follow(...): warp:follow(s3.level, 0, 40); 0 takes one off, fx:off all. A gui() line is the box's effects: one it no longer names goes -- take kaleido:3 out of the line, run it again, and the kaleidoscope is gone (a line with none, gui(s3, size:1), leaves it plain). A line whose effects are all relative (warp:*2) is a tweak: the others stay. On a shape, a cluster or a drawing, the filters (not kaleido / mirror / tile).
view How the sound is drawn: wave (the default), polar, phase, xy, spectrum, ridge or waterfall — see below.
rows For view:ridge / waterfall: how many lines are stacked (default 24, 2..120).
span For view:ridge / waterfall: the beats of the past the stack holds (default 2): a line every span/rows beats. Bigger is slower.
y For view:xy: the uid of the sound drawn up the box (this one is across).
lag For view:phase: how many samples later the y signal is (default 12). A number, or follow(...).
cycle For view:phase: the lag as a fraction of the sound's own cycle, so the figure keeps its shape whatever the pitch — a sine is a line at 0, a circle at 0.25, the other line at 0.5. A number, or follow(...). lag: and cycle: replace each other.
spin Each voice's trace turns round the middle of the box, once in so many beats -- spin:20; a minus the other way. spin:[20, -20] voice by voice (the first voice the first, then round again: these alternate); spin:birand(10, 30) or choose(20, -20) a draw for each voice, its own speed and way. 0 none. Unlike s3 > rotate(...), which turns the whole box with all its voices. Wave, polar, phase, xy and spectrum views.
trail How long traces leave tails: 0 (the default) none; 0.3 a smear, 1 a short tail, 2 about a second, 8 several seconds, up to 30. Tails always fade to nothing. Wave, polar, phase and spectrum views; a box turned by rotate() leaves the trail of its turning too. On a shape or a cluster, its movements leave the tails — see Shapes.
palette For a poly: sound, whose voices each draw their own line: a colour for each voice in turn -- live (the colours boxes had before), grey, primary, pastel, neon; a list of your own, palette:[red, #05d9e8, gold]; or one you named with palette(mine, [...]). A voice keeps its colour while it plays. One voice draws one line, so a sound that is not poly: takes the palette's first colour: give it color: instead. A stroke: colours every voice and wins over a palette; setting palette: again takes over from it.

Texts

A text() with no target: stands in the middle of the screen. gui() reaches it by its uid too:

gui(sz, at:[0.25, 0.2]) // there, from now on gui(sz, fill:#05d9e8, opacity:0.6)

Its place and look hold for every item it shows after (each letter of a shuffle) and every run of the line. Such a text can also be dragged with the mouse; it stays where it is dropped.

Palettes

synth(uid:choir, poly:6, freq:Pwhite(200, 800), dur:2)
gui(choir, palette:neon)                       each voice the next of neon's colours
gui(choir, palette:[red, #05d9e8, gold])       ... of these
palette(mine, [#ff2a6d, white, #7cff6b])       a palette by that name, from now on
gui(choir, palette:mine)
palette(primary, [red, green, blue])           or other colours under a name it has

A palette is for a poly: sound: each of its voices draws its own line, and each line takes the next colour, keeping it while it plays. A box already drawing in a palette that is named again keeps its voices' colours; the next voices take the new ones. Colours are any CSS colour: a name (gold), #rgb, #rrggbb. A palette named with palette() lasts as long as the page.

Views

A sound's box can draw what it plays in seven ways. The box keeps its view, like its stroke and width, so every voice of a poly synth drawn in it, and every later run, uses it.

view what you see
wave the oscilloscope: level across time
polar the same signal wrapped round the middle of the box — angle is time, distance from the middle is level. Chords and harmonics make rosettes.
phase the signal against itself lag samples (or cycle of a cycle) later: x/y figures, ellipses that turn as voices detune
xy this sound across, another (y: its uid) up: Lissajous figures, oscilloscope art
spectrum level per frequency, low on the left, on a log scale
ridge the wave's recent past as stacked lines: the newest at the bottom, in front, the older ones going up and back, each hiding what is behind it where it rises — the Unknown Pleasures look
waterfall the same with the spectrum: each line the level per frequency, low on the left

A box the console drew (a sound's box in Oscilla Live, or from the live console on a score) is not a frame its drawing has to stay in. Its trace is sized to how loud the sound has been over the last second or two, not to each moment's own loudest point: a loud note swells out past the box, a dying one shrinks back, and quiet passages are drawn small. Past the box's edge the trace bends in softly, towards a rim half the box's shorter side beyond it, so it is never cut off. polar, phase and xy keep their two axes equal, in the square in the middle of the box: a circle stays round in a wide box, and a dense figure no longer fills the box out to its corners. To draw such a figure bigger, make the box's shorter side bigger.

Ridge and waterfall

gui(s1, view:ridge) 24 lines over the last 2 beats gui(s1, view:ridge, span:8) the same lines over 8 beats: 4x slower gui(s1, view:ridge, rows:48, span:16) more lines, slower still gui(s1, view:waterfall, rows:16, span:1) gui(s1, view:ridge, fill:none) see-through lines

A line is taken every span/rows beats and the stack moves up smoothly between them; the oldest fades out at the top.

Speed. span: is the beats of the past the stack holds: a bigger span scrolls slower. More rows: over the same span means a line taken more often, so it moves faster -- raise both together to keep the pace. Being beats, the speed follows tempo().

A wave line starts where the wave crosses upward, so a steady note keeps its place line after line, and lines are scaled to the loudest of the last few, so a note dying away is seen shrinking.

Fill. Each line is filled below with the stage's colour, so it hides the lines behind it where it rises. fill: a colour fills them with that instead; fill:none leaves only the lines, every one showing through the ones in front.

A filter sweeping (filter:{freq:sinOsc(...)}) draws a ridge travelling across a waterfall.

The phase view

The figure depends most on how the lag compares with one cycle of the sound. With lag: in samples, the pitch changes the figure: a sine at the default lag:12 is a circle near 1 kHz and almost a line at 110 Hz, so a glide sweeps it from line to circle. cycle: holds the figure still while the pitch moves; moving cycle: moves the figure instead:

gui(organ, view:phase, cycle:0.25) a circle at any pitch gui(organ, view:phase, cycle:follow(tri.norm, 0, 0.5)) line, circle, line as tri turns gui(organ, view:phase, lag:follow(tri.sin, 5, 200))

Then the wave gives the outline (a triangle wave a diamond, a square four corners, a sawtooth a slanted line with its jump), a detuned pair (freq:[110, 110.7]) breathes, simple ratios knot, a resonant low-pass rounds corners into rings, and a delay's feedback doubles the figure. amp: changes nothing: the view fills the box at any level.

cycle: reads the pitch from the sound itself, from where it crosses upward. For a note, detuned or not, that is its cycle; for a chord it is the spacing of its crossings, which is shorter than its full repeat.

The xy view

Two sounds against each other, the way an oscilloscope in X/Y mode draws a stereo pair: this box's sound across, the y: sound up, each filling its axis.

synth(uid:x1, freq:220, amp:0.04) synth(uid:y1, freq:330.3, amp:0.04, waveform:none) gui(x1, size:1, view:xy, y:y1, trail:0.5)

Simple ratios between the two (1:2, 2:3, 3:4) make Lissajous figures across the whole box; a slight detune (330.3 against 330) turns them slowly, the further off the faster. Square waves draw boxes and grids, FM on one of the two (fm:{ratio:2, index:0.6}) knots it, a pattern on either changes the figure each step. The y: sound needs no box of its own (waveform:none); until it plays, the box draws its own sound as a phase figure.

The phase view, by contrast, plots one sound against itself, so it only shows the levels that sound passes through: a square wave, with two levels, is four corners and an empty middle whatever the lag. Filtering it, or FM on a sine, gives it levels in between; view:xy with a second sound fills the box.

On an audio box, wave is the file's waveform with its playhead; any other view draws each playing voice live instead, and view:wave brings the file back.

Behaviour

Shapes

On a shape, or a whole cluster:

gui(choir, trail:2) every member leaves a tail as it turns and moves gui(choir, fill:scope) each member's sound drawn inside it gui(choir, view:polar) ... as wave (the default), polar, phase or spectrum gui(choir, trail:0) tails off

trail: takes the same beats as a box's. A cluster has one trail under all its members; the outline, the fill and a fill:scope trace all leave it. fill:scope draws the sound named after the shape -- the synth or audio on its line -- clipped to its outline, in its stroke colour; see shape().

Tip: use ← → or ↑ ↓ to navigate the docs