partially revert 30b087ab3, CoreAudio SDK uses "Frames"
[ardour.git] / libs / evoral / src / Note.cpp
index afd733032573414266f0945324a3ab099a640e23..631a995ab364c58feaf459c21408d3bbabb06ee0 100644 (file)
@@ -16,6 +16,7 @@
  * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#include <cassert>
 #include <iostream>
 #include <limits>
 #include <glib.h>
 #include "evoral/Note.hpp"
 #endif
 
+#include "evoral/Beats.hpp"
+
 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 (MIDI_EVENT, t, 3, NULL, true)
+       , _off_event (MIDI_EVENT, t + l, 3, NULL, true)
 {
        assert(chan < 16);
 
@@ -55,8 +57,6 @@ Note<Time>::Note(const Note<Time>& copy)
        : _on_event(copy._on_event, true)
        , _off_event(copy._off_event, true)
 {
-       set_id (copy.id());
-
        assert(_on_event.buffer());
        assert(_off_event.buffer());
        /*
@@ -90,24 +90,6 @@ Note<Time>::set_id (event_id_t id)
        _off_event.set_id (id);
 }
 
-template<typename Time>
-const Note<Time>&
-Note<Time>::operator=(const Note<Time>& other)
-{
-       _on_event = other._on_event;
-       _off_event = other._off_event;
-
-       assert(time() == other.time());
-       assert(end_time() == other.end_time());
-       assert(length() == other.length());
-       assert(note() == other.note());
-       assert(velocity() == other.velocity());
-       assert(_on_event.channel() == _off_event.channel());
-       assert(channel() == other.channel());
-
-       return *this;
-}
-
 template class Note<Evoral::Beats>;
 
 } // namespace Evoral