mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 14:54:56 +01:00
MCU/UF8: reuse and special-case Mackie ctrl surface for SSL-UF8
This adds a unique namespace to the MCU source code, so it can be compiled multiple times resulting in different ctrl surfaces.
This commit is contained in:
parent
8dbd76e81c
commit
ec365820d8
42 changed files with 557 additions and 497 deletions
|
|
@ -26,7 +26,7 @@
|
|||
#include "control_group.h"
|
||||
|
||||
using namespace ArdourSurface;
|
||||
using namespace Mackie;
|
||||
using namespace ArdourSurface::MACKIE_NAMESPACE;
|
||||
|
||||
Control*
|
||||
Button::factory (Surface& surface, Button::ID bid, int id, const std::string& name, Group& group)
|
||||
|
|
|
|||
|
|
@ -26,9 +26,7 @@
|
|||
#include "controls.h"
|
||||
#include "led.h"
|
||||
|
||||
namespace ArdourSurface {
|
||||
|
||||
namespace Mackie {
|
||||
namespace ArdourSurface { namespace MACKIE_NAMESPACE {
|
||||
|
||||
class Surface;
|
||||
|
||||
|
|
|
|||
|
|
@ -20,10 +20,12 @@
|
|||
#ifndef __ardour_mackie_control_protocol_control_group_h__
|
||||
#define __ardour_mackie_control_protocol_control_group_h__
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace ArdourSurface {
|
||||
namespace Mackie {
|
||||
#include "types.h"
|
||||
|
||||
namespace ArdourSurface { namespace MACKIE_NAMESPACE {
|
||||
|
||||
class Control;
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
|
||||
using namespace std;
|
||||
using namespace ArdourSurface;
|
||||
using namespace Mackie;
|
||||
using namespace ArdourSurface::MACKIE_NAMESPACE;
|
||||
|
||||
using ARDOUR::AutomationControl;
|
||||
|
||||
|
|
@ -112,7 +112,7 @@ Control::stop_touch (Temporal::timepos_t const & when)
|
|||
}
|
||||
}
|
||||
|
||||
ostream & operator << (ostream & os, const ArdourSurface::Mackie::Control & control)
|
||||
ostream & operator << (ostream & os, const ArdourSurface::MACKIE_NAMESPACE::Control & control)
|
||||
{
|
||||
os << typeid (control).name();
|
||||
os << " { ";
|
||||
|
|
|
|||
|
|
@ -41,9 +41,7 @@ namespace ARDOUR {
|
|||
class AutomationControl;
|
||||
}
|
||||
|
||||
namespace ArdourSurface {
|
||||
|
||||
namespace Mackie {
|
||||
namespace ArdourSurface { namespace MACKIE_NAMESPACE {
|
||||
|
||||
class Strip;
|
||||
class Group;
|
||||
|
|
@ -93,6 +91,6 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
std::ostream & operator << (std::ostream & os, const ArdourSurface::Mackie::Control & control);
|
||||
std::ostream & operator << (std::ostream & os, const ArdourSurface::MACKIE_NAMESPACE::Control & control);
|
||||
|
||||
#endif /* __mackie_controls_h__ */
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
using namespace PBD;
|
||||
using namespace ARDOUR;
|
||||
using namespace ArdourSurface;
|
||||
using namespace Mackie;
|
||||
using namespace ArdourSurface::MACKIE_NAMESPACE;
|
||||
|
||||
using std::string;
|
||||
using std::vector;
|
||||
|
|
@ -69,7 +69,11 @@ DeviceInfo::DeviceInfo()
|
|||
, _has_separate_meters (false)
|
||||
, _single_fader_follows_selection (false)
|
||||
, _device_type (MCU)
|
||||
#ifdef UF8
|
||||
, _name (X_("UF8/UF1"))
|
||||
#else
|
||||
, _name (X_("Mackie Control Universal Pro"))
|
||||
#endif
|
||||
{
|
||||
mackie_control_buttons ();
|
||||
}
|
||||
|
|
@ -576,8 +580,15 @@ devinfo_search_path ()
|
|||
static bool
|
||||
devinfo_filter (const string &str, void* /*arg*/)
|
||||
{
|
||||
#ifdef UF8
|
||||
return (str.length() > strlen(devinfo_suffix) &&
|
||||
str.find ("uf8") != string::npos &&
|
||||
str.find (devinfo_suffix) == (str.length() - strlen (devinfo_suffix))
|
||||
);
|
||||
#else
|
||||
return (str.length() > strlen(devinfo_suffix) &&
|
||||
str.find (devinfo_suffix) == (str.length() - strlen (devinfo_suffix)));
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -617,7 +628,7 @@ DeviceInfo::reload_device_info ()
|
|||
}
|
||||
}
|
||||
|
||||
std::ostream& operator<< (std::ostream& os, const Mackie::DeviceInfo& di)
|
||||
std::ostream& operator<< (std::ostream& os, const MACKIE_NAMESPACE::DeviceInfo& di)
|
||||
{
|
||||
os << di.name() << ' '
|
||||
<< di.strip_cnt() << ' '
|
||||
|
|
|
|||
|
|
@ -26,12 +26,11 @@
|
|||
#include <map>
|
||||
|
||||
#include "button.h"
|
||||
#include "types.h"
|
||||
|
||||
class XMLNode;
|
||||
|
||||
namespace ArdourSurface {
|
||||
|
||||
namespace Mackie {
|
||||
namespace ArdourSurface { namespace MACKIE_NAMESPACE {
|
||||
|
||||
struct GlobalButtonInfo {
|
||||
std::string label; // visible to user
|
||||
|
|
@ -141,6 +140,6 @@ class DeviceInfo
|
|||
} // Mackie namespace
|
||||
} // ArdourSurface namespace
|
||||
|
||||
std::ostream& operator<< (std::ostream& os, const ArdourSurface::Mackie::DeviceInfo& di);
|
||||
std::ostream& operator<< (std::ostream& os, const ArdourSurface::MACKIE_NAMESPACE::DeviceInfo& di);
|
||||
|
||||
#endif /* __ardour_mackie_control_protocol_device_info_h__ */
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@
|
|||
using namespace PBD;
|
||||
using namespace ARDOUR;
|
||||
using namespace ArdourSurface;
|
||||
using namespace Mackie;
|
||||
using namespace ArdourSurface::MACKIE_NAMESPACE;
|
||||
|
||||
using std::string;
|
||||
using std::vector;
|
||||
|
|
|
|||
|
|
@ -29,9 +29,7 @@
|
|||
|
||||
class XMLNode;
|
||||
|
||||
namespace ArdourSurface {
|
||||
|
||||
namespace Mackie {
|
||||
namespace ArdourSurface { namespace MACKIE_NAMESPACE {
|
||||
|
||||
class DeviceProfile
|
||||
{
|
||||
|
|
|
|||
|
|
@ -28,9 +28,9 @@
|
|||
#include "control_group.h"
|
||||
#include "mackie_control_protocol.h"
|
||||
|
||||
using namespace ArdourSurface;
|
||||
using namespace Mackie;
|
||||
using namespace PBD;
|
||||
using namespace ArdourSurface;
|
||||
using namespace ArdourSurface::MACKIE_NAMESPACE;
|
||||
|
||||
Control*
|
||||
Fader::factory (Surface& surface, int id, const char* name, Group& group)
|
||||
|
|
|
|||
|
|
@ -22,9 +22,7 @@
|
|||
|
||||
#include "controls.h"
|
||||
|
||||
namespace ArdourSurface {
|
||||
|
||||
namespace Mackie {
|
||||
namespace ArdourSurface { namespace MACKIE_NAMESPACE {
|
||||
|
||||
class Fader : public Control
|
||||
{
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@
|
|||
#include "pbd/error.h"
|
||||
#include "pbd/unwind.h"
|
||||
#include "pbd/strsplit.h"
|
||||
#include "pbd/file_utils.h"
|
||||
|
||||
#include "gtkmm2ext/actions.h"
|
||||
#include "gtkmm2ext/action_model.h"
|
||||
|
|
@ -43,6 +44,7 @@
|
|||
#include "gtkmm2ext/utils.h"
|
||||
|
||||
#include "ardour/audioengine.h"
|
||||
#include "ardour/filesystem_paths.h"
|
||||
#include "ardour/port.h"
|
||||
#include "ardour/rc_configuration.h"
|
||||
|
||||
|
|
@ -57,7 +59,7 @@
|
|||
using namespace std;
|
||||
using namespace Gtk;
|
||||
using namespace ArdourSurface;
|
||||
using namespace Mackie;
|
||||
using namespace ArdourSurface::MACKIE_NAMESPACE;
|
||||
|
||||
void*
|
||||
MackieControlProtocol::get_gui () const
|
||||
|
|
@ -103,7 +105,9 @@ MackieControlProtocolGUI::MackieControlProtocolGUI (MackieControlProtocol& p)
|
|||
, ignore_active_change (false)
|
||||
{
|
||||
Gtk::Label* l;
|
||||
#ifndef UF8
|
||||
Gtk::Alignment* align;
|
||||
#endif
|
||||
int row = 0;
|
||||
|
||||
set_border_width (12);
|
||||
|
|
@ -112,6 +116,17 @@ MackieControlProtocolGUI::MackieControlProtocolGUI (MackieControlProtocol& p)
|
|||
table.set_col_spacings (6);
|
||||
table.set_border_width (12);
|
||||
table.set_homogeneous (false);
|
||||
#ifdef UF8
|
||||
std::string data_file_path;
|
||||
string name = "ssl-uf8-small.png";
|
||||
PBD::Searchpath spath(ARDOUR::ardour_data_search_path());
|
||||
spath.add_subdirectory_to_paths ("icons");
|
||||
find_file (spath, name, data_file_path);
|
||||
if (!data_file_path.empty()) {
|
||||
image.set (data_file_path);
|
||||
hpacker.pack_start (image, false, false);
|
||||
}
|
||||
#endif
|
||||
|
||||
l = manage (new Gtk::Label (_("Device Type:")));
|
||||
l->set_alignment (1.0, 0.5);
|
||||
|
|
@ -149,6 +164,7 @@ MackieControlProtocolGUI::MackieControlProtocolGUI (MackieControlProtocol& p)
|
|||
table.attach (*_device_dependent_widget, 0, 12, row, row+1, AttachOptions(0), AttachOptions(0), 0, 0);
|
||||
row++;
|
||||
|
||||
#ifndef UF8
|
||||
/* back to the boilerplate */
|
||||
|
||||
RadioButtonGroup rb_group = absolute_touch_mode_button.get_group();
|
||||
|
|
@ -222,8 +238,11 @@ MackieControlProtocolGUI::MackieControlProtocolGUI (MackieControlProtocol& p)
|
|||
_profile_combo.set_active_text (p.device_profile().name());
|
||||
_profile_combo.signal_changed().connect (sigc::mem_fun (*this, &MackieControlProtocolGUI::profile_combo_changed));
|
||||
|
||||
append_page (table, _("Device Setup"));
|
||||
table.show_all();
|
||||
#endif
|
||||
hpacker.pack_start(table, false, false);
|
||||
append_page (hpacker, _("Device Setup"));
|
||||
hpacker.show_all();
|
||||
|
||||
|
||||
/* function key editor */
|
||||
|
||||
|
|
@ -503,13 +522,13 @@ MackieControlProtocolGUI::refresh_function_key_editor ()
|
|||
DeviceProfile dp (_cp.device_profile());
|
||||
DeviceInfo di (_cp.device_info());
|
||||
|
||||
for (int n = 0; n < Mackie::Button::FinalGlobalButton; ++n) {
|
||||
for (int n = 0; n < MACKIE_NAMESPACE::Button::FinalGlobalButton; ++n) {
|
||||
|
||||
Mackie::Button::ID bid = (Mackie::Button::ID) n;
|
||||
MACKIE_NAMESPACE::Button::ID bid = (MACKIE_NAMESPACE::Button::ID) n;
|
||||
|
||||
row = *(function_key_model->append());
|
||||
if (di.global_buttons().find (bid) == di.global_buttons().end()) {
|
||||
row[function_key_columns.name] = Mackie::Button::id_to_name (bid);
|
||||
row[function_key_columns.name] = MACKIE_NAMESPACE::Button::id_to_name (bid);
|
||||
} else {
|
||||
row[function_key_columns.name] = di.get_global_button_name (bid) + "*";
|
||||
}
|
||||
|
|
@ -523,7 +542,7 @@ MackieControlProtocolGUI::refresh_function_key_editor ()
|
|||
* reserved for hard-coded actions.
|
||||
*/
|
||||
|
||||
if (bid >= Mackie::Button::F1 && bid <= Mackie::Button::F8) {
|
||||
if (bid >= MACKIE_NAMESPACE::Button::F1 && bid <= MACKIE_NAMESPACE::Button::F8) {
|
||||
|
||||
action = dp.get_button_action (bid, 0);
|
||||
if (action.empty()) {
|
||||
|
|
@ -548,7 +567,7 @@ MackieControlProtocolGUI::refresh_function_key_editor ()
|
|||
* reserved for hard-coded actions.
|
||||
*/
|
||||
|
||||
if (bid >= Mackie::Button::F1 && bid <= Mackie::Button::F8) {
|
||||
if (bid >= MACKIE_NAMESPACE::Button::F1 && bid <= MACKIE_NAMESPACE::Button::F8) {
|
||||
|
||||
action = dp.get_button_action (bid, MackieControlProtocol::MODIFIER_SHIFT);
|
||||
if (action.empty()) {
|
||||
|
|
|
|||
|
|
@ -19,14 +19,18 @@
|
|||
|
||||
#include <vector>
|
||||
|
||||
#include <gtkmm/combobox.h>
|
||||
#include <gtkmm/comboboxtext.h>
|
||||
#include <gtkmm/box.h>
|
||||
#include <gtkmm/spinbutton.h>
|
||||
#include <gtkmm/table.h>
|
||||
#include <gtkmm/treeview.h>
|
||||
#include <gtkmm/image.h>
|
||||
#include <gtkmm/liststore.h>
|
||||
#include <gtkmm/notebook.h>
|
||||
#include <gtkmm/radiobutton.h>
|
||||
#include <gtkmm/scale.h>
|
||||
#include <gtkmm/scrolledwindow.h>
|
||||
#include <gtkmm/treeview.h>
|
||||
#include <gtkmm/treestore.h>
|
||||
|
||||
namespace Gtk {
|
||||
class CellRendererCombo;
|
||||
|
|
@ -40,13 +44,10 @@ namespace ActionManager {
|
|||
class ActionModel;
|
||||
}
|
||||
|
||||
namespace ArdourSurface {
|
||||
namespace ArdourSurface { namespace MACKIE_NAMESPACE {
|
||||
|
||||
class MackieControlProtocol;
|
||||
|
||||
namespace Mackie {
|
||||
class Surface;
|
||||
}
|
||||
class Surface;
|
||||
|
||||
class MackieControlProtocolGUI : public Gtk::Notebook
|
||||
{
|
||||
|
|
@ -84,7 +85,7 @@ class MackieControlProtocolGUI : public Gtk::Notebook
|
|||
add (shiftcontrol);
|
||||
};
|
||||
Gtk::TreeModelColumn<std::string> name;
|
||||
Gtk::TreeModelColumn<Mackie::Button::ID> id;
|
||||
Gtk::TreeModelColumn<MACKIE_NAMESPACE::Button::ID> id;
|
||||
Gtk::TreeModelColumn<std::string> plain;
|
||||
Gtk::TreeModelColumn<std::string> shift;
|
||||
Gtk::TreeModelColumn<std::string> control;
|
||||
|
|
@ -123,6 +124,9 @@ class MackieControlProtocolGUI : public Gtk::Notebook
|
|||
Gtk::Adjustment ipmidi_base_port_adjustment;
|
||||
Gtk::Button discover_button;
|
||||
|
||||
Gtk::HBox hpacker;
|
||||
Gtk::Image image;
|
||||
|
||||
void discover_clicked ();
|
||||
void recalibrate_faders ();
|
||||
void toggle_backlight ();
|
||||
|
|
@ -138,7 +142,7 @@ class MackieControlProtocolGUI : public Gtk::Notebook
|
|||
void update_port_combos (std::vector<std::string> const&, std::vector<std::string> const&,
|
||||
Gtk::ComboBox* input_combo,
|
||||
Gtk::ComboBox* output_combo,
|
||||
std::shared_ptr<Mackie::Surface> surface);
|
||||
std::shared_ptr<MACKIE_NAMESPACE::Surface> surface);
|
||||
|
||||
PBD::ScopedConnectionList _port_connections;
|
||||
void connection_handler ();
|
||||
|
|
@ -146,7 +150,8 @@ class MackieControlProtocolGUI : public Gtk::Notebook
|
|||
Glib::RefPtr<Gtk::ListStore> build_midi_port_list (std::vector<std::string> const & ports, bool for_input);
|
||||
bool _ignore_profile_changed;
|
||||
bool ignore_active_change;
|
||||
void active_port_changed (Gtk::ComboBox* combo, std::weak_ptr<Mackie::Surface> ws, bool for_input);
|
||||
void active_port_changed (Gtk::ComboBox* combo, std::weak_ptr<MACKIE_NAMESPACE::Surface> ws, bool for_input);
|
||||
};
|
||||
|
||||
}
|
||||
} // namespace Mackie
|
||||
} // namespace ArdourSurface
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ using namespace ARDOUR;
|
|||
using namespace PBD;
|
||||
using namespace std;
|
||||
using namespace ArdourSurface;
|
||||
using namespace Mackie;
|
||||
using namespace ArdourSurface::MACKIE_NAMESPACE;
|
||||
|
||||
static ControlProtocol*
|
||||
new_mackie_protocol (Session* s)
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
#include "control_group.h"
|
||||
|
||||
using namespace ArdourSurface;
|
||||
using namespace Mackie;
|
||||
using namespace ArdourSurface::MACKIE_NAMESPACE;
|
||||
|
||||
const int Jog::ID = 0x3c;
|
||||
|
||||
|
|
|
|||
|
|
@ -23,8 +23,7 @@
|
|||
#include "controls.h"
|
||||
#include "pot.h"
|
||||
|
||||
namespace ArdourSurface {
|
||||
namespace Mackie {
|
||||
namespace ArdourSurface { namespace MACKIE_NAMESPACE {
|
||||
|
||||
class Jog : public Pot
|
||||
{
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
#include <algorithm>
|
||||
|
||||
using namespace ArdourSurface;
|
||||
using namespace Mackie;
|
||||
using namespace ArdourSurface::MACKIE_NAMESPACE;
|
||||
|
||||
JogWheel::JogWheel (MackieControlProtocol & mcp)
|
||||
: _mcp (mcp)
|
||||
|
|
|
|||
|
|
@ -26,13 +26,10 @@
|
|||
#include <deque>
|
||||
#include <queue>
|
||||
|
||||
namespace ArdourSurface {
|
||||
namespace ArdourSurface { namespace MACKIE_NAMESPACE {
|
||||
|
||||
class MackieControlProtocol;
|
||||
|
||||
namespace Mackie
|
||||
{
|
||||
|
||||
class JogWheel
|
||||
{
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
#include "control_group.h"
|
||||
|
||||
using namespace ArdourSurface;
|
||||
using namespace Mackie;
|
||||
using namespace ArdourSurface::MACKIE_NAMESPACE;
|
||||
|
||||
const int Led::FaderTouch = 0x70;
|
||||
const int Led::Timecode = 0x71;
|
||||
|
|
|
|||
|
|
@ -24,9 +24,7 @@
|
|||
#include "midi_byte_array.h"
|
||||
#include "types.h"
|
||||
|
||||
namespace ArdourSurface {
|
||||
|
||||
namespace Mackie {
|
||||
namespace ArdourSurface { namespace MACKIE_NAMESPACE {
|
||||
|
||||
class Led : public Control
|
||||
{
|
||||
|
|
|
|||
|
|
@ -21,8 +21,9 @@
|
|||
|
||||
#include <stdexcept>
|
||||
|
||||
namespace ArdourSurface {
|
||||
namespace Mackie {
|
||||
#include "types.h"
|
||||
|
||||
namespace ArdourSurface { namespace MACKIE_NAMESPACE {
|
||||
|
||||
class MackieControlException : public std::exception
|
||||
{
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ using namespace std;
|
|||
using namespace PBD;
|
||||
using namespace Glib;
|
||||
using namespace ArdourSurface;
|
||||
using namespace Mackie;
|
||||
using namespace ArdourSurface::MACKIE_NAMESPACE;
|
||||
|
||||
#include "pbd/i18n.h"
|
||||
|
||||
|
|
@ -139,7 +139,7 @@ MackieControlProtocol::MackieControlProtocol (Session& session)
|
|||
{
|
||||
DEBUG_TRACE (DEBUG::MackieControl, "MackieControlProtocol::MackieControlProtocol\n");
|
||||
|
||||
_subview = Mackie::SubviewFactory::instance()->create_subview(Subview::None, *this, std::shared_ptr<Stripable>());
|
||||
_subview = MACKIE_NAMESPACE::SubviewFactory::instance()->create_subview(Subview::None, *this, std::shared_ptr<Stripable>());
|
||||
|
||||
DeviceInfo::reload_device_info ();
|
||||
DeviceProfile::reload_device_profiles ();
|
||||
|
|
@ -688,7 +688,7 @@ MackieControlProtocol::device_ready ()
|
|||
}
|
||||
}
|
||||
update_surfaces ();
|
||||
set_subview_mode (Mackie::Subview::None, std::shared_ptr<Stripable>());
|
||||
set_subview_mode (MACKIE_NAMESPACE::Subview::None, std::shared_ptr<Stripable>());
|
||||
set_flip_mode (Normal);
|
||||
}
|
||||
|
||||
|
|
@ -849,9 +849,9 @@ MackieControlProtocol::set_device (const string& device_name, bool force)
|
|||
}
|
||||
|
||||
gboolean
|
||||
ArdourSurface::ipmidi_input_handler (GIOChannel*, GIOCondition condition, void *data)
|
||||
ArdourSurface::MACKIE_NAMESPACE::ipmidi_input_handler (GIOChannel*, GIOCondition condition, void *data)
|
||||
{
|
||||
ArdourSurface::MackieControlProtocol::ipMIDIHandler* ipm = static_cast<ArdourSurface::MackieControlProtocol::ipMIDIHandler*>(data);
|
||||
MackieControlProtocol::ipMIDIHandler* ipm = static_cast<MackieControlProtocol::ipMIDIHandler*>(data);
|
||||
return ipm->mcp->midi_input_handler (Glib::IOCondition (condition), ipm->port);
|
||||
}
|
||||
|
||||
|
|
@ -1331,6 +1331,7 @@ MackieControlProtocol::notify_solo_active_changed (bool active)
|
|||
if (x != surface->controls_by_device_independent_id.end()) {
|
||||
Led* rude_solo = dynamic_cast<Led*> (x->second);
|
||||
if (rude_solo) {
|
||||
update_global_button (Button::ClearSolo, active);
|
||||
surface->write (rude_solo->set_state (active ? flashing : off));
|
||||
}
|
||||
}
|
||||
|
|
@ -1493,7 +1494,7 @@ MackieControlProtocol::stop ()
|
|||
}
|
||||
|
||||
void
|
||||
MackieControlProtocol::update_led (Surface& surface, Button& button, Mackie::LedState ls)
|
||||
MackieControlProtocol::update_led (Surface& surface, Button& button, MACKIE_NAMESPACE::LedState ls)
|
||||
{
|
||||
if (ls != none) {
|
||||
surface.port().write (button.set_state (ls));
|
||||
|
|
@ -1807,7 +1808,7 @@ MackieControlProtocol::set_subview_mode (Subview::Mode sm, std::shared_ptr<Strip
|
|||
if (!surfaces.empty()) {
|
||||
if (!reason_why_subview_not_possible.empty()) {
|
||||
surfaces.front()->display_message_for (reason_why_subview_not_possible, 1000);
|
||||
if (_subview->subview_mode() != Mackie::Subview::None) {
|
||||
if (_subview->subview_mode() != MACKIE_NAMESPACE::Subview::None) {
|
||||
/* redisplay current subview mode after
|
||||
that message goes away.
|
||||
*/
|
||||
|
|
@ -1822,7 +1823,7 @@ MackieControlProtocol::set_subview_mode (Subview::Mode sm, std::shared_ptr<Strip
|
|||
return false;
|
||||
}
|
||||
|
||||
_subview = Mackie::SubviewFactory::instance()->create_subview(sm, *this, r);
|
||||
_subview = MACKIE_NAMESPACE::SubviewFactory::instance()->create_subview(sm, *this, r);
|
||||
/* Catch the current subview stripable going away */
|
||||
if (_subview->subview_stripable()) {
|
||||
_subview->subview_stripable()->DropReferences.connect (_subview->subview_stripable_connections(), MISSING_INVALIDATOR,
|
||||
|
|
@ -1854,7 +1855,7 @@ MackieControlProtocol::set_view_mode (ViewMode m)
|
|||
|
||||
/* leave subview mode, whatever it was */
|
||||
DEBUG_TRACE (DEBUG::MackieControl, "\t\t\tsubview mode reset in MackieControlProtocol::set_view_mode \n");
|
||||
set_subview_mode (Mackie::Subview::None, std::shared_ptr<Stripable>());
|
||||
set_subview_mode (MACKIE_NAMESPACE::Subview::None, std::shared_ptr<Stripable>());
|
||||
display_view_mode ();
|
||||
}
|
||||
|
||||
|
|
@ -2446,12 +2447,12 @@ MackieControlProtocol::stripable_selection_changed ()
|
|||
*/
|
||||
|
||||
if (!set_subview_mode (_subview->subview_mode(), s)) {
|
||||
set_subview_mode (Mackie::Subview::None, std::shared_ptr<Stripable>());
|
||||
set_subview_mode (MACKIE_NAMESPACE::Subview::None, std::shared_ptr<Stripable>());
|
||||
}
|
||||
}
|
||||
else {
|
||||
// none selected or not on surface
|
||||
set_subview_mode(Mackie::Subview::None, std::shared_ptr<Stripable>());
|
||||
set_subview_mode(MACKIE_NAMESPACE::Subview::None, std::shared_ptr<Stripable>());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -57,15 +57,13 @@ namespace MIDI {
|
|||
class Port;
|
||||
}
|
||||
|
||||
namespace ArdourSurface {
|
||||
namespace ArdourSurface { namespace MACKIE_NAMESPACE {
|
||||
|
||||
namespace Mackie {
|
||||
class Surface;
|
||||
class Control;
|
||||
class SurfacePort;
|
||||
class Button;
|
||||
class Strip;
|
||||
}
|
||||
class Surface;
|
||||
class Control;
|
||||
class SurfacePort;
|
||||
class Button;
|
||||
class Strip;
|
||||
|
||||
gboolean ipmidi_input_handler (GIOChannel*, GIOCondition condition, void *data);
|
||||
|
||||
|
|
@ -114,11 +112,11 @@ class MackieControlProtocol
|
|||
|
||||
static MackieControlProtocol* instance() { return _instance; }
|
||||
|
||||
const Mackie::DeviceInfo& device_info() const { return _device_info; }
|
||||
Mackie::DeviceProfile& device_profile() { return _device_profile; }
|
||||
const MACKIE_NAMESPACE::DeviceInfo& device_info() const { return _device_info; }
|
||||
MACKIE_NAMESPACE::DeviceProfile& device_profile() { return _device_profile; }
|
||||
|
||||
PBD::Signal0<void> DeviceChanged;
|
||||
PBD::Signal1<void,std::shared_ptr<Mackie::Surface> > ConnectionChange;
|
||||
PBD::Signal1<void,std::shared_ptr<MACKIE_NAMESPACE::Surface> > ConnectionChange;
|
||||
|
||||
void device_ready ();
|
||||
|
||||
|
|
@ -128,7 +126,7 @@ class MackieControlProtocol
|
|||
|
||||
FlipMode flip_mode () const { return _flip_mode; }
|
||||
ViewMode view_mode () const { return _view_mode; }
|
||||
std::shared_ptr<Mackie::Subview> subview() { return _subview; }
|
||||
std::shared_ptr<MACKIE_NAMESPACE::Subview> subview() { return _subview; }
|
||||
bool zoom_mode () const { return modifier_state() & MODIFIER_ZOOM; }
|
||||
bool metering_active () const { return _metering_active; }
|
||||
|
||||
|
|
@ -147,7 +145,7 @@ class MackieControlProtocol
|
|||
void set_automation_state (ARDOUR::AutoState);
|
||||
|
||||
void set_view_mode (ViewMode);
|
||||
bool set_subview_mode (Mackie::Subview::Mode, std::shared_ptr<ARDOUR::Stripable>);
|
||||
bool set_subview_mode (MACKIE_NAMESPACE::Subview::Mode, std::shared_ptr<ARDOUR::Stripable>);
|
||||
bool redisplay_subview_mode ();
|
||||
void set_flip_mode (FlipMode);
|
||||
void display_view_mode ();
|
||||
|
|
@ -161,14 +159,14 @@ class MackieControlProtocol
|
|||
*/
|
||||
|
||||
mutable Glib::Threads::Mutex surfaces_lock;
|
||||
typedef std::list<std::shared_ptr<Mackie::Surface> > Surfaces;
|
||||
typedef std::list<std::shared_ptr<MACKIE_NAMESPACE::Surface> > Surfaces;
|
||||
Surfaces surfaces;
|
||||
|
||||
std::shared_ptr<Mackie::Surface> get_surface_by_raw_pointer (void*) const;
|
||||
std::shared_ptr<Mackie::Surface> nth_surface (uint32_t) const;
|
||||
std::shared_ptr<MACKIE_NAMESPACE::Surface> get_surface_by_raw_pointer (void*) const;
|
||||
std::shared_ptr<MACKIE_NAMESPACE::Surface> nth_surface (uint32_t) const;
|
||||
|
||||
uint32_t global_index (Mackie::Strip&);
|
||||
uint32_t global_index_locked (Mackie::Strip&);
|
||||
uint32_t global_index (MACKIE_NAMESPACE::Strip&);
|
||||
uint32_t global_index_locked (MACKIE_NAMESPACE::Strip&);
|
||||
|
||||
std::list<std::shared_ptr<ARDOUR::Bundle> > bundles ();
|
||||
|
||||
|
|
@ -181,7 +179,7 @@ class MackieControlProtocol
|
|||
void* get_gui () const;
|
||||
void tear_down_gui ();
|
||||
|
||||
void handle_button_event (Mackie::Surface&, Mackie::Button& button, Mackie::ButtonState);
|
||||
void handle_button_event (MACKIE_NAMESPACE::Surface&, MACKIE_NAMESPACE::Button& button, MACKIE_NAMESPACE::ButtonState);
|
||||
|
||||
void notify_subview_stripable_deleted ();
|
||||
void notify_routes_added (ARDOUR::RouteList &);
|
||||
|
|
@ -212,10 +210,10 @@ class MackieControlProtocol
|
|||
void update_timecode_beats_led();
|
||||
|
||||
/// 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_led(MACKIE_NAMESPACE::Surface&, MACKIE_NAMESPACE::Button & button, MACKIE_NAMESPACE::LedState);
|
||||
|
||||
void update_global_button (int id, Mackie::LedState);
|
||||
void update_global_led (int id, Mackie::LedState);
|
||||
void update_global_button (int id, MACKIE_NAMESPACE::LedState);
|
||||
void update_global_led (int id, MACKIE_NAMESPACE::LedState);
|
||||
|
||||
ARDOUR::Session & get_session() { return *session; }
|
||||
samplepos_t transport_sample() const;
|
||||
|
|
@ -283,23 +281,23 @@ class MackieControlProtocol
|
|||
private:
|
||||
|
||||
struct ButtonHandlers {
|
||||
Mackie::LedState (MackieControlProtocol::*press) (Mackie::Button&);
|
||||
Mackie::LedState (MackieControlProtocol::*release) (Mackie::Button&);
|
||||
MACKIE_NAMESPACE::LedState (MackieControlProtocol::*press) (MACKIE_NAMESPACE::Button&);
|
||||
MACKIE_NAMESPACE::LedState (MackieControlProtocol::*release) (MACKIE_NAMESPACE::Button&);
|
||||
|
||||
ButtonHandlers (Mackie::LedState (MackieControlProtocol::*p) (Mackie::Button&),
|
||||
Mackie::LedState (MackieControlProtocol::*r) (Mackie::Button&))
|
||||
ButtonHandlers (MACKIE_NAMESPACE::LedState (MackieControlProtocol::*p) (MACKIE_NAMESPACE::Button&),
|
||||
MACKIE_NAMESPACE::LedState (MackieControlProtocol::*r) (MACKIE_NAMESPACE::Button&))
|
||||
: press (p)
|
||||
, release (r) {}
|
||||
};
|
||||
|
||||
typedef std::map<Mackie::Button::ID,ButtonHandlers> ButtonMap;
|
||||
typedef std::map<MACKIE_NAMESPACE::Button::ID,ButtonHandlers> ButtonMap;
|
||||
|
||||
static MackieControlProtocol* _instance;
|
||||
|
||||
bool profile_exists (std::string const&) const;
|
||||
|
||||
Mackie::DeviceInfo _device_info;
|
||||
Mackie::DeviceProfile _device_profile;
|
||||
MACKIE_NAMESPACE::DeviceInfo _device_info;
|
||||
MACKIE_NAMESPACE::DeviceProfile _device_profile;
|
||||
sigc::connection periodic_connection;
|
||||
sigc::connection redisplay_connection;
|
||||
sigc::connection hui_connection;
|
||||
|
|
@ -310,7 +308,7 @@ class MackieControlProtocol
|
|||
PBD::ScopedConnectionList gui_connections;
|
||||
PBD::ScopedConnectionList fader_automation_connections;
|
||||
// timer for two quick marker left presses
|
||||
Mackie::Timer _frm_left_last;
|
||||
MACKIE_NAMESPACE::Timer _frm_left_last;
|
||||
// last written timecode string
|
||||
std::string _timecode_last;
|
||||
samplepos_t _sample_last;
|
||||
|
|
@ -324,7 +322,7 @@ class MackieControlProtocol
|
|||
bool _scrub_mode;
|
||||
FlipMode _flip_mode;
|
||||
ViewMode _view_mode;
|
||||
std::shared_ptr<Mackie::Subview> _subview;
|
||||
std::shared_ptr<MACKIE_NAMESPACE::Subview> _subview;
|
||||
int _current_selected_track;
|
||||
int _modifier_state;
|
||||
ButtonMap button_map;
|
||||
|
|
@ -338,14 +336,14 @@ class MackieControlProtocol
|
|||
bool marker_modifier_consumed_by_button;
|
||||
bool nudge_modifier_consumed_by_button;
|
||||
|
||||
std::shared_ptr<ArdourSurface::Mackie::Surface> _master_surface;
|
||||
std::shared_ptr<ArdourSurface::MACKIE_NAMESPACE::Surface> _master_surface;
|
||||
|
||||
struct ipMIDIHandler {
|
||||
MackieControlProtocol* mcp;
|
||||
MIDI::Port* port;
|
||||
};
|
||||
friend struct ipMIDIHandler; /* is this necessary */
|
||||
friend gboolean ArdourSurface::ipmidi_input_handler (GIOChannel*, GIOCondition condition, void *data);
|
||||
struct ipMIDIHandler {
|
||||
MackieControlProtocol* mcp;
|
||||
MIDI::Port* port;
|
||||
};
|
||||
friend struct ipMIDIHandler; /* is this necessary */
|
||||
friend gboolean ArdourSurface::MACKIE_NAMESPACE::ipmidi_input_handler (GIOChannel*, GIOCondition condition, void *data);
|
||||
|
||||
int create_surfaces ();
|
||||
bool periodic();
|
||||
|
|
@ -379,170 +377,171 @@ class MackieControlProtocol
|
|||
void pull_stripable_range (DownButtonList&, ARDOUR::StripableList&, uint32_t pressed);
|
||||
|
||||
/* implemented button handlers */
|
||||
Mackie::LedState stop_press(Mackie::Button &);
|
||||
Mackie::LedState stop_release(Mackie::Button &);
|
||||
Mackie::LedState play_press(Mackie::Button &);
|
||||
Mackie::LedState play_release(Mackie::Button &);
|
||||
Mackie::LedState record_press(Mackie::Button &);
|
||||
Mackie::LedState record_release(Mackie::Button &);
|
||||
Mackie::LedState loop_press(Mackie::Button &);
|
||||
Mackie::LedState loop_release(Mackie::Button &);
|
||||
Mackie::LedState rewind_press(Mackie::Button & button);
|
||||
Mackie::LedState rewind_release(Mackie::Button & button);
|
||||
Mackie::LedState ffwd_press(Mackie::Button & button);
|
||||
Mackie::LedState ffwd_release(Mackie::Button & button);
|
||||
Mackie::LedState cursor_up_press (Mackie::Button &);
|
||||
Mackie::LedState cursor_up_release (Mackie::Button &);
|
||||
Mackie::LedState cursor_down_press (Mackie::Button &);
|
||||
Mackie::LedState cursor_down_release (Mackie::Button &);
|
||||
Mackie::LedState cursor_left_press (Mackie::Button &);
|
||||
Mackie::LedState cursor_left_release (Mackie::Button &);
|
||||
Mackie::LedState cursor_right_press (Mackie::Button &);
|
||||
Mackie::LedState cursor_right_release (Mackie::Button &);
|
||||
Mackie::LedState left_press(Mackie::Button &);
|
||||
Mackie::LedState left_release(Mackie::Button &);
|
||||
Mackie::LedState right_press(Mackie::Button &);
|
||||
Mackie::LedState right_release(Mackie::Button &);
|
||||
Mackie::LedState channel_left_press(Mackie::Button &);
|
||||
Mackie::LedState channel_left_release(Mackie::Button &);
|
||||
Mackie::LedState channel_right_press(Mackie::Button &);
|
||||
Mackie::LedState channel_right_release(Mackie::Button &);
|
||||
Mackie::LedState marker_press(Mackie::Button &);
|
||||
Mackie::LedState marker_release(Mackie::Button &);
|
||||
Mackie::LedState save_press(Mackie::Button &);
|
||||
Mackie::LedState save_release(Mackie::Button &);
|
||||
Mackie::LedState timecode_beats_press(Mackie::Button &);
|
||||
Mackie::LedState timecode_beats_release(Mackie::Button &);
|
||||
Mackie::LedState zoom_press(Mackie::Button &);
|
||||
Mackie::LedState zoom_release(Mackie::Button &);
|
||||
Mackie::LedState scrub_press(Mackie::Button &);
|
||||
Mackie::LedState scrub_release(Mackie::Button &);
|
||||
Mackie::LedState undo_press (Mackie::Button &);
|
||||
Mackie::LedState undo_release (Mackie::Button &);
|
||||
Mackie::LedState shift_press (Mackie::Button &);
|
||||
Mackie::LedState shift_release (Mackie::Button &);
|
||||
Mackie::LedState option_press (Mackie::Button &);
|
||||
Mackie::LedState option_release (Mackie::Button &);
|
||||
Mackie::LedState control_press (Mackie::Button &);
|
||||
Mackie::LedState control_release (Mackie::Button &);
|
||||
Mackie::LedState cmd_alt_press (Mackie::Button &);
|
||||
Mackie::LedState cmd_alt_release (Mackie::Button &);
|
||||
MACKIE_NAMESPACE::LedState stop_press(MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState stop_release(MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState play_press(MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState play_release(MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState record_press(MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState record_release(MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState loop_press(MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState loop_release(MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState rewind_press(MACKIE_NAMESPACE::Button & button);
|
||||
MACKIE_NAMESPACE::LedState rewind_release(MACKIE_NAMESPACE::Button & button);
|
||||
MACKIE_NAMESPACE::LedState ffwd_press(MACKIE_NAMESPACE::Button & button);
|
||||
MACKIE_NAMESPACE::LedState ffwd_release(MACKIE_NAMESPACE::Button & button);
|
||||
MACKIE_NAMESPACE::LedState cursor_up_press (MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState cursor_up_release (MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState cursor_down_press (MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState cursor_down_release (MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState cursor_left_press (MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState cursor_left_release (MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState cursor_right_press (MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState cursor_right_release (MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState left_press(MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState left_release(MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState right_press(MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState right_release(MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState channel_left_press(MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState channel_left_release(MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState channel_right_press(MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState channel_right_release(MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState marker_press(MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState marker_release(MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState save_press(MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState save_release(MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState timecode_beats_press(MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState timecode_beats_release(MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState zoom_press(MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState zoom_release(MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState scrub_press(MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState scrub_release(MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState undo_press (MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState undo_release (MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState shift_press (MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState shift_release (MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState option_press (MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState option_release (MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState control_press (MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState control_release (MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState cmd_alt_press (MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState cmd_alt_release (MACKIE_NAMESPACE::Button &);
|
||||
|
||||
Mackie::LedState pan_press (Mackie::Button &);
|
||||
Mackie::LedState pan_release (Mackie::Button &);
|
||||
Mackie::LedState plugin_press (Mackie::Button &);
|
||||
Mackie::LedState plugin_release (Mackie::Button &);
|
||||
Mackie::LedState eq_press (Mackie::Button &);
|
||||
Mackie::LedState eq_release (Mackie::Button &);
|
||||
Mackie::LedState dyn_press (Mackie::Button &);
|
||||
Mackie::LedState dyn_release (Mackie::Button &);
|
||||
Mackie::LedState flip_press (Mackie::Button &);
|
||||
Mackie::LedState flip_release (Mackie::Button &);
|
||||
Mackie::LedState name_value_press (Mackie::Button &);
|
||||
Mackie::LedState name_value_release (Mackie::Button &);
|
||||
// Mackie::LedState F1_press (Mackie::Button &);
|
||||
// Mackie::LedState F1_release (Mackie::Button &);
|
||||
// Mackie::LedState F2_press (Mackie::Button &);
|
||||
// Mackie::LedState F2_release (Mackie::Button &);
|
||||
// Mackie::LedState F3_press (Mackie::Button &);
|
||||
// Mackie::LedState F3_release (Mackie::Button &);
|
||||
// Mackie::LedState F4_press (Mackie::Button &);
|
||||
// Mackie::LedState F4_release (Mackie::Button &);
|
||||
// Mackie::LedState F5_press (Mackie::Button &);
|
||||
// Mackie::LedState F5_release (Mackie::Button &);
|
||||
// Mackie::LedState F6_press (Mackie::Button &);
|
||||
// Mackie::LedState F6_release (Mackie::Button &);
|
||||
// Mackie::LedState F7_press (Mackie::Button &);
|
||||
// Mackie::LedState F7_release (Mackie::Button &);
|
||||
// Mackie::LedState F8_press (Mackie::Button &);
|
||||
// Mackie::LedState F8_release (Mackie::Button &);
|
||||
Mackie::LedState touch_press (Mackie::Button &);
|
||||
Mackie::LedState touch_release (Mackie::Button &);
|
||||
Mackie::LedState enter_press (Mackie::Button &);
|
||||
Mackie::LedState enter_release (Mackie::Button &);
|
||||
Mackie::LedState cancel_press (Mackie::Button &);
|
||||
Mackie::LedState cancel_release (Mackie::Button &);
|
||||
Mackie::LedState user_a_press (Mackie::Button &);
|
||||
Mackie::LedState user_a_release (Mackie::Button &);
|
||||
Mackie::LedState user_b_press (Mackie::Button &);
|
||||
Mackie::LedState user_b_release (Mackie::Button &);
|
||||
Mackie::LedState fader_touch_press (Mackie::Button &);
|
||||
Mackie::LedState fader_touch_release (Mackie::Button &);
|
||||
Mackie::LedState master_fader_touch_press (Mackie::Button &);
|
||||
Mackie::LedState master_fader_touch_release (Mackie::Button &);
|
||||
MACKIE_NAMESPACE::LedState pan_press (MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState pan_release (MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState plugin_press (MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState plugin_release (MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState eq_press (MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState eq_release (MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState dyn_press (MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState dyn_release (MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState flip_press (MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState flip_release (MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState name_value_press (MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState name_value_release (MACKIE_NAMESPACE::Button &);
|
||||
// MACKIE_NAMESPACE::LedState F1_press (MACKIE_NAMESPACE::Button &);
|
||||
// MACKIE_NAMESPACE::LedState F1_release (MACKIE_NAMESPACE::Button &);
|
||||
// MACKIE_NAMESPACE::LedState F2_press (MACKIE_NAMESPACE::Button &);
|
||||
// MACKIE_NAMESPACE::LedState F2_release (MACKIE_NAMESPACE::Button &);
|
||||
// MACKIE_NAMESPACE::LedState F3_press (MACKIE_NAMESPACE::Button &);
|
||||
// MACKIE_NAMESPACE::LedState F3_release (MACKIE_NAMESPACE::Button &);
|
||||
// MACKIE_NAMESPACE::LedState F4_press (MACKIE_NAMESPACE::Button &);
|
||||
// MACKIE_NAMESPACE::LedState F4_release (MACKIE_NAMESPACE::Button &);
|
||||
// MACKIE_NAMESPACE::LedState F5_press (MACKIE_NAMESPACE::Button &);
|
||||
// MACKIE_NAMESPACE::LedState F5_release (MACKIE_NAMESPACE::Button &);
|
||||
// MACKIE_NAMESPACE::LedState F6_press (MACKIE_NAMESPACE::Button &);
|
||||
// MACKIE_NAMESPACE::LedState F6_release (MACKIE_NAMESPACE::Button &);
|
||||
// MACKIE_NAMESPACE::LedState F7_press (MACKIE_NAMESPACE::Button &);
|
||||
// MACKIE_NAMESPACE::LedState F7_release (MACKIE_NAMESPACE::Button &);
|
||||
// MACKIE_NAMESPACE::LedState F8_press (MACKIE_NAMESPACE::Button &);
|
||||
// MACKIE_NAMESPACE::LedState F8_release (MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState touch_press (MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState touch_release (MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState enter_press (MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState enter_release (MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState cancel_press (MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState cancel_release (MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState user_a_press (MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState user_a_release (MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState user_b_press (MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState user_b_release (MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState fader_touch_press (MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState fader_touch_release (MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState master_fader_touch_press (MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState master_fader_touch_release (MACKIE_NAMESPACE::Button &);
|
||||
|
||||
Mackie::LedState read_press (Mackie::Button&);
|
||||
Mackie::LedState read_release (Mackie::Button&);
|
||||
Mackie::LedState write_press (Mackie::Button&);
|
||||
Mackie::LedState write_release (Mackie::Button&);
|
||||
Mackie::LedState clearsolo_press (Mackie::Button&);
|
||||
Mackie::LedState clearsolo_release (Mackie::Button&);
|
||||
Mackie::LedState track_press (Mackie::Button&);
|
||||
Mackie::LedState track_release (Mackie::Button&);
|
||||
Mackie::LedState send_press (Mackie::Button&);
|
||||
Mackie::LedState send_release (Mackie::Button&);
|
||||
Mackie::LedState miditracks_press (Mackie::Button&);
|
||||
Mackie::LedState miditracks_release (Mackie::Button&);
|
||||
Mackie::LedState inputs_press (Mackie::Button&);
|
||||
Mackie::LedState inputs_release (Mackie::Button&);
|
||||
Mackie::LedState audiotracks_press (Mackie::Button&);
|
||||
Mackie::LedState audiotracks_release (Mackie::Button&);
|
||||
Mackie::LedState audioinstruments_press (Mackie::Button&);
|
||||
Mackie::LedState audioinstruments_release (Mackie::Button&);
|
||||
Mackie::LedState aux_press (Mackie::Button&);
|
||||
Mackie::LedState aux_release (Mackie::Button&);
|
||||
Mackie::LedState busses_press (Mackie::Button&);
|
||||
Mackie::LedState busses_release (Mackie::Button&);
|
||||
Mackie::LedState outputs_press (Mackie::Button&);
|
||||
Mackie::LedState outputs_release (Mackie::Button&);
|
||||
Mackie::LedState user_press (Mackie::Button&);
|
||||
Mackie::LedState user_release (Mackie::Button&);
|
||||
Mackie::LedState trim_press (Mackie::Button&);
|
||||
Mackie::LedState trim_release (Mackie::Button&);
|
||||
Mackie::LedState latch_press (Mackie::Button&);
|
||||
Mackie::LedState latch_release (Mackie::Button&);
|
||||
Mackie::LedState grp_press (Mackie::Button&);
|
||||
Mackie::LedState grp_release (Mackie::Button&);
|
||||
Mackie::LedState nudge_press (Mackie::Button&);
|
||||
Mackie::LedState nudge_release (Mackie::Button&);
|
||||
Mackie::LedState drop_press (Mackie::Button&);
|
||||
Mackie::LedState drop_release (Mackie::Button&);
|
||||
Mackie::LedState replace_press (Mackie::Button&);
|
||||
Mackie::LedState replace_release (Mackie::Button&);
|
||||
Mackie::LedState click_press (Mackie::Button&);
|
||||
Mackie::LedState click_release (Mackie::Button&);
|
||||
Mackie::LedState view_press (Mackie::Button&);
|
||||
Mackie::LedState view_release (Mackie::Button&);
|
||||
MACKIE_NAMESPACE::LedState read_press (MACKIE_NAMESPACE::Button&);
|
||||
MACKIE_NAMESPACE::LedState read_release (MACKIE_NAMESPACE::Button&);
|
||||
MACKIE_NAMESPACE::LedState write_press (MACKIE_NAMESPACE::Button&);
|
||||
MACKIE_NAMESPACE::LedState write_release (MACKIE_NAMESPACE::Button&);
|
||||
MACKIE_NAMESPACE::LedState clearsolo_press (MACKIE_NAMESPACE::Button&);
|
||||
MACKIE_NAMESPACE::LedState clearsolo_release (MACKIE_NAMESPACE::Button&);
|
||||
MACKIE_NAMESPACE::LedState track_press (MACKIE_NAMESPACE::Button&);
|
||||
MACKIE_NAMESPACE::LedState track_release (MACKIE_NAMESPACE::Button&);
|
||||
MACKIE_NAMESPACE::LedState send_press (MACKIE_NAMESPACE::Button&);
|
||||
MACKIE_NAMESPACE::LedState send_release (MACKIE_NAMESPACE::Button&);
|
||||
MACKIE_NAMESPACE::LedState miditracks_press (MACKIE_NAMESPACE::Button&);
|
||||
MACKIE_NAMESPACE::LedState miditracks_release (MACKIE_NAMESPACE::Button&);
|
||||
MACKIE_NAMESPACE::LedState inputs_press (MACKIE_NAMESPACE::Button&);
|
||||
MACKIE_NAMESPACE::LedState inputs_release (MACKIE_NAMESPACE::Button&);
|
||||
MACKIE_NAMESPACE::LedState audiotracks_press (MACKIE_NAMESPACE::Button&);
|
||||
MACKIE_NAMESPACE::LedState audiotracks_release (MACKIE_NAMESPACE::Button&);
|
||||
MACKIE_NAMESPACE::LedState audioinstruments_press (MACKIE_NAMESPACE::Button&);
|
||||
MACKIE_NAMESPACE::LedState audioinstruments_release (MACKIE_NAMESPACE::Button&);
|
||||
MACKIE_NAMESPACE::LedState aux_press (MACKIE_NAMESPACE::Button&);
|
||||
MACKIE_NAMESPACE::LedState aux_release (MACKIE_NAMESPACE::Button&);
|
||||
MACKIE_NAMESPACE::LedState busses_press (MACKIE_NAMESPACE::Button&);
|
||||
MACKIE_NAMESPACE::LedState busses_release (MACKIE_NAMESPACE::Button&);
|
||||
MACKIE_NAMESPACE::LedState outputs_press (MACKIE_NAMESPACE::Button&);
|
||||
MACKIE_NAMESPACE::LedState outputs_release (MACKIE_NAMESPACE::Button&);
|
||||
MACKIE_NAMESPACE::LedState user_press (MACKIE_NAMESPACE::Button&);
|
||||
MACKIE_NAMESPACE::LedState user_release (MACKIE_NAMESPACE::Button&);
|
||||
MACKIE_NAMESPACE::LedState trim_press (MACKIE_NAMESPACE::Button&);
|
||||
MACKIE_NAMESPACE::LedState trim_release (MACKIE_NAMESPACE::Button&);
|
||||
MACKIE_NAMESPACE::LedState latch_press (MACKIE_NAMESPACE::Button&);
|
||||
MACKIE_NAMESPACE::LedState latch_release (MACKIE_NAMESPACE::Button&);
|
||||
MACKIE_NAMESPACE::LedState grp_press (MACKIE_NAMESPACE::Button&);
|
||||
MACKIE_NAMESPACE::LedState grp_release (MACKIE_NAMESPACE::Button&);
|
||||
MACKIE_NAMESPACE::LedState nudge_press (MACKIE_NAMESPACE::Button&);
|
||||
MACKIE_NAMESPACE::LedState nudge_release (MACKIE_NAMESPACE::Button&);
|
||||
MACKIE_NAMESPACE::LedState drop_press (MACKIE_NAMESPACE::Button&);
|
||||
MACKIE_NAMESPACE::LedState drop_release (MACKIE_NAMESPACE::Button&);
|
||||
MACKIE_NAMESPACE::LedState replace_press (MACKIE_NAMESPACE::Button&);
|
||||
MACKIE_NAMESPACE::LedState replace_release (MACKIE_NAMESPACE::Button&);
|
||||
MACKIE_NAMESPACE::LedState click_press (MACKIE_NAMESPACE::Button&);
|
||||
MACKIE_NAMESPACE::LedState click_release (MACKIE_NAMESPACE::Button&);
|
||||
MACKIE_NAMESPACE::LedState view_press (MACKIE_NAMESPACE::Button&);
|
||||
MACKIE_NAMESPACE::LedState view_release (MACKIE_NAMESPACE::Button&);
|
||||
|
||||
Mackie::LedState bank_release (Mackie::Button&, uint32_t bank_num);
|
||||
Mackie::LedState master_press(Mackie::Button &);
|
||||
Mackie::LedState master_release(Mackie::Button &);
|
||||
Mackie::LedState redo_press(Mackie::Button &);
|
||||
Mackie::LedState redo_release(Mackie::Button &);
|
||||
Mackie::LedState prev_marker_press(Mackie::Button &);
|
||||
Mackie::LedState prev_marker_release(Mackie::Button &);
|
||||
Mackie::LedState next_marker_press(Mackie::Button &);
|
||||
Mackie::LedState next_marker_release(Mackie::Button &);
|
||||
Mackie::LedState flip_window_press (Mackie::Button&);
|
||||
Mackie::LedState flip_window_release (Mackie::Button&);
|
||||
Mackie::LedState open_press(Mackie::Button &);
|
||||
Mackie::LedState open_release(Mackie::Button &);
|
||||
Mackie::LedState prog2_clear_solo_press(Mackie::Button &);
|
||||
Mackie::LedState prog2_clear_solo_release(Mackie::Button &);
|
||||
Mackie::LedState prog2_save_press(Mackie::Button &);
|
||||
Mackie::LedState prog2_save_release(Mackie::Button &);
|
||||
Mackie::LedState prog2_vst_press(Mackie::Button &);
|
||||
Mackie::LedState prog2_vst_release(Mackie::Button &);
|
||||
Mackie::LedState prog2_left_press(Mackie::Button &);
|
||||
Mackie::LedState prog2_left_release(Mackie::Button &);
|
||||
Mackie::LedState prog2_right_press(Mackie::Button &);
|
||||
Mackie::LedState prog2_right_release(Mackie::Button &);
|
||||
Mackie::LedState prog2_marker_press(Mackie::Button &);
|
||||
Mackie::LedState prog2_marker_release(Mackie::Button &);
|
||||
Mackie::LedState prog2_undo_press(Mackie::Button &);
|
||||
Mackie::LedState prog2_undo_release(Mackie::Button &);
|
||||
MACKIE_NAMESPACE::LedState bank_release (MACKIE_NAMESPACE::Button&, uint32_t bank_num);
|
||||
MACKIE_NAMESPACE::LedState master_press(MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState master_release(MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState redo_press(MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState redo_release(MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState prev_marker_press(MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState prev_marker_release(MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState next_marker_press(MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState next_marker_release(MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState flip_window_press (MACKIE_NAMESPACE::Button&);
|
||||
MACKIE_NAMESPACE::LedState flip_window_release (MACKIE_NAMESPACE::Button&);
|
||||
MACKIE_NAMESPACE::LedState open_press(MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState open_release(MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState prog2_clear_solo_press(MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState prog2_clear_solo_release(MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState prog2_save_press(MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState prog2_save_release(MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState prog2_vst_press(MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState prog2_vst_release(MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState prog2_left_press(MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState prog2_left_release(MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState prog2_right_press(MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState prog2_right_release(MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState prog2_marker_press(MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState prog2_marker_release(MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState prog2_undo_press(MACKIE_NAMESPACE::Button &);
|
||||
MACKIE_NAMESPACE::LedState prog2_undo_release(MACKIE_NAMESPACE::Button &);
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace
|
||||
|
||||
#endif // ardour_mackie_control_protocol_h
|
||||
|
|
|
|||
|
|
@ -1,45 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2006-2007 John Anderson
|
||||
* Copyright (C) 2012-2015 Paul Davis <paul@linuxaudiosystems.com>
|
||||
*
|
||||
* 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.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#include "mackie_control_protocol.h"
|
||||
|
||||
#include "midi_byte_array.h"
|
||||
#include "surface_port.h"
|
||||
|
||||
#include "pbd/pthread_utils.h"
|
||||
#include "pbd/error.h"
|
||||
|
||||
#include "midi++/types.h"
|
||||
#include "midi++/port.h"
|
||||
#include "midi++/manager.h"
|
||||
#include "pbd/i18n.h"
|
||||
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
using namespace std;
|
||||
using namespace Mackie;
|
||||
using namespace PBD;
|
||||
|
||||
|
|
@ -46,7 +46,7 @@ using std::string;
|
|||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
using namespace ArdourSurface;
|
||||
using namespace Mackie;
|
||||
using namespace ArdourSurface::MACKIE_NAMESPACE;
|
||||
|
||||
LedState
|
||||
MackieControlProtocol::shift_press (Button &)
|
||||
|
|
@ -102,7 +102,7 @@ MackieControlProtocol::cmd_alt_release (Button &)
|
|||
LedState
|
||||
MackieControlProtocol::left_press (Button &)
|
||||
{
|
||||
if (_subview->subview_mode() != Mackie::Subview::None) {
|
||||
if (_subview->subview_mode() != MACKIE_NAMESPACE::Subview::None) {
|
||||
return none;
|
||||
}
|
||||
|
||||
|
|
@ -136,7 +136,7 @@ MackieControlProtocol::left_release (Button &)
|
|||
LedState
|
||||
MackieControlProtocol::right_press (Button &)
|
||||
{
|
||||
if (_subview->subview_mode() != Mackie::Subview::None) {
|
||||
if (_subview->subview_mode() != MACKIE_NAMESPACE::Subview::None) {
|
||||
return none;
|
||||
}
|
||||
|
||||
|
|
@ -294,7 +294,7 @@ MackieControlProtocol::channel_left_press (Button &)
|
|||
return on;
|
||||
}
|
||||
|
||||
if (_subview->subview_mode() != Mackie::Subview::None) {
|
||||
if (_subview->subview_mode() != MACKIE_NAMESPACE::Subview::None) {
|
||||
return none;
|
||||
}
|
||||
Sorted sorted = get_sorted_stripables();
|
||||
|
|
@ -320,7 +320,7 @@ MackieControlProtocol::channel_right_press (Button &)
|
|||
return on;
|
||||
}
|
||||
|
||||
if (_subview->subview_mode() != Mackie::Subview::None) {
|
||||
if (_subview->subview_mode() != MACKIE_NAMESPACE::Subview::None) {
|
||||
return none;
|
||||
}
|
||||
Sorted sorted = get_sorted_stripables();
|
||||
|
|
@ -338,14 +338,14 @@ MackieControlProtocol::channel_right_release (Button &)
|
|||
return off;
|
||||
}
|
||||
|
||||
Mackie::LedState
|
||||
MackieControlProtocol::zoom_press (Mackie::Button &)
|
||||
MACKIE_NAMESPACE::LedState
|
||||
MackieControlProtocol::zoom_press (MACKIE_NAMESPACE::Button &)
|
||||
{
|
||||
return none;
|
||||
}
|
||||
|
||||
Mackie::LedState
|
||||
MackieControlProtocol::zoom_release (Mackie::Button &)
|
||||
MACKIE_NAMESPACE::LedState
|
||||
MackieControlProtocol::zoom_release (MACKIE_NAMESPACE::Button &)
|
||||
{
|
||||
if (_modifier_state & MODIFIER_ZOOM) {
|
||||
_modifier_state &= ~MODIFIER_ZOOM;
|
||||
|
|
@ -356,8 +356,8 @@ MackieControlProtocol::zoom_release (Mackie::Button &)
|
|||
return (zoom_mode() ? on : off);
|
||||
}
|
||||
|
||||
Mackie::LedState
|
||||
MackieControlProtocol::scrub_press (Mackie::Button &)
|
||||
MACKIE_NAMESPACE::LedState
|
||||
MackieControlProtocol::scrub_press (MACKIE_NAMESPACE::Button &)
|
||||
{
|
||||
if (_master_surface) {
|
||||
_master_surface->next_jog_mode ();
|
||||
|
|
@ -366,8 +366,8 @@ MackieControlProtocol::scrub_press (Mackie::Button &)
|
|||
return none;
|
||||
}
|
||||
|
||||
Mackie::LedState
|
||||
MackieControlProtocol::scrub_release (Mackie::Button &)
|
||||
MACKIE_NAMESPACE::LedState
|
||||
MackieControlProtocol::scrub_release (MACKIE_NAMESPACE::Button &)
|
||||
{
|
||||
return none;
|
||||
}
|
||||
|
|
@ -712,7 +712,7 @@ MackieControlProtocol::enter_release (Button &)
|
|||
LedState
|
||||
MackieControlProtocol::bank_release (Button& b, uint32_t basic_bank_num)
|
||||
{
|
||||
if (_subview->subview_mode() != Mackie::Subview::None) {
|
||||
if (_subview->subview_mode() != MACKIE_NAMESPACE::Subview::None) {
|
||||
return none;
|
||||
}
|
||||
|
||||
|
|
@ -817,7 +817,7 @@ LedState
|
|||
MackieControlProtocol::pan_press (Button &)
|
||||
{
|
||||
/* XXX eventually pan may have its own subview mode */
|
||||
set_subview_mode (Mackie::Subview::None, std::shared_ptr<Stripable>());
|
||||
set_subview_mode (MACKIE_NAMESPACE::Subview::None, std::shared_ptr<Stripable>());
|
||||
return none;
|
||||
}
|
||||
LedState
|
||||
|
|
@ -942,7 +942,7 @@ MackieControlProtocol::user_b_release (Button &)
|
|||
}
|
||||
|
||||
LedState
|
||||
MackieControlProtocol::master_fader_touch_press (Mackie::Button &)
|
||||
MackieControlProtocol::master_fader_touch_press (MACKIE_NAMESPACE::Button &)
|
||||
{
|
||||
if (_master_surface && _master_surface->master_fader() != 0) {
|
||||
DEBUG_TRACE (DEBUG::MackieControl, "MackieControlProtocol::master_fader_touch_press\n");
|
||||
|
|
@ -955,7 +955,7 @@ MackieControlProtocol::master_fader_touch_press (Mackie::Button &)
|
|||
return none;
|
||||
}
|
||||
LedState
|
||||
MackieControlProtocol::master_fader_touch_release (Mackie::Button &)
|
||||
MackieControlProtocol::master_fader_touch_release (MACKIE_NAMESPACE::Button &)
|
||||
{
|
||||
if (_master_surface && _master_surface->master_fader() != 0) {
|
||||
DEBUG_TRACE (DEBUG::MackieControl, "MackieControlProtocol::master_fader_touch_release\n");
|
||||
|
|
@ -969,32 +969,32 @@ MackieControlProtocol::master_fader_touch_release (Mackie::Button &)
|
|||
return none;
|
||||
}
|
||||
|
||||
Mackie::LedState
|
||||
MackieControlProtocol::read_press (Mackie::Button&)
|
||||
MACKIE_NAMESPACE::LedState
|
||||
MackieControlProtocol::read_press (MACKIE_NAMESPACE::Button&)
|
||||
{
|
||||
return none;
|
||||
}
|
||||
|
||||
Mackie::LedState
|
||||
MackieControlProtocol::read_release (Mackie::Button&)
|
||||
MACKIE_NAMESPACE::LedState
|
||||
MackieControlProtocol::read_release (MACKIE_NAMESPACE::Button&)
|
||||
{
|
||||
set_automation_state (ARDOUR::Play);
|
||||
return none;
|
||||
}
|
||||
Mackie::LedState
|
||||
MackieControlProtocol::write_press (Mackie::Button&)
|
||||
MACKIE_NAMESPACE::LedState
|
||||
MackieControlProtocol::write_press (MACKIE_NAMESPACE::Button&)
|
||||
{
|
||||
return none;
|
||||
}
|
||||
Mackie::LedState
|
||||
MackieControlProtocol::write_release (Mackie::Button&)
|
||||
MACKIE_NAMESPACE::LedState
|
||||
MackieControlProtocol::write_release (MACKIE_NAMESPACE::Button&)
|
||||
{
|
||||
set_automation_state (ARDOUR::Write);
|
||||
return none;
|
||||
}
|
||||
|
||||
Mackie::LedState
|
||||
MackieControlProtocol::clearsolo_press (Mackie::Button&)
|
||||
MACKIE_NAMESPACE::LedState
|
||||
MackieControlProtocol::clearsolo_press (MACKIE_NAMESPACE::Button&)
|
||||
{
|
||||
// clears all solos and listens (pfl/afl)
|
||||
|
||||
|
|
@ -1007,152 +1007,152 @@ MackieControlProtocol::clearsolo_press (Mackie::Button&)
|
|||
return none;
|
||||
}
|
||||
|
||||
Mackie::LedState
|
||||
MackieControlProtocol::clearsolo_release (Mackie::Button&)
|
||||
MACKIE_NAMESPACE::LedState
|
||||
MackieControlProtocol::clearsolo_release (MACKIE_NAMESPACE::Button&)
|
||||
{
|
||||
//return session->soloing();
|
||||
return none;
|
||||
}
|
||||
|
||||
Mackie::LedState
|
||||
MackieControlProtocol::track_press (Mackie::Button&)
|
||||
MACKIE_NAMESPACE::LedState
|
||||
MackieControlProtocol::track_press (MACKIE_NAMESPACE::Button&)
|
||||
{
|
||||
set_subview_mode (Subview::TrackView, first_selected_stripable());
|
||||
return none;
|
||||
}
|
||||
Mackie::LedState
|
||||
MackieControlProtocol::track_release (Mackie::Button&)
|
||||
MACKIE_NAMESPACE::LedState
|
||||
MackieControlProtocol::track_release (MACKIE_NAMESPACE::Button&)
|
||||
{
|
||||
return none;
|
||||
}
|
||||
Mackie::LedState
|
||||
MackieControlProtocol::send_press (Mackie::Button&)
|
||||
MACKIE_NAMESPACE::LedState
|
||||
MackieControlProtocol::send_press (MACKIE_NAMESPACE::Button&)
|
||||
{
|
||||
set_subview_mode (Subview::Sends, first_selected_stripable());
|
||||
return none; /* led state handled by set_subview_mode() */
|
||||
}
|
||||
Mackie::LedState
|
||||
MackieControlProtocol::send_release (Mackie::Button&)
|
||||
MACKIE_NAMESPACE::LedState
|
||||
MackieControlProtocol::send_release (MACKIE_NAMESPACE::Button&)
|
||||
{
|
||||
return none;
|
||||
}
|
||||
Mackie::LedState
|
||||
MackieControlProtocol::miditracks_press (Mackie::Button&)
|
||||
MACKIE_NAMESPACE::LedState
|
||||
MackieControlProtocol::miditracks_press (MACKIE_NAMESPACE::Button&)
|
||||
{
|
||||
return none;
|
||||
}
|
||||
Mackie::LedState
|
||||
MackieControlProtocol::miditracks_release (Mackie::Button&)
|
||||
MACKIE_NAMESPACE::LedState
|
||||
MackieControlProtocol::miditracks_release (MACKIE_NAMESPACE::Button&)
|
||||
{
|
||||
set_view_mode (MidiTracks);
|
||||
return none;
|
||||
}
|
||||
Mackie::LedState
|
||||
MackieControlProtocol::inputs_press (Mackie::Button&)
|
||||
MACKIE_NAMESPACE::LedState
|
||||
MackieControlProtocol::inputs_press (MACKIE_NAMESPACE::Button&)
|
||||
{
|
||||
return none;
|
||||
}
|
||||
Mackie::LedState
|
||||
MackieControlProtocol::inputs_release (Mackie::Button&)
|
||||
MACKIE_NAMESPACE::LedState
|
||||
MackieControlProtocol::inputs_release (MACKIE_NAMESPACE::Button&)
|
||||
{
|
||||
set_view_mode (Inputs);
|
||||
return none;
|
||||
}
|
||||
Mackie::LedState
|
||||
MackieControlProtocol::audiotracks_press (Mackie::Button&)
|
||||
MACKIE_NAMESPACE::LedState
|
||||
MackieControlProtocol::audiotracks_press (MACKIE_NAMESPACE::Button&)
|
||||
{
|
||||
return none;
|
||||
}
|
||||
Mackie::LedState
|
||||
MackieControlProtocol::audiotracks_release (Mackie::Button&)
|
||||
MACKIE_NAMESPACE::LedState
|
||||
MackieControlProtocol::audiotracks_release (MACKIE_NAMESPACE::Button&)
|
||||
{
|
||||
set_view_mode (AudioTracks);
|
||||
return none;
|
||||
}
|
||||
Mackie::LedState
|
||||
MackieControlProtocol::audioinstruments_press (Mackie::Button& b)
|
||||
MACKIE_NAMESPACE::LedState
|
||||
MackieControlProtocol::audioinstruments_press (MACKIE_NAMESPACE::Button& b)
|
||||
{
|
||||
return none;
|
||||
}
|
||||
|
||||
Mackie::LedState
|
||||
MackieControlProtocol::audioinstruments_release (Mackie::Button& b)
|
||||
MACKIE_NAMESPACE::LedState
|
||||
MackieControlProtocol::audioinstruments_release (MACKIE_NAMESPACE::Button& b)
|
||||
{
|
||||
set_view_mode (AudioInstr);
|
||||
return none;
|
||||
|
||||
}
|
||||
Mackie::LedState
|
||||
MackieControlProtocol::aux_press (Mackie::Button&)
|
||||
MACKIE_NAMESPACE::LedState
|
||||
MackieControlProtocol::aux_press (MACKIE_NAMESPACE::Button&)
|
||||
{
|
||||
return none;
|
||||
}
|
||||
Mackie::LedState
|
||||
MackieControlProtocol::aux_release (Mackie::Button&)
|
||||
MACKIE_NAMESPACE::LedState
|
||||
MackieControlProtocol::aux_release (MACKIE_NAMESPACE::Button&)
|
||||
{
|
||||
set_view_mode (Auxes);
|
||||
return none;
|
||||
}
|
||||
Mackie::LedState
|
||||
MackieControlProtocol::busses_press (Mackie::Button&)
|
||||
MACKIE_NAMESPACE::LedState
|
||||
MackieControlProtocol::busses_press (MACKIE_NAMESPACE::Button&)
|
||||
{
|
||||
return none;
|
||||
}
|
||||
Mackie::LedState
|
||||
MackieControlProtocol::busses_release (Mackie::Button&)
|
||||
MACKIE_NAMESPACE::LedState
|
||||
MackieControlProtocol::busses_release (MACKIE_NAMESPACE::Button&)
|
||||
{
|
||||
set_view_mode (Busses);
|
||||
return none;
|
||||
}
|
||||
Mackie::LedState
|
||||
MackieControlProtocol::outputs_press (Mackie::Button&)
|
||||
MACKIE_NAMESPACE::LedState
|
||||
MackieControlProtocol::outputs_press (MACKIE_NAMESPACE::Button&)
|
||||
{
|
||||
return none;
|
||||
}
|
||||
Mackie::LedState
|
||||
MackieControlProtocol::outputs_release (Mackie::Button&)
|
||||
MACKIE_NAMESPACE::LedState
|
||||
MackieControlProtocol::outputs_release (MACKIE_NAMESPACE::Button&)
|
||||
{
|
||||
set_view_mode (Outputs);
|
||||
return none;
|
||||
}
|
||||
Mackie::LedState
|
||||
MackieControlProtocol::user_press (Mackie::Button&)
|
||||
MACKIE_NAMESPACE::LedState
|
||||
MackieControlProtocol::user_press (MACKIE_NAMESPACE::Button&)
|
||||
{
|
||||
return none;
|
||||
}
|
||||
Mackie::LedState
|
||||
MackieControlProtocol::user_release (Mackie::Button&)
|
||||
MACKIE_NAMESPACE::LedState
|
||||
MackieControlProtocol::user_release (MACKIE_NAMESPACE::Button&)
|
||||
{
|
||||
set_view_mode (Selected);
|
||||
return none;
|
||||
}
|
||||
Mackie::LedState
|
||||
MackieControlProtocol::trim_press (Mackie::Button&)
|
||||
MACKIE_NAMESPACE::LedState
|
||||
MackieControlProtocol::trim_press (MACKIE_NAMESPACE::Button&)
|
||||
{
|
||||
return none;
|
||||
}
|
||||
Mackie::LedState
|
||||
MackieControlProtocol::trim_release (Mackie::Button&)
|
||||
MACKIE_NAMESPACE::LedState
|
||||
MackieControlProtocol::trim_release (MACKIE_NAMESPACE::Button&)
|
||||
{
|
||||
return none;
|
||||
}
|
||||
Mackie::LedState
|
||||
MackieControlProtocol::latch_press (Mackie::Button&)
|
||||
MACKIE_NAMESPACE::LedState
|
||||
MackieControlProtocol::latch_press (MACKIE_NAMESPACE::Button&)
|
||||
{
|
||||
return none;
|
||||
}
|
||||
Mackie::LedState
|
||||
MackieControlProtocol::latch_release (Mackie::Button&)
|
||||
MACKIE_NAMESPACE::LedState
|
||||
MackieControlProtocol::latch_release (MACKIE_NAMESPACE::Button&)
|
||||
{
|
||||
return none;
|
||||
}
|
||||
Mackie::LedState
|
||||
MackieControlProtocol::grp_press (Mackie::Button&)
|
||||
MACKIE_NAMESPACE::LedState
|
||||
MackieControlProtocol::grp_press (MACKIE_NAMESPACE::Button&)
|
||||
{
|
||||
return none;
|
||||
}
|
||||
Mackie::LedState
|
||||
MackieControlProtocol::grp_release (Mackie::Button&)
|
||||
MACKIE_NAMESPACE::LedState
|
||||
MackieControlProtocol::grp_release (MACKIE_NAMESPACE::Button&)
|
||||
{
|
||||
/* There is no "Off" button for automation,
|
||||
so we use Group for this purpose.
|
||||
|
|
@ -1160,15 +1160,15 @@ MackieControlProtocol::grp_release (Mackie::Button&)
|
|||
set_automation_state (Off);
|
||||
return none;
|
||||
}
|
||||
Mackie::LedState
|
||||
MackieControlProtocol::nudge_press (Mackie::Button&)
|
||||
MACKIE_NAMESPACE::LedState
|
||||
MackieControlProtocol::nudge_press (MACKIE_NAMESPACE::Button&)
|
||||
{
|
||||
_modifier_state |= MODIFIER_NUDGE;
|
||||
nudge_modifier_consumed_by_button = false;
|
||||
return on;
|
||||
}
|
||||
Mackie::LedState
|
||||
MackieControlProtocol::nudge_release (Mackie::Button&)
|
||||
MACKIE_NAMESPACE::LedState
|
||||
MackieControlProtocol::nudge_release (MACKIE_NAMESPACE::Button&)
|
||||
{
|
||||
_modifier_state &= ~MODIFIER_NUDGE;
|
||||
|
||||
|
|
@ -1184,8 +1184,8 @@ MackieControlProtocol::nudge_release (Mackie::Button&)
|
|||
|
||||
return off;
|
||||
}
|
||||
Mackie::LedState
|
||||
MackieControlProtocol::replace_press (Mackie::Button&)
|
||||
MACKIE_NAMESPACE::LedState
|
||||
MackieControlProtocol::replace_press (MACKIE_NAMESPACE::Button&)
|
||||
{
|
||||
if (main_modifier_state() == MODIFIER_SHIFT) {
|
||||
toggle_punch_out();
|
||||
|
|
@ -1195,13 +1195,13 @@ MackieControlProtocol::replace_press (Mackie::Button&)
|
|||
}
|
||||
return none;
|
||||
}
|
||||
Mackie::LedState
|
||||
MackieControlProtocol::replace_release (Mackie::Button&)
|
||||
MACKIE_NAMESPACE::LedState
|
||||
MackieControlProtocol::replace_release (MACKIE_NAMESPACE::Button&)
|
||||
{
|
||||
return none;
|
||||
}
|
||||
Mackie::LedState
|
||||
MackieControlProtocol::click_press (Mackie::Button&)
|
||||
MACKIE_NAMESPACE::LedState
|
||||
MackieControlProtocol::click_press (MACKIE_NAMESPACE::Button&)
|
||||
{
|
||||
if (main_modifier_state() & MODIFIER_SHIFT) {
|
||||
access_action ("Editor/set-punch-from-edit-range");
|
||||
|
|
@ -1212,19 +1212,19 @@ MackieControlProtocol::click_press (Mackie::Button&)
|
|||
return none;
|
||||
}
|
||||
}
|
||||
Mackie::LedState
|
||||
MackieControlProtocol::click_release (Mackie::Button&)
|
||||
MACKIE_NAMESPACE::LedState
|
||||
MackieControlProtocol::click_release (MACKIE_NAMESPACE::Button&)
|
||||
{
|
||||
return none;
|
||||
}
|
||||
Mackie::LedState
|
||||
MackieControlProtocol::view_press (Mackie::Button&)
|
||||
MACKIE_NAMESPACE::LedState
|
||||
MackieControlProtocol::view_press (MACKIE_NAMESPACE::Button&)
|
||||
{
|
||||
set_view_mode (Mixer);
|
||||
return none;
|
||||
}
|
||||
Mackie::LedState
|
||||
MackieControlProtocol::view_release (Mackie::Button&)
|
||||
MACKIE_NAMESPACE::LedState
|
||||
MackieControlProtocol::view_release (MACKIE_NAMESPACE::Button&)
|
||||
{
|
||||
return none;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
using namespace PBD;
|
||||
using namespace ArdourSurface;
|
||||
using namespace Mackie;
|
||||
using namespace ArdourSurface::MACKIE_NAMESPACE;
|
||||
|
||||
Control*
|
||||
Meter::factory (Surface& surface, int id, const char* name, Group& group)
|
||||
|
|
|
|||
|
|
@ -23,9 +23,7 @@
|
|||
#include "controls.h"
|
||||
#include "midi_byte_array.h"
|
||||
|
||||
namespace ArdourSurface {
|
||||
|
||||
namespace Mackie {
|
||||
namespace ArdourSurface { namespace MACKIE_NAMESPACE {
|
||||
|
||||
class SurfacePort;
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
#include "control_group.h"
|
||||
|
||||
using namespace ArdourSurface;
|
||||
using namespace Mackie;
|
||||
using namespace ArdourSurface::MACKIE_NAMESPACE;
|
||||
|
||||
int const Pot::External = 0x2e; /* specific ID for "vpot" representing external control */
|
||||
int const Pot::ID = 0x10; /* base value for v-pot IDs */
|
||||
|
|
|
|||
|
|
@ -22,9 +22,7 @@
|
|||
|
||||
#include "controls.h"
|
||||
|
||||
namespace ArdourSurface {
|
||||
|
||||
namespace Mackie {
|
||||
namespace ArdourSurface { namespace MACKIE_NAMESPACE {
|
||||
|
||||
class Pot : public Control
|
||||
{
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ using namespace std;
|
|||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
using namespace ArdourSurface;
|
||||
using namespace Mackie;
|
||||
using namespace ArdourSurface::MACKIE_NAMESPACE;
|
||||
|
||||
#ifndef timeradd /// only avail with __USE_BSD
|
||||
#define timeradd(a,b,result) \
|
||||
|
|
@ -91,7 +91,7 @@ using namespace Mackie;
|
|||
|
||||
#define ui_context() MackieControlProtocol::instance() /* a UICallback-derived object that specifies the event loop for signal handling */
|
||||
|
||||
Strip::Strip (Surface& s, const std::string& name, int index, const map<Button::ID,StripButtonInfo>& strip_buttons)
|
||||
Strip::Strip (Surface& s, const std::string& name, int index, const map<MACKIE_NAMESPACE::Button::ID,StripButtonInfo>& strip_buttons)
|
||||
: Group (name)
|
||||
, _solo (0)
|
||||
, _recenable (0)
|
||||
|
|
|
|||
|
|
@ -44,9 +44,7 @@ namespace ARDOUR {
|
|||
class ChannelCount;
|
||||
}
|
||||
|
||||
namespace ArdourSurface {
|
||||
|
||||
namespace Mackie {
|
||||
namespace ArdourSurface { namespace MACKIE_NAMESPACE {
|
||||
|
||||
class Control;
|
||||
class Surface;
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@
|
|||
|
||||
using namespace ARDOUR;
|
||||
using namespace ArdourSurface;
|
||||
using namespace Mackie;
|
||||
using namespace ArdourSurface::MACKIE_NAMESPACE;
|
||||
using namespace PBD;
|
||||
|
||||
#define ui_context() MackieControlProtocol::instance() /* a UICallback-derived object that specifies the event loop for signal handling */
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
|
||||
#include <boost/smart_ptr.hpp>
|
||||
|
||||
#include "pbd/signals.h"
|
||||
#include "ardour/types.h"
|
||||
|
||||
namespace ARDOUR {
|
||||
|
|
@ -30,12 +31,10 @@ namespace ARDOUR {
|
|||
class PluginInsert;
|
||||
}
|
||||
|
||||
namespace ArdourSurface {
|
||||
namespace ArdourSurface { namespace MACKIE_NAMESPACE {
|
||||
|
||||
class MackieControlProtocol;
|
||||
|
||||
namespace Mackie {
|
||||
|
||||
class Pot;
|
||||
class Strip;
|
||||
class Subview;
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ using ARDOUR::Profile;
|
|||
using ARDOUR::AutomationControl;
|
||||
using ARDOUR::ChanCount;
|
||||
using namespace ArdourSurface;
|
||||
using namespace Mackie;
|
||||
using namespace ArdourSurface::MACKIE_NAMESPACE;
|
||||
|
||||
#define ui_context() MackieControlProtocol::instance() /* a UICallback-derived object that specifies the event loop for signal handling */
|
||||
|
||||
|
|
@ -366,7 +366,7 @@ Surface::init_controls()
|
|||
|
||||
DEBUG_TRACE (DEBUG::MackieControl, "Surface::init_controls: creating jog wheel\n");
|
||||
if (_mcp.device_info().has_jog_wheel()) {
|
||||
_jog_wheel = new Mackie::JogWheel (_mcp);
|
||||
_jog_wheel = new MACKIE_NAMESPACE::JogWheel (_mcp);
|
||||
}
|
||||
|
||||
DEBUG_TRACE (DEBUG::MackieControl, "Surface::init_controls: creating global controls\n");
|
||||
|
|
|
|||
|
|
@ -48,13 +48,9 @@ namespace ARDOUR {
|
|||
|
||||
class MidiByteArray;
|
||||
|
||||
namespace ArdourSurface {
|
||||
namespace ArdourSurface { namespace MACKIE_NAMESPACE {
|
||||
|
||||
class MackieControlProtocol;
|
||||
|
||||
namespace Mackie
|
||||
{
|
||||
|
||||
class MackieButtonHandler;
|
||||
class SurfacePort;
|
||||
class MackieMidiBuilder;
|
||||
|
|
@ -100,7 +96,7 @@ public:
|
|||
std::map<int,Meter*> meters;
|
||||
std::map<int,Control*> controls_by_device_independent_id;
|
||||
|
||||
Mackie::JogWheel* jog_wheel() const { return _jog_wheel; }
|
||||
MACKIE_NAMESPACE::JogWheel* jog_wheel() const { return _jog_wheel; }
|
||||
Fader* master_fader() const { return _master_fader; }
|
||||
|
||||
/// The collection of all numbered strips.
|
||||
|
|
@ -193,7 +189,7 @@ public:
|
|||
MackieControlProtocol& mcp() const { return _mcp; }
|
||||
|
||||
void next_jog_mode ();
|
||||
void set_jog_mode (Mackie::JogWheel::Mode);
|
||||
void set_jog_mode (MACKIE_NAMESPACE::JogWheel::Mode);
|
||||
|
||||
void notify_metering_state_changed();
|
||||
void turn_it_on ();
|
||||
|
|
@ -213,20 +209,21 @@ public:
|
|||
bool master_stripable_is_master_monitor ();
|
||||
|
||||
private:
|
||||
MackieControlProtocol& _mcp;
|
||||
SurfacePort* _port;
|
||||
surface_type_t _stype;
|
||||
uint32_t _number;
|
||||
std::string _name;
|
||||
bool _active;
|
||||
bool _connected;
|
||||
Mackie::JogWheel* _jog_wheel;
|
||||
Fader* _master_fader;
|
||||
float _last_master_gain_written;
|
||||
PBD::ScopedConnection master_connection;
|
||||
bool _has_master_display;
|
||||
bool _has_master_meter;
|
||||
MackieControlProtocol& _mcp;
|
||||
SurfacePort* _port;
|
||||
surface_type_t _stype;
|
||||
uint32_t _number;
|
||||
std::string _name;
|
||||
bool _active;
|
||||
bool _connected;
|
||||
MACKIE_NAMESPACE::JogWheel* _jog_wheel;
|
||||
Fader* _master_fader;
|
||||
float _last_master_gain_written;
|
||||
PBD::ScopedConnection master_connection;
|
||||
bool _has_master_display;
|
||||
bool _has_master_meter;
|
||||
std::shared_ptr<ARDOUR::Stripable> _master_stripable;
|
||||
|
||||
std::string pending_display[2];
|
||||
std::string current_display[2];
|
||||
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ using namespace std;
|
|||
using namespace PBD;
|
||||
using namespace ARDOUR;
|
||||
using namespace ArdourSurface;
|
||||
using namespace Mackie;
|
||||
using namespace ArdourSurface::MACKIE_NAMESPACE;
|
||||
|
||||
SurfacePort::SurfacePort (Surface& s)
|
||||
: _surface (&s)
|
||||
|
|
@ -235,7 +235,7 @@ SurfacePort::write (const MidiByteArray & mba)
|
|||
}
|
||||
|
||||
ostream &
|
||||
Mackie::operator << (ostream & os, const SurfacePort & port)
|
||||
MACKIE_NAMESPACE::operator << (ostream & os, const SurfacePort & port)
|
||||
{
|
||||
os << "{ ";
|
||||
os << "name: " << port.input_port().name() << " " << port.output_port().name();
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
#include <midi++/types.h>
|
||||
|
||||
#include "pbd/signals.h"
|
||||
|
||||
#include "pbd/xml++.h"
|
||||
|
||||
#include "midi_byte_array.h"
|
||||
#include "types.h"
|
||||
|
|
@ -33,19 +33,14 @@ namespace MIDI {
|
|||
class Port;
|
||||
}
|
||||
|
||||
|
||||
namespace ARDOUR {
|
||||
class AsyncMIDIPort;
|
||||
class Port;
|
||||
}
|
||||
|
||||
namespace ArdourSurface {
|
||||
namespace ArdourSurface { namespace MACKIE_NAMESPACE {
|
||||
|
||||
class MackieControlProtocol;
|
||||
|
||||
namespace Mackie
|
||||
{
|
||||
|
||||
class Surface;
|
||||
|
||||
/**
|
||||
|
|
@ -55,7 +50,7 @@ class Surface;
|
|||
class SurfacePort
|
||||
{
|
||||
public:
|
||||
SurfacePort (Mackie::Surface&);
|
||||
SurfacePort (Surface&);
|
||||
virtual ~SurfacePort();
|
||||
|
||||
/// an easier way to output bytes via midi
|
||||
|
|
@ -78,7 +73,7 @@ class SurfacePort
|
|||
protected:
|
||||
|
||||
private:
|
||||
Mackie::Surface* _surface;
|
||||
Surface* _surface;
|
||||
MIDI::Port* _input_port;
|
||||
MIDI::Port* _output_port;
|
||||
std::shared_ptr<ARDOUR::Port> _async_in;
|
||||
|
|
|
|||
|
|
@ -21,16 +21,11 @@
|
|||
#ifndef timer_h
|
||||
#define timer_h
|
||||
|
||||
#ifdef _WIN32
|
||||
#include "windows.h"
|
||||
#else
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
#include <glib.h>
|
||||
|
||||
namespace ArdourSurface {
|
||||
#include "types.h"
|
||||
|
||||
namespace Mackie
|
||||
{
|
||||
namespace ArdourSurface { namespace MACKIE_NAMESPACE {
|
||||
|
||||
/**
|
||||
millisecond timer class.
|
||||
|
|
|
|||
|
|
@ -19,9 +19,7 @@
|
|||
|
||||
#include "types.h"
|
||||
|
||||
namespace ArdourSurface {
|
||||
|
||||
namespace Mackie {
|
||||
namespace ArdourSurface { namespace MACKIE_NAMESPACE {
|
||||
|
||||
LedState on( LedState::on );
|
||||
LedState off( LedState::off );
|
||||
|
|
@ -31,7 +29,7 @@ LedState none( LedState::none );
|
|||
}
|
||||
}
|
||||
|
||||
std::ostream & operator << ( std::ostream & os, const ArdourSurface::Mackie::ControlState & cs )
|
||||
std::ostream & operator << ( std::ostream & os, const ArdourSurface::MACKIE_NAMESPACE::ControlState & cs )
|
||||
{
|
||||
os << "ControlState { ";
|
||||
os << "pos: " << cs.pos;
|
||||
|
|
|
|||
|
|
@ -21,8 +21,13 @@
|
|||
|
||||
#include <iostream>
|
||||
|
||||
namespace ArdourSurface {
|
||||
namespace Mackie {
|
||||
#ifdef UF8
|
||||
# define MACKIE_NAMESPACE NS_UF8
|
||||
#else
|
||||
# define MACKIE_NAMESPACE NS_MCU
|
||||
#endif
|
||||
|
||||
namespace ArdourSurface { namespace MACKIE_NAMESPACE {
|
||||
|
||||
enum surface_type_t {
|
||||
mcu,
|
||||
|
|
|
|||
84
libs/surfaces/mackie/uf8_interface.cc
Normal file
84
libs/surfaces/mackie/uf8_interface.cc
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
/*
|
||||
* Copyright (C) 2006-2007 John Anderson
|
||||
* Copyright (C) 2008-2015 Paul Davis <paul@linuxaudiosystems.com>
|
||||
* Copyright (C) 2009-2010 Carl Hetherington <carl@carlh.net>
|
||||
* Copyright (C) 2009 David Robillard <d@drobilla.net>
|
||||
*
|
||||
* 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.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#include <stdexcept>
|
||||
|
||||
#include "pbd/error.h"
|
||||
|
||||
#include "ardour/rc_configuration.h"
|
||||
#include "ardour/debug.h"
|
||||
|
||||
#include "control_protocol/control_protocol.h"
|
||||
|
||||
#include "mackie_control_protocol.h"
|
||||
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
using namespace std;
|
||||
using namespace ArdourSurface;
|
||||
using namespace ArdourSurface::MACKIE_NAMESPACE;
|
||||
|
||||
static ControlProtocol*
|
||||
new_uf8_protocol (Session* s)
|
||||
{
|
||||
MackieControlProtocol* mcp = 0;
|
||||
|
||||
DEBUG_TRACE (DEBUG::MackieControl, "making uf8-protocol");
|
||||
|
||||
try {
|
||||
mcp = new MackieControlProtocol (*s);
|
||||
/* do not set active here - wait for set_state() */
|
||||
}
|
||||
catch (exception & e) {
|
||||
error << "Error instantiating MackieControlProtocol for UF8: " << e.what() << endmsg;
|
||||
delete mcp;
|
||||
mcp = 0;
|
||||
}
|
||||
|
||||
return mcp;
|
||||
}
|
||||
|
||||
static void
|
||||
delete_uf8_protocol (ControlProtocol* cp)
|
||||
{
|
||||
try
|
||||
{
|
||||
delete cp;
|
||||
}
|
||||
catch ( exception & e )
|
||||
{
|
||||
cout << "Exception caught trying to destroy MackieControlProtocol or UF8: " << e.what() << endl;
|
||||
}
|
||||
}
|
||||
|
||||
// Field names commented out by JE - 06-01-2010
|
||||
static ControlProtocolDescriptor uf8_descriptor = {
|
||||
/* name */ "SSL UF-8",
|
||||
/* id */ "uri://ardour.org/surfaces/ssl_uf8:0",
|
||||
/* module */ 0,
|
||||
/* available */ 0,
|
||||
/* probe_port */ 0,
|
||||
/* match usb */ 0,
|
||||
/* initialize */ new_uf8_protocol,
|
||||
/* destroy */ delete_uf8_protocol,
|
||||
};
|
||||
|
||||
extern "C" ARDOURSURFACE_API ControlProtocolDescriptor* protocol_descriptor () { return &uf8_descriptor; }
|
||||
|
|
@ -6,6 +6,28 @@ import os
|
|||
top = '.'
|
||||
out = 'build'
|
||||
|
||||
mackie_sources = [
|
||||
'button.cc',
|
||||
'controls.cc',
|
||||
'device_info.cc',
|
||||
'device_profile.cc',
|
||||
'fader.cc',
|
||||
'gui.cc',
|
||||
'jog.cc',
|
||||
'jog_wheel.cc',
|
||||
'led.cc',
|
||||
'mackie_control_protocol.cc',
|
||||
'mcp_buttons.cc',
|
||||
'meter.cc',
|
||||
'midi_byte_array.cc',
|
||||
'pot.cc',
|
||||
'strip.cc',
|
||||
'subview.cc',
|
||||
'surface.cc',
|
||||
'surface_port.cc',
|
||||
'types.cc'
|
||||
]
|
||||
|
||||
def options(opt):
|
||||
autowaf.set_options(opt)
|
||||
|
||||
|
|
@ -14,28 +36,8 @@ def configure(conf):
|
|||
|
||||
def build(bld):
|
||||
obj = bld(features = 'cxx cxxshlib')
|
||||
obj.source = '''
|
||||
button.cc
|
||||
controls.cc
|
||||
device_info.cc
|
||||
device_profile.cc
|
||||
fader.cc
|
||||
gui.cc
|
||||
interface.cc
|
||||
jog.cc
|
||||
jog_wheel.cc
|
||||
led.cc
|
||||
mackie_control_protocol.cc
|
||||
mcp_buttons.cc
|
||||
meter.cc
|
||||
midi_byte_array.cc
|
||||
pot.cc
|
||||
strip.cc
|
||||
subview.cc
|
||||
surface.cc
|
||||
surface_port.cc
|
||||
types.cc
|
||||
'''
|
||||
obj.source = list(mackie_sources)
|
||||
obj.source += [ 'interface.cc' ]
|
||||
obj.defines = [ 'PACKAGE="ardour_mackie"' ]
|
||||
obj.defines += [ 'ARDOURSURFACE_DLL_EXPORTS' ]
|
||||
obj.includes = [ '.' ]
|
||||
|
|
@ -45,5 +47,18 @@ def build(bld):
|
|||
obj.use = 'libardour libardour_cp libgtkmm2ext'
|
||||
obj.install_path = os.path.join(bld.env['LIBDIR'], 'surfaces')
|
||||
|
||||
obj = bld(features = 'cxx cxxshlib')
|
||||
obj.source = list(mackie_sources)
|
||||
obj.source += [ 'uf8_interface.cc' ]
|
||||
obj.defines = [ 'PACKAGE="ardour_ssl_uf8"' ]
|
||||
obj.defines += [ 'ARDOURSURFACE_DLL_EXPORTS' ]
|
||||
obj.defines += [ 'UF8' ]
|
||||
obj.includes = [ '.' ]
|
||||
obj.name = 'libardour_ssl_uf8'
|
||||
obj.target = 'ardour_ssl_uf8'
|
||||
obj.uselib = 'GTKMM XML OSX'
|
||||
obj.use = 'libardour libardour_cp libgtkmm2ext'
|
||||
obj.install_path = os.path.join(bld.env['LIBDIR'], 'surfaces')
|
||||
|
||||
def shutdown():
|
||||
autowaf.shutdown()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue