, _extenders (0)
, _has_two_character_display (true)
, _has_master_fader (true)
- , _has_segmented_display (false)
, _has_timecode_display (true)
, _has_global_controls (true)
, _has_jog_wheel (true)
}
}
- if ((child = node.child ("DisplaySegments")) != 0) {
- if ((prop = child->property ("value")) != 0) {
- _has_segmented_display = string_is_affirmative (prop->value());
- }
- }
-
if ((child = node.child ("TimecodeDisplay")) != 0) {
if ((prop = child->property ("value")) != 0) {
_has_timecode_display = string_is_affirmative (prop->value());
}
+ } else {
+ _has_timecode_display = false;
}
if ((child = node.child ("GlobalControls")) != 0) {
if ((prop = child->property ("value")) != 0) {
_has_global_controls = string_is_affirmative (prop->value());
}
+ } else {
+ _has_global_controls = false;
}
if ((child = node.child ("JogWheel")) != 0) {
if ((prop = child->property ("value")) != 0) {
_has_jog_wheel = string_is_affirmative (prop->value());
}
+ } else {
+ _has_jog_wheel = false;
}
if ((child = node.child ("TouchSenseFaders")) != 0) {
if ((prop = child->property ("value")) != 0) {
_has_touch_sense_faders = string_is_affirmative (prop->value());
}
+ } else {
+ _has_touch_sense_faders = false;
}
if ((child = node.child ("UsesIPMIDI")) != 0) {
if ((prop = child->property ("value")) != 0) {
_uses_ipmidi = string_is_affirmative (prop->value());
}
+ } else {
+ _uses_ipmidi = false;
}
if ((child = node.child ("LogicControlButtons")) != 0) {
return _has_two_character_display;
}
-bool
-DeviceInfo::has_segmented_display() const
-{
- return _has_segmented_display;
-}
-
bool
DeviceInfo::has_timecode_display () const
{
uint32_t extenders() const;
bool has_two_character_display() const;
bool has_master_fader () const;
- bool has_segmented_display() const;
bool has_timecode_display() const;
bool has_global_controls() const;
bool has_jog_wheel () const;
uint32_t _extenders;
bool _has_two_character_display;
bool _has_master_fader;
- bool _has_segmented_display;
bool _has_timecode_display;
bool _has_global_controls;
bool _has_jog_wheel;
, touch_sensitivity_adjustment (0, 0, 9, 1, 4)
, touch_sensitivity_scale (touch_sensitivity_adjustment)
, recalibrate_fader_button (_("Recalibrate Faders"))
+ , ipmidi_base_port_adjustment (MIDI::IPMIDIPort::lowest_ipmidi_port_default, 0, 32767, 1, 1000)
+ , ipmidi_base_port_spinner (ipmidi_base_port_adjustment)
{
Gtk::Label* l;
Gtk::Alignment* align;
set_border_width (12);
- Gtk::Table* table = Gtk::manage (new Gtk::Table (2, 7));
+ Gtk::Table* table = Gtk::manage (new Gtk::Table (2, 8));
table->set_row_spacings (4);
table->set_col_spacings (6);
l = manage (new Gtk::Label (_("Device Type:")));
table->attach (touch_sensitivity_scale, 1, 2, 5, 6, AttachOptions(FILL|EXPAND), AttachOptions (0));
table->attach (recalibrate_fader_button, 1, 2, 6, 7, AttachOptions(FILL|EXPAND), AttachOptions (0));
+ l = manage (new Gtk::Label (_("ipMIDI Port (lowest)")));
+ l->set_alignment (1.0, 0.5);
+ table->attach (*l, 0, 1, 7, 8, AttachOptions(FILL|EXPAND), AttachOptions (0));
+ table->attach (ipmidi_base_port_spinner, 1, 2, 7, 8, AttachOptions(FILL|EXPAND), AttachOptions (0));
+
+ ipmidi_base_port_spinner.set_sensitive (_cp.device_info().uses_ipmidi());
+
vector<string> profiles;
profiles.push_back ("default");
MackieControlProtocolGUI::surface_combo_changed ()
{
_cp.set_device (_surface_combo.get_active_text());
+
+ /* update ipMIDI field */
+
+ cerr << "New device called " << _cp.device_info().name() << " with ipMIDI ? " << _cp.device_info().uses_ipmidi() << endl;
+
+ ipmidi_base_port_spinner.set_sensitive (_cp.device_info().uses_ipmidi());
}
void
Gtk::Adjustment touch_sensitivity_adjustment;
Gtk::HScale touch_sensitivity_scale;
Gtk::Button recalibrate_fader_button;
+ Gtk::Adjustment ipmidi_base_port_adjustment;
+ Gtk::SpinButton ipmidi_base_port_spinner;
};
#include "pbd/abstract_ui.cc" // instantiate template
-#define ui_bind(f, ...) boost::protect (boost::bind (f, __VA_ARGS__))
-
const int MackieControlProtocol::MODIFIER_OPTION = 0x1;
const int MackieControlProtocol::MODIFIER_CONTROL = 0x2;
const int MackieControlProtocol::MODIFIER_SHIFT = 0x4;
set_device (Config->get_mackie_device_name());
set_profile (Config->get_mackie_device_profile());
- TrackSelectionChanged.connect (gui_connections, MISSING_INVALIDATOR, ui_bind (&MackieControlProtocol::gui_track_selection_changed, this, _1), this);
+ TrackSelectionChanged.connect (gui_connections, MISSING_INVALIDATOR, boost::bind (&MackieControlProtocol::gui_track_selection_changed, this, _1), this);
_instance = this;
MackieControlProtocol::connect_session_signals()
{
// receive routes added
- session->RouteAdded.connect(session_connections, MISSING_INVALIDATOR, ui_bind (&MackieControlProtocol::notify_route_added, this, _1), this);
+ session->RouteAdded.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&MackieControlProtocol::notify_route_added, this, _1), this);
// receive record state toggled
- session->RecordStateChanged.connect(session_connections, MISSING_INVALIDATOR, ui_bind (&MackieControlProtocol::notify_record_state_changed, this), this);
+ session->RecordStateChanged.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&MackieControlProtocol::notify_record_state_changed, this), this);
// receive transport state changed
- session->TransportStateChange.connect(session_connections, MISSING_INVALIDATOR, ui_bind (&MackieControlProtocol::notify_transport_state_changed, this), this);
- session->TransportLooped.connect (session_connections, MISSING_INVALIDATOR, ui_bind (&MackieControlProtocol::notify_loop_state_changed, this), this);
+ session->TransportStateChange.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&MackieControlProtocol::notify_transport_state_changed, this), this);
+ session->TransportLooped.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&MackieControlProtocol::notify_loop_state_changed, this), this);
// receive punch-in and punch-out
- Config->ParameterChanged.connect(session_connections, MISSING_INVALIDATOR, ui_bind (&MackieControlProtocol::notify_parameter_changed, this, _1), this);
- session->config.ParameterChanged.connect (session_connections, MISSING_INVALIDATOR, ui_bind (&MackieControlProtocol::notify_parameter_changed, this, _1), this);
+ Config->ParameterChanged.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&MackieControlProtocol::notify_parameter_changed, this, _1), this);
+ session->config.ParameterChanged.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&MackieControlProtocol::notify_parameter_changed, this, _1), this);
// receive rude solo changed
- session->SoloActive.connect(session_connections, MISSING_INVALIDATOR, ui_bind (&MackieControlProtocol::notify_solo_active_changed, this, _1), this);
+ session->SoloActive.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&MackieControlProtocol::notify_solo_active_changed, this, _1), this);
// make sure remote id changed signals reach here
// see also notify_route_added
Sorted sorted = get_sorted_routes();
for (Sorted::iterator it = sorted.begin(); it != sorted.end(); ++it) {
- (*it)->RemoteControlIDChanged.connect (route_connections, MISSING_INVALIDATOR, ui_bind(&MackieControlProtocol::notify_remote_id_changed, this), this);
+ (*it)->RemoteControlIDChanged.connect (route_connections, MISSING_INVALIDATOR, boost::bind (&MackieControlProtocol::notify_remote_id_changed, this), this);
}
}
return;
}
+ if (_active) {
+ clear_ports ();
+ surfaces.clear ();
+ }
+
_device_info = d->second;
/* store it away in a global location */
Config->set_mackie_device_name (device_name);
if (_active) {
- clear_ports ();
- surfaces.clear ();
create_surfaces ();
switch_banks (0, true);
}
typedef ARDOUR::RouteList ARS;
for (ARS::iterator it = rl.begin(); it != rl.end(); ++it) {
- (*it)->RemoteControlIDChanged.connect (route_connections, MISSING_INVALIDATOR, ui_bind (&MackieControlProtocol::notify_remote_id_changed, this), this);
+ (*it)->RemoteControlIDChanged.connect (route_connections, MISSING_INVALIDATOR, boost::bind (&MackieControlProtocol::notify_remote_id_changed, this), this);
}
}
using namespace PBD;
#define ui_context() MackieControlProtocol::instance() /* a UICallback-derived object that specifies the event loop for signal handling */
-#define ui_bind(f, ...) boost::protect (boost::bind (f, __VA_ARGS__))
Strip::Strip (Surface& s, const std::string& name, int index, const map<Button::ID,StripButtonInfo>& strip_buttons)
: Group (name)
_vpot = dynamic_cast<Pot*> (Pot::factory (*_surface, Pot::ID + index, "vpot", *this));
_meter = dynamic_cast<Meter*> (Meter::factory (*_surface, index, "meter", *this));
-#ifndef NDEBUG
for (map<Button::ID,StripButtonInfo>::const_iterator b = strip_buttons.begin(); b != strip_buttons.end(); ++b) {
Button* bb = dynamic_cast<Button*> (Button::factory (*_surface, b->first, b->second.base_id + index, b->second.name, *this));
DEBUG_TRACE (DEBUG::MackieControl, string_compose ("surface %1 strip %2 new button BID %3 id %4 from base %5\n",
_surface->number(), index, Button::id_to_name (bb->bid()),
bb->id(), b->second.base_id));
}
-#endif
}
Strip::~Strip ()
set_vpot_parameter (PanAzimuthAutomation);
- _route->solo_control()->Changed.connect(route_connections, MISSING_INVALIDATOR, ui_bind (&Strip::notify_solo_changed, this), ui_context());
- _route->mute_control()->Changed.connect(route_connections, MISSING_INVALIDATOR, ui_bind (&Strip::notify_mute_changed, this), ui_context());
+ _route->solo_control()->Changed.connect(route_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_solo_changed, this), ui_context());
+ _route->mute_control()->Changed.connect(route_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_mute_changed, this), ui_context());
boost::shared_ptr<Pannable> pannable = _route->pannable();
if (pannable) {
- pannable->pan_azimuth_control->Changed.connect(route_connections, MISSING_INVALIDATOR, ui_bind (&Strip::notify_panner_azi_changed, this, false), ui_context());
- pannable->pan_width_control->Changed.connect(route_connections, MISSING_INVALIDATOR, ui_bind (&Strip::notify_panner_width_changed, this, false), ui_context());
+ pannable->pan_azimuth_control->Changed.connect(route_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_panner_azi_changed, this, false), ui_context());
+ pannable->pan_width_control->Changed.connect(route_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_panner_width_changed, this, false), ui_context());
}
- _route->gain_control()->Changed.connect(route_connections, MISSING_INVALIDATOR, ui_bind (&Strip::notify_gain_changed, this, false), ui_context());
- _route->PropertyChanged.connect (route_connections, MISSING_INVALIDATOR, ui_bind (&Strip::notify_property_changed, this, _1), ui_context());
+ _route->gain_control()->Changed.connect(route_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_gain_changed, this, false), ui_context());
+ _route->PropertyChanged.connect (route_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_property_changed, this, _1), ui_context());
boost::shared_ptr<Track> trk = boost::dynamic_pointer_cast<ARDOUR::Track>(_route);
if (trk) {
_recenable->set_control (trk->rec_enable_control());
- trk->rec_enable_control()->Changed .connect(route_connections, MISSING_INVALIDATOR, ui_bind (&Strip::notify_record_enable_changed, this), ui_context());
+ trk->rec_enable_control()->Changed .connect(route_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_record_enable_changed, this), ui_context());
}
// TODO this works when a currently-banked route is made inactive, but not
// when a route is activated which should be currently banked.
- _route->active_changed.connect (route_connections, MISSING_INVALIDATOR, ui_bind (&Strip::notify_active_changed, this), ui_context());
- _route->DropReferences.connect (route_connections, MISSING_INVALIDATOR, ui_bind (&Strip::notify_route_deleted, this), ui_context());
+ _route->active_changed.connect (route_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_active_changed, this), ui_context());
+ _route->DropReferences.connect (route_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_route_deleted, this), ui_context());
/* Update */
using ARDOUR::AutomationControl;
#define ui_context() MackieControlProtocol::instance() /* a UICallback-derived object that specifies the event loop for signal handling */
-#define ui_bind(f, ...) boost::protect (boost::bind (f, __VA_ARGS__))
// The MCU sysex header.4th byte Will be overwritten
// when we get an incoming sysex that identifies
}
_master_fader->set_control (m->gain_control());
- m->gain_control()->Changed.connect (*this, MISSING_INVALIDATOR, ui_bind (&Surface::master_gain_changed, this), ui_context());
+ m->gain_control()->Changed.connect (*this, MISSING_INVALIDATOR, boost::bind (&Surface::master_gain_changed, this), ui_context());
}
void
*/
SurfacePort::SurfacePort (Surface& s)
: _surface (&s)
+ , _input_port (0)
+ , _output_port (0)
{
if (_surface->mcp().device_info().uses_ipmidi()) {
_input_port = new MIDI::IPMIDIPort (MIDI::IPMIDIPort::lowest_ipmidi_port_default+_surface->number());