diff options
Diffstat (limited to 'libs/surfaces/mackie')
-rw-r--r-- | libs/surfaces/mackie/device_info.cc | 6 | ||||
-rw-r--r-- | libs/surfaces/mackie/device_info.h | 10 | ||||
-rw-r--r-- | libs/surfaces/mackie/device_profile.cc | 2 | ||||
-rw-r--r-- | libs/surfaces/mackie/gui.cc | 4 | ||||
-rw-r--r-- | libs/surfaces/mackie/gui.h | 8 | ||||
-rw-r--r-- | libs/surfaces/mackie/jog_wheel.cc | 2 | ||||
-rw-r--r-- | libs/surfaces/mackie/jog_wheel.h | 2 | ||||
-rw-r--r-- | libs/surfaces/mackie/led.cc | 8 | ||||
-rw-r--r-- | libs/surfaces/mackie/mackie_control_protocol.h | 24 | ||||
-rw-r--r-- | libs/surfaces/mackie/mcp_buttons.cc | 444 | ||||
-rw-r--r-- | libs/surfaces/mackie/meter.cc | 2 | ||||
-rw-r--r-- | libs/surfaces/mackie/meter.h | 2 | ||||
-rw-r--r-- | libs/surfaces/mackie/strip.cc | 30 | ||||
-rw-r--r-- | libs/surfaces/mackie/strip.h | 2 | ||||
-rw-r--r-- | libs/surfaces/mackie/surface.cc | 70 | ||||
-rw-r--r-- | libs/surfaces/mackie/surface.h | 2 | ||||
-rw-r--r-- | libs/surfaces/mackie/surface_port.cc | 4 | ||||
-rw-r--r-- | libs/surfaces/mackie/surface_port.h | 4 | ||||
-rw-r--r-- | libs/surfaces/mackie/timer.h | 6 | ||||
-rw-r--r-- | libs/surfaces/mackie/types.cc | 2 | ||||
-rw-r--r-- | libs/surfaces/mackie/types.h | 6 |
21 files changed, 320 insertions, 320 deletions
diff --git a/libs/surfaces/mackie/device_info.cc b/libs/surfaces/mackie/device_info.cc index c59ac84e5f..365ff1db9f 100644 --- a/libs/surfaces/mackie/device_info.cc +++ b/libs/surfaces/mackie/device_info.cc @@ -100,8 +100,8 @@ DeviceInfo::mackie_control_buttons () _global_buttons[Button::UserA] = GlobalButtonInfo ("Rear Panel User Switch 1", "user", 0x66); _global_buttons[Button::UserB] = GlobalButtonInfo ("Rear Panel User Switch 2", "user", 0x67); - //TODO Implement "rear panel external control": a connection for a resistive - //TODO element expression pedal . Message: 0xb0 0x2e 0xVV where 0xVV = external + //TODO Implement "rear panel external control": a connection for a resistive + //TODO element expression pedal . Message: 0xb0 0x2e 0xVV where 0xVV = external //TODO controller position value (0x00 to 0x7f) _strip_buttons[Button::RecEnable] = StripButtonInfo (0x0, "Rec"); @@ -547,7 +547,7 @@ DeviceInfo::reload_device_info () std::ostream& operator<< (std::ostream& os, const Mackie::DeviceInfo& di) { - os << di.name() << ' ' + os << di.name() << ' ' << di.strip_cnt() << ' ' << di.extenders() << ' ' << di.master_position() << ' ' diff --git a/libs/surfaces/mackie/device_info.h b/libs/surfaces/mackie/device_info.h index e272ff252f..c4cbd071c5 100644 --- a/libs/surfaces/mackie/device_info.h +++ b/libs/surfaces/mackie/device_info.h @@ -37,22 +37,22 @@ struct GlobalButtonInfo { std::string label; // visible to user std::string group; // in case we want to present in a GUI int32_t id; // value sent by device - + GlobalButtonInfo () : id (-1) {} GlobalButtonInfo (const std::string& l, const std::string& g, uint32_t i) : label (l), group (g), id (i) {} }; - + struct StripButtonInfo { int32_t base_id; std::string name; - + StripButtonInfo () : base_id (-1) {} StripButtonInfo (uint32_t i, const std::string& n) : base_id (i), name (n) {} }; -class DeviceInfo +class DeviceInfo { public: enum DeviceType { @@ -72,7 +72,7 @@ class DeviceInfo uint32_t strip_cnt () const; uint32_t extenders() const; uint32_t master_position() const; - bool has_two_character_display() const; + bool has_two_character_display() const; bool has_master_fader () const; bool has_timecode_display() const; bool has_global_controls() const; diff --git a/libs/surfaces/mackie/device_profile.cc b/libs/surfaces/mackie/device_profile.cc index 57793ecdbe..c4cd9bf1a8 100644 --- a/libs/surfaces/mackie/device_profile.cc +++ b/libs/surfaces/mackie/device_profile.cc @@ -135,7 +135,7 @@ DeviceProfile::set_state (const XMLNode& node, int /* version */) } /* name is mandatory */ - + if ((child = node.child ("Name")) == 0 || (prop = child->property ("value")) == 0) { return -1; } else { diff --git a/libs/surfaces/mackie/gui.cc b/libs/surfaces/mackie/gui.cc index ac366efbd3..48bfa6cd8a 100644 --- a/libs/surfaces/mackie/gui.cc +++ b/libs/surfaces/mackie/gui.cc @@ -275,7 +275,7 @@ void MackieControlProtocolGUI::build_available_action_menu () { /* build a model of all available actions (needs to be tree structured - * more) + * more) */ available_action_model = TreeStore::create (available_action_columns); @@ -555,7 +555,7 @@ MackieControlProtocolGUI::refresh_function_key_editor () function_key_editor.set_model (function_key_model); } -void +void MackieControlProtocolGUI::action_changed (const Glib::ustring &sPath, const Glib::ustring &text, TreeModelColumnBase col) { // Remove Binding is not in the action map but still valid diff --git a/libs/surfaces/mackie/gui.h b/libs/surfaces/mackie/gui.h index 4c2acc6278..7927d106b0 100644 --- a/libs/surfaces/mackie/gui.h +++ b/libs/surfaces/mackie/gui.h @@ -1,16 +1,16 @@ /* Copyright (C) 2010-2012 Paul Davis - + 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., 675 Mass Ave, Cambridge, MA 02139, USA. @@ -57,7 +57,7 @@ class MackieControlProtocolGUI : public Gtk::Notebook Gtk::TreeModelColumn<std::string> name; Gtk::TreeModelColumn<std::string> path; }; - + struct FunctionKeyColumns : public Gtk::TreeModel::ColumnRecord { FunctionKeyColumns() { add (name); diff --git a/libs/surfaces/mackie/jog_wheel.cc b/libs/surfaces/mackie/jog_wheel.cc index 318a6452a0..5d8259f290 100644 --- a/libs/surfaces/mackie/jog_wheel.cc +++ b/libs/surfaces/mackie/jog_wheel.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2012 Paul Davis + Copyright (C) 2012 Paul Davis 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 diff --git a/libs/surfaces/mackie/jog_wheel.h b/libs/surfaces/mackie/jog_wheel.h index 5ef3c6c255..568589e54d 100644 --- a/libs/surfaces/mackie/jog_wheel.h +++ b/libs/surfaces/mackie/jog_wheel.h @@ -7,7 +7,7 @@ #include <deque> #include <queue> -namespace ArdourSurface { +namespace ArdourSurface { class MackieControlProtocol; diff --git a/libs/surfaces/mackie/led.cc b/libs/surfaces/mackie/led.cc index 6a090cdc74..d103829a77 100644 --- a/libs/surfaces/mackie/led.cc +++ b/libs/surfaces/mackie/led.cc @@ -40,7 +40,7 @@ Led::factory (Surface& surface, int id, const char* name, Group& group) return l; } -MidiByteArray +MidiByteArray Led::set_state (LedState new_state) { state = new_state; @@ -49,13 +49,13 @@ Led::set_state (LedState new_state) switch (state.state()) { case LedState::on: - msg = 0x7f; + msg = 0x7f; break; case LedState::off: - msg = 0x00; + msg = 0x00; break; case LedState::flashing: - msg = 0x01; + msg = 0x01; break; case LedState::none: return MidiByteArray (); diff --git a/libs/surfaces/mackie/mackie_control_protocol.h b/libs/surfaces/mackie/mackie_control_protocol.h index 1908070a9e..ac1ba53896 100644 --- a/libs/surfaces/mackie/mackie_control_protocol.h +++ b/libs/surfaces/mackie/mackie_control_protocol.h @@ -1,16 +1,16 @@ /* Copyright (C) 2006,2007 John Anderson - + 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., 675 Mass Ave, Cambridge, MA 02139, USA. @@ -87,7 +87,7 @@ public: ~MackieControlUIRequest () {} }; -class MackieControlProtocol +class MackieControlProtocol : public ARDOUR::ControlProtocol , public AbstractUI<MackieControlUIRequest> { @@ -194,7 +194,7 @@ class MackieControlProtocol /// this is called to generate the midi to send in response to a button press. void update_led(Mackie::Surface&, Mackie::Button & button, Mackie::LedState); - + void update_global_button (int id, Mackie::LedState); void update_global_led (int id, Mackie::LedState); @@ -225,7 +225,7 @@ class MackieControlProtocol protected: // shut down the surface void close(); - + // This sets up the notifications and sets the // controls to the correct values void update_surfaces(); @@ -243,12 +243,12 @@ class MackieControlProtocol */ typedef std::vector<boost::shared_ptr<ARDOUR::Route> > Sorted; Sorted get_sorted_routes(); - + // bank switching void switch_banks (uint32_t first_remote_id, bool force = false); void prev_track (); void next_track (); - + // also called from poll_automation to update timecode display void update_timecode_display(); @@ -267,9 +267,9 @@ class MackieControlProtocol struct ButtonHandlers { Mackie::LedState (MackieControlProtocol::*press) (Mackie::Button&); Mackie::LedState (MackieControlProtocol::*release) (Mackie::Button&); - + ButtonHandlers (Mackie::LedState (MackieControlProtocol::*p) (Mackie::Button&), - Mackie::LedState (MackieControlProtocol::*r) (Mackie::Button&)) + Mackie::LedState (MackieControlProtocol::*r) (Mackie::Button&)) : press (p) , release (r) {} }; @@ -343,7 +343,7 @@ class MackieControlProtocol typedef std::set<uint32_t> DownButtonList; typedef std::map<ARDOUR::AutomationType,DownButtonList> DownButtonMap; DownButtonMap _down_buttons; - DownButtonList _down_select_buttons; + DownButtonList _down_select_buttons; void pull_route_range (DownButtonList&, ARDOUR::RouteList&); @@ -488,6 +488,6 @@ class MackieControlProtocol Mackie::LedState view_release (Mackie::Button&); }; -} // namespace +} // namespace #endif // ardour_mackie_control_protocol_h diff --git a/libs/surfaces/mackie/mcp_buttons.cc b/libs/surfaces/mackie/mcp_buttons.cc index 47fb763602..c2d3680ff0 100644 --- a/libs/surfaces/mackie/mcp_buttons.cc +++ b/libs/surfaces/mackie/mcp_buttons.cc @@ -34,7 +34,7 @@ #include "i18n.h" /* handlers for all buttons, broken into a separate file to avoid clutter in - * mackie_control_protocol.cc + * mackie_control_protocol.cc */ using std::string; @@ -94,11 +94,11 @@ MackieControlProtocol::cmd_alt_release (Button &) return off; } -LedState +LedState MackieControlProtocol::left_press (Button &) { Sorted sorted = get_sorted_routes(); - uint32_t strip_cnt = n_strips (); + uint32_t strip_cnt = n_strips (); DEBUG_TRACE (DEBUG::MackieControl, string_compose ("bank left with current initial = %1 nstrips = %2 tracks/busses = %3\n", _current_initial_bank, strip_cnt, sorted.size())); @@ -112,13 +112,13 @@ MackieControlProtocol::left_press (Button &) return on; } -LedState +LedState MackieControlProtocol::left_release (Button &) { return off; } -LedState +LedState MackieControlProtocol::right_press (Button &) { Sorted sorted = get_sorted_routes(); @@ -141,7 +141,7 @@ MackieControlProtocol::right_press (Button &) return on; } -LedState +LedState MackieControlProtocol::right_release (Button &) { if (zoom_mode()) { @@ -262,7 +262,7 @@ MackieControlProtocol::cursor_down_release (Button&) return off; } -LedState +LedState MackieControlProtocol::channel_left_press (Button &) { Sorted sorted = get_sorted_routes(); @@ -274,13 +274,13 @@ MackieControlProtocol::channel_left_press (Button &) } } -LedState +LedState MackieControlProtocol::channel_left_release (Button &) { return off; } -LedState +LedState MackieControlProtocol::channel_right_press (Button &) { Sorted sorted = get_sorted_routes(); @@ -292,19 +292,19 @@ MackieControlProtocol::channel_right_press (Button &) } } -LedState +LedState MackieControlProtocol::channel_right_release (Button &) { return off; } -Mackie::LedState +Mackie::LedState MackieControlProtocol::zoom_press (Mackie::Button &) { return none; } -Mackie::LedState +Mackie::LedState MackieControlProtocol::zoom_release (Mackie::Button &) { if (_modifier_state & MODIFIER_ZOOM) { @@ -316,7 +316,7 @@ MackieControlProtocol::zoom_release (Mackie::Button &) return (zoom_mode() ? on : off); } -Mackie::LedState +Mackie::LedState MackieControlProtocol::scrub_press (Mackie::Button &) { if (!surfaces.empty()) { @@ -326,7 +326,7 @@ MackieControlProtocol::scrub_press (Mackie::Button &) return none; } -Mackie::LedState +Mackie::LedState MackieControlProtocol::scrub_release (Mackie::Button &) { return none; @@ -349,33 +349,33 @@ MackieControlProtocol::undo_release (Button&) return off; } -LedState +LedState MackieControlProtocol::drop_press (Button &) { session->remove_last_capture(); return on; } -LedState +LedState MackieControlProtocol::drop_release (Button &) { return off; } -LedState +LedState MackieControlProtocol::save_press (Button &) { session->save_state (""); return on; } -LedState +LedState MackieControlProtocol::save_release (Button &) { return off; } -LedState +LedState MackieControlProtocol::timecode_beats_press (Button &) { switch (_timecode_type) { @@ -394,7 +394,7 @@ MackieControlProtocol::timecode_beats_press (Button &) return on; } -LedState +LedState MackieControlProtocol::timecode_beats_release (Button &) { return off; @@ -403,7 +403,7 @@ MackieControlProtocol::timecode_beats_release (Button &) ///////////////////////////////////// // Functions ///////////////////////////////////// -LedState +LedState MackieControlProtocol::marker_press (Button &) { string markername; @@ -414,7 +414,7 @@ MackieControlProtocol::marker_press (Button &) return on; } -LedState +LedState MackieControlProtocol::marker_release (Button &) { return off; @@ -424,20 +424,20 @@ MackieControlProtocol::marker_release (Button &) // Transport Buttons ///////////////////////////////////// -LedState +LedState MackieControlProtocol::stop_press (Button &) { transport_stop (); return on; } -LedState +LedState MackieControlProtocol::stop_release (Button &) { return session->transport_stopped(); } -LedState +LedState MackieControlProtocol::play_press (Button &) { /* if we're already rolling at normal speed, and we're pressed @@ -448,26 +448,26 @@ MackieControlProtocol::play_press (Button &) return none; } -LedState +LedState MackieControlProtocol::play_release (Button &) { return none; } -LedState +LedState MackieControlProtocol::record_press (Button &) { rec_enable_toggle (); return none; } -LedState +LedState MackieControlProtocol::record_release (Button &) { return none; } -LedState +LedState MackieControlProtocol::rewind_press (Button &) { if (main_modifier_state() == MODIFIER_CONTROL) { @@ -478,13 +478,13 @@ MackieControlProtocol::rewind_press (Button &) return none; } -LedState +LedState MackieControlProtocol::rewind_release (Button &) { return none; } -LedState +LedState MackieControlProtocol::ffwd_press (Button &) { if (main_modifier_state() == MODIFIER_CONTROL) { @@ -495,13 +495,13 @@ MackieControlProtocol::ffwd_press (Button &) return none; } -LedState +LedState MackieControlProtocol::ffwd_release (Button &) { return none; } -LedState +LedState MackieControlProtocol::loop_press (Button &) { if (main_modifier_state() & MODIFIER_CONTROL) { @@ -513,13 +513,13 @@ MackieControlProtocol::loop_press (Button &) } } -LedState +LedState MackieControlProtocol::loop_release (Button &) { return none; } -LedState +LedState MackieControlProtocol::clicking_press (Button &) { bool state = !Config->get_clicking(); @@ -527,7 +527,7 @@ MackieControlProtocol::clicking_press (Button &) return state; } -LedState +LedState MackieControlProtocol::clicking_release (Button &) { return Config->get_clicking(); @@ -546,149 +546,149 @@ LedState MackieControlProtocol::global_solo_release (Button &) } LedState -MackieControlProtocol::enter_press (Button &) -{ +MackieControlProtocol::enter_press (Button &) +{ Enter(); /* EMIT SIGNAL */ return off; } LedState -MackieControlProtocol::enter_release (Button &) -{ +MackieControlProtocol::enter_release (Button &) +{ return off; } LedState -MackieControlProtocol::F1_press (Button &) -{ - return off; +MackieControlProtocol::F1_press (Button &) +{ + return off; } LedState -MackieControlProtocol::F1_release (Button &) -{ - return off; +MackieControlProtocol::F1_release (Button &) +{ + return off; } LedState -MackieControlProtocol::F2_press (Button &) -{ - return off; +MackieControlProtocol::F2_press (Button &) +{ + return off; } LedState -MackieControlProtocol::F2_release (Button &) -{ - return off; +MackieControlProtocol::F2_release (Button &) +{ + return off; } LedState -MackieControlProtocol::F3_press (Button &) -{ - return off; +MackieControlProtocol::F3_press (Button &) +{ + return off; } LedState -MackieControlProtocol::F3_release (Button &) -{ - return off; +MackieControlProtocol::F3_release (Button &) +{ + return off; } LedState -MackieControlProtocol::F4_press (Button &) -{ - return off; +MackieControlProtocol::F4_press (Button &) +{ + return off; } LedState -MackieControlProtocol::F4_release (Button &) -{ - return off; +MackieControlProtocol::F4_release (Button &) +{ + return off; } LedState -MackieControlProtocol::F5_press (Button &) -{ - return off; +MackieControlProtocol::F5_press (Button &) +{ + return off; } LedState -MackieControlProtocol::F5_release (Button &) -{ - return off; +MackieControlProtocol::F5_release (Button &) +{ + return off; } LedState -MackieControlProtocol::F6_press (Button &) -{ - return off; +MackieControlProtocol::F6_press (Button &) +{ + return off; } LedState -MackieControlProtocol::F6_release (Button &) -{ - return off; +MackieControlProtocol::F6_release (Button &) +{ + return off; } LedState -MackieControlProtocol::F7_press (Button &) -{ - return off; +MackieControlProtocol::F7_press (Button &) +{ + return off; } LedState -MackieControlProtocol::F7_release (Button &) -{ - return off; +MackieControlProtocol::F7_release (Button &) +{ + return off; } LedState -MackieControlProtocol::F8_press (Button &) -{ +MackieControlProtocol::F8_press (Button &) +{ CloseDialog (); /* EMIT SIGNAL */ - return off; + return off; } LedState -MackieControlProtocol::F8_release (Button &) -{ - return off; +MackieControlProtocol::F8_release (Button &) +{ + return off; } /* UNIMPLEMENTED */ LedState -MackieControlProtocol::pan_press (Button &) -{ - return off; +MackieControlProtocol::pan_press (Button &) +{ + return off; } LedState -MackieControlProtocol::pan_release (Button &) -{ - return none; +MackieControlProtocol::pan_release (Button &) +{ + return none; } LedState -MackieControlProtocol::plugin_press (Button &) -{ - return off; +MackieControlProtocol::plugin_press (Button &) +{ + return off; } LedState -MackieControlProtocol::plugin_release (Button &) -{ - return none; +MackieControlProtocol::plugin_release (Button &) +{ + return none; } LedState -MackieControlProtocol::eq_press (Button &) -{ +MackieControlProtocol::eq_press (Button &) +{ //set_view_mode (EQ); // not implemented yet, turn off (see comments for send button) return off; } LedState -MackieControlProtocol::eq_release (Button &) -{ +MackieControlProtocol::eq_release (Button &) +{ return none; } LedState -MackieControlProtocol::dyn_press (Button &) -{ +MackieControlProtocol::dyn_press (Button &) +{ //set_view_mode (Dynamics); // same as send return off; } LedState -MackieControlProtocol::dyn_release (Button &) -{ +MackieControlProtocol::dyn_release (Button &) +{ return none; } LedState -MackieControlProtocol::flip_press (Button &) -{ +MackieControlProtocol::flip_press (Button &) +{ if (_flip_mode != Normal) { set_flip_mode (Normal); } else { @@ -697,61 +697,61 @@ MackieControlProtocol::flip_press (Button &) return ((_flip_mode != Normal) ? on : off); } LedState -MackieControlProtocol::flip_release (Button &) -{ +MackieControlProtocol::flip_release (Button &) +{ return none; } LedState -MackieControlProtocol::name_value_press (Button &) -{ - return off; +MackieControlProtocol::name_value_press (Button &) +{ + return off; } LedState -MackieControlProtocol::name_value_release (Button &) -{ - return off; +MackieControlProtocol::name_value_release (Button &) +{ + return off; } LedState -MackieControlProtocol::touch_press (Button &) -{ - return off; +MackieControlProtocol::touch_press (Button &) +{ + return off; } LedState -MackieControlProtocol::touch_release (Button &) -{ - return off; +MackieControlProtocol::touch_release (Button &) +{ + return off; } LedState -MackieControlProtocol::cancel_press (Button &) -{ - return off; +MackieControlProtocol::cancel_press (Button &) +{ + return off; } LedState -MackieControlProtocol::cancel_release (Button &) -{ - return off; +MackieControlProtocol::cancel_release (Button &) +{ + return off; } LedState -MackieControlProtocol::user_a_press (Button &) -{ +MackieControlProtocol::user_a_press (Button &) +{ transport_play (session->transport_speed() == 1.0); - return off; + return off; } LedState -MackieControlProtocol::user_a_release (Button &) -{ - return off; +MackieControlProtocol::user_a_release (Button &) +{ + return off; } LedState -MackieControlProtocol::user_b_press (Button &) -{ +MackieControlProtocol::user_b_press (Button &) +{ transport_stop(); - return off; + return off; } LedState -MackieControlProtocol::user_b_release (Button &) -{ - return off; +MackieControlProtocol::user_b_release (Button &) +{ + return off; } LedState @@ -781,51 +781,51 @@ MackieControlProtocol::master_fader_touch_release (Mackie::Button &) return none; } -Mackie::LedState -MackieControlProtocol::read_press (Mackie::Button&) +Mackie::LedState +MackieControlProtocol::read_press (Mackie::Button&) { _metering_active = !_metering_active; notify_metering_state_changed (); return _metering_active; } -Mackie::LedState -MackieControlProtocol::read_release (Mackie::Button&) +Mackie::LedState +MackieControlProtocol::read_release (Mackie::Button&) { return _metering_active; } -Mackie::LedState -MackieControlProtocol::write_press (Mackie::Button&) +Mackie::LedState +MackieControlProtocol::write_press (Mackie::Button&) { return none; } -Mackie::LedState -MackieControlProtocol::write_release (Mackie::Button&) +Mackie::LedState +MackieControlProtocol::write_release (Mackie::Button&) { return none; } -Mackie::LedState -MackieControlProtocol::clearsolo_press (Mackie::Button&) +Mackie::LedState +MackieControlProtocol::clearsolo_press (Mackie::Button&) { return none; } -Mackie::LedState -MackieControlProtocol::clearsolo_release (Mackie::Button&) +Mackie::LedState +MackieControlProtocol::clearsolo_release (Mackie::Button&) { return none; } -Mackie::LedState -MackieControlProtocol::track_press (Mackie::Button&) +Mackie::LedState +MackieControlProtocol::track_press (Mackie::Button&) { return off; } -Mackie::LedState -MackieControlProtocol::track_release (Mackie::Button&) +Mackie::LedState +MackieControlProtocol::track_release (Mackie::Button&) { return none; } -Mackie::LedState -MackieControlProtocol::send_press (Mackie::Button&) +Mackie::LedState +MackieControlProtocol::send_press (Mackie::Button&) { // code moved here from "sends_press" //set_view_mode (Sends); @@ -835,158 +835,158 @@ MackieControlProtocol::send_press (Mackie::Button&) //return on; return off; } -Mackie::LedState -MackieControlProtocol::send_release (Mackie::Button&) +Mackie::LedState +MackieControlProtocol::send_release (Mackie::Button&) { return none; } -Mackie::LedState -MackieControlProtocol::miditracks_press (Mackie::Button&) +Mackie::LedState +MackieControlProtocol::miditracks_press (Mackie::Button&) { return none; } -Mackie::LedState -MackieControlProtocol::miditracks_release (Mackie::Button&) +Mackie::LedState +MackieControlProtocol::miditracks_release (Mackie::Button&) { return none; } -Mackie::LedState -MackieControlProtocol::inputs_press (Mackie::Button&) +Mackie::LedState +MackieControlProtocol::inputs_press (Mackie::Button&) { return none; } -Mackie::LedState -MackieControlProtocol::inputs_release (Mackie::Button&) +Mackie::LedState +MackieControlProtocol::inputs_release (Mackie::Button&) { return none; } -Mackie::LedState -MackieControlProtocol::audiotracks_press (Mackie::Button&) +Mackie::LedState +MackieControlProtocol::audiotracks_press (Mackie::Button&) { return none; } -Mackie::LedState -MackieControlProtocol::audiotracks_release (Mackie::Button&) +Mackie::LedState +MackieControlProtocol::audiotracks_release (Mackie::Button&) { return none; } -Mackie::LedState -MackieControlProtocol::audioinstruments_press (Mackie::Button&) +Mackie::LedState +MackieControlProtocol::audioinstruments_press (Mackie::Button&) { return none; } -Mackie::LedState -MackieControlProtocol::audioinstruments_release (Mackie::Button&) +Mackie::LedState +MackieControlProtocol::audioinstruments_release (Mackie::Button&) { return none; } -Mackie::LedState -MackieControlProtocol::aux_press (Mackie::Button&) +Mackie::LedState +MackieControlProtocol::aux_press (Mackie::Button&) { return none; } -Mackie::LedState -MackieControlProtocol::aux_release (Mackie::Button&) +Mackie::LedState +MackieControlProtocol::aux_release (Mackie::Button&) { return none; } -Mackie::LedState -MackieControlProtocol::busses_press (Mackie::Button&) +Mackie::LedState +MackieControlProtocol::busses_press (Mackie::Button&) { return none; } -Mackie::LedState -MackieControlProtocol::busses_release (Mackie::Button&) +Mackie::LedState +MackieControlProtocol::busses_release (Mackie::Button&) { return none; } -Mackie::LedState -MackieControlProtocol::outputs_press (Mackie::Button&) +Mackie::LedState +MackieControlProtocol::outputs_press (Mackie::Button&) { return none; } -Mackie::LedState -MackieControlProtocol::outputs_release (Mackie::Button&) +Mackie::LedState +MackieControlProtocol::outputs_release (Mackie::Button&) { return none; } -Mackie::LedState -MackieControlProtocol::user_press (Mackie::Button&) +Mackie::LedState +MackieControlProtocol::user_press (Mackie::Button&) { return none; } -Mackie::LedState -MackieControlProtocol::user_release (Mackie::Button&) +Mackie::LedState +MackieControlProtocol::user_release (Mackie::Button&) { return none; } -Mackie::LedState -MackieControlProtocol::trim_press (Mackie::Button&) +Mackie::LedState +MackieControlProtocol::trim_press (Mackie::Button&) { return none; } -Mackie::LedState -MackieControlProtocol::trim_release (Mackie::Button&) +Mackie::LedState +MackieControlProtocol::trim_release (Mackie::Button&) { return none; } -Mackie::LedState -MackieControlProtocol::latch_press (Mackie::Button&) +Mackie::LedState +MackieControlProtocol::latch_press (Mackie::Button&) { return none; } -Mackie::LedState -MackieControlProtocol::latch_release (Mackie::Button&) +Mackie::LedState +MackieControlProtocol::latch_release (Mackie::Button&) { return none; } -Mackie::LedState -MackieControlProtocol::grp_press (Mackie::Button&) +Mackie::LedState +MackieControlProtocol::grp_press (Mackie::Button&) { return none; } -Mackie::LedState -MackieControlProtocol::grp_release (Mackie::Button&) +Mackie::LedState +MackieControlProtocol::grp_release (Mackie::Button&) { return none; } -Mackie::LedState -MackieControlProtocol::nudge_press (Mackie::Button&) +Mackie::LedState +MackieControlProtocol::nudge_press (Mackie::Button&) { return none; } -Mackie::LedState -MackieControlProtocol::nudge_release (Mackie::Button&) +Mackie::LedState +MackieControlProtocol::nudge_release (Mackie::Button&) { return none; } -Mackie::LedState -MackieControlProtocol::replace_press (Mackie::Button&) +Mackie::LedState +MackieControlProtocol::replace_press (Mackie::Button&) { return none; } -Mackie::LedState -MackieControlProtocol::replace_release (Mackie::Button&) +Mackie::LedState +MackieControlProtocol::replace_release (Mackie::Button&) { return none; } -Mackie::LedState -MackieControlProtocol::click_press (Mackie::Button&) +Mackie::LedState +MackieControlProtocol::click_press (Mackie::Button&) { return none; } -Mackie::LedState -MackieControlProtocol::click_release (Mackie::Button&) +Mackie::LedState +MackieControlProtocol::click_release (Mackie::Button&) { return none; } -Mackie::LedState -MackieControlProtocol::view_press (Mackie::Button&) +Mackie::LedState +MackieControlProtocol::view_press (Mackie::Button&) { return none; } -Mackie::LedState -MackieControlProtocol::view_release (Mackie::Button&) +Mackie::LedState +MackieControlProtocol::view_release (Mackie::Button&) { return none; } diff --git a/libs/surfaces/mackie/meter.cc b/libs/surfaces/mackie/meter.cc index bc148db185..91de8d6ef6 100644 --- a/libs/surfaces/mackie/meter.cc +++ b/libs/surfaces/mackie/meter.cc @@ -41,7 +41,7 @@ Meter::factory (Surface& surface, int id, const char* name, Group& group) return m; } -void +void Meter::notify_metering_state_changed(Surface& surface, bool transport_is_rolling, bool metering_active) { MidiByteArray msg; diff --git a/libs/surfaces/mackie/meter.h b/libs/surfaces/mackie/meter.h index 9ca5656664..1cbeeac0af 100644 --- a/libs/surfaces/mackie/meter.h +++ b/libs/surfaces/mackie/meter.h @@ -41,7 +41,7 @@ public: MidiByteArray zero(); static Control* factory (Surface&, int id, const char*, Group&); - + void notify_metering_state_changed(Surface& surface, bool transport_is_rolling, bool metering_active); private: diff --git a/libs/surfaces/mackie/strip.cc b/libs/surfaces/mackie/strip.cc index edf034e5c6..ca5c79e9e0 100644 --- a/libs/surfaces/mackie/strip.cc +++ b/libs/surfaces/mackie/strip.cc @@ -108,7 +108,7 @@ Strip::Strip (Surface& s, const std::string& name, int index, const map<Button:: 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()), + _surface->number(), index, Button::id_to_name (bb->bid()), bb->id(), b->second.base_id)); } } @@ -118,7 +118,7 @@ Strip::~Strip () /* surface is responsible for deleting all controls */ } -void +void Strip::add (Control & control) { Button* button; @@ -244,7 +244,7 @@ Strip::set_route (boost::shared_ptr<Route> r, bool /*with_messages*/) } } -void +void Strip::notify_all() { if (!_route) { @@ -261,7 +261,7 @@ Strip::notify_all() notify_record_enable_changed (); } -void +void Strip::notify_solo_changed () { if (_route && _solo) { @@ -269,7 +269,7 @@ Strip::notify_solo_changed () } } -void +void Strip::notify_mute_changed () { DEBUG_TRACE (DEBUG::MackieControl, string_compose ("Strip %1 mute changed\n", _index)); @@ -281,7 +281,7 @@ Strip::notify_mute_changed () } } -void +void Strip::notify_record_enable_changed () { if (_route && _recenable) { @@ -289,19 +289,19 @@ Strip::notify_record_enable_changed () } } -void +void Strip::notify_active_changed () { _surface->mcp().refresh_current_bank(); } -void +void Strip::notify_route_deleted () { _surface->mcp().refresh_current_bank(); } -void +void Strip::notify_gain_changed (bool force_update) { if (_route) { @@ -340,7 +340,7 @@ Strip::notify_gain_changed (bool force_update) } } -void +void Strip::notify_property_changed (const PropertyChange& what_changed) { if (!what_changed.contains (ARDOUR::Properties::name)) { @@ -361,7 +361,7 @@ Strip::notify_property_changed (const PropertyChange& what_changed) } } -void +void Strip::notify_panner_azi_changed (bool force_update) { if (_route) { @@ -400,7 +400,7 @@ Strip::notify_panner_azi_changed (bool force_update) } } -void +void Strip::notify_panner_width_changed (bool force_update) { if (_route) { @@ -731,7 +731,7 @@ Strip::redisplay () } } -void +void Strip::update_automation () { ARDOUR::AutoState gain_state = _route->gain_control()->automation_state(); @@ -926,7 +926,7 @@ Strip::reset_display () clear_display_reset (); } - + struct RouteCompareByName { bool operator() (boost::shared_ptr<Route> a, boost::shared_ptr<Route> b) { return a->name().compare (b->name()) < 0; @@ -1135,7 +1135,7 @@ Strip::reset_saved_values () } -void +void Strip::notify_metering_state_changed() { if (!_route || !_meter) { diff --git a/libs/surfaces/mackie/strip.h b/libs/surfaces/mackie/strip.h index b1b00bd8b6..4099dce8af 100644 --- a/libs/surfaces/mackie/strip.h +++ b/libs/surfaces/mackie/strip.h @@ -82,7 +82,7 @@ public: bool locked() const { return _controls_locked; } void gui_selection_changed (const ARDOUR::StrongRouteNotificationList&); - + void notify_metering_state_changed(); private: diff --git a/libs/surfaces/mackie/surface.cc b/libs/surfaces/mackie/surface.cc index a4b1feccad..51b03f86a3 100644 --- a/libs/surfaces/mackie/surface.cc +++ b/libs/surfaces/mackie/surface.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2012 Paul Davis + Copyright (C) 2012 Paul Davis 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 @@ -180,7 +180,7 @@ Surface::set_state (const XMLNode& node, int version) return 0; } -const MidiByteArray& +const MidiByteArray& Surface::sysex_hdr() const { switch (_stype) { @@ -201,7 +201,7 @@ static GlobalControlDefinition mackie_global_controls[] = { { "", 0, Led::factory, "" } }; -void +void Surface::init_controls() { Group* group; @@ -243,7 +243,7 @@ Surface::init_controls() } } -void +void Surface::init_strips (uint32_t n) { const map<Button::ID,StripButtonInfo>& strip_buttons (_mcp.device_info().strip_buttons()); @@ -268,7 +268,7 @@ Surface::setup_master () if ((m = _mcp.get_session().monitor_out()) == 0) { m = _mcp.get_session().master_out(); - } + } if (!m) { return; @@ -318,7 +318,7 @@ Surface::master_gain_changed () _last_master_gain_written = normalized_position; } -float +float Surface::scaled_delta (float delta, float current_speed) { /* XXX needs work before use */ @@ -327,7 +327,7 @@ Surface::scaled_delta (float delta, float current_speed) return ((sign * std::pow (delta + 1.0, 2.0)) + current_speed) / 100.0; } -void +void Surface::display_bank_start (uint32_t current_bank) { if (current_bank == 0) { @@ -339,7 +339,7 @@ Surface::display_bank_start (uint32_t current_bank) } } -void +void Surface::blank_jog_ring () { Control* control = controls_by_device_independent_id[Jog::ID]; @@ -358,13 +358,13 @@ Surface::scrub_scaling_factor () const return 100.0; } -void +void Surface::connect_to_signals () { if (!_connected) { - DEBUG_TRACE (DEBUG::MackieControl, string_compose ("Surface %1 connecting to signals on port %2\n", + DEBUG_TRACE (DEBUG::MackieControl, string_compose ("Surface %1 connecting to signals on port %2\n", number(), _port->input_port().name())); MIDI::Parser* p = _port->input_port().parser(); @@ -396,7 +396,7 @@ Surface::handle_midi_pitchbend_message (MIDI::Parser&, MIDI::pitchbend_t pb, uin * from the MIDI::Parser conveys the fader ID, which was given by the * channel ID in the status byte. * - * Instead, we have used bind() to supply the fader-within-strip ID + * Instead, we have used bind() to supply the fader-within-strip ID * when we connected to the per-channel pitchbend events. */ @@ -433,21 +433,21 @@ Surface::handle_midi_pitchbend_message (MIDI::Parser&, MIDI::pitchbend_t pb, uin } } -void +void Surface::handle_midi_note_on_message (MIDI::Parser &, MIDI::EventTwoBytes* ev) { DEBUG_TRACE (DEBUG::MackieControl, string_compose ("Surface::handle_midi_note_on_message %1 = %2\n", (int) ev->note_number, (int) ev->velocity)); if (_mcp.device_info().no_handshake()) { turn_it_on (); - } + } if (_mcp.device_info().device_type() == DeviceInfo::HUI && ev->note_number == 0 && ev->velocity == 127) { turn_it_on (); } /* fader touch sense is given by "buttons" 0xe..0xe7 and 0xe8 for the - * master. + * master. */ if (ev->note_number >= 0xE0 && ev->note_number <= 0xE8) { @@ -487,7 +487,7 @@ Surface::handle_midi_note_on_message (MIDI::Parser &, MIDI::EventTwoBytes* ev) } } -void +void Surface::handle_midi_controller_message (MIDI::Parser &, MIDI::EventTwoBytes* ev) { DEBUG_TRACE (DEBUG::MackieControl, string_compose ("SurfacePort::handle_midi_controller %1 = %2\n", (int) ev->controller_number, (int) ev->value)); @@ -499,7 +499,7 @@ Surface::handle_midi_controller_message (MIDI::Parser &, MIDI::EventTwoBytes* ev Pot* pot = pots[ev->controller_number]; // bit 6 gives the sign - float sign = (ev->value & 0x40) == 0 ? 1.0 : -1.0; + float sign = (ev->value & 0x40) == 0 ? 1.0 : -1.0; // bits 0..5 give the velocity. we interpret this as "ticks // moved before this message was sent" float ticks = (ev->value & 0x3f); @@ -532,10 +532,10 @@ Surface::handle_midi_controller_message (MIDI::Parser &, MIDI::EventTwoBytes* ev Strip* strip = dynamic_cast<Strip*> (&pot->group()); if (strip) { strip->handle_pot (*pot, delta); - } + } } -void +void Surface::handle_midi_sysex (MIDI::Parser &, MIDI::byte * raw_bytes, size_t count) { MidiByteArray bytes (count, raw_bytes); @@ -547,7 +547,7 @@ Surface::handle_midi_sysex (MIDI::Parser &, MIDI::byte * raw_bytes, size_t count } /* always save the device type ID so that our outgoing sysex messages - * are correct + * are correct */ if (_stype == mcu) { @@ -558,8 +558,8 @@ Surface::handle_midi_sysex (MIDI::Parser &, MIDI::byte * raw_bytes, size_t count switch (bytes[5]) { case 0x01: - /* MCP: Device Ready - LCP: Connection Challenge + /* MCP: Device Ready + LCP: Connection Challenge */ if (bytes[4] == 0x10 || bytes[4] == 0x11) { DEBUG_TRACE (DEBUG::MackieControl, "Logic Control Device connection challenge\n"); @@ -589,7 +589,7 @@ Surface::handle_midi_sysex (MIDI::Parser &, MIDI::byte * raw_bytes, size_t count } } -static MidiByteArray +static MidiByteArray calculate_challenge_response (MidiByteArray::iterator begin, MidiByteArray::iterator end) { MidiByteArray l; @@ -609,7 +609,7 @@ calculate_challenge_response (MidiByteArray::iterator begin, MidiByteArray::iter } // not used right now -MidiByteArray +MidiByteArray Surface::host_connection_query (MidiByteArray & bytes) { MidiByteArray response; @@ -635,7 +635,7 @@ Surface::host_connection_query (MidiByteArray & bytes) } // not used right now -MidiByteArray +MidiByteArray Surface::host_connection_confirmation (const MidiByteArray & bytes) { DEBUG_TRACE (DEBUG::MackieControl, string_compose ("host_connection_confirmation: %1\n", bytes)); @@ -673,7 +673,7 @@ Surface::turn_it_on () } } -void +void Surface::write_sysex (const MidiByteArray & mba) { if (mba.empty()) { @@ -685,7 +685,7 @@ Surface::write_sysex (const MidiByteArray & mba) _port->write (buf); } -void +void Surface::write_sysex (MIDI::byte msg) { MidiByteArray buf; @@ -698,7 +698,7 @@ Surface::n_strips (bool with_locked_strips) const { if (with_locked_strips) { return strips.size(); - } + } uint32_t n = 0; @@ -782,7 +782,7 @@ Surface::redisplay () } void -Surface::write (const MidiByteArray& data) +Surface::write (const MidiByteArray& data) { if (_active) { _port->write (data); @@ -819,7 +819,7 @@ Surface::map_routes (const vector<boost::shared_ptr<Route> >& routes) } -static char +static char translate_seven_segment (char achar) { achar = toupper (achar); @@ -876,7 +876,7 @@ Surface::display_timecode (const std::string & timecode, const std::string & las } // pad to 10 characters - while (local_timecode.length() < 10) { + while (local_timecode.length() < 10) { local_timecode += " "; } @@ -1012,7 +1012,7 @@ Surface::route_is_locked_to_strip (boost::shared_ptr<Route> r) const return false; } -void +void Surface::notify_metering_state_changed() { for (Strips::const_iterator s = strips.begin(); s != strips.end(); ++s) { @@ -1026,7 +1026,7 @@ Surface::reset () if (_port) { /* reset msg for Mackie Control */ MidiByteArray msg (8, MIDI::sysex, 0x00, 0x00, 0x66, 0x14, 0x08, 0x00, MIDI::eox); - _port->write (msg); + _port->write (msg); msg[4] = 0x15; /* reset Mackie XT */ _port->write (msg); msg[4] = 0x10; /* reset Logic Control */ @@ -1042,7 +1042,7 @@ Surface::toggle_backlight () if (_port) { int onoff = random() %2; MidiByteArray msg (8, MIDI::sysex, 0x00, 0x00, 0x66, 0x14, 0x0a, onoff, MIDI::eox); - _port->write (msg); + _port->write (msg); msg[4] = 0x15; /* reset Mackie XT */ _port->write (msg); msg[4] = 0x10; /* reset Logic Control */ @@ -1057,7 +1057,7 @@ Surface::recalibrate_faders () { if (_port) { MidiByteArray msg (8, MIDI::sysex, 0x00, 0x00, 0x66, 0x14, 0x09, 0x00, MIDI::eox); - _port->write (msg); + _port->write (msg); msg[4] = 0x15; /* reset Mackie XT */ _port->write (msg); msg[4] = 0x10; /* reset Logic Control */ @@ -1080,7 +1080,7 @@ Surface::set_touch_sensitivity (int sensitivity) for (int fader = 0; fader < 9; ++fader) { msg[6] = fader; - _port->write (msg); + _port->write (msg); msg[4] = 0x15; /* reset Mackie XT */ _port->write (msg); msg[4] = 0x10; /* reset Logic Control */ diff --git a/libs/surfaces/mackie/surface.h b/libs/surfaces/mackie/surface.h index a3d874a89a..7ca620d3b6 100644 --- a/libs/surfaces/mackie/surface.h +++ b/libs/surfaces/mackie/surface.h @@ -154,7 +154,7 @@ public: void next_jog_mode (); void set_jog_mode (Mackie::JogWheel::Mode); - + void notify_metering_state_changed(); void turn_it_on (); diff --git a/libs/surfaces/mackie/surface_port.cc b/libs/surfaces/mackie/surface_port.cc index 3d7c1d66c6..4a8cff6e16 100644 --- a/libs/surfaces/mackie/surface_port.cc +++ b/libs/surfaces/mackie/surface_port.cc @@ -151,7 +151,7 @@ string fetch_errmsg (int error_number) return msg; } -int +int SurfacePort::write (const MidiByteArray & mba) { if (mba.empty()) { @@ -190,7 +190,7 @@ SurfacePort::write (const MidiByteArray & mba) return 0; } -ostream & +ostream & Mackie::operator << (ostream & os, const SurfacePort & port) { os << "{ "; diff --git a/libs/surfaces/mackie/surface_port.h b/libs/surfaces/mackie/surface_port.h index 1239bc533c..d22e46f4bf 100644 --- a/libs/surfaces/mackie/surface_port.h +++ b/libs/surfaces/mackie/surface_port.h @@ -50,12 +50,12 @@ class Surface; Make a relationship between a midi port and a Mackie device. */ -class SurfacePort +class SurfacePort { public: SurfacePort (Mackie::Surface&); virtual ~SurfacePort(); - + /// an easier way to output bytes via midi int write (const MidiByteArray&); diff --git a/libs/surfaces/mackie/timer.h b/libs/surfaces/mackie/timer.h index dd6066c87b..31470a92c3 100644 --- a/libs/surfaces/mackie/timer.h +++ b/libs/surfaces/mackie/timer.h @@ -1,16 +1,16 @@ /* Copyright (C) 1998, 1999, 2000, 2007 John Anderson - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library 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 Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. diff --git a/libs/surfaces/mackie/types.cc b/libs/surfaces/mackie/types.cc index f3a05e0f3c..9ee0431cd9 100644 --- a/libs/surfaces/mackie/types.cc +++ b/libs/surfaces/mackie/types.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2012 Paul Davis + Copyright (C) 2012 Paul Davis 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 diff --git a/libs/surfaces/mackie/types.h b/libs/surfaces/mackie/types.h index 3095248a1a..fd1b225c65 100644 --- a/libs/surfaces/mackie/types.h +++ b/libs/surfaces/mackie/types.h @@ -23,9 +23,9 @@ namespace ArdourSurface { namespace Mackie { -enum surface_type_t { - mcu, - ext, +enum surface_type_t { + mcu, + ext, }; /** |