commit 48c6de6170141cf17341a76ab0574813b8c63ccf
parent 436345d66c532d8bab8f6181729e01d48bea1f74
Author: Alexandre Bique <bique.alexandre@gmail.com>
Date: Sat, 12 Mar 2022 10:01:19 +0100
Separate parameter gesture into specific events
Diffstat:
1 file changed, 15 insertions(+), 7 deletions(-)
diff --git a/include/clap/events.h b/include/clap/events.h
@@ -25,14 +25,8 @@ enum clap_event_flags {
// indicate a live momentary event
CLAP_EVENT_IS_LIVE = 1 << 0,
- // live user adjustment begun
- CLAP_EVENT_BEGIN_ADJUST = 1 << 1,
-
- // live user adjustment ended
- CLAP_EVENT_END_ADJUST = 1 << 2,
-
// should record this event be recorded?
- CLAP_EVENT_SHOULD_RECORD = 1 << 3,
+ CLAP_EVENT_SHOULD_RECORD = 1 << 1,
};
// Some of the following events overlap, a note on can be expressed with:
@@ -78,6 +72,11 @@ enum {
CLAP_EVENT_PARAM_VALUE,
CLAP_EVENT_PARAM_MOD,
+ // uses clap_event_param_gesture
+ // Indicates that the knob is begining to be adjusted, or that the adjustement ended.
+ CLAP_EVENT_PARAM_GESTURE_BEGIN,
+ CLAP_EVENT_PARAM_GESTURE_END,
+
CLAP_EVENT_TRANSPORT, // update the transport info; clap_event_transport
CLAP_EVENT_MIDI, // raw midi event; clap_event_midi
CLAP_EVENT_MIDI_SYSEX, // raw midi sysex event; clap_event_midi_sysex
@@ -161,6 +160,15 @@ typedef struct clap_event_param_mod {
double amount; // modulation amount
} clap_event_param_mod_t;
+typedef struct clap_event_param_gesture {
+ clap_event_header_t header;
+
+ // target parameter
+ clap_id param_id; // @ref clap_param_info.id
+ void *cookie; // @ref clap_param_info.cookie
+
+} clap_event_param_gesture_t;
+
enum clap_transport_flags {
CLAP_TRANSPORT_HAS_TEMPO = 1 << 0,
CLAP_TRANSPORT_HAS_BEATS_TIMELINE = 1 << 1,