, _have_pending_stop_events (false)
, _parameter_changed_since_last_preset (false)
{
+ _pending_stop_events.ensure_buffers (DataType::MIDI, 1, 4096);
}
Plugin::Plugin (const Plugin& other)
, _have_pending_stop_events (false)
, _parameter_changed_since_last_preset (false)
{
-
+ _pending_stop_events.ensure_buffers (DataType::MIDI, 1, 4096);
}
Plugin::~Plugin ()
{
-
}
void
if (bufs.count().n_midi() > 0) {
/* Track notes that we are sending to the plugin */
+
MidiBuffer& b = bufs.get_midi (0);
bool looped;
+
_tracker.track (b.begin(), b.end(), looped);
if (_have_pending_stop_events) {
void
Plugin::realtime_handle_transport_stopped ()
+{
+ resolve_midi ();
+}
+
+void
+Plugin::realtime_locate ()
+{
+ resolve_midi ();
+}
+
+void
+Plugin::monitoring_changed ()
+{
+ resolve_midi ();
+}
+
+void
+Plugin::resolve_midi ()
{
/* Create note-offs for any active notes and put them in _pending_stop_events, to be picked
up on the next call to connect_and_run ().
*/
- _pending_stop_events.ensure_buffers (DataType::MIDI, 1, 4096);
_pending_stop_events.get_midi(0).clear ();
_tracker.resolve_notes (_pending_stop_events.get_midi (0), 0);
_have_pending_stop_events = true;
{
_info = info;
}
+
+