From e76c4ee06d3a913468dd634a540be2eb0380b0ed Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 1 Sep 2010 23:08:42 +0000 Subject: Default to play mode for MIDI controllers. Fixes #3429. git-svn-id: svn://localhost/ardour2/branches/3.0@7728 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/midi_source.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libs/ardour/midi_source.cc b/libs/ardour/midi_source.cc index 4a0f20cbdb..b54e044201 100644 --- a/libs/ardour/midi_source.cc +++ b/libs/ardour/midi_source.cc @@ -415,7 +415,11 @@ MidiSource::automation_state_of (Evoral::Parameter p) const { AutomationStateMap::const_iterator i = _automation_state.find (p); if (i == _automation_state.end()) { - return Off; + /* default to `play', otherwise if MIDI is recorded / + imported with controllers etc. they are by default + not played back, which is a little surprising. + */ + return Play; } return i->second; @@ -448,7 +452,7 @@ MidiSource::set_automation_state_of (Evoral::Parameter p, AutoState s) return; } - if (s == Off) { + if (s == Play) { /* automation state is being set to the default, so we don't need a note in our map */ _automation_state.erase (p); } else { -- cgit v1.2.3