Prepare for distinct live-midi event type
The motivation for this is to determine if a given event originates from a user-controlled live input controller or from playback from disk or a MIDI file. This distinction is required for VST3 MIDI learn.
This commit is contained in:
parent
472ce90fab
commit
472fe2b556
@ -620,6 +620,12 @@ LuaBindings::common (lua_State* L)
|
||||
.addConst ("Curved", Evoral::ControlList::InterpolationStyle(Evoral::ControlList::Curved))
|
||||
.endNamespace ()
|
||||
|
||||
.beginNamespace ("EventType")
|
||||
.addConst ("NO_EVENT", Evoral::EventType(Evoral::NO_EVENT))
|
||||
.addConst ("MIDI_EVENT", Evoral::EventType(Evoral::MIDI_EVENT))
|
||||
.addConst ("LIVE_MIDI_EVENT", Evoral::EventType(Evoral::LIVE_MIDI_EVENT))
|
||||
.endNamespace ()
|
||||
|
||||
.endNamespace (); // Evoral
|
||||
|
||||
luabridge::getGlobalNamespace (L)
|
||||
|
@ -123,6 +123,9 @@ public:
|
||||
inline const uint8_t* buffer() const { return _buf; }
|
||||
inline uint8_t* buffer() { return _buf; }
|
||||
|
||||
inline bool is_midi () const { return _type == LIVE_MIDI_EVENT || _type == MIDI_EVENT; }
|
||||
inline bool is_live_midi () const { return _type == LIVE_MIDI_EVENT; }
|
||||
|
||||
inline void set_event_type(EventType t) { _type = t; }
|
||||
|
||||
inline void set_time(Time t) { _time = t; }
|
||||
|
@ -51,7 +51,8 @@ typedef int32_t event_id_t;
|
||||
*/
|
||||
enum EventType {
|
||||
NO_EVENT,
|
||||
MIDI_EVENT
|
||||
MIDI_EVENT,
|
||||
LIVE_MIDI_EVENT
|
||||
};
|
||||
|
||||
/** Type of a parameter (opaque, mapped by application, e.g. gain) */
|
||||
|
Loading…
Reference in New Issue
Block a user