Minor Changes
- c851819: New
@audio-ui/core/deviceentry: an effect or an instrument as a set of named parameters, with no interface and no audio in it, so a panel, an engine and an agent share one description.defineDevice({ id, name, description, parameters })takes a descriptor per parameter (a number with its range, step, scale and unit, a toggle, or a choice from a short list of options such as a waveform) and gives back the device's defaults,set,sanitize(a state loaded from a saved project, repaired),clampValue,normalizeanddenormalizealong the parameter's scale, andformatfor a readout.describe()returns the device as JSON, andapply(state, changes)changes several parameters at once and says what happened to each: a value out of range is brought in and marked, and an unknown id or a value of the wrong type is refused by name instead of being replaced by a default.deviceTools(device)returns the tools that drive a device (<id>_setand<id>_reset) with a JSON Schema input, for any agent: they report in a sentence a model can read back and never throw on what it sends. The state is a plain object typed by the parameter ids, a choice holding the value of its option, anddeviceToolsgives a model the values it may send. A device that cannot work (a default outside its range, a log scale from zero, a duplicate id) throws aDeviceDefinitionErrornaming the parameter when it is defined. An instrument can describe the note it plays (note: a pitch in hertz, a filter cutoff, each with a range), anddeviceToolsthen gives an agent a third tool,<id>_play, whose call returns the note to play and how long: values out of range are brought in, wrong ones refused by name, and a part left out takes its default.InstrumentBindingis what a host implements to play it (noteOn,noteOffnext toupdateanddispose), andplayNote(instrument, note, seconds)starts a note and lets it go when the time is up.