mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 14:54:56 +01:00
Prefer General MIDI Synth as default instrument
This commit is contained in:
parent
f58a47419e
commit
b157034e83
2 changed files with 10 additions and 1 deletions
|
|
@ -29,6 +29,7 @@ using namespace ARDOUR;
|
||||||
|
|
||||||
InstrumentSelector::InstrumentSelector()
|
InstrumentSelector::InstrumentSelector()
|
||||||
: _reasonable_synth_id(0)
|
: _reasonable_synth_id(0)
|
||||||
|
, _gmsynth_id(UINT32_MAX)
|
||||||
{
|
{
|
||||||
refill ();
|
refill ();
|
||||||
|
|
||||||
|
|
@ -51,7 +52,11 @@ InstrumentSelector::refill()
|
||||||
set_model(_instrument_list);
|
set_model(_instrument_list);
|
||||||
pack_start(_instrument_list_columns.name);
|
pack_start(_instrument_list_columns.name);
|
||||||
if (selected.empty ()) {
|
if (selected.empty ()) {
|
||||||
set_active(_reasonable_synth_id);
|
if (_gmsynth_id != UINT32_MAX) {
|
||||||
|
set_active(_gmsynth_id);
|
||||||
|
} else {
|
||||||
|
set_active(_reasonable_synth_id);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
TreeModel::Children rows = _instrument_list->children();
|
TreeModel::Children rows = _instrument_list->children();
|
||||||
TreeModel::Children::iterator i;
|
TreeModel::Children::iterator i;
|
||||||
|
|
@ -147,6 +152,9 @@ InstrumentSelector::build_instrument_list()
|
||||||
if (p->unique_id == "https://community.ardour.org/node/7596") {
|
if (p->unique_id == "https://community.ardour.org/node/7596") {
|
||||||
_reasonable_synth_id = n;
|
_reasonable_synth_id = n;
|
||||||
}
|
}
|
||||||
|
if (p->unique_id == "http://gareus.org/oss/lv2/gmsynth") {
|
||||||
|
_reasonable_synth_id = n;
|
||||||
|
}
|
||||||
prev = p->name;
|
prev = p->name;
|
||||||
n++;
|
n++;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -59,6 +59,7 @@ private:
|
||||||
Glib::RefPtr<Gtk::ListStore> _instrument_list;
|
Glib::RefPtr<Gtk::ListStore> _instrument_list;
|
||||||
InstrumentListColumns _instrument_list_columns;
|
InstrumentListColumns _instrument_list_columns;
|
||||||
uint32_t _reasonable_synth_id;
|
uint32_t _reasonable_synth_id;
|
||||||
|
uint32_t _gmsynth_id;
|
||||||
PBD::ScopedConnection _update_connection;
|
PBD::ScopedConnection _update_connection;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue