mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-07 06:05:43 +01:00
add beginnings of EQ and dynamics control to mackie for mixbus
This commit is contained in:
parent
99764e946a
commit
a1ef99b9b7
5 changed files with 79 additions and 36 deletions
|
|
@ -51,6 +51,7 @@
|
|||
#include "ardour/midi_track.h"
|
||||
#include "ardour/panner.h"
|
||||
#include "ardour/panner_shell.h"
|
||||
#include "ardour/profile.h"
|
||||
#include "ardour/route.h"
|
||||
#include "ardour/route_group.h"
|
||||
#include "ardour/session.h"
|
||||
|
|
@ -309,12 +310,19 @@ MackieControlProtocol::get_sorted_routes()
|
|||
}
|
||||
break;
|
||||
case Busses:
|
||||
if (!is_track(route)) {
|
||||
if (route->route_group()) {
|
||||
route->route_group()->set_active (true, this);
|
||||
if (Profile->get_mixbus()) {
|
||||
if (route->mixbus()) {
|
||||
sorted.push_back (route);
|
||||
remote_ids.insert (route->remote_control_id());
|
||||
}
|
||||
} else {
|
||||
if (!is_track(route)) {
|
||||
if (route->route_group()) {
|
||||
route->route_group()->set_active (true, this);
|
||||
}
|
||||
sorted.push_back (route);
|
||||
remote_ids.insert (route->remote_control_id());
|
||||
}
|
||||
sorted.push_back (route);
|
||||
remote_ids.insert (route->remote_control_id());
|
||||
}
|
||||
break;
|
||||
case MidiTracks:
|
||||
|
|
@ -328,7 +336,7 @@ MackieControlProtocol::get_sorted_routes()
|
|||
break;
|
||||
case Plugins:
|
||||
break;
|
||||
case Auxes: // for now aux and buss are same
|
||||
case Auxes: // in ardour, for now aux and buss are same. for mixbus, see "Busses" case above
|
||||
if (!is_track(route)) {
|
||||
if (route->route_group()) {
|
||||
route->route_group()->set_active (true, this);
|
||||
|
|
@ -349,6 +357,12 @@ MackieControlProtocol::get_sorted_routes()
|
|||
remote_ids.insert (route->remote_control_id());
|
||||
}
|
||||
break;
|
||||
case Dynamics:
|
||||
/* display shows a single route */
|
||||
break;
|
||||
case EQ:
|
||||
/* display shows a single route */
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1483,7 +1497,6 @@ MackieControlProtocol::build_button_map ()
|
|||
DEFINE_BUTTON_HANDLER (Button::UserA, &MackieControlProtocol::user_a_press, &MackieControlProtocol::user_a_release);
|
||||
DEFINE_BUTTON_HANDLER (Button::UserB, &MackieControlProtocol::user_b_press, &MackieControlProtocol::user_b_release);
|
||||
DEFINE_BUTTON_HANDLER (Button::MasterFaderTouch, &MackieControlProtocol::master_fader_touch_press, &MackieControlProtocol::master_fader_touch_release);
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -1505,6 +1518,8 @@ MackieControlProtocol::handle_button_event (Surface& surface, Button& button, Bu
|
|||
|
||||
if (!action.empty()) {
|
||||
|
||||
std::cerr << "Button has action: " << action << std::endl;
|
||||
|
||||
if (action.find ('/') != string::npos) { /* good chance that this is really an action */
|
||||
|
||||
DEBUG_TRACE (DEBUG::MackieControl, string_compose ("Looked up action for button %1 with modifier %2, got [%3]\n",
|
||||
|
|
|
|||
|
|
@ -109,6 +109,8 @@ class MackieControlProtocol
|
|||
Auxes,
|
||||
Selected,
|
||||
Plugins,
|
||||
Dynamics,
|
||||
EQ,
|
||||
};
|
||||
|
||||
enum PotMode {
|
||||
|
|
|
|||
|
|
@ -408,7 +408,18 @@ MackieControlProtocol::marker_press (Button &)
|
|||
{
|
||||
string markername;
|
||||
|
||||
session->locations()->next_available_name (markername,"mcu");
|
||||
/* Don't add another mark if one exists within 1/100th of a second of
|
||||
* the current position.
|
||||
*/
|
||||
|
||||
|
||||
framepos_t where = session->audible_frame();
|
||||
|
||||
if (session->locations()->mark_at (where, session->frame_rate() / 100.0)) {
|
||||
return off;
|
||||
}
|
||||
|
||||
session->locations()->next_available_name (markername,"marker");
|
||||
add_marker (markername);
|
||||
|
||||
return on;
|
||||
|
|
|
|||
|
|
@ -222,19 +222,19 @@ Strip::set_route (boost::shared_ptr<Route> r, bool /*with_messages*/)
|
|||
|
||||
boost::shared_ptr<Pannable> pannable = _route->pannable();
|
||||
|
||||
if(Profile->get_mixbus()) {
|
||||
const uint32_t port_channel_post_pan = 2; // gtk2_ardour/mixbus_ports.h
|
||||
boost::shared_ptr<ARDOUR::PluginInsert> plug = _route->ch_post();
|
||||
mb_pan_controllable = boost::dynamic_pointer_cast<ARDOUR::AutomationControl> (plug->control (Evoral::Parameter (ARDOUR::PluginAutomation, 0, port_channel_post_pan)));
|
||||
if(Profile->get_mixbus()) {
|
||||
const uint32_t port_channel_post_pan = 2; // gtk2_ardour/mixbus_ports.h
|
||||
boost::shared_ptr<ARDOUR::PluginInsert> plug = _route->ch_post();
|
||||
mb_pan_controllable = boost::dynamic_pointer_cast<ARDOUR::AutomationControl> (plug->control (Evoral::Parameter (ARDOUR::PluginAutomation, 0, port_channel_post_pan)));
|
||||
|
||||
mb_pan_controllable->Changed.connect(route_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_panner_azi_changed, this, false), ui_context());
|
||||
} else {
|
||||
if (pannable && _route->panner()) {
|
||||
pannable->pan_azimuth_control->Changed.connect(route_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_panner_azi_changed, this, false), ui_context());
|
||||
pannable->pan_width_control->Changed.connect(route_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_panner_width_changed, this, false), ui_context());
|
||||
mb_pan_controllable->Changed.connect(route_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_panner_azi_changed, this, false), ui_context());
|
||||
} else {
|
||||
if (pannable && _route->panner()) {
|
||||
pannable->pan_azimuth_control->Changed.connect(route_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_panner_azi_changed, this, false), ui_context());
|
||||
pannable->pan_width_control->Changed.connect(route_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_panner_width_changed, this, false), ui_context());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
_route->gain_control()->Changed.connect(route_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_gain_changed, this, false), ui_context());
|
||||
_route->PropertyChanged.connect (route_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_property_changed, this, _1), ui_context());
|
||||
|
||||
|
|
@ -257,25 +257,25 @@ if(Profile->get_mixbus()) {
|
|||
|
||||
possible_pot_parameters.clear();
|
||||
|
||||
if (Profile->get_mixbus()) {
|
||||
possible_pot_parameters.push_back (PanAzimuthAutomation);
|
||||
} else {
|
||||
if (pannable) {
|
||||
boost::shared_ptr<Panner> panner = _route->panner();
|
||||
if (panner) {
|
||||
set<Evoral::Parameter> automatable = panner->what_can_be_automated ();
|
||||
set<Evoral::Parameter>::iterator a;
|
||||
if (Profile->get_mixbus()) {
|
||||
possible_pot_parameters.push_back (PanAzimuthAutomation);
|
||||
} else {
|
||||
if (pannable) {
|
||||
boost::shared_ptr<Panner> panner = _route->panner();
|
||||
if (panner) {
|
||||
set<Evoral::Parameter> automatable = panner->what_can_be_automated ();
|
||||
set<Evoral::Parameter>::iterator a;
|
||||
|
||||
if ((a = automatable.find (PanAzimuthAutomation)) != automatable.end()) {
|
||||
possible_pot_parameters.push_back (PanAzimuthAutomation);
|
||||
}
|
||||
if ((a = automatable.find (PanAzimuthAutomation)) != automatable.end()) {
|
||||
possible_pot_parameters.push_back (PanAzimuthAutomation);
|
||||
}
|
||||
|
||||
if ((a = automatable.find (PanWidthAutomation)) != automatable.end()) {
|
||||
possible_pot_parameters.push_back (PanWidthAutomation);
|
||||
if ((a = automatable.find (PanWidthAutomation)) != automatable.end()) {
|
||||
possible_pot_parameters.push_back (PanWidthAutomation);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (_route->trim() && route()->trim()->active()) {
|
||||
possible_pot_parameters.push_back (TrimAutomation);
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@
|
|||
#include "ardour/route.h"
|
||||
#include "ardour/panner.h"
|
||||
#include "ardour/panner_shell.h"
|
||||
#include "ardour/profile.h"
|
||||
#include "ardour/rc_configuration.h"
|
||||
#include "ardour/session.h"
|
||||
#include "ardour/utils.h"
|
||||
|
|
@ -64,7 +65,7 @@ using namespace std;
|
|||
using namespace PBD;
|
||||
using ARDOUR::Route;
|
||||
using ARDOUR::Panner;
|
||||
using ARDOUR::Pannable;
|
||||
using ARDOUR::Profile;
|
||||
using ARDOUR::AutomationControl;
|
||||
using namespace ArdourSurface;
|
||||
using namespace Mackie;
|
||||
|
|
@ -1070,10 +1071,14 @@ Surface::update_view_mode_display ()
|
|||
case MackieControlProtocol::Busses:
|
||||
show_two_char_display ("BS");
|
||||
id = Button::Busses;
|
||||
text = _("Busses");
|
||||
if (Profile->get_mixbus()) {
|
||||
text = _("Mixbusses");
|
||||
} else {
|
||||
text = _("Busses");
|
||||
}
|
||||
break;
|
||||
case MackieControlProtocol::Auxes:
|
||||
show_two_char_display ("AB");
|
||||
show_two_char_display ("Au");
|
||||
id = Button::Aux;
|
||||
text = _("Auxes");
|
||||
break;
|
||||
|
|
@ -1082,6 +1087,16 @@ Surface::update_view_mode_display ()
|
|||
id = Button::User;
|
||||
text = _("Selected Routes");
|
||||
break;
|
||||
case MackieControlProtocol::Dynamics:
|
||||
show_two_char_display ("DI");
|
||||
id = Button::User;
|
||||
text = _("Dynamics");
|
||||
break;
|
||||
case MackieControlProtocol::EQ:
|
||||
show_two_char_display ("EQ");
|
||||
id = Button::User;
|
||||
text = _("EQ");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue