Levels & Files
The methods named here are in the audio reference.
Volume
Section titled “Volume”| Fact | Value |
|---|---|
| Unit | dB. 0 is unity gain. |
| Range | −70 to +6. −70 and below is silence; above +6 is held at +6. |
set_norm(0…1) | 0 is −70 dB, 1 is +6 dB, linear in dB between |
| A new value | Glides there over 10 ms |
| From a signal | The signal’s value in dB |
| Fact | Value |
|---|---|
| Range | −1 (left) to 1 (right); 0 is centre |
| Law | Constant power: θ = (pan + 1)·π/4, left gain √2·cos θ, right gain √2·sin θ |
| Centre | Both channels at unity, exactly |
| Hard left or right | That side +3 dB, the other side silent |
| A stereo track | Each channel is scaled by its gain: the pan acts as a balance |
| A mono sample | Played on both channels, then panned |
Audio device
Section titled “Audio device”| Fact | Value |
|---|---|
| Sample rate | The device’s own, unless sample_rate is set in preferences; 48000 if the device does not say |
| Buffer size | The device’s own, unless buffer_size is set; at most 4096 frames |
Audio files
Section titled “Audio files”| File | Format |
|---|---|
| A sample, a kit sound | WAV, integer or float, any bit depth, sample rate or channel count. No other format is read. |
render output | WAV, stereo, 48000 Hz, 24-bit integer, whatever the device’s rate. Samples beyond ±1 are clipped; no dither. |
track.save, clip.save | WAV, 32-bit float, at the clip’s own sample rate and channel count |
A render is cycles cycles long, exactly: floor(48000 / cps) × cycles frames. It goes to a new
folder:
renders/<name>_<YYYY-MM-DD>_<HH-MM-SS>/├── master.wav render(n), render(master, n)├── <track>.wav render(track, n), one per track rendered└── frames/ render(screen, n): frame_00000.png onwards, 60 a second<name> is the project’s set_project_title, else its package name, else untitled — lower-cased, with
every character other than a letter, digit or - made _, runs of _ made one, _ trimmed from
both ends, and cut to 50 characters. How to render is in Render a Project.
What a render contains
Section titled “What a render contains”A render runs the session’s audio graph offline, from cycle 0, whatever the play head is doing. It works in a file run and in a live session, where live output pauses while it runs.
| File | What is in it |
|---|---|
master.wav | Every audio track that reaches the master: instruments, effects, faders, sends, buses, the master’s effects, modulation and automation, with plugin latency compensated |
<track>.wav | The track alone: its instrument, effects and fader. Its buses, its sends and the master’s effects are not in it. |
Not in a render:
| MIDI tracks | A WAV holds audio. midi_export() writes their notes. |
| A track sent to hardware outputs | Not in master.wav, as it is not in the master live. Its own <track>.wav has it. |
A track’s .set_delay() | The round trip to outboard gear is not there to compensate, and the delay is not applied. |
| Live inputs | A track’s set_input() is silent. |
| The tail | The render stops at its last cycle; a reverb or delay still sounding is cut. |
Effects are not cleared first: in a live session, a delay or reverb still sounding carries it into
the render’s first cycle. rand_true() and choose_true() give a new value every call, in a render
too, so a render that uses them differs every time; seeded rand() and choose() do not.
save_project
Section titled “save_project”save_project() writes the state of every CLAP and VST3 plugin in the session to the project’s
plugin-state/ folder, and load_project() reads it back.
plugin-state/├── track__<track>__instrument.preset├── track__<track>__effect__<slot>.preset├── master__effect__<slot>.preset└── .history/ └── <YYYY-MM-DD_HH-MM-SS-mmm>/ a copy of each save, the last 100Names are made safe for a file name. When two plugins’ names would give one file name, a 6-digit
hexadecimal hash is added (__h1a2b3c). A .preset file of a plugin no longer in the session is
removed at the next save.
A .preset file is JSON:
| Key | Value |
|---|---|
resonon_preset | 1, the format version |
plugin_name | The plugin’s name |
state.params | Each parameter’s value, by its path |
state.binary_state | The plugin’s own saved state, base64, when it has one |