|
Operator SDK
Build MIDI processing and UI modes for the Operator device
|
Declarative parameter DSL for modes: param specs and widget builders. More...
Classes | |
| struct | Numeric |
| An integer parameter with a min, max, step, and optional decimals. More... | |
| struct | Bool |
| A two-state on/off toggle. More... | |
| struct | Enum |
| A single choice from a fixed list of named options. More... | |
| struct | List |
| A multi-select set of named options stored as a bitmask. More... | |
| struct | Note |
| A single MIDI note (0..127) shown with a note-name label. More... | |
| struct | Range |
| A low/high pair of integers (a span the user dials at both ends). More... | |
| struct | NoteRange |
| A low/high pair of MIDI notes shown with note-name labels. More... | |
| struct | FilePicker |
| A picker that lets the user choose a file from storage. More... | |
| struct | FilePickerValue |
| The value returned by param<>() for a FilePicker parameter. More... | |
| struct | Section |
| A named grouping header for the params that follow it. More... | |
| struct | Action |
| A button that runs one of the mode's functions when selected. More... | |
Typedefs | |
| using | Op = ::op::modes::op_params::Op |
| Comparison used by a parameter's visible_when gate. | |
Functions | |
| template<typename T> | |
| constexpr VisibleWhen | gate (const T &watcher, Op op, int8_t value) |
| Gate a parameter's visibility on another parameter's current value. | |
| constexpr VisibleWhen | hidden () |
| Mark a state-only param as always hidden. | |
| template<typename... Children> | |
| constexpr detail::SectionGroup< Children... > | make_section (std::string_view name, Children... children) |
| Build a Section together with its children in one expression. | |
Declarative parameter DSL for modes: param specs and widget builders.
Comparison used by a parameter's visible_when gate.
This is the operator field of a visible_when gate (see gate). Write it as Op::Eq, Op::Neq, Op::Gt, Op::Gte, Op::Lt, or Op::Lte at the call site. See op::modes::op_params::Op for what each one means.
|
constexpr |
Gate a parameter's visibility on another parameter's current value.
Call-form shorthand for a conditional .visible_when. Use it whenever a param should only appear in certain states, for example hiding an LFO's depth and rate until its source enum is set, or hiding "Maximum" while a "Constant" toggle is on. The call form and the designated-initializer aggregate are exactly equivalent, so pick whichever reads better at the call site:
.visible_when = gate(Constant, Op::Eq, false) // call
.visible_when = {.watch = Constant, .op = Op::Eq, .value = false} // aggregate
Both keep the param visible only while Constant == false.
| watcher | The other param object to watch (bare reference, no &). |
| op | How to compare the watcher's value (see Op). |
| value | The value to compare the watcher against. |
|
constexpr |
Mark a state-only param as always hidden.
A param carrying .visible_when = hidden() is persisted across reboots and never drawn on the param page, which suits a value the mode keeps for itself and only needs stored.
|
constexpr |
Build a Section together with its children in one expression.
The structural form: pass the section name and its child params inline and they are parented to the new Section automatically.
OP_MODE_PARAMS(make_section("LFO", Bool{.name="On"},
Numeric{.name="Rate", ...}))
Children here must stay ungated (leave their .visible_when at the default). Inline children have no name a gate watcher could reference, so declare gated params flat-form at file scope and use .parent instead.
| name | The section's display name. |
| children | The params to place inside the section. |