LMMS
Loading...
Searching...
No Matches
note-ports.h
Go to the documentation of this file.
1#pragma once
2
3#include "../plugin.h"
4#include "../string-sizes.h"
5
11
12static CLAP_CONSTEXPR const char CLAP_EXT_NOTE_PORTS[] = "clap.note-ports";
13
14#ifdef __cplusplus
15extern "C" {
16#endif
17
19 // Uses clap_event_note and clap_event_note_expression.
21
22 // Uses clap_event_midi, no polyphonic expression
24
25 // Uses clap_event_midi, with polyphonic expression (MPE)
27
28 // Uses clap_event_midi2
30};
31
32typedef struct clap_note_port_info {
33 // id identifies a port and must be stable.
34 // id may overlap between input and output ports.
36 uint32_t supported_dialects; // bitfield, see clap_note_dialect
37 uint32_t preferred_dialect; // one value of clap_note_dialect
38 char name[CLAP_NAME_SIZE]; // displayable name, i18n?
40
41// The note ports scan has to be done while the plugin is deactivated.
42typedef struct clap_plugin_note_ports {
43 // number of ports, for either input or output
44 // [main-thread]
45 uint32_t (*count)(const clap_plugin_t *plugin, bool is_input);
46
47 // get info about about a note port.
48 // [main-thread]
49 bool (*get)(const clap_plugin_t *plugin,
50 uint32_t index,
51 bool is_input,
54
55enum {
56 // The ports have changed, the host shall perform a full scan of the ports.
57 // This flag can only be used if the plugin is not active.
58 // If the plugin active, call host->request_restart() and then call rescan()
59 // when the host calls deactivate()
61
62 // The ports name did change, the host can scan them right away.
64};
65
66typedef struct clap_host_note_ports {
67 // Query which dialects the host supports
68 // [main-thread]
70
71 // Rescan the full list of note ports according to the flags.
72 // [main-thread]
73 void (*rescan)(const clap_host_t *host, uint32_t flags);
75
76#ifdef __cplusplus
77}
78#endif
struct clap_host clap_host_t
uint32_t clap_id
Definition id.h:6
struct backing_store_struct * info
Definition jmemsys.h:183
#define CLAP_CONSTEXPR
Definition macros.h:32
unsigned int uint32_t
Definition mid.cpp:100
struct clap_host_note_ports clap_host_note_ports_t
static CLAP_CONSTEXPR const char CLAP_EXT_NOTE_PORTS[]
Definition note-ports.h:12
struct clap_note_port_info clap_note_port_info_t
clap_note_dialect
Definition note-ports.h:18
@ CLAP_NOTE_DIALECT_MIDI2
Definition note-ports.h:29
@ CLAP_NOTE_DIALECT_MIDI
Definition note-ports.h:23
@ CLAP_NOTE_DIALECT_CLAP
Definition note-ports.h:20
@ CLAP_NOTE_DIALECT_MIDI_MPE
Definition note-ports.h:26
@ CLAP_NOTE_PORTS_RESCAN_ALL
Definition note-ports.h:60
@ CLAP_NOTE_PORTS_RESCAN_NAMES
Definition note-ports.h:63
struct clap_plugin_note_ports clap_plugin_note_ports_t
struct clap_plugin clap_plugin_t
@ CLAP_NAME_SIZE
Definition string-sizes.h:9
Definition note-ports.h:66
uint32_t(* supported_dialects)(const clap_host_t *host)
Definition note-ports.h:69
void(* rescan)(const clap_host_t *host, uint32_t flags)
Definition note-ports.h:73
Definition note-ports.h:32
clap_id id
Definition note-ports.h:35
char name[CLAP_NAME_SIZE]
Definition note-ports.h:38
uint32_t preferred_dialect
Definition note-ports.h:37
uint32_t supported_dialects
Definition note-ports.h:36
Definition note-ports.h:42
bool(* get)(const clap_plugin_t *plugin, uint32_t index, bool is_input, clap_note_port_info_t *info)
Definition note-ports.h:49
uint32_t(* count)(const clap_plugin_t *plugin, bool is_input)
Definition note-ports.h:45
#define void
Definition unzip.h:396