diff options
author | Hans Baier <hansfbaier@googlemail.com> | 2008-04-09 15:33:01 +0000 |
---|---|---|
committer | Hans Baier <hansfbaier@googlemail.com> | 2008-04-09 15:33:01 +0000 |
commit | 1a0044b35d2cca7e7316d6afbb8e4955b6d7a627 (patch) | |
tree | 43fe8bf5cfc170f6aa4a5ec2f821a909965f572e /libs/midi++2/midi++/event.h | |
parent | f39606f985223d211d218799c9e0de1e7c0e7f0c (diff) |
* implemented persistent undo for MidiModel::DeltaCommand. Deserializing works, but weirdly has no effect when undo/redo is applied in the editor
git-svn-id: svn://localhost/ardour2/branches/3.0@3240 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/midi++2/midi++/event.h')
-rw-r--r-- | libs/midi++2/midi++/event.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libs/midi++2/midi++/event.h b/libs/midi++2/midi++/event.h index 6ef1c49ee9..cce17b0625 100644 --- a/libs/midi++2/midi++/event.h +++ b/libs/midi++2/midi++/event.h @@ -167,6 +167,7 @@ struct Event { inline uint32_t& size() { return _size; } inline uint8_t type() const { return (_buffer[0] & 0xF0); } inline uint8_t channel() const { return (_buffer[0] & 0x0F); } + inline void set_channel(uint8_t channel) { _buffer[0] = (0xF0 & _buffer[0]) | channel; } 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); } |