#include #include #include #include #include "temporal/beats.h" #include "evoral/Sequence.hpp" #include "evoral/TypeMap.hpp" #include "evoral/EventSink.hpp" #include "evoral/midi_events.h" #include "evoral/Control.hpp" using namespace Evoral; class DummyTypeMap : public TypeMap { public: enum DummyEventType { NOTE, CONTROL, SYSEX }; ~DummyTypeMap() {} bool type_is_midi (uint32_t /*type*/) const { return true; } uint8_t parameter_midi_type(const Parameter& param) const { switch (param.type()) { case CONTROL: return MIDI_CMD_CONTROL; case SYSEX: return MIDI_CMD_COMMON_SYSEX; default: return 0; }; } virtual ParameterType midi_parameter_type(const uint8_t* buf, uint32_t len) const { switch (buf[0] & 0xF0) { case MIDI_CMD_CONTROL: return CONTROL; case MIDI_CMD_COMMON_SYSEX: return SYSEX; case MIDI_CMD_NOTE_ON: return NOTE; case MIDI_CMD_NOTE_OFF: return NOTE; default: return 0; } } ParameterDescriptor descriptor(const Parameter& param) const { return ParameterDescriptor(); } std::string to_symbol(const Parameter& /*param*/) const { return "control"; } }; template class MySequence : public Sequence