summaryrefslogtreecommitdiff
path: root/gtk2_ardour/patch_change_widget.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2018-07-24 21:35:14 +0200
committerRobin Gareus <robin@gareus.org>2018-07-24 23:22:21 +0200
commit203c6546c198053c3a5fc93a6c515424b22e465c (patch)
treeab74b85632ab031eec02327bf5dd3561dee41bb6 /gtk2_ardour/patch_change_widget.cc
parent938b2422e3a27a94b0b084b40663255c5457eba1 (diff)
GUI tweaks for unset midi banks.
Some MIDNAM files use Patch-Banks that do *not* have a common midi bank (CC0, CC32) but the Patchbank is instead just a collection of patches. There may be more than 127 patches in a patch-bank and each of those may be in a different midi-bank (e.g. Roland SC-88 Pro). Midnams like these are now properly supported via dropdowns (in the patch add/modify dialog and timeline), but ignored by the grid (patch-widget). More work is needed.
Diffstat (limited to 'gtk2_ardour/patch_change_widget.cc')
-rw-r--r--gtk2_ardour/patch_change_widget.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/gtk2_ardour/patch_change_widget.cc b/gtk2_ardour/patch_change_widget.cc
index 922f7cd6f7..f9c88d8068 100644
--- a/gtk2_ardour/patch_change_widget.cc
+++ b/gtk2_ardour/patch_change_widget.cc
@@ -238,6 +238,9 @@ PatchChangeWidget::refill_banks ()
if (cns) {
for (MIDI::Name::ChannelNameSet::PatchBanks::const_iterator i = cns->patch_banks().begin(); i != cns->patch_banks().end(); ++i) {
std::string n = (*i)->name ();
+ if ((*i)->number () == UINT16_MAX) {
+ continue;
+ }
_bank_select.AddMenuElem (MenuElemNoMnemonic (n, sigc::bind (sigc::mem_fun (*this, &PatchChangeWidget::select_bank), (*i)->number ())));
if ((*i)->number () == b) {
_current_patch_bank = *i;