SPB Git

Repository Public

studio.md 5.5 KB

# Studio

The Studio space (⌘3) shows the compiled piece as a multitrack session: a timeline above, and below it either the mixer or a piano roll. Everything it displays comes from the compiler and the audio engine: the notes are the notes the code produced, the waveforms are drawn from the rendered audio of each track, the meters read what the engine is playing.

# The timeline

  • Ruler. Bars are numbered along the top; beats appear when there is room. Click or drag in the ruler to move the playhead. Shift-drag draws the cycle range.
  • Lanes. One lane per track. Each note is a bar placed by time and pitch; behind the notes is the waveform of the track's own audio (its stem), rendered in the background after each compilation. A waveform shown in grey belongs to the previous version of the code and is being re-rendered.
  • Markers declared with marker "A" at 4bars appear as flags in the ruler. Automation curves written in the code are drawn as dashed lines over their track.
  • Zoom with a pinch, with ⌘-scroll or ⌥-scroll, or with the slider; the read-out at the right gives the scale, down to single samples. Fit shows the whole piece. Scroll sideways to move in time and vertically through the tracks. While playing, the view follows the playhead.
  • Track headers show the name, the instrument, mute (M) and solo (S), the fader value and a level meter. Drag the lower edge of a header to change the height of the lane. The context menu sets the track's colour and offers Show in Code.
  • Double-click a note to jump to the statement that produced it in the Code space. Double-clicking an empty part of a lane jumps to the track.
  • Space starts and pauses playback when the Studio has the focus (in the editor, where Space types a space, use ⌘↩).

# Transport

Control Shortcut
Play / Pause ⌘↩ (Space in the Studio)
Stop ⌘.
Return to start ⇧⌘↩
Cycle ⌘L
Metronome ⌘K

The position read-out shows the bar and beat and the time. Both come from the engine's clock and the compiled bar map, so they stay right through tempo and metre changes.

# The mixer

Choose Mixer in the dock, or Detach Mixer to open it in its own floating window. There is a strip for each track, each bus and the master:

  • a fader in decibels (drag; hold Shift for fine steps; double-click for 0 dB; arrow keys when focused);
  • pan, mute and solo;
  • the strip's effects, with their settings in a tooltip (crossed out when bypassed);
  • a meter: the pale bar is the peak, the solid bar the RMS level, the line the peak hold, whose value is written under the fader.

The panel at the right gives the loudness of the master (momentary, short-term, integrated, true peak) and what the engine measured about itself: the time spent in the audio callback (median, 99th percentile, maximum), the number of voices and the number of overruns.

# The piano roll

Choose Piano Roll in the dock and select a track. The roll shows that track's notes on a keyboard grid, with their velocities underneath.

Action How
Select click a note; Shift-click adds or removes
Move in time or pitch drag a note (the selection follows)
Change length drag the right end of a note
Transpose ↑ and ↓ (with Shift: an octave)
Add a note double-click an empty place
Delete select, then ⌫
Change velocity drag a stem in the velocity lane
Quantise Quantise moves the selected notes (or all) to the nearest grid line
Hear the instrument press a key of the keyboard at the left

The Snap menu sets the grid used for moving, resizing, adding and quantising: bar, beat, half, quarter or third of a beat, or off.

# How studio edits relate to the code

This is the rule that keeps a project understandable: the code is the piece, and the Studio never rewrites it.

When you move a fader or drag a note, the change is stored as an explicit override in the project's studio.json, beside the code. The compiler applies the overrides after compiling the source, so the timeline, the mixer, the score, the renders and the command line all agree.

  • Mixer overrides are stored per strip, by name: gain, pan, mute, solo. A strip with an override shows Reset to code, which removes it.
  • Note overrides are stored per note: a new start, length, pitch or velocity, or a deletion. Notes you add are stored as added notes and drawn in a different colour. The header of the piano roll counts the edits of the track and offers Discard Edits.
  • Every studio change can be undone and redone (⌘Z, ⇧⌘Z).
  • Each note override remembers the start and pitch the note had when you edited it. If you later change that note in the code, the override no longer matches: it is not applied to some other note. The console lists it as Studio edit skipped with the reason, and the code's version plays.
  • Deleting studio.json, or discarding the edits, returns the project to exactly what the code says.

If an edit should become part of the piece itself, write it in the code. The Studio is for adjusting; the code is for composing.

# Not in this version

So that nothing is assumed: recording audio or MIDI, editing audio clips on the timeline (trim, split, fades), drawing automation in the Studio (automation is written in the code and displayed), and freezing tracks are not part of version 0.1.

Files main
Menu

Theme