clap

CLAP Audio Plugin API
Log | Files | Refs | README | LICENSE

commit 677c9a356c3dc1da21795885ee956c711b590582
parent 1b291f642d630a087398a12edb48fae42703cae1
Author: Alexandre Bique <bique.alexandre@gmail.com>
Date:   Mon, 28 Nov 2022 15:13:02 +0100

Bunch of improvements

Diffstat:
Minclude/clap/ext/draft/param-indication.h | 8+++++---
Minclude/clap/ext/draft/remote-controls.h | 17+++++++++--------
2 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/include/clap/ext/draft/param-indication.h b/include/clap/ext/draft/param-indication.h @@ -7,16 +7,18 @@ // mapped to a physical controller. // // It is common that those controllers works using a bank of 8 knobs, and to -// improve readability the host may assign a color to each physical knobs and -// indicate them on the GUI. +// improve readability the host may assign a different color to each physical +// knobs and indicate them on the GUI. static CLAP_CONSTEXPR const char CLAP_EXT_PARAM_INDICATION[] = "clap.param-indication.draft/0"; typedef struct clap_plugin_param_indication { // Sets or clears a mapping indication. + // If the host doesn't use mapping color, then mapping_color should be null. + // If is_mapped is false, then the mapping color is ignored. // [main-thread] void(CLAP_ABI *set_indication)(const clap_plugin_t *plugin, clap_id param_id, bool is_mapped, - clap_color_t mapping_color); + const clap_color_t *mapping_color); } clap_plugin_param_indication_t; \ No newline at end of file diff --git a/include/clap/ext/draft/remote-controls.h b/include/clap/ext/draft/remote-controls.h @@ -3,9 +3,10 @@ #include "../../plugin.h" #include "../../string-sizes.h" -// This extensions let the plugin provide a structure way of mapping parameters to a physical control surface. +// This extension let the plugin provide a structured way of mapping parameters to an hardware +// controller. // -// This is done by providing a set of pages organized by section. +// This is done by providing a set of remote control pages organized by section. // A page contains up to 8 controls, which references parameters using param_id. // // |`- [section:main] @@ -17,13 +18,13 @@ // | `- [name:osc-noise] osc noise page // |`- [section:filter] // | |`- [name:flt1] filter 1 page -// | |`- [name:flt2] filter 2 page +// | `- [name:flt2] filter 2 page // |`- [section:env] // | |`- [name:env1] env1 page -// | |`- [name:env2] env2 page +// | `- [name:env2] env2 page // |`- [section:lfo] // | |`- [name:lfo1] env1 page -// | |`- [name:lfo2] env2 page +// | `- [name:lfo2] env2 page // `- etc... // // One possible workflow is to have a set of buttons, which correspond to a section. @@ -39,9 +40,9 @@ extern "C" { enum { CLAP_REMOTE_CONTROLS_COUNT = 8 }; typedef struct clap_remote_controls_page { + char section_name[CLAP_NAME_SIZE]; clap_id page_id; char page_name[CLAP_NAME_SIZE]; - char section_name[CLAP_NAME_SIZE]; clap_id param_ids[CLAP_REMOTE_CONTROLS_COUNT]; } clap_remote_controls_page_t; @@ -52,8 +53,8 @@ typedef struct clap_plugin_remote_controls { // Get a page by index. // [main-thread] - bool(CLAP_ABI *get)(const clap_plugin_t *plugin, - uint32_t page_index, + bool(CLAP_ABI *get)(const clap_plugin_t *plugin, + uint32_t page_index, clap_remote_controls_page_t *page); } clap_plugin_remote_controls_t;