mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-09 00:04:56 +01:00
faderport: make punch button LED indicate punch status
This commit is contained in:
parent
fd44adfe01
commit
ee9524c9b6
2 changed files with 21 additions and 0 deletions
|
|
@ -48,6 +48,7 @@
|
||||||
#include "ardour/rc_configuration.h"
|
#include "ardour/rc_configuration.h"
|
||||||
#include "ardour/route.h"
|
#include "ardour/route.h"
|
||||||
#include "ardour/session.h"
|
#include "ardour/session.h"
|
||||||
|
#include "ardour/session_configuration.h"
|
||||||
#include "ardour/track.h"
|
#include "ardour/track.h"
|
||||||
|
|
||||||
#include "faderport.h"
|
#include "faderport.h"
|
||||||
|
|
@ -580,11 +581,30 @@ FaderPort::notify_transport_state_changed ()
|
||||||
get_button (Ffwd).set_led_state (_output_port, session->transport_speed() > 1.0);
|
get_button (Ffwd).set_led_state (_output_port, session->transport_speed() > 1.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
FaderPort::parameter_changed (string what)
|
||||||
|
{
|
||||||
|
if (what == "punch-in" || what == "punch-out") {
|
||||||
|
bool in = session->config.get_punch_in ();
|
||||||
|
bool out = session->config.get_punch_out ();
|
||||||
|
if (in && out) {
|
||||||
|
get_button (Punch).set_led_state (_output_port, true);
|
||||||
|
blinkers.remove (Punch);
|
||||||
|
} else if (in || out) {
|
||||||
|
blinkers.push_back (Punch);
|
||||||
|
} else {
|
||||||
|
blinkers.remove (Punch);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
FaderPort::connect_session_signals()
|
FaderPort::connect_session_signals()
|
||||||
{
|
{
|
||||||
session->RecordStateChanged.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort::notify_record_state_changed, this), this);
|
session->RecordStateChanged.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort::notify_record_state_changed, this), this);
|
||||||
session->TransportStateChange.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort::notify_transport_state_changed, this), this);
|
session->TransportStateChange.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort::notify_transport_state_changed, this), this);
|
||||||
|
/* not session, but treat it similarly */
|
||||||
|
session->config.ParameterChanged.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort::parameter_changed, this, _1), this);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
|
|
||||||
|
|
@ -295,6 +295,7 @@ class FaderPort : public ARDOUR::ControlProtocol, public AbstractUI<FaderPortReq
|
||||||
void map_recenable ();
|
void map_recenable ();
|
||||||
void map_gain ();
|
void map_gain ();
|
||||||
void map_cut ();
|
void map_cut ();
|
||||||
|
void parameter_changed (std::string);
|
||||||
|
|
||||||
/* operations (defined in operations.cc) */
|
/* operations (defined in operations.cc) */
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue