Skip to main content

Module edits

Module edits 

Source
Expand description

The edit list: the JSON an agent writes and preset apply reads.

{"synth": "vital",
 "edits": [
   {"param": "filter_1_cutoff", "value": "410 Hz", "reason": "cutoff measured near 410 Hz"},
   {"route": {"source": "lfo_1", "dest": "filter_1_cutoff", "amount": "25%"}, "reason": "wobble"},
   {"menu": "filter_1_model", "choice": "Ladder", "reason": "warm low-pass"},
   {"raw": {"key": "settings_key_not_in_registry", "value": 1.0}, "reason": "newer build"}],
 "ambiguities": [{"id": "filter_type", "choice": "ladder", "reason": "smooth slope"}]}

A unit control takes a unit string such as "1.2 kHz", "800 ms", "-6 dB", "+12 st" or "25%", never a bare number. A count takes a whole number, a switch takes true or false, and a menu takes the label of its choice. A control without a physical unit takes its stored value as a bare number. parse reads the text strictly and resolve checks every edit against the registry. Both report every problem, not only the first, and each message names the edit, the cause and the fix.

Structs§

Decision
The decision on one ambiguity of the layer report.
Edit
One edit: a record and the reason for it.
EditError
One problem with an edit list.
EditErrors
Every problem of an edit list, in order.
EditList
A parsed edit list. It serializes to the same JSON form parse reads.
RouteRecord
A route record.

Enums§

ParamValue
A value of a parameter record as written.
Path
Whether every edit must carry a reason.
PolarityText
The polarity as an edit list writes it.
Record
The four record kinds.
Resolved
An edit checked against the registry, with values in stored units.

Functions§

parse
Reads an edit list. A leading UTF-8 byte order mark, which some editors add, is skipped.
resolve
Checks every edit against the registry of the list’s synth.