mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 23:05:04 +01:00
add a (potentially temporary) discover button for mackie devices
git-svn-id: svn://localhost/ardour2/branches/3.0@12228 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
73161988bb
commit
5a7a89e068
4 changed files with 20 additions and 2 deletions
|
|
@ -74,13 +74,14 @@ MackieControlProtocolGUI::MackieControlProtocolGUI (MackieControlProtocol& p)
|
|||
, recalibrate_fader_button (_("Recalibrate Faders"))
|
||||
, ipmidi_base_port_adjustment (_cp.ipmidi_base(), 0, 32767, 1, 1000)
|
||||
, ipmidi_base_port_spinner (ipmidi_base_port_adjustment)
|
||||
, discover_button (_("Discover Mackie Devices"))
|
||||
{
|
||||
Gtk::Label* l;
|
||||
Gtk::Alignment* align;
|
||||
|
||||
set_border_width (12);
|
||||
|
||||
Gtk::Table* table = Gtk::manage (new Gtk::Table (2, 8));
|
||||
Gtk::Table* table = Gtk::manage (new Gtk::Table (2, 9));
|
||||
table->set_row_spacings (4);
|
||||
table->set_col_spacings (6);
|
||||
l = manage (new Gtk::Label (_("Device Type:")));
|
||||
|
|
@ -144,6 +145,10 @@ MackieControlProtocolGUI::MackieControlProtocolGUI (MackieControlProtocol& p)
|
|||
ipmidi_base_port_spinner.set_sensitive (_cp.device_info().uses_ipmidi());
|
||||
ipmidi_base_port_adjustment.signal_value_changed().connect (sigc::mem_fun (*this, &MackieControlProtocolGUI::ipmidi_spinner_changed));
|
||||
|
||||
|
||||
table->attach (discover_button, 1, 2, 8, 9, AttachOptions(FILL|EXPAND), AttachOptions (0));
|
||||
discover_button.signal_clicked().connect (sigc::mem_fun (*this, &MackieControlProtocolGUI::discover_clicked));
|
||||
|
||||
vector<string> profiles;
|
||||
|
||||
profiles.push_back ("default");
|
||||
|
|
@ -510,3 +515,10 @@ MackieControlProtocolGUI::ipmidi_spinner_changed ()
|
|||
cerr << "Set IP MIDI base to " << ipmidi_base_port_spinner.get_value() << endl;
|
||||
_cp.set_ipmidi_base ((int16_t) lrintf (ipmidi_base_port_spinner.get_value()));
|
||||
}
|
||||
|
||||
void
|
||||
MackieControlProtocolGUI::discover_clicked ()
|
||||
{
|
||||
/* this should help to get things started */
|
||||
_cp.midi_connectivity_established ();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -105,5 +105,8 @@ class MackieControlProtocolGUI : public Gtk::Notebook
|
|||
Gtk::Button recalibrate_fader_button;
|
||||
Gtk::Adjustment ipmidi_base_port_adjustment;
|
||||
Gtk::SpinButton ipmidi_base_port_spinner;
|
||||
Gtk::Button discover_button;
|
||||
|
||||
void discover_clicked ();
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -196,6 +196,8 @@ class MackieControlProtocol
|
|||
int16_t ipmidi_base() const { return _ipmidi_base; }
|
||||
void set_ipmidi_base (int16_t);
|
||||
|
||||
void midi_connectivity_established ();
|
||||
|
||||
protected:
|
||||
// shut down the surface
|
||||
void close();
|
||||
|
|
@ -233,7 +235,6 @@ class MackieControlProtocol
|
|||
int stop ();
|
||||
|
||||
void thread_init ();
|
||||
void midi_connectivity_established ();
|
||||
|
||||
bool route_is_locked_to_strip (boost::shared_ptr<ARDOUR::Route>) const;
|
||||
|
||||
|
|
|
|||
|
|
@ -803,6 +803,8 @@ Surface::gui_selection_changed (const ARDOUR::StrongRouteNotificationList& route
|
|||
void
|
||||
Surface::say_hello ()
|
||||
{
|
||||
cerr << "Sending hello to port " << _port->output_port().name() << endl;
|
||||
|
||||
/* wakeup for Mackie Control */
|
||||
MidiByteArray wakeup (7, MIDI::sysex, 0x00, 0x00, 0x66, 0x14, 0x00, MIDI::eox);
|
||||
_port->write (wakeup);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue