Ardour  8.12
patch_change_dialog.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2010-2012 Carl Hetherington <carl@carlh.net>
3  * Copyright (C) 2012-2017 Paul Davis <paul@linuxaudiosystems.com>
4  * Copyright (C) 2013-2015 David Robillard <d@drobilla.net>
5  * Copyright (C) 2017-2019 Robin Gareus <robin@gareus.org>
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License along
18  * with this program; if not, write to the Free Software Foundation, Inc.,
19  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20  */
21 
22 #include <gtkmm/spinbutton.h>
23 #include <gtkmm/comboboxtext.h>
24 
25 #include "evoral/PatchChange.h"
26 #include "ardour_dialog.h"
27 #include "audio_clock.h"
28 
29 namespace ARDOUR {
30  class BeatsSamplesConverter;
31  class Session;
32  class InstrumentInfo;
33 }
34 
35 namespace MIDI {
36  namespace Name {
37  class PatchBank;
38  }
39 }
40 
42 {
43 public:
48  const Gtk::BuiltinStockID&,
49  bool allow_delete = false,
50  bool modal = true,
51  std::shared_ptr<ARDOUR::Region> region = std::shared_ptr<ARDOUR::Region>()
52  );
53 
55 
56 protected:
57  void on_response (int);
58 
59 private:
60  void fill_bank_combo ();
66  void channel_changed ();
67  void bank_changed ();
68  void program_changed ();
69 
70  int get_14bit_bank () const;
71 
72  const std::shared_ptr<ARDOUR::Region> _region;
81 
82  std::shared_ptr<MIDI::Name::PatchBank> _current_patch_bank;
83 
85  bool _keep_open;
86 
89 };
void patch_combo_changed()
Evoral::PatchChange< Temporal::Beats > patch() const
int get_14bit_bank() const
Gtk::SpinButton _bank_lsb
PatchChangeDialog(ARDOUR::Session *, Evoral::PatchChange< Temporal::Beats > const &, ARDOUR::InstrumentInfo &, const Gtk::BuiltinStockID &, bool allow_delete=false, bool modal=true, std::shared_ptr< ARDOUR::Region > region=std::shared_ptr< ARDOUR::Region >())
Gtk::SpinButton _program
std::shared_ptr< MIDI::Name::PatchBank > _current_patch_bank
Gtk::SpinButton _channel
void set_active_bank_combo()
void instrument_info_changed()
const std::shared_ptr< ARDOUR::Region > _region
PBD::ScopedConnection _info_changed_connection
ARDOUR::InstrumentInfo & _info
void bank_combo_changed()
void on_response(int)
This is a default handler for the signal signal_response().
Gtk::ComboBoxText _patch_combo
Gtk::SpinButton _bank_msb
Gtk::ComboBoxText _bank_combo
void set_active_patch_combo()