summaryrefslogtreecommitdiff
path: root/libs/ardour
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2016-11-06 22:04:35 -0500
committerDavid Robillard <d@drobilla.net>2016-12-03 15:18:21 -0500
commit08fffeffec10beb708610fd35eb9e7c35365d446 (patch)
treece9c8c77e6a926b4d8be90052c32945b7718bb4b /libs/ardour
parent875b1367b2c4750ecd861424c57ed4bcc9c642d2 (diff)
Remove Evoral::MIDIEvent
It is slightly questionable whether type specific methods like velocity() belong on Event at all, these may be better off as free functions. However the code currently uses them as methods in many places, and it seems like a step in the right direction, since, for example, we might some day have events that have a velocity but aren't stored as MIDI messages (e.g. if Ardour uses an internal musical model that is more expressive). In any case, the former inheritance and plethora of sloppy casts is definitely not the right thing.
Diffstat (limited to 'libs/ardour')
-rw-r--r--libs/ardour/amp.cc25
-rw-r--r--libs/ardour/ardour/buffer_set.h4
-rw-r--r--libs/ardour/ardour/midi_buffer.h12
-rw-r--r--libs/ardour/async_midi_port.cc8
-rw-r--r--libs/ardour/audio_unit.cc2
-rw-r--r--libs/ardour/buffer_set.cc2
-rw-r--r--libs/ardour/delayline.cc4
-rw-r--r--libs/ardour/luabindings.cc16
-rw-r--r--libs/ardour/luaproc.cc2
-rw-r--r--libs/ardour/lv2_plugin.cc2
-rw-r--r--libs/ardour/meter.cc2
-rw-r--r--libs/ardour/midi_buffer.cc8
-rw-r--r--libs/ardour/midi_channel_filter.cc2
-rw-r--r--libs/ardour/midi_diskstream.cc2
-rw-r--r--libs/ardour/midi_model.cc2
-rw-r--r--libs/ardour/midi_port.cc2
-rw-r--r--libs/ardour/midi_scene_changer.cc2
-rw-r--r--libs/ardour/midi_state_tracker.cc4
-rw-r--r--libs/ardour/midi_track.cc4
-rw-r--r--libs/ardour/smf_source.cc2
20 files changed, 57 insertions, 50 deletions
diff --git a/libs/ardour/amp.cc b/libs/ardour/amp.cc
index d86362aa0d..21c79df684 100644
--- a/libs/ardour/amp.cc
+++ b/libs/ardour/amp.cc
@@ -70,6 +70,13 @@ Amp::configure_io (ChanCount in, ChanCount out)
return Processor::configure_io (in, out);
}
+static void
+scale_midi_velocity(Evoral::Event<MidiBuffer::TimeType>& ev, float factor)
+{
+ factor = std::max(factor, 0.0f);
+ ev.set_velocity(std::min(127L, lrintf(ev.velocity() * factor)));
+}
+
void
Amp::run (BufferSet& bufs, framepos_t /*start_frame*/, framepos_t /*end_frame*/, double /*speed*/, pframes_t nframes, bool)
{
@@ -88,10 +95,10 @@ Amp::run (BufferSet& bufs, framepos_t /*start_frame*/, framepos_t /*end_frame*/,
for (BufferSet::midi_iterator i = bufs.midi_begin(); i != bufs.midi_end(); ++i) {
MidiBuffer& mb (*i);
for (MidiBuffer::iterator m = mb.begin(); m != mb.end(); ++m) {
- Evoral::MIDIEvent<MidiBuffer::TimeType> ev = *m;
+ Evoral::Event<MidiBuffer::TimeType> ev = *m;
if (ev.is_note_on()) {
assert(ev.time() >= 0 && ev.time() < nframes);
- ev.scale_velocity (fabsf (gab[ev.time()]));
+ scale_midi_velocity (ev, fabsf (gab[ev.time()]));
}
}
}
@@ -135,9 +142,9 @@ Amp::run (BufferSet& bufs, framepos_t /*start_frame*/, framepos_t /*end_frame*/,
MidiBuffer& mb (*i);
for (MidiBuffer::iterator m = mb.begin(); m != mb.end(); ++m) {
- Evoral::MIDIEvent<MidiBuffer::TimeType> ev = *m;
+ Evoral::Event<MidiBuffer::TimeType> ev = *m;
if (ev.is_note_on()) {
- ev.scale_velocity (fabsf (_current_gain));
+ scale_midi_velocity (ev, fabsf (_current_gain));
}
}
}
@@ -186,11 +193,11 @@ Amp::apply_gain (BufferSet& bufs, framecnt_t sample_rate, framecnt_t nframes, ga
MidiBuffer& mb (*i);
for (MidiBuffer::iterator m = mb.begin(); m != mb.end(); ++m) {
- Evoral::MIDIEvent<MidiBuffer::TimeType> ev = *m;
+ Evoral::Event<MidiBuffer::TimeType> ev = *m;
if (ev.is_note_on()) {
const gain_t scale = delta * (ev.time()/(double) nframes);
- ev.scale_velocity (fabsf (initial+scale));
+ scale_midi_velocity (ev, fabsf (initial + scale));
}
}
}
@@ -304,7 +311,7 @@ Amp::apply_simple_gain (BufferSet& bufs, framecnt_t nframes, gain_t target, bool
MidiBuffer& mb (*i);
for (MidiBuffer::iterator m = mb.begin(); m != mb.end(); ++m) {
- Evoral::MIDIEvent<MidiBuffer::TimeType> ev = *m;
+ Evoral::Event<MidiBuffer::TimeType> ev = *m;
if (ev.is_note_on()) {
ev.set_velocity (0);
}
@@ -324,9 +331,9 @@ Amp::apply_simple_gain (BufferSet& bufs, framecnt_t nframes, gain_t target, bool
MidiBuffer& mb (*i);
for (MidiBuffer::iterator m = mb.begin(); m != mb.end(); ++m) {
- Evoral::MIDIEvent<MidiBuffer::TimeType> ev = *m;
+ Evoral::Event<MidiBuffer::TimeType> ev = *m;
if (ev.is_note_on()) {
- ev.scale_velocity (fabsf (target));
+ scale_midi_velocity(ev, fabsf (target));
}
}
}
diff --git a/libs/ardour/ardour/buffer_set.h b/libs/ardour/ardour/buffer_set.h
index f1b632e6e2..a4fa53e2fc 100644
--- a/libs/ardour/ardour/buffer_set.h
+++ b/libs/ardour/ardour/buffer_set.h
@@ -31,7 +31,7 @@
#include "ardour/types.h"
#if defined WINDOWS_VST_SUPPORT || defined LXVST_SUPPORT || defined MACVST_SUPPORT
-#include "evoral/MIDIEvent.hpp"
+#include "evoral/Event.hpp"
struct _VstEvents;
typedef struct _VstEvents VstEvents;
struct _VstMidiEvent;
@@ -196,7 +196,7 @@ private:
~VSTBuffer ();
void clear ();
- void push_back (Evoral::MIDIEvent<framepos_t> const &);
+ void push_back (Evoral::Event<framepos_t> const &);
VstEvents* events () const {
return _events;
}
diff --git a/libs/ardour/ardour/midi_buffer.h b/libs/ardour/ardour/midi_buffer.h
index e4a1a3f02c..1b0bf2a151 100644
--- a/libs/ardour/ardour/midi_buffer.h
+++ b/libs/ardour/ardour/midi_buffer.h
@@ -47,7 +47,7 @@ public:
void copy(const MidiBuffer& copy);
void copy(MidiBuffer const * const);
- bool push_back(const Evoral::MIDIEvent<TimeType>& event);
+ bool push_back(const Evoral::Event<TimeType>& event);
bool push_back(TimeType time, size_t size, const uint8_t* data);
uint8_t* reserve(TimeType time, size_t size);
@@ -56,7 +56,7 @@ public:
size_t size() const { return _size; }
bool empty() const { return _size == 0; }
- bool insert_event(const Evoral::MIDIEvent<TimeType>& event);
+ bool insert_event(const Evoral::Event<TimeType>& event);
bool merge_in_place(const MidiBuffer &other);
/** EventSink interface for non-RT use (export, bounce). */
@@ -122,8 +122,8 @@ public:
size_t offset;
};
- typedef iterator_base< MidiBuffer, Evoral::MIDIEvent<TimeType> > iterator;
- typedef iterator_base< const MidiBuffer, const Evoral::MIDIEvent<TimeType> > const_iterator;
+ typedef iterator_base< MidiBuffer, Evoral::Event<TimeType> > iterator;
+ typedef iterator_base< const MidiBuffer, const Evoral::Event<TimeType> > const_iterator;
iterator begin() { return iterator(*this, 0); }
iterator end() { return iterator(*this, _size); }
@@ -176,8 +176,8 @@ public:
static bool second_simultaneous_midi_byte_is_first (uint8_t, uint8_t);
private:
- friend class iterator_base< MidiBuffer, Evoral::MIDIEvent<TimeType> >;
- friend class iterator_base< const MidiBuffer, const Evoral::MIDIEvent<TimeType> >;
+ friend class iterator_base< MidiBuffer, Evoral::Event<TimeType> >;
+ friend class iterator_base< const MidiBuffer, const Evoral::Event<TimeType> >;
uint8_t* _data; ///< timestamp, event, timestamp, event, ...
pframes_t _size;
diff --git a/libs/ardour/async_midi_port.cc b/libs/ardour/async_midi_port.cc
index 388aaf1935..ce8ab40a01 100644
--- a/libs/ardour/async_midi_port.cc
+++ b/libs/ardour/async_midi_port.cc
@@ -241,14 +241,14 @@ AsyncMIDIPort::write (const MIDI::byte * msg, size_t msglen, MIDI::timestamp_t t
necessary.
*/
if (!vec.buf[0]->owns_buffer()) {
- vec.buf[0]->set_buffer (0, 0, true);
- }
+ vec.buf[0]->set_buffer (0, 0, true);
+ }
vec.buf[0]->set (msg, msglen, timestamp);
} else {
/* see comment in previous branch of if() statement */
if (!vec.buf[1]->owns_buffer()) {
- vec.buf[1]->set_buffer (0, 0, true);
- }
+ vec.buf[1]->set_buffer (0, 0, true);
+ }
vec.buf[1]->set (msg, msglen, timestamp);
}
diff --git a/libs/ardour/audio_unit.cc b/libs/ardour/audio_unit.cc
index 95a66800c8..4bc8cdaf3b 100644
--- a/libs/ardour/audio_unit.cc
+++ b/libs/ardour/audio_unit.cc
@@ -1686,7 +1686,7 @@ AUPlugin::connect_and_run (BufferSet& bufs,
/* one MIDI port/buffer only */
MidiBuffer& m = bufs.get_midi (i);
for (MidiBuffer::iterator i = m.begin(); i != m.end(); ++i) {
- Evoral::MIDIEvent<framepos_t> ev (*i);
+ Evoral::Event<framepos_t> ev (*i);
if (ev.is_channel_event()) {
const uint8_t* b = ev.buffer();
DEBUG_TRACE (DEBUG::AudioUnits, string_compose ("%1: MIDI event %2\n", name(), ev));
diff --git a/libs/ardour/buffer_set.cc b/libs/ardour/buffer_set.cc
index 982725f491..5b09ace1d6 100644
--- a/libs/ardour/buffer_set.cc
+++ b/libs/ardour/buffer_set.cc
@@ -401,7 +401,7 @@ BufferSet::VSTBuffer::clear ()
}
void
-BufferSet::VSTBuffer::push_back (Evoral::MIDIEvent<framepos_t> const & ev)
+BufferSet::VSTBuffer::push_back (Evoral::Event<framepos_t> const & ev)
{
if (ev.size() > 3) {
/* XXX: this will silently drop MIDI messages longer than 3 bytes, so
diff --git a/libs/ardour/delayline.cc b/libs/ardour/delayline.cc
index eda85f0dfd..77b59b540c 100644
--- a/libs/ardour/delayline.cc
+++ b/libs/ardour/delayline.cc
@@ -234,7 +234,7 @@ DelayLine::run (BufferSet& bufs, framepos_t /* start_frame */, framepos_t /* end
// move events from dly-buffer into current-buffer until nsamples
// and remove them from the dly-buffer
for (MidiBuffer::iterator m = dly->begin(); m != dly->end();) {
- const Evoral::MIDIEvent<MidiBuffer::TimeType> ev (*m, false);
+ const Evoral::Event<MidiBuffer::TimeType> ev (*m, false);
if (ev.time() >= nsamples) {
break;
}
@@ -250,7 +250,7 @@ DelayLine::run (BufferSet& bufs, framepos_t /* start_frame */, framepos_t /* end
// move events after nsamples from current-buffer into dly-buffer
// and trim current-buffer after nsamples
for (MidiBuffer::iterator m = mb.begin(); m != mb.end();) {
- const Evoral::MIDIEvent<MidiBuffer::TimeType> ev (*m, false);
+ const Evoral::Event<MidiBuffer::TimeType> ev (*m, false);
if (ev.time() < nsamples) {
++m;
continue;
diff --git a/libs/ardour/luabindings.cc b/libs/ardour/luabindings.cc
index 4c0b653af5..f7fdcf4085 100644
--- a/libs/ardour/luabindings.cc
+++ b/libs/ardour/luabindings.cc
@@ -447,7 +447,7 @@ LuaBindings::common (lua_State* L)
.addFunction ("size", &Evoral::Event<framepos_t>::size)
.addFunction ("set_buffer", &Evoral::Event<framepos_t>::set_buffer)
.addFunction ("buffer", (uint8_t*(Evoral::Event<framepos_t>::*)())&Evoral::Event<framepos_t>::buffer)
- .addFunction ("time", (framepos_t (Evoral::Event<framepos_t>::*)())&Evoral::MIDIEvent<framepos_t>::time)
+ .addFunction ("time", (framepos_t (Evoral::Event<framepos_t>::*)())&Evoral::Event<framepos_t>::time)
.endClass ()
.beginClass <Evoral::Beats> ("Beats")
@@ -1908,10 +1908,10 @@ LuaBindings::dsp (lua_State* L)
.addFunction ("empty", &MidiBuffer::empty)
.addFunction ("resize", &MidiBuffer::resize)
.addFunction ("copy", (void (MidiBuffer::*)(MidiBuffer const * const))&MidiBuffer::copy)
- .addFunction ("push_event", (bool (MidiBuffer::*)(const Evoral::MIDIEvent<framepos_t>&))&MidiBuffer::push_back)
+ .addFunction ("push_event", (bool (MidiBuffer::*)(const Evoral::Event<framepos_t>&))&MidiBuffer::push_back)
.addFunction ("push_back", (bool (MidiBuffer::*)(framepos_t, size_t, const uint8_t*))&MidiBuffer::push_back)
// TODO iterators..
- .addExtCFunction ("table", &luabridge::CFunc::listToTable<const Evoral::MIDIEvent<framepos_t>, MidiBuffer>)
+ .addExtCFunction ("table", &luabridge::CFunc::listToTable<const Evoral::Event<framepos_t>, MidiBuffer>)
.endClass()
.beginClass <BufferSet> ("BufferSet")
@@ -1924,12 +1924,12 @@ LuaBindings::dsp (lua_State* L)
luabridge::getGlobalNamespace (L)
.beginNamespace ("Evoral")
- .deriveClass <Evoral::MIDIEvent<framepos_t>, Evoral::Event<framepos_t> > ("MidiEvent")
+ .deriveClass <Evoral::Event<framepos_t>, Evoral::Event<framepos_t> > ("MidiEvent")
// add Ctor?
- .addFunction ("type", &Evoral::MIDIEvent<framepos_t>::type)
- .addFunction ("channel", &Evoral::MIDIEvent<framepos_t>::channel)
- .addFunction ("set_type", &Evoral::MIDIEvent<framepos_t>::set_type)
- .addFunction ("set_channel", &Evoral::MIDIEvent<framepos_t>::set_channel)
+ .addFunction ("type", &Evoral::Event<framepos_t>::type)
+ .addFunction ("channel", &Evoral::Event<framepos_t>::channel)
+ .addFunction ("set_type", &Evoral::Event<framepos_t>::set_type)
+ .addFunction ("set_channel", &Evoral::Event<framepos_t>::set_channel)
.endClass ()
.endNamespace ();
diff --git a/libs/ardour/luaproc.cc b/libs/ardour/luaproc.cc
index 0a17b70f4f..436f60bfc4 100644
--- a/libs/ardour/luaproc.cc
+++ b/libs/ardour/luaproc.cc
@@ -667,7 +667,7 @@ LuaProc::connect_and_run (BufferSet& bufs,
if (valid) {
for (MidiBuffer::iterator m = bufs.get_midi(idx).begin();
m != bufs.get_midi(idx).end(); ++m, ++e) {
- const Evoral::MIDIEvent<framepos_t> ev(*m, false);
+ const Evoral::Event<framepos_t> ev(*m, false);
luabridge::LuaRef lua_midi_data (luabridge::newTable (L));
const uint8_t* data = ev.buffer();
for (uint32_t i = 0; i < ev.size(); ++i) {
diff --git a/libs/ardour/lv2_plugin.cc b/libs/ardour/lv2_plugin.cc
index a163b879c7..5a8cfb42b1 100644
--- a/libs/ardour/lv2_plugin.cc
+++ b/libs/ardour/lv2_plugin.cc
@@ -2601,7 +2601,7 @@ LV2Plugin::connect_and_run(BufferSet& bufs,
MetricSection* metric = (metric_i != tmap.metrics_end())
? *metric_i : NULL;
if (m != m_end && (!metric || metric->frame() > (*m).time())) {
- const Evoral::MIDIEvent<framepos_t> ev(*m, false);
+ const Evoral::Event<framepos_t> ev(*m, false);
if (ev.time() < nframes) {
LV2_Evbuf_Iterator eend = lv2_evbuf_end(_ev_buffers[port_index]);
lv2_evbuf_write(&eend, ev.time(), 0, type, ev.size(), ev.buffer());
diff --git a/libs/ardour/meter.cc b/libs/ardour/meter.cc
index 430306c91a..289ce579db 100644
--- a/libs/ardour/meter.cc
+++ b/libs/ardour/meter.cc
@@ -106,7 +106,7 @@ PeakMeter::run (BufferSet& bufs, framepos_t /*start_frame*/, framepos_t /*end_fr
const MidiBuffer& buf (bufs.get_midi(i));
for (MidiBuffer::const_iterator e = buf.begin(); e != buf.end(); ++e) {
- const Evoral::MIDIEvent<framepos_t> ev(*e, false);
+ const Evoral::Event<framepos_t> ev(*e, false);
if (ev.is_note_on()) {
const float this_vel = ev.buffer()[2] / 127.0;
if (this_vel > val) {
diff --git a/libs/ardour/midi_buffer.cc b/libs/ardour/midi_buffer.cc
index 516d5a98c7..652be5290c 100644
--- a/libs/ardour/midi_buffer.cc
+++ b/libs/ardour/midi_buffer.cc
@@ -110,7 +110,7 @@ MidiBuffer::read_from (const Buffer& src, framecnt_t nframes, frameoffset_t dst_
}
for (MidiBuffer::const_iterator i = msrc.begin(); i != msrc.end(); ++i) {
- const Evoral::MIDIEvent<TimeType> ev(*i, false);
+ const Evoral::Event<TimeType> ev(*i, false);
if (dst_offset >= 0) {
/* Positive offset: shifting events from internal
@@ -168,7 +168,7 @@ MidiBuffer::merge_from (const Buffer& src, framecnt_t /*nframes*/, frameoffset_t
* @return false if operation failed (not enough room)
*/
bool
-MidiBuffer::push_back(const Evoral::MIDIEvent<TimeType>& ev)
+MidiBuffer::push_back(const Evoral::Event<TimeType>& ev)
{
return push_back (ev.time(), ev.size(), ev.buffer());
}
@@ -220,7 +220,7 @@ MidiBuffer::push_back(TimeType time, size_t size, const uint8_t* data)
}
bool
-MidiBuffer::insert_event(const Evoral::MIDIEvent<TimeType>& ev)
+MidiBuffer::insert_event(const Evoral::Event<TimeType>& ev)
{
if (size() == 0) {
return push_back(ev);
@@ -273,7 +273,7 @@ MidiBuffer::insert_event(const Evoral::MIDIEvent<TimeType>& ev)
uint32_t
MidiBuffer::write(TimeType time, Evoral::EventType type, uint32_t size, const uint8_t* buf)
{
- insert_event(Evoral::MIDIEvent<TimeType>(type, time, size, const_cast<uint8_t*>(buf)));
+ insert_event(Evoral::Event<TimeType>(type, time, size, const_cast<uint8_t*>(buf)));
return size;
}
diff --git a/libs/ardour/midi_channel_filter.cc b/libs/ardour/midi_channel_filter.cc
index 40658802e5..f81c57fef7 100644
--- a/libs/ardour/midi_channel_filter.cc
+++ b/libs/ardour/midi_channel_filter.cc
@@ -42,7 +42,7 @@ MidiChannelFilter::filter(BufferSet& bufs)
MidiBuffer& buf = bufs.get_midi(0);
for (MidiBuffer::iterator e = buf.begin(); e != buf.end(); ) {
- Evoral::MIDIEvent<framepos_t> ev(*e, false);
+ Evoral::Event<framepos_t> ev(*e, false);
if (ev.is_channel_event()) {
switch (mode) {
diff --git a/libs/ardour/midi_diskstream.cc b/libs/ardour/midi_diskstream.cc
index 359dd573cf..22a3df1145 100644
--- a/libs/ardour/midi_diskstream.cc
+++ b/libs/ardour/midi_diskstream.cc
@@ -409,7 +409,7 @@ MidiDiskstream::process (BufferSet& bufs, framepos_t transport_frame, pframes_t
MidiChannelFilter* filter = mt ? &mt->capture_filter() : NULL;
for (MidiBuffer::iterator i = buf.begin(); i != buf.end(); ++i) {
- Evoral::MIDIEvent<MidiBuffer::TimeType> ev(*i, false);
+ Evoral::Event<MidiBuffer::TimeType> ev(*i, false);
if (ev.time() + rec_offset > rec_nframes) {
break;
}
diff --git a/libs/ardour/midi_model.cc b/libs/ardour/midi_model.cc
index 80bc38cb0b..e73ba8c689 100644
--- a/libs/ardour/midi_model.cc
+++ b/libs/ardour/midi_model.cc
@@ -1497,7 +1497,7 @@ MidiModel::write_section_to (boost::shared_ptr<MidiSource> source,
for (Evoral::Sequence<TimeType>::const_iterator i = begin(TimeType(), true); i != end(); ++i) {
if (i->time() >= begin_time && i->time() < end_time) {
- Evoral::MIDIEvent<TimeType> mev (*i, true); /* copy the event */
+ Evoral::Event<TimeType> mev (*i, true); /* copy the event */
if (offset_events) {
mev.set_time(mev.time() - begin_time);
diff --git a/libs/ardour/midi_port.cc b/libs/ardour/midi_port.cc
index f3f5378f5b..05d9da5971 100644
--- a/libs/ardour/midi_port.cc
+++ b/libs/ardour/midi_port.cc
@@ -230,7 +230,7 @@ MidiPort::flush_buffers (pframes_t nframes)
for (MidiBuffer::iterator i = _buffer->begin(); i != _buffer->end(); ++i) {
- const Evoral::MIDIEvent<MidiBuffer::TimeType> ev (*i, false);
+ const Evoral::Event<MidiBuffer::TimeType> ev (*i, false);
if (sends_output() && _trace_on) {
diff --git a/libs/ardour/midi_scene_changer.cc b/libs/ardour/midi_scene_changer.cc
index 07eb549e66..0c2880dcaf 100644
--- a/libs/ardour/midi_scene_changer.cc
+++ b/libs/ardour/midi_scene_changer.cc
@@ -17,7 +17,7 @@
*/
-#include "evoral/MIDIEvent.hpp"
+#include "evoral/Event.hpp"
#include "midi++/channel.h"
#include "midi++/parser.h"
#include "midi++/port.h"
diff --git a/libs/ardour/midi_state_tracker.cc b/libs/ardour/midi_state_tracker.cc
index 3e81a064c8..17ecd10e94 100644
--- a/libs/ardour/midi_state_tracker.cc
+++ b/libs/ardour/midi_state_tracker.cc
@@ -122,7 +122,7 @@ MidiStateTracker::resolve_notes (MidiBuffer &dst, framepos_t time)
for (int note = 0; note < 128; ++note) {
while (_active_notes[note + 128 * channel]) {
uint8_t buffer[3] = { ((uint8_t) (MIDI_CMD_NOTE_OFF | channel)), uint8_t (note), 0 };
- Evoral::MIDIEvent<MidiBuffer::TimeType> noteoff
+ Evoral::Event<MidiBuffer::TimeType> noteoff
(MIDI_CMD_NOTE_OFF, time, 3, buffer, false);
/* note that we do not care about failure from
push_back() ... should we warn someone ?
@@ -181,7 +181,7 @@ MidiStateTracker::resolve_notes (MidiSource& src, const MidiSource::Lock& lock,
for (int channel = 0; channel < 16; ++channel) {
for (int note = 0; note < 128; ++note) {
while (_active_notes[note + 128 * channel]) {
- Evoral::MIDIEvent<Evoral::Beats> ev ((MIDI_CMD_NOTE_OFF|channel), time, 3, 0, true);
+ Evoral::Event<Evoral::Beats> ev ((MIDI_CMD_NOTE_OFF|channel), time, 3, 0, true);
ev.set_type (MIDI_CMD_NOTE_OFF);
ev.set_channel (channel);
ev.set_note (note);
diff --git a/libs/ardour/midi_track.cc b/libs/ardour/midi_track.cc
index f1344e7697..69291f1cce 100644
--- a/libs/ardour/midi_track.cc
+++ b/libs/ardour/midi_track.cc
@@ -339,7 +339,7 @@ MidiTrack::update_controls(const BufferSet& bufs)
{
const MidiBuffer& buf = bufs.get_midi(0);
for (MidiBuffer::const_iterator e = buf.begin(); e != buf.end(); ++e) {
- const Evoral::MIDIEvent<framepos_t>& ev = *e;
+ const Evoral::Event<framepos_t>& ev = *e;
const Evoral::Parameter param = midi_parameter(ev.buffer(), ev.size());
const boost::shared_ptr<Evoral::Control> control = this->control(param);
if (control) {
@@ -549,7 +549,7 @@ MidiTrack::push_midi_input_to_step_edit_ringbuffer (framecnt_t nframes)
for (MidiBuffer::const_iterator e = mb->begin(); e != mb->end(); ++e) {
- const Evoral::MIDIEvent<framepos_t> ev(*e, false);
+ const Evoral::Event<framepos_t> ev(*e, false);
/* note on, since for step edit, note length is determined
elsewhere
diff --git a/libs/ardour/smf_source.cc b/libs/ardour/smf_source.cc
index 0ddc14f78d..bcd3e43749 100644
--- a/libs/ardour/smf_source.cc
+++ b/libs/ardour/smf_source.cc
@@ -334,7 +334,7 @@ SMFSource::write_unlocked (const Lock& lock,
_model->start_write();
}
- Evoral::MIDIEvent<framepos_t> ev;
+ Evoral::Event<framepos_t> ev;
while (true) {
/* Get the event time, in frames since session start but ignoring looping. */
bool ret;