diff --git a/libs/ardour/disk_writer.cc b/libs/ardour/disk_writer.cc index 2f12d14e74..75a87b8f63 100644 --- a/libs/ardour/disk_writer.cc +++ b/libs/ardour/disk_writer.cc @@ -897,9 +897,6 @@ DiskWriter::set_note_mode (NoteMode m) if (mp) { mp->set_note_mode (m); } - - if (_midi_write_source && _midi_write_source->model()) - _midi_write_source->model()->set_note_mode(m); } void diff --git a/libs/ardour/midi_model.cc b/libs/ardour/midi_model.cc index bf43d58366..68fcba216e 100644 --- a/libs/ardour/midi_model.cc +++ b/libs/ardour/midi_model.cc @@ -1229,17 +1229,15 @@ MidiModel::write_to (boost::shared_ptr source, { ReadLock lock(read_lock()); - const bool old_percussive = percussive(); - set_percussive(false); source->drop_model(source_lock); - source->mark_streaming_midi_write_started (source_lock, note_mode()); + /* as of March 2022 or long before , the note mode argument does nothing */ + source->mark_streaming_midi_write_started (source_lock, Sustained); for (Evoral::Sequence::const_iterator i = begin(TimeType(), true); i != end(); ++i) { source->append_event_beats(source_lock, *i); } - set_percussive(old_percussive); source->mark_streaming_write_completed(source_lock); set_edited(false); @@ -1257,9 +1255,6 @@ MidiModel::sync_to_source (const Glib::Threads::Mutex::Lock& source_lock) { ReadLock lock(read_lock()); - const bool old_percussive = percussive(); - set_percussive(false); - boost::shared_ptr ms = _midi_source.lock (); if (!ms) { error << "MIDI model has no source to sync to" << endmsg; @@ -1270,13 +1265,13 @@ MidiModel::sync_to_source (const Glib::Threads::Mutex::Lock& source_lock) on the next roll if time progresses linearly. */ ms->invalidate(source_lock); - ms->mark_streaming_midi_write_started (source_lock, note_mode()); + /* as of March 2022 or long before , the note mode argument does nothing */ + _midi_source.mark_streaming_midi_write_started (source_lock, Sustained); for (Evoral::Sequence::const_iterator i = begin(TimeType(), true); i != end(); ++i) { ms->append_event_beats(source_lock, *i); } - set_percussive (old_percussive); ms->mark_streaming_write_completed (source_lock); set_edited (false); @@ -1301,11 +1296,9 @@ MidiModel::write_section_to (boost::shared_ptr source, ReadLock lock(read_lock()); MidiNoteTracker mst; - const bool old_percussive = percussive(); - set_percussive(false); - source->drop_model(source_lock); - source->mark_streaming_midi_write_started (source_lock, note_mode()); + /* as of March 2022 or long before , the note mode argument does nothing */ + source->mark_streaming_midi_write_started (source_lock, Sustained); for (Evoral::Sequence::const_iterator i = begin(TimeType(), true); i != end(); ++i) { if (i->time() >= begin_time && i->time() < end_time) { @@ -1343,7 +1336,6 @@ MidiModel::write_section_to (boost::shared_ptr source, } mst.resolve_notes (*source, source_lock, end_time); - set_percussive(old_percussive); source->mark_streaming_write_completed(source_lock); set_edited(false); diff --git a/libs/ardour/midi_region.cc b/libs/ardour/midi_region.cc index ed5c976e31..4495d55e39 100644 --- a/libs/ardour/midi_region.cc +++ b/libs/ardour/midi_region.cc @@ -242,7 +242,6 @@ MidiRegion::_read_at (const SourceList& /*srcs*/, Glib::Threads::Mutex::Lock lm(src->mutex()); - src->set_note_mode(lm, mode); #if 0 cerr << "MR " << name () << " read @ " << pos << " + " << to_read @@ -306,7 +305,6 @@ MidiRegion::render_range (Evoral::EventSink& dst, Glib::Threads::Mutex::Lock lm(src->mutex()); - src->set_note_mode(lm, mode); #if 0 cerr << "MR " << name () << " render " diff --git a/libs/ardour/midi_source.cc b/libs/ardour/midi_source.cc index 3fc9f395e2..6d83e41f2d 100644 --- a/libs/ardour/midi_source.cc +++ b/libs/ardour/midi_source.cc @@ -314,7 +314,7 @@ void MidiSource::mark_streaming_midi_write_started (const Lock& lock, NoteMode mode) { if (_model) { - _model->set_note_mode (mode); + /* XXX do something with note mode? */ _model->start_write (); } @@ -350,8 +350,8 @@ MidiSource::mark_write_starting_now (timepos_t const & position, samplecnt_t cap void MidiSource::mark_streaming_write_started (const Lock& lock) { - NoteMode note_mode = _model ? _model->note_mode() : Sustained; - mark_streaming_midi_write_started (lock, note_mode); + /* as of March 2022 or long before , the note mode argument does nothing */ + mark_streaming_midi_write_started (lock, Sustained); } void @@ -466,14 +466,6 @@ MidiSource::session_saved() } } -void -MidiSource::set_note_mode(const Lock& lock, NoteMode mode) -{ - if (_model) { - _model->set_note_mode(mode); - } -} - void MidiSource::drop_model (const Lock& lock) { diff --git a/libs/evoral/Sequence.cc b/libs/evoral/Sequence.cc index a7e27bd0fa..246cac6408 100644 --- a/libs/evoral/Sequence.cc +++ b/libs/evoral/Sequence.cc @@ -480,7 +480,6 @@ Sequence