2010-12-28 13:43:22 -05:00
|
|
|
/*
|
2019-08-02 17:26:43 -04:00
|
|
|
* Copyright (C) 2010-2012 Carl Hetherington <carl@carlh.net>
|
|
|
|
* Copyright (C) 2011-2015 David Robillard <d@drobilla.net>
|
|
|
|
* Copyright (C) 2011-2017 Paul Davis <paul@linuxaudiosystems.com>
|
|
|
|
* Copyright (C) 2015-2019 Robin Gareus <robin@gareus.org>
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
*/
|
2010-12-28 13:43:22 -05:00
|
|
|
|
|
|
|
#include <gtkmm/stock.h>
|
|
|
|
#include <gtkmm/table.h>
|
2012-06-11 18:59:35 -04:00
|
|
|
|
2012-06-02 09:02:01 -04:00
|
|
|
#include <boost/algorithm/string.hpp>
|
2012-06-11 18:59:35 -04:00
|
|
|
|
2012-06-04 21:03:36 -04:00
|
|
|
#include "gtkmm2ext/utils.h"
|
2012-06-11 18:59:35 -04:00
|
|
|
|
2013-01-20 03:56:00 -05:00
|
|
|
#include "midi++/midnam_patch.h"
|
|
|
|
|
2012-06-11 18:59:35 -04:00
|
|
|
#include "ardour/instrument_info.h"
|
2020-10-02 23:26:17 -04:00
|
|
|
#include "ardour/region.h"
|
2012-06-11 18:59:35 -04:00
|
|
|
|
2010-12-28 13:43:22 -05:00
|
|
|
#include "patch_change_dialog.h"
|
2012-06-12 00:05:10 -04:00
|
|
|
#include "gui_thread.h"
|
2012-06-11 18:59:35 -04:00
|
|
|
|
2016-07-14 14:44:52 -04:00
|
|
|
#include "pbd/i18n.h"
|
2010-12-28 13:43:22 -05:00
|
|
|
|
2012-06-02 09:02:01 -04:00
|
|
|
using namespace std;
|
2010-12-28 13:43:22 -05:00
|
|
|
using namespace Gtk;
|
2012-06-04 21:03:36 -04:00
|
|
|
using namespace Gtkmm2ext;
|
2010-12-28 13:43:22 -05:00
|
|
|
|
2011-07-28 09:27:04 -04:00
|
|
|
/** @param tc If non-0, a time converter for this patch change. If 0, time control will be desensitized */
|
2010-12-28 13:43:22 -05:00
|
|
|
PatchChangeDialog::PatchChangeDialog (
|
2019-04-08 15:37:02 -04:00
|
|
|
ARDOUR::Session* session,
|
|
|
|
Evoral::PatchChange<Temporal::Beats> const& patch,
|
|
|
|
ARDOUR::InstrumentInfo& info,
|
|
|
|
const Gtk::BuiltinStockID& ok,
|
|
|
|
bool allow_delete,
|
2020-10-02 23:26:17 -04:00
|
|
|
bool modal,
|
2023-02-16 18:33:28 -05:00
|
|
|
std::shared_ptr<ARDOUR::Region> region)
|
2017-08-24 17:41:21 -04:00
|
|
|
: ArdourDialog (_("Patch Change"), modal)
|
2020-10-02 23:26:17 -04:00
|
|
|
, _region (region)
|
2012-06-11 18:59:35 -04:00
|
|
|
, _info (info)
|
2011-11-17 17:49:13 -05:00
|
|
|
, _time (X_("patchchangetime"), true, "", true, false)
|
2010-12-28 13:43:22 -05:00
|
|
|
, _channel (*manage (new Adjustment (1, 1, 16, 1, 4)))
|
|
|
|
, _program (*manage (new Adjustment (1, 1, 128, 1, 16)))
|
2017-02-14 17:46:22 -05:00
|
|
|
, _bank_msb (*manage (new Adjustment (0, 0, 127, 1, 16)))
|
|
|
|
, _bank_lsb (*manage (new Adjustment (0, 0, 127, 1, 16)))
|
2012-06-02 09:02:01 -04:00
|
|
|
, _ignore_signals (false)
|
2017-08-24 17:41:21 -04:00
|
|
|
, _keep_open (!modal)
|
2010-12-28 13:43:22 -05:00
|
|
|
{
|
|
|
|
Table* t = manage (new Table (4, 2));
|
2011-07-28 09:27:04 -04:00
|
|
|
Label* l;
|
2010-12-28 13:43:22 -05:00
|
|
|
t->set_spacings (6);
|
|
|
|
int r = 0;
|
|
|
|
|
2020-10-02 23:26:17 -04:00
|
|
|
if (_region) {
|
2015-10-05 10:17:49 -04:00
|
|
|
|
2012-06-04 21:03:36 -04:00
|
|
|
l = manage (left_aligned_label (_("Time")));
|
2010-12-28 13:43:22 -05:00
|
|
|
t->attach (*l, 0, 1, r, r + 1);
|
|
|
|
t->attach (_time, 1, 2, r, r + 1);
|
|
|
|
++r;
|
2011-06-01 13:00:29 -04:00
|
|
|
|
2010-12-28 13:43:22 -05:00
|
|
|
_time.set_session (session);
|
|
|
|
_time.set_mode (AudioClock::BBT);
|
2020-10-02 23:26:17 -04:00
|
|
|
_time.set (_region->source_beats_to_absolute_time (patch.time ()), true);
|
2010-12-28 13:43:22 -05:00
|
|
|
}
|
2011-06-01 13:00:29 -04:00
|
|
|
|
2012-06-04 21:03:36 -04:00
|
|
|
l = manage (left_aligned_label (_("Patch Bank")));
|
2012-06-02 09:02:01 -04:00
|
|
|
t->attach (*l, 0, 1, r, r + 1);
|
|
|
|
t->attach (_bank_combo, 1, 2, r, r + 1);
|
|
|
|
++r;
|
|
|
|
|
|
|
|
_bank_combo.signal_changed().connect (sigc::mem_fun (*this, &PatchChangeDialog::bank_combo_changed));
|
|
|
|
|
2012-06-04 21:03:36 -04:00
|
|
|
l = manage (left_aligned_label (_("Patch")));
|
2012-06-02 09:02:01 -04:00
|
|
|
t->attach (*l, 0, 1, r, r + 1);
|
|
|
|
t->attach (_patch_combo, 1, 2, r, r + 1);
|
|
|
|
++r;
|
2015-10-05 10:17:49 -04:00
|
|
|
|
2012-06-02 09:02:01 -04:00
|
|
|
_patch_combo.signal_changed().connect (sigc::mem_fun (*this, &PatchChangeDialog::patch_combo_changed));
|
|
|
|
|
2012-06-04 21:03:36 -04:00
|
|
|
l = manage (left_aligned_label (_("Channel")));
|
2011-07-28 09:27:04 -04:00
|
|
|
t->attach (*l, 0, 1, r, r + 1);
|
|
|
|
t->attach (_channel, 1, 2, r, r + 1);
|
|
|
|
++r;
|
2012-06-02 09:02:01 -04:00
|
|
|
|
2011-07-28 09:27:04 -04:00
|
|
|
_channel.set_value (patch.channel() + 1);
|
2012-06-02 09:02:01 -04:00
|
|
|
_channel.signal_changed().connect (sigc::mem_fun (*this, &PatchChangeDialog::channel_changed));
|
2011-07-28 09:27:04 -04:00
|
|
|
|
2012-06-04 21:03:36 -04:00
|
|
|
l = manage (left_aligned_label (_("Program")));
|
2010-12-28 13:43:22 -05:00
|
|
|
t->attach (*l, 0, 1, r, r + 1);
|
|
|
|
t->attach (_program, 1, 2, r, r + 1);
|
|
|
|
++r;
|
2011-06-01 13:00:29 -04:00
|
|
|
|
2010-12-28 13:43:22 -05:00
|
|
|
_program.set_value (patch.program () + 1);
|
2012-06-02 09:02:01 -04:00
|
|
|
_program.signal_changed().connect (sigc::mem_fun (*this, &PatchChangeDialog::program_changed));
|
2010-12-28 13:43:22 -05:00
|
|
|
|
2017-02-14 17:46:22 -05:00
|
|
|
l = manage (left_aligned_label (_("Bank MSB")));
|
2010-12-28 13:43:22 -05:00
|
|
|
t->attach (*l, 0, 1, r, r + 1);
|
2017-02-14 17:46:22 -05:00
|
|
|
t->attach (_bank_msb, 1, 2, r, r + 1);
|
2010-12-28 13:43:22 -05:00
|
|
|
++r;
|
2011-06-01 13:00:29 -04:00
|
|
|
|
2017-02-14 17:46:22 -05:00
|
|
|
l = manage (left_aligned_label (_("Bank LSB")));
|
|
|
|
t->attach (*l, 0, 1, r, r + 1);
|
|
|
|
t->attach (_bank_lsb, 1, 2, r, r + 1);
|
|
|
|
++r;
|
|
|
|
|
2018-07-24 15:35:14 -04:00
|
|
|
assert (patch.bank() != UINT16_MAX);
|
|
|
|
|
2017-02-14 17:46:22 -05:00
|
|
|
_bank_msb.set_value ((patch.bank() >> 7));
|
|
|
|
_bank_msb.signal_changed().connect (sigc::mem_fun (*this, &PatchChangeDialog::bank_changed));
|
|
|
|
_bank_lsb.set_value ((patch.bank() & 127));
|
|
|
|
_bank_lsb.signal_changed().connect (sigc::mem_fun (*this, &PatchChangeDialog::bank_changed));
|
2011-06-01 13:00:29 -04:00
|
|
|
|
2010-12-28 13:43:22 -05:00
|
|
|
get_vbox()->add (*t);
|
|
|
|
|
2017-08-24 17:41:21 -04:00
|
|
|
if (modal) {
|
|
|
|
add_button (Stock::CANCEL, RESPONSE_CANCEL);
|
|
|
|
}
|
2010-12-28 13:43:22 -05:00
|
|
|
add_button (ok, RESPONSE_ACCEPT);
|
2012-12-22 13:27:33 -05:00
|
|
|
if (allow_delete) {
|
2013-07-13 08:45:27 -04:00
|
|
|
add_button (Gtk::StockID(GTK_STOCK_DELETE), RESPONSE_REJECT);
|
2012-12-22 13:27:33 -05:00
|
|
|
}
|
2010-12-28 13:43:22 -05:00
|
|
|
set_default_response (RESPONSE_ACCEPT);
|
|
|
|
|
2012-06-02 09:02:01 -04:00
|
|
|
fill_bank_combo ();
|
|
|
|
set_active_bank_combo ();
|
|
|
|
bank_combo_changed ();
|
|
|
|
|
2015-10-04 14:51:05 -04:00
|
|
|
_info.Changed.connect (_info_changed_connection, invalidator (*this),
|
2012-06-12 00:05:10 -04:00
|
|
|
boost::bind (&PatchChangeDialog::instrument_info_changed, this), gui_context());
|
|
|
|
|
2010-12-28 13:43:22 -05:00
|
|
|
show_all ();
|
|
|
|
}
|
|
|
|
|
2017-08-24 17:41:21 -04:00
|
|
|
void
|
|
|
|
PatchChangeDialog::on_response (int response_id)
|
|
|
|
{
|
|
|
|
if (_keep_open) {
|
|
|
|
Gtk::Dialog::on_response (response_id);
|
|
|
|
} else {
|
|
|
|
ArdourDialog::on_response (response_id);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-02-14 17:46:22 -05:00
|
|
|
int
|
|
|
|
PatchChangeDialog::get_14bit_bank () const
|
|
|
|
{
|
2017-02-17 17:29:12 -05:00
|
|
|
return (_bank_msb.get_value_as_int() << 7) + _bank_lsb.get_value_as_int();
|
2017-02-14 17:46:22 -05:00
|
|
|
}
|
|
|
|
|
2012-06-12 00:05:10 -04:00
|
|
|
void
|
|
|
|
PatchChangeDialog::instrument_info_changed ()
|
|
|
|
{
|
|
|
|
_bank_combo.clear ();
|
|
|
|
_patch_combo.clear ();
|
|
|
|
fill_bank_combo ();
|
|
|
|
fill_patch_combo ();
|
2023-09-25 23:31:46 -04:00
|
|
|
|
|
|
|
set_active_bank_combo ();
|
|
|
|
bank_combo_changed ();
|
2012-06-12 00:05:10 -04:00
|
|
|
}
|
|
|
|
|
2017-09-24 12:03:54 -04:00
|
|
|
Evoral::PatchChange<Temporal::Beats>
|
2010-12-28 13:43:22 -05:00
|
|
|
PatchChangeDialog::patch () const
|
|
|
|
{
|
2017-09-24 12:03:54 -04:00
|
|
|
Temporal::Beats t = Temporal::Beats();
|
2011-07-28 09:27:04 -04:00
|
|
|
|
2020-10-02 23:26:17 -04:00
|
|
|
if (_region) {
|
2022-11-14 09:52:15 -05:00
|
|
|
t = _region->absolute_time_to_source_beats (_time.last_when ());
|
2010-12-28 13:43:22 -05:00
|
|
|
}
|
2011-06-01 13:00:29 -04:00
|
|
|
|
2017-09-24 12:03:54 -04:00
|
|
|
return Evoral::PatchChange<Temporal::Beats> (
|
2010-12-28 13:43:22 -05:00
|
|
|
t,
|
|
|
|
_channel.get_value_as_int() - 1,
|
|
|
|
_program.get_value_as_int() - 1,
|
2017-02-14 17:46:22 -05:00
|
|
|
get_14bit_bank ()
|
2010-12-28 13:43:22 -05:00
|
|
|
);
|
|
|
|
}
|
2012-06-02 09:02:01 -04:00
|
|
|
|
|
|
|
/** Fill the bank_combo according to the current _channel */
|
|
|
|
void
|
|
|
|
PatchChangeDialog::fill_bank_combo ()
|
|
|
|
{
|
2013-01-19 19:52:05 -05:00
|
|
|
_bank_combo.clear ();
|
|
|
|
|
2023-02-16 18:33:28 -05:00
|
|
|
std::shared_ptr<MIDI::Name::ChannelNameSet> cns = _info.get_patches (_channel.get_value_as_int() - 1);
|
2012-06-02 09:02:01 -04:00
|
|
|
|
2012-06-12 00:05:10 -04:00
|
|
|
if (!cns) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2012-06-11 18:59:35 -04:00
|
|
|
for (MIDI::Name::ChannelNameSet::PatchBanks::const_iterator i = cns->patch_banks().begin(); i != cns->patch_banks().end(); ++i) {
|
2012-06-02 09:02:01 -04:00
|
|
|
string n = (*i)->name ();
|
|
|
|
boost::replace_all (n, "_", " ");
|
2022-01-26 15:11:15 -05:00
|
|
|
_bank_combo.append (n);
|
2012-06-02 09:02:01 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/** Set the active value of the bank_combo, and _current_patch_bank, from the contents of _bank */
|
|
|
|
void
|
|
|
|
PatchChangeDialog::set_active_bank_combo ()
|
|
|
|
{
|
|
|
|
_current_patch_bank.reset ();
|
2015-10-05 10:17:49 -04:00
|
|
|
|
2023-02-16 18:33:28 -05:00
|
|
|
std::shared_ptr<MIDI::Name::ChannelNameSet> cns = _info.get_patches (_channel.get_value_as_int() - 1);
|
2012-06-11 18:59:35 -04:00
|
|
|
|
2012-06-12 00:05:10 -04:00
|
|
|
if (!cns) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2012-06-11 18:59:35 -04:00
|
|
|
for (MIDI::Name::ChannelNameSet::PatchBanks::const_iterator i = cns->patch_banks().begin(); i != cns->patch_banks().end(); ++i) {
|
2012-06-02 09:02:01 -04:00
|
|
|
|
|
|
|
string n = (*i)->name ();
|
|
|
|
boost::replace_all (n, "_", " ");
|
|
|
|
|
2017-02-14 17:46:22 -05:00
|
|
|
if ((*i)->number() == get_14bit_bank()) {
|
2012-06-02 09:02:01 -04:00
|
|
|
_current_patch_bank = *i;
|
|
|
|
_ignore_signals = true;
|
|
|
|
_bank_combo.set_active_text (n);
|
|
|
|
_ignore_signals = false;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
_ignore_signals = true;
|
|
|
|
_bank_combo.set_active (-1);
|
|
|
|
_ignore_signals = false;
|
|
|
|
}
|
|
|
|
|
|
|
|
/** Update _current_patch_bank and reflect the current value of
|
|
|
|
* bank_combo in the rest of the dialog.
|
|
|
|
*/
|
|
|
|
void
|
|
|
|
PatchChangeDialog::bank_combo_changed ()
|
|
|
|
{
|
|
|
|
if (_ignore_signals) {
|
|
|
|
return;
|
|
|
|
}
|
2015-10-05 10:17:49 -04:00
|
|
|
|
2012-06-02 09:02:01 -04:00
|
|
|
_current_patch_bank.reset ();
|
|
|
|
|
2023-02-16 18:33:28 -05:00
|
|
|
std::shared_ptr<MIDI::Name::ChannelNameSet> cns = _info.get_patches (_channel.get_value_as_int() - 1);
|
2012-06-02 09:02:01 -04:00
|
|
|
|
2012-06-12 00:05:10 -04:00
|
|
|
if (!cns) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2012-06-11 18:59:35 -04:00
|
|
|
for (MIDI::Name::ChannelNameSet::PatchBanks::const_iterator i = cns->patch_banks().begin(); i != cns->patch_banks().end(); ++i) {
|
2012-06-02 09:02:01 -04:00
|
|
|
string n = (*i)->name ();
|
|
|
|
boost::replace_all (n, "_", " ");
|
|
|
|
if (n == _bank_combo.get_active_text()) {
|
|
|
|
_current_patch_bank = *i;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-06-02 10:53:34 -04:00
|
|
|
if (_current_patch_bank == 0) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2012-06-02 09:02:01 -04:00
|
|
|
/* Reflect */
|
|
|
|
|
|
|
|
fill_patch_combo ();
|
|
|
|
set_active_patch_combo ();
|
|
|
|
|
2018-07-24 15:35:14 -04:00
|
|
|
if (_current_patch_bank->number() != UINT16_MAX) {
|
|
|
|
_ignore_signals = true;
|
|
|
|
_bank_msb.set_value (_current_patch_bank->number() >> 7);
|
|
|
|
_bank_lsb.set_value (_current_patch_bank->number() & 127);
|
|
|
|
_ignore_signals = false;
|
|
|
|
}
|
2012-06-02 09:02:01 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
/** Fill the contents of the patch combo */
|
|
|
|
void
|
|
|
|
PatchChangeDialog::fill_patch_combo ()
|
|
|
|
{
|
|
|
|
_patch_combo.clear ();
|
|
|
|
|
|
|
|
if (_current_patch_bank == 0) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2013-01-20 03:56:00 -05:00
|
|
|
const MIDI::Name::PatchNameList& patches = _current_patch_bank->patch_name_list ();
|
|
|
|
for (MIDI::Name::PatchNameList::const_iterator j = patches.begin(); j != patches.end(); ++j) {
|
2012-06-02 09:02:01 -04:00
|
|
|
string n = (*j)->name ();
|
|
|
|
boost::replace_all (n, "_", " ");
|
2022-01-26 15:11:15 -05:00
|
|
|
_patch_combo.append (n);
|
2012-06-02 09:02:01 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/** Set the active value of the patch combo from the value of the _program entry */
|
|
|
|
void
|
|
|
|
PatchChangeDialog::set_active_patch_combo ()
|
|
|
|
{
|
|
|
|
if (_ignore_signals) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (_current_patch_bank == 0) {
|
|
|
|
_ignore_signals = true;
|
|
|
|
_patch_combo.set_active (-1);
|
|
|
|
_ignore_signals = false;
|
|
|
|
return;
|
|
|
|
}
|
2015-10-05 10:17:49 -04:00
|
|
|
|
2013-01-20 03:56:00 -05:00
|
|
|
const MIDI::Name::PatchNameList& patches = _current_patch_bank->patch_name_list ();
|
|
|
|
for (MIDI::Name::PatchNameList::const_iterator j = patches.begin(); j != patches.end(); ++j) {
|
2012-06-02 09:02:01 -04:00
|
|
|
string n = (*j)->name ();
|
|
|
|
boost::replace_all (n, "_", " ");
|
|
|
|
|
|
|
|
MIDI::Name::PatchPrimaryKey const & key = (*j)->patch_primary_key ();
|
2014-12-17 19:43:09 -05:00
|
|
|
if (key.program() == _program.get_value() - 1) {
|
2012-06-02 09:02:01 -04:00
|
|
|
_ignore_signals = true;
|
|
|
|
_patch_combo.set_active_text (n);
|
|
|
|
_ignore_signals = false;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
_ignore_signals = true;
|
|
|
|
_patch_combo.set_active (-1);
|
|
|
|
_ignore_signals = false;
|
2015-10-05 10:17:49 -04:00
|
|
|
}
|
2012-06-02 09:02:01 -04:00
|
|
|
|
|
|
|
/** Set _program from the current state of _patch_combo */
|
|
|
|
void
|
|
|
|
PatchChangeDialog::patch_combo_changed ()
|
|
|
|
{
|
|
|
|
if (_ignore_signals || _current_patch_bank == 0) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2013-01-20 03:56:00 -05:00
|
|
|
const MIDI::Name::PatchNameList& patches = _current_patch_bank->patch_name_list ();
|
2012-06-12 00:05:10 -04:00
|
|
|
|
2013-01-20 03:56:00 -05:00
|
|
|
for (MIDI::Name::PatchNameList::const_iterator j = patches.begin(); j != patches.end(); ++j) {
|
2012-06-02 09:02:01 -04:00
|
|
|
string n = (*j)->name ();
|
|
|
|
boost::replace_all (n, "_", " ");
|
2012-11-13 10:11:07 -05:00
|
|
|
|
2012-06-02 09:02:01 -04:00
|
|
|
if (n == _patch_combo.get_active_text ()) {
|
|
|
|
_ignore_signals = true;
|
2012-06-12 00:05:10 -04:00
|
|
|
_program.set_value ((*j)->program_number() + 1);
|
2018-07-24 15:35:14 -04:00
|
|
|
_bank_msb.set_value ((*j)->bank_number() >> 7);
|
|
|
|
_bank_lsb.set_value ((*j)->bank_number() & 127);
|
2012-06-02 09:02:01 -04:00
|
|
|
_ignore_signals = false;
|
2012-06-12 00:05:10 -04:00
|
|
|
break;
|
2012-06-02 09:02:01 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
PatchChangeDialog::channel_changed ()
|
|
|
|
{
|
|
|
|
fill_bank_combo ();
|
|
|
|
set_active_bank_combo ();
|
|
|
|
fill_patch_combo ();
|
|
|
|
set_active_patch_combo ();
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
PatchChangeDialog::program_changed ()
|
|
|
|
{
|
|
|
|
if (_ignore_signals) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
set_active_patch_combo ();
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
PatchChangeDialog::bank_changed ()
|
|
|
|
{
|
|
|
|
if (_ignore_signals) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
set_active_bank_combo ();
|
|
|
|
fill_patch_combo ();
|
|
|
|
set_active_patch_combo ();
|
|
|
|
}
|
|
|
|
|