diff options
author | Robin Gareus <robin@gareus.org> | 2015-08-24 02:42:31 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2015-08-24 02:42:31 +0200 |
commit | cc9c38ce5e79f8bcd558b1b6e694915f47aa3af4 (patch) | |
tree | e032dc27da9c84c00b130d420e7fe14abfd29d33 /libs/ardour/midi_track.cc | |
parent | 6129b3492d3e47f7c027278f795ebb5cbea53cca (diff) |
Do not send non-automated MIDI-CCs on locate.
If a "CC" automation lane was visible at least once, a Control Object
is created and henceforth saved with the session:
<Object id="automation TrackID TYPE" ../>
It is currently not possible to remove this object. (Automation > clear
will only zero all events, but not remove the Control itself.
The bug:
After showing a MIDI-CC lane at least once Events are sent for this CC.
If there is no corresponding value in the .mid, it will be zero after
session reload.
see also 7e2c8ac
Still ToDo: "Show existing automation" shows the lane even if there
are no values nor any automation at all for the given CC.
Diffstat (limited to 'libs/ardour/midi_track.cc')
-rw-r--r-- | libs/ardour/midi_track.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/ardour/midi_track.cc b/libs/ardour/midi_track.cc index e48d516575..6d7b4519c5 100644 --- a/libs/ardour/midi_track.cc +++ b/libs/ardour/midi_track.cc @@ -527,7 +527,9 @@ MidiTrack::non_realtime_locate (framepos_t pos) if ((tcontrol = boost::dynamic_pointer_cast<MidiTrack::MidiControl>(c->second)) && (rcontrol = region->control(tcontrol->parameter()))) { const Evoral::Beats pos_beats = bfc.from(pos - origin); - tcontrol->set_value(rcontrol->list()->eval(pos_beats.to_double())); + if (rcontrol->list()->size() > 0) { + tcontrol->set_value(rcontrol->list()->eval(pos_beats.to_double())); + } } } } |