diff options
Diffstat (limited to 'libs/evoral/src/Note.cpp')
-rw-r--r-- | libs/evoral/src/Note.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/libs/evoral/src/Note.cpp b/libs/evoral/src/Note.cpp index ead5d1eff5..62b7da723c 100644 --- a/libs/evoral/src/Note.cpp +++ b/libs/evoral/src/Note.cpp @@ -18,6 +18,7 @@ #include <iostream> #include <limits> +#include <glib.h> #include "evoral/Note.hpp" namespace Evoral { @@ -25,8 +26,8 @@ namespace Evoral { template<typename Time> Note<Time>::Note(uint8_t chan, Time t, Time l, uint8_t n, uint8_t v) // FIXME: types? - : _on_event(0xDE, t, 3, NULL, true) - , _off_event(0xAD, t + l, 3, NULL, true) + : _on_event (0xDE, t, 3, NULL, true) + , _off_event (0xAD, t + l, 3, NULL, true) { assert(chan < 16); @@ -49,9 +50,11 @@ Note<Time>::Note(uint8_t chan, Time t, Time l, uint8_t n, uint8_t v) template<typename Time> Note<Time>::Note(const Note<Time>& copy) - : _on_event(copy._on_event, true) + : _on_event(copy._on_event, true) , _off_event(copy._off_event, true) { + set_id (copy.id()); + assert(_on_event.buffer()); assert(_off_event.buffer()); /* @@ -78,6 +81,13 @@ Note<Time>::~Note() { } +template<typename Time> void +Note<Time>::set_id (event_id_t id) +{ + _on_event.set_id (id); + _off_event.set_id (id); +} + template<typename Time> const Note<Time>& Note<Time>::operator=(const Note<Time>& other) |