diff options
author | Robin Gareus <robin@gareus.org> | 2017-01-30 16:42:11 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-01-30 16:42:11 +0100 |
commit | b157034e832f8f01f2ea46a849fb133a402b3733 (patch) | |
tree | e1560b558f228c15a199d490b113cca95a38ba65 | |
parent | f58a47419ef39c7630eeb5fff0f3aacd1e370f0d (diff) |
Prefer General MIDI Synth as default instrument
-rw-r--r-- | gtk2_ardour/instrument_selector.cc | 10 | ||||
-rw-r--r-- | gtk2_ardour/instrument_selector.h | 1 |
2 files changed, 10 insertions, 1 deletions
diff --git a/gtk2_ardour/instrument_selector.cc b/gtk2_ardour/instrument_selector.cc index f692a902b4..a5edfd8bff 100644 --- a/gtk2_ardour/instrument_selector.cc +++ b/gtk2_ardour/instrument_selector.cc @@ -29,6 +29,7 @@ using namespace ARDOUR; InstrumentSelector::InstrumentSelector() : _reasonable_synth_id(0) + , _gmsynth_id(UINT32_MAX) { refill (); @@ -51,7 +52,11 @@ InstrumentSelector::refill() set_model(_instrument_list); pack_start(_instrument_list_columns.name); if (selected.empty ()) { - set_active(_reasonable_synth_id); + if (_gmsynth_id != UINT32_MAX) { + set_active(_gmsynth_id); + } else { + set_active(_reasonable_synth_id); + } } else { TreeModel::Children rows = _instrument_list->children(); TreeModel::Children::iterator i; @@ -147,6 +152,9 @@ InstrumentSelector::build_instrument_list() if (p->unique_id == "https://community.ardour.org/node/7596") { _reasonable_synth_id = n; } + if (p->unique_id == "http://gareus.org/oss/lv2/gmsynth") { + _reasonable_synth_id = n; + } prev = p->name; n++; } diff --git a/gtk2_ardour/instrument_selector.h b/gtk2_ardour/instrument_selector.h index 7fe6c8cbf2..6df9a86e0a 100644 --- a/gtk2_ardour/instrument_selector.h +++ b/gtk2_ardour/instrument_selector.h @@ -59,6 +59,7 @@ private: Glib::RefPtr<Gtk::ListStore> _instrument_list; InstrumentListColumns _instrument_list_columns; uint32_t _reasonable_synth_id; + uint32_t _gmsynth_id; PBD::ScopedConnection _update_connection; }; |