The Machine and the Piece
Where a setting lives follows from what kind of fact it is, and there are only three kinds:
| What it is | Where it goes | Travels with the project? |
|---|---|---|
| A fact about this machine — which audio interface, which MIDI ports, where your kits and plugins are | ~/.resonon/preferences.toml | No — and it must not |
| A fact about this piece — which packages it draws on, which kits came from outside it | resonon.toml in the project | Yes |
| An operational knob — CI, headless rendering, benchmarks | A CLI flag, an environment variable, or a VSCode setting | n/a |
That is the split every DAW makes between its Preferences and its project folder. Live has one Preferences dialog; so does resonon, and it is a file.
The rule underneath it: a setting anything outside the running session needs to know is data.
The editor, resonon collect, resonon kits list and the plugin scan all need to know where your
content is, and none of them runs your code. A folder named by a function call only exists while
something is running that call, so everything else was guessing.
Preferences are a file
Section titled “Preferences are a file”~/.resonon/preferences.tomlRead before any of your code runs, so the device comes up right the first time rather than coming up wrong and being reopened. Every key it takes is listed in Preferences.
Your piece then holds channel numbers and kit names only, so it travels:
set_project_title("my_song");set_bpm(120);master >> Output(0, 1);
let vocals = AudioTrack("vocals");vocals.set_input(0);Omit the file entirely and resonon uses the system default devices at their own sample rate and block size — a script that never mentions audio still makes sound and still records.
resonon setup is the Preferences dialog, in the terminal. It exists so that an interface is chosen
from what this machine has rather than typed from memory — but what it produces is the same file you
could write by hand, with your comments and key order kept. Neither door is the real one; the file is.
Set Up This Machine shows both.
What belongs in the piece instead
Section titled “What belongs in the piece instead”Device names are a fact about your machine: "Focusrite Scarlett 2i2" is true of one rig and
meaningless on another. Channel numbers are a fact about your piece: drums.set_input(2, 3) means “the
third and fourth inputs”, and that survives moving to a different rig. So channel routing stays in
the music:
| Setting | Call |
|---|---|
| Master output channels | master >> Output(0, 1) |
| Per-track output channels | drums >> Output(2, 3) |
| Per-track input channels | drums.set_input(2, 3) |
What is a call, not a setting
Section titled “What is a call, not a setting”Three things, and they are the three things Live keeps as buttons rather than as fields:
| Call | What it does |
|---|---|
plugin_scan() | Rescan the plugin folders now. |
plugin_rescan(path) | Re-open one bundle, whatever the database says. |
reload_preferences() | Put the file in force. |
resonon setup is a gesture too, and the same one Live’s Preferences dialog is: you open it, you
change something, you close it. It writes the file; reload_preferences() is what puts a change in
force in a session that is already playing.
They are actions — things you do at a moment — rather than settings, which are things that are true until you change them. That is the whole test.
Related
Section titled “Related”- How Preferences Are Applied — why a bad key or a missing device cannot take a session down
- Search Paths & Portability — how content is found, and what travels with a project
- Startup & the Environment — the operational knobs
- Preferences — every key in
preferences.toml - resonon.toml — the project manifest
- Set Up This Machine —
resonon setup, folders andreload_preferences()