diff options
author | David Robillard <d@drobilla.net> | 2007-08-16 01:25:58 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-08-16 01:25:58 +0000 |
commit | f9a7388d7aa62c6b8ab0bc8c62bf53ae1652e8e1 (patch) | |
tree | b3737567d21c42688ff3129f28be144898cb28a6 /libs/ardour/ardour/midi_event.h | |
parent | 356f9ba80aabb8705ce24ad78b2b409d084a718e (diff) |
Make SMFSource suck significantly less.
Read from MidiRingbuffer directly into model, don't read MidiRingBuffer into a new midi buffer, then into the model.
Pass rec data to UI via model instead of a separate buffer.
Read MIDI CC data into MidiModel (though not actually used yet).
Made quantization toggle edited flag so model is saved.
git-svn-id: svn://localhost/ardour2/trunk@2308 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour/midi_event.h')
-rw-r--r-- | libs/ardour/ardour/midi_event.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libs/ardour/ardour/midi_event.h b/libs/ardour/ardour/midi_event.h index 3a6b89f198..61e6b8af6e 100644 --- a/libs/ardour/ardour/midi_event.h +++ b/libs/ardour/ardour/midi_event.h @@ -112,11 +112,14 @@ struct MidiEvent { inline uint8_t channel() const { return (_buffer[0] & 0x0F); } inline bool is_note_on() const { return (type() == MIDI_CMD_NOTE_ON); } inline bool is_note_off() const { return (type() == MIDI_CMD_NOTE_OFF); } + inline bool is_cc() const { return (type() == MIDI_CMD_CONTROL); } inline bool is_note() const { return (is_note_on() || is_note_off()); } inline uint8_t note() const { return (_buffer[1]); } inline uint8_t velocity() const { return (_buffer[2]); } + inline uint8_t cc_number() const { return (_buffer[1]); } + inline uint8_t cc_value() const { return (_buffer[2]); } inline const Byte* buffer() const { return _buffer; } - inline Byte* buffer() { return _buffer; } + inline Byte*& buffer() { return _buffer; } private: double _time; /**< Sample index (or beat time) at which event is valid */ |