Skip to main content

Module param_editor

Module param_editor 

Source
Expand description

The parameters of one op, editable: numbers as inputs (Enter or leaving the field applies them), a short list of numbers as one input each, choices as menus, switches as checkboxes. It works on any op that serializes to a JSON object (Params): lumen’s ops, dsp-kitchen’s pipeline nodes. Whoever owns the op decides how a change is applied (a Commit: a project or session command), so a side panel and a pipeline inspector can share it.

Structs§

ParamEditor
The editor of one op’s parameters (a view: cx.new(|_| ParamEditor::<MyOp>::new())).

Traits§

Params
An op the editor can edit: it serializes to a JSON object whose numbers, short number lists, choices and switches are its parameters, and deserializing checks new values. The hooks say what JSON alone cannot (which text fields are choices, labels of list elements); each has a default, so impl Params for MyOp {} is enough for an op with numbers only.

Functions§

label_of
clip_limit → Clip limit
trim_number
300 rather than 300.0, at most 6 decimals.

Type Aliases§

Commit
Sets the new op; an error is shown under the fields.