do not set MIDI CC values on locate if control/parameter is set to "Off"

This commit is contained in:
Paul Davis 2019-06-05 10:02:27 -06:00
parent 2c88055ef4
commit fb2e65fd35

View File

@ -387,10 +387,20 @@ MidiTrack::non_realtime_locate (samplepos_t pos)
/* Update track controllers based on its "automation". */
const samplepos_t origin = region->position() - region->start();
BeatsSamplesConverter bfc(_session.tempo_map(), origin);
for (Controls::const_iterator c = _controls.begin(); c != _controls.end(); ++c) {
boost::shared_ptr<AutomationControl> ac = boost::dynamic_pointer_cast<AutomationControl> (c->second);
if (!ac->automation_playback()) {
continue;
}
boost::shared_ptr<MidiTrack::MidiControl> tcontrol;
boost::shared_ptr<Evoral::Control> rcontrol;
if ((tcontrol = boost::dynamic_pointer_cast<MidiTrack::MidiControl>(c->second)) &&
(rcontrol = region->control(tcontrol->parameter()))) {
const Temporal::Beats pos_beats = bfc.from(pos - origin);
if (rcontrol->list()->size() > 0) {