mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-17 04:06:26 +01:00
Rename ControlProtocol::session to ControlProtocol::_session
To match ARDOUR_UI, towards finally sharing code here.
This commit is contained in:
parent
927c7328cc
commit
56fe5b47ae
26 changed files with 419 additions and 419 deletions
|
|
@ -105,13 +105,13 @@ CC121::CC121 (Session& s)
|
||||||
_input_bundle->add_channel (
|
_input_bundle->add_channel (
|
||||||
"",
|
"",
|
||||||
ARDOUR::DataType::MIDI,
|
ARDOUR::DataType::MIDI,
|
||||||
session->engine().make_port_name_non_relative (inp->name())
|
_session->engine().make_port_name_non_relative (inp->name())
|
||||||
);
|
);
|
||||||
|
|
||||||
_output_bundle->add_channel (
|
_output_bundle->add_channel (
|
||||||
"",
|
"",
|
||||||
ARDOUR::DataType::MIDI,
|
ARDOUR::DataType::MIDI,
|
||||||
session->engine().make_port_name_non_relative (outp->name())
|
_session->engine().make_port_name_non_relative (outp->name())
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -309,7 +309,7 @@ CC121::button_press_handler (MIDI::Parser &, MIDI::EventTwoBytes* tb)
|
||||||
if (_current_stripable) {
|
if (_current_stripable) {
|
||||||
boost::shared_ptr<AutomationControl> gain = _current_stripable->gain_control ();
|
boost::shared_ptr<AutomationControl> gain = _current_stripable->gain_control ();
|
||||||
if (gain) {
|
if (gain) {
|
||||||
samplepos_t now = session->engine().sample_time();
|
samplepos_t now = _session->engine().sample_time();
|
||||||
gain->start_touch (now);
|
gain->start_touch (now);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -356,7 +356,7 @@ CC121::button_release_handler (MIDI::Parser &, MIDI::EventTwoBytes* tb)
|
||||||
if (_current_stripable) {
|
if (_current_stripable) {
|
||||||
boost::shared_ptr<AutomationControl> gain = _current_stripable->gain_control ();
|
boost::shared_ptr<AutomationControl> gain = _current_stripable->gain_control ();
|
||||||
if (gain) {
|
if (gain) {
|
||||||
samplepos_t now = session->engine().sample_time();
|
samplepos_t now = _session->engine().sample_time();
|
||||||
gain->stop_touch (now);
|
gain->stop_touch (now);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -642,7 +642,7 @@ CC121::map_recenable_state ()
|
||||||
|
|
||||||
bool onoff;
|
bool onoff;
|
||||||
|
|
||||||
switch (session->record_status()) {
|
switch (_session->record_status()) {
|
||||||
case Session::Disabled:
|
case Session::Disabled:
|
||||||
onoff = false;
|
onoff = false;
|
||||||
break;
|
break;
|
||||||
|
|
@ -650,7 +650,7 @@ CC121::map_recenable_state ()
|
||||||
onoff = blink_state;
|
onoff = blink_state;
|
||||||
break;
|
break;
|
||||||
case Session::Recording:
|
case Session::Recording:
|
||||||
if (session->have_rec_enabled_track ()) {
|
if (_session->have_rec_enabled_track ()) {
|
||||||
onoff = true;
|
onoff = true;
|
||||||
} else {
|
} else {
|
||||||
onoff = blink_state;
|
onoff = blink_state;
|
||||||
|
|
@ -667,7 +667,7 @@ CC121::map_recenable_state ()
|
||||||
void
|
void
|
||||||
CC121::map_transport_state ()
|
CC121::map_transport_state ()
|
||||||
{
|
{
|
||||||
get_button (Loop).set_led_state (_output_port, session->get_play_loop());
|
get_button (Loop).set_led_state (_output_port, _session->get_play_loop());
|
||||||
|
|
||||||
float ts = get_transport_speed();
|
float ts = get_transport_speed();
|
||||||
|
|
||||||
|
|
@ -689,8 +689,8 @@ CC121::map_transport_state ()
|
||||||
void
|
void
|
||||||
CC121::connect_session_signals()
|
CC121::connect_session_signals()
|
||||||
{
|
{
|
||||||
session->RecordStateChanged.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&CC121::map_recenable_state, this), this);
|
_session->RecordStateChanged.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&CC121::map_recenable_state, this), this);
|
||||||
session->TransportStateChange.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&CC121::map_transport_state, this), this);
|
_session->TransportStateChange.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&CC121::map_transport_state, this), this);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
|
@ -706,7 +706,7 @@ CC121::midi_input_handler (Glib::IOCondition ioc, boost::shared_ptr<ARDOUR::Asyn
|
||||||
|
|
||||||
port->clear ();
|
port->clear ();
|
||||||
DEBUG_TRACE (DEBUG::CC121, string_compose ("data available on %1\n", boost::shared_ptr<MIDI::Port>(port)->name()));
|
DEBUG_TRACE (DEBUG::CC121, string_compose ("data available on %1\n", boost::shared_ptr<MIDI::Port>(port)->name()));
|
||||||
samplepos_t now = session->engine().sample_time();
|
samplepos_t now = _session->engine().sample_time();
|
||||||
port->parse (now);
|
port->parse (now);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1053,8 +1053,8 @@ void
|
||||||
CC121::drop_current_stripable ()
|
CC121::drop_current_stripable ()
|
||||||
{
|
{
|
||||||
if (_current_stripable) {
|
if (_current_stripable) {
|
||||||
if (_current_stripable == session->monitor_out()) {
|
if (_current_stripable == _session->monitor_out()) {
|
||||||
set_current_stripable (session->master_out());
|
set_current_stripable (_session->master_out());
|
||||||
} else {
|
} else {
|
||||||
set_current_stripable (boost::shared_ptr<Stripable>());
|
set_current_stripable (boost::shared_ptr<Stripable>());
|
||||||
}
|
}
|
||||||
|
|
@ -1256,7 +1256,7 @@ CC121::map_stripable_state ()
|
||||||
map_auto ();
|
map_auto ();
|
||||||
map_monitoring ();
|
map_monitoring ();
|
||||||
|
|
||||||
if (_current_stripable == session->monitor_out()) {
|
if (_current_stripable == _session->monitor_out()) {
|
||||||
map_cut ();
|
map_cut ();
|
||||||
} else {
|
} else {
|
||||||
map_mute ();
|
map_mute ();
|
||||||
|
|
|
||||||
|
|
@ -157,7 +157,7 @@ CC121::mute ()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_current_stripable == session->monitor_out()) {
|
if (_current_stripable == _session->monitor_out()) {
|
||||||
boost::shared_ptr<MonitorProcessor> mp = _current_stripable->monitor_control();
|
boost::shared_ptr<MonitorProcessor> mp = _current_stripable->monitor_control();
|
||||||
mp->set_cut_all (!mp->cut_all());
|
mp->set_cut_all (!mp->cut_all());
|
||||||
return;
|
return;
|
||||||
|
|
@ -194,7 +194,7 @@ CC121::rec_enable ()
|
||||||
void
|
void
|
||||||
CC121::use_master ()
|
CC121::use_master ()
|
||||||
{
|
{
|
||||||
boost::shared_ptr<Stripable> r = session->master_out();
|
boost::shared_ptr<Stripable> r = _session->master_out();
|
||||||
if (r) {
|
if (r) {
|
||||||
if (_current_stripable == r) {
|
if (_current_stripable == r) {
|
||||||
r = pre_master_stripable.lock();
|
r = pre_master_stripable.lock();
|
||||||
|
|
@ -202,7 +202,7 @@ CC121::use_master ()
|
||||||
get_button(Output).set_led_state (_output_port, false);
|
get_button(Output).set_led_state (_output_port, false);
|
||||||
blinkers.remove (Output);
|
blinkers.remove (Output);
|
||||||
} else {
|
} else {
|
||||||
if (_current_stripable != session->master_out() && _current_stripable != session->monitor_out()) {
|
if (_current_stripable != _session->master_out() && _current_stripable != _session->monitor_out()) {
|
||||||
pre_master_stripable = boost::weak_ptr<Stripable> (_current_stripable);
|
pre_master_stripable = boost::weak_ptr<Stripable> (_current_stripable);
|
||||||
}
|
}
|
||||||
set_current_stripable (r);
|
set_current_stripable (r);
|
||||||
|
|
@ -215,7 +215,7 @@ CC121::use_master ()
|
||||||
void
|
void
|
||||||
CC121::use_monitor ()
|
CC121::use_monitor ()
|
||||||
{
|
{
|
||||||
boost::shared_ptr<Stripable> r = session->monitor_out();
|
boost::shared_ptr<Stripable> r = _session->monitor_out();
|
||||||
|
|
||||||
if (r) {
|
if (r) {
|
||||||
if (_current_stripable == r) {
|
if (_current_stripable == r) {
|
||||||
|
|
@ -224,7 +224,7 @@ CC121::use_monitor ()
|
||||||
get_button(Output).set_led_state (_output_port, false);
|
get_button(Output).set_led_state (_output_port, false);
|
||||||
blinkers.remove (Output);
|
blinkers.remove (Output);
|
||||||
} else {
|
} else {
|
||||||
if (_current_stripable != session->master_out() && _current_stripable != session->monitor_out()) {
|
if (_current_stripable != _session->master_out() && _current_stripable != _session->monitor_out()) {
|
||||||
pre_monitor_stripable = boost::weak_ptr<Stripable> (_current_stripable);
|
pre_monitor_stripable = boost::weak_ptr<Stripable> (_current_stripable);
|
||||||
}
|
}
|
||||||
set_current_stripable (r);
|
set_current_stripable (r);
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ using namespace ARDOUR;
|
||||||
PBD::Signal2<void,std::string,std::string> BasicUI::AccessAction;
|
PBD::Signal2<void,std::string,std::string> BasicUI::AccessAction;
|
||||||
|
|
||||||
BasicUI::BasicUI (Session& s)
|
BasicUI::BasicUI (Session& s)
|
||||||
: session (&s)
|
: _session (&s)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -72,21 +72,21 @@ BasicUI::access_action ( std::string action_path )
|
||||||
void
|
void
|
||||||
BasicUI::loop_toggle ()
|
BasicUI::loop_toggle ()
|
||||||
{
|
{
|
||||||
if (!session) {
|
if (!_session) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Location * looploc = session->locations()->auto_loop_location();
|
Location * looploc = _session->locations()->auto_loop_location();
|
||||||
|
|
||||||
if (!looploc) {
|
if (!looploc) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (session->get_play_loop()) {
|
if (_session->get_play_loop()) {
|
||||||
|
|
||||||
/* looping enabled, our job is to disable it */
|
/* looping enabled, our job is to disable it */
|
||||||
|
|
||||||
session->request_play_loop (false);
|
_session->request_play_loop (false);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
|
@ -97,9 +97,9 @@ BasicUI::loop_toggle ()
|
||||||
does not start transport.
|
does not start transport.
|
||||||
*/
|
*/
|
||||||
if (Config->get_loop_is_mode()) {
|
if (Config->get_loop_is_mode()) {
|
||||||
session->request_play_loop (true, false);
|
_session->request_play_loop (true, false);
|
||||||
} else {
|
} else {
|
||||||
session->request_play_loop (true, true);
|
_session->request_play_loop (true, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -111,10 +111,10 @@ void
|
||||||
BasicUI::loop_location (samplepos_t start, samplepos_t end)
|
BasicUI::loop_location (samplepos_t start, samplepos_t end)
|
||||||
{
|
{
|
||||||
Location* tll;
|
Location* tll;
|
||||||
if ((tll = session->locations()->auto_loop_location()) == 0) {
|
if ((tll = _session->locations()->auto_loop_location()) == 0) {
|
||||||
Location* loc = new Location (*session, start, end, _("Loop"), Location::IsAutoLoop);
|
Location* loc = new Location (*_session, start, end, _("Loop"), Location::IsAutoLoop);
|
||||||
session->locations()->add (loc, true);
|
_session->locations()->add (loc, true);
|
||||||
session->set_auto_loop_location (loc);
|
_session->set_auto_loop_location (loc);
|
||||||
} else {
|
} else {
|
||||||
tll->set_hidden (false, this);
|
tll->set_hidden (false, this);
|
||||||
tll->set (start, end);
|
tll->set (start, end);
|
||||||
|
|
@ -124,58 +124,58 @@ BasicUI::loop_location (samplepos_t start, samplepos_t end)
|
||||||
void
|
void
|
||||||
BasicUI::goto_start (bool and_roll)
|
BasicUI::goto_start (bool and_roll)
|
||||||
{
|
{
|
||||||
session->goto_start (and_roll);
|
_session->goto_start (and_roll);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
BasicUI::goto_zero ()
|
BasicUI::goto_zero ()
|
||||||
{
|
{
|
||||||
session->request_locate (0);
|
_session->request_locate (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
BasicUI::goto_end ()
|
BasicUI::goto_end ()
|
||||||
{
|
{
|
||||||
session->goto_end ();
|
_session->goto_end ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
BasicUI::add_marker (const std::string& markername)
|
BasicUI::add_marker (const std::string& markername)
|
||||||
{
|
{
|
||||||
samplepos_t where = session->audible_sample();
|
samplepos_t where = _session->audible_sample();
|
||||||
Location *location = new Location (*session, where, where, markername, Location::IsMark);
|
Location *location = new Location (*_session, where, where, markername, Location::IsMark);
|
||||||
session->begin_reversible_command (_("add marker"));
|
_session->begin_reversible_command (_("add marker"));
|
||||||
XMLNode &before = session->locations()->get_state();
|
XMLNode &before = _session->locations()->get_state();
|
||||||
session->locations()->add (location, true);
|
_session->locations()->add (location, true);
|
||||||
XMLNode &after = session->locations()->get_state();
|
XMLNode &after = _session->locations()->get_state();
|
||||||
session->add_command (new MementoCommand<Locations>(*(session->locations()), &before, &after));
|
_session->add_command (new MementoCommand<Locations>(*(_session->locations()), &before, &after));
|
||||||
session->commit_reversible_command ();
|
_session->commit_reversible_command ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
BasicUI::remove_marker_at_playhead ()
|
BasicUI::remove_marker_at_playhead ()
|
||||||
{
|
{
|
||||||
if (session) {
|
if (_session) {
|
||||||
//set up for undo
|
//set up for undo
|
||||||
XMLNode &before = session->locations()->get_state();
|
XMLNode &before = _session->locations()->get_state();
|
||||||
bool removed = false;
|
bool removed = false;
|
||||||
|
|
||||||
//find location(s) at this time
|
//find location(s) at this time
|
||||||
Locations::LocationList locs;
|
Locations::LocationList locs;
|
||||||
session->locations()->find_all_between (session->audible_sample(), session->audible_sample()+1, locs, Location::Flags(0));
|
_session->locations()->find_all_between (_session->audible_sample(), _session->audible_sample()+1, locs, Location::Flags(0));
|
||||||
for (Locations::LocationList::iterator i = locs.begin(); i != locs.end(); ++i) {
|
for (Locations::LocationList::iterator i = locs.begin(); i != locs.end(); ++i) {
|
||||||
if ((*i)->is_mark()) {
|
if ((*i)->is_mark()) {
|
||||||
session->locations()->remove (*i);
|
_session->locations()->remove (*i);
|
||||||
removed = true;
|
removed = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//store undo
|
//store undo
|
||||||
if (removed) {
|
if (removed) {
|
||||||
session->begin_reversible_command (_("remove marker"));
|
_session->begin_reversible_command (_("remove marker"));
|
||||||
XMLNode &after = session->locations()->get_state();
|
XMLNode &after = _session->locations()->get_state();
|
||||||
session->add_command(new MementoCommand<Locations>(*(session->locations()), &before, &after));
|
_session->add_command(new MementoCommand<Locations>(*(_session->locations()), &before, &after));
|
||||||
session->commit_reversible_command ();
|
_session->commit_reversible_command ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -195,14 +195,14 @@ BasicUI::button_varispeed (bool fwd)
|
||||||
|
|
||||||
if (fwd) {
|
if (fwd) {
|
||||||
if (transport_speed <= 0) {
|
if (transport_speed <= 0) {
|
||||||
session->request_transport_speed (1.0, false);
|
_session->request_transport_speed (1.0, false);
|
||||||
session->request_roll (TRS_UI);
|
_session->request_roll (TRS_UI);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (transport_speed >= 0) {
|
if (transport_speed >= 0) {
|
||||||
session->request_transport_speed (-1.0, false);
|
_session->request_transport_speed (-1.0, false);
|
||||||
session->request_roll (TRS_UI);
|
_session->request_roll (TRS_UI);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -216,13 +216,13 @@ BasicUI::button_varispeed (bool fwd)
|
||||||
|
|
||||||
if (fwd) {
|
if (fwd) {
|
||||||
if (transport_speed <= 0) {
|
if (transport_speed <= 0) {
|
||||||
session->request_transport_speed (1.0, false);
|
_session->request_transport_speed (1.0, false);
|
||||||
session->request_roll (TRS_UI);
|
_session->request_roll (TRS_UI);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (transport_speed >= 0) {
|
if (transport_speed >= 0) {
|
||||||
session->request_transport_speed (-1.0, false);
|
_session->request_transport_speed (-1.0, false);
|
||||||
session->request_roll (TRS_UI);
|
_session->request_roll (TRS_UI);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -267,8 +267,8 @@ BasicUI::button_varispeed (bool fwd)
|
||||||
|
|
||||||
speed = semitone_ratio * transport_speed;
|
speed = semitone_ratio * transport_speed;
|
||||||
speed = std::max (-maxspeed, std::min (maxspeed, speed));
|
speed = std::max (-maxspeed, std::min (maxspeed, speed));
|
||||||
session->request_transport_speed (speed, false);
|
_session->request_transport_speed (speed, false);
|
||||||
session->request_roll (TRS_UI);
|
_session->request_roll (TRS_UI);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -286,13 +286,13 @@ BasicUI::ffwd ()
|
||||||
void
|
void
|
||||||
BasicUI::transport_stop ()
|
BasicUI::transport_stop ()
|
||||||
{
|
{
|
||||||
session->request_stop ();
|
_session->request_stop ();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
BasicUI::stop_button_onoff () const
|
BasicUI::stop_button_onoff () const
|
||||||
{
|
{
|
||||||
return session->transport_stopped_or_stopping ();
|
return _session->transport_stopped_or_stopping ();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
|
@ -316,7 +316,7 @@ BasicUI::rewind_button_onoff () const
|
||||||
bool
|
bool
|
||||||
BasicUI::loop_button_onoff () const
|
BasicUI::loop_button_onoff () const
|
||||||
{
|
{
|
||||||
return session->get_play_loop();
|
return _session->get_play_loop();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -324,17 +324,17 @@ BasicUI::transport_play (bool from_last_start)
|
||||||
{
|
{
|
||||||
/* ::toggle_roll() is smarter and preferred */
|
/* ::toggle_roll() is smarter and preferred */
|
||||||
|
|
||||||
if (!session) {
|
if (!_session) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (session->is_auditioning()) {
|
if (_session->is_auditioning()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool rolling = transport_rolling();
|
bool rolling = transport_rolling();
|
||||||
|
|
||||||
if (session->get_play_loop()) {
|
if (_session->get_play_loop()) {
|
||||||
|
|
||||||
/* If loop playback is not a mode, then we should cancel
|
/* If loop playback is not a mode, then we should cancel
|
||||||
it when this action is requested. If it is a mode
|
it when this action is requested. If it is a mode
|
||||||
|
|
@ -347,99 +347,99 @@ BasicUI::transport_play (bool from_last_start)
|
||||||
*/
|
*/
|
||||||
if (rolling) {
|
if (rolling) {
|
||||||
/* stop loop playback but keep rolling */
|
/* stop loop playback but keep rolling */
|
||||||
session->request_play_loop (false, false);
|
_session->request_play_loop (false, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (session->get_play_range () ) {
|
} else if (_session->get_play_range () ) {
|
||||||
/* stop playing a range if we currently are */
|
/* stop playing a range if we currently are */
|
||||||
session->request_play_range (0, true);
|
_session->request_play_range (0, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rolling) {
|
if (rolling) {
|
||||||
session->request_transport_speed (1.0, false, TRS_UI);
|
_session->request_transport_speed (1.0, false, TRS_UI);
|
||||||
} else {
|
} else {
|
||||||
session->request_roll ();
|
_session->request_roll ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
BasicUI::rec_enable_toggle ()
|
BasicUI::rec_enable_toggle ()
|
||||||
{
|
{
|
||||||
switch (session->record_status()) {
|
switch (_session->record_status()) {
|
||||||
case Session::Disabled:
|
case Session::Disabled:
|
||||||
if (session->ntracks() == 0) {
|
if (_session->ntracks() == 0) {
|
||||||
// string txt = _("Please create 1 or more track\nbefore trying to record.\nCheck the Session menu.");
|
// string txt = _("Please create 1 or more track\nbefore trying to record.\nCheck the Session menu.");
|
||||||
// MessageDialog msg (*editor, txt);
|
// MessageDialog msg (*editor, txt);
|
||||||
// msg.run ();
|
// msg.run ();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
session->maybe_enable_record ();
|
_session->maybe_enable_record ();
|
||||||
break;
|
break;
|
||||||
case Session::Recording:
|
case Session::Recording:
|
||||||
case Session::Enabled:
|
case Session::Enabled:
|
||||||
session->disable_record (false, true);
|
_session->disable_record (false, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
BasicUI::all_tracks_rec_in ()
|
BasicUI::all_tracks_rec_in ()
|
||||||
{
|
{
|
||||||
session->set_all_tracks_record_enabled (true);
|
_session->set_all_tracks_record_enabled (true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
BasicUI::all_tracks_rec_out ()
|
BasicUI::all_tracks_rec_out ()
|
||||||
{
|
{
|
||||||
session->set_all_tracks_record_enabled (false);
|
_session->set_all_tracks_record_enabled (false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
BasicUI::save_state ()
|
BasicUI::save_state ()
|
||||||
{
|
{
|
||||||
session->save_state ("");
|
_session->save_state ("");
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
BasicUI::prev_marker ()
|
BasicUI::prev_marker ()
|
||||||
{
|
{
|
||||||
samplepos_t pos = session->locations()->first_mark_before (session->transport_sample());
|
samplepos_t pos = _session->locations()->first_mark_before (_session->transport_sample());
|
||||||
|
|
||||||
if (pos >= 0) {
|
if (pos >= 0) {
|
||||||
session->request_locate (pos);
|
_session->request_locate (pos);
|
||||||
} else {
|
} else {
|
||||||
session->goto_start ();
|
_session->goto_start ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
BasicUI::next_marker ()
|
BasicUI::next_marker ()
|
||||||
{
|
{
|
||||||
samplepos_t pos = session->locations()->first_mark_after (session->transport_sample());
|
samplepos_t pos = _session->locations()->first_mark_after (_session->transport_sample());
|
||||||
|
|
||||||
if (pos >= 0) {
|
if (pos >= 0) {
|
||||||
session->request_locate (pos);
|
_session->request_locate (pos);
|
||||||
} else {
|
} else {
|
||||||
session->goto_end();
|
_session->goto_end();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
BasicUI::set_transport_speed (double speed)
|
BasicUI::set_transport_speed (double speed)
|
||||||
{
|
{
|
||||||
session->request_transport_speed (speed);
|
_session->request_transport_speed (speed);
|
||||||
}
|
}
|
||||||
|
|
||||||
double
|
double
|
||||||
BasicUI::get_transport_speed () const
|
BasicUI::get_transport_speed () const
|
||||||
{
|
{
|
||||||
return session->actual_speed ();
|
return _session->actual_speed ();
|
||||||
}
|
}
|
||||||
|
|
||||||
double
|
double
|
||||||
BasicUI::transport_rolling () const
|
BasicUI::transport_rolling () const
|
||||||
{
|
{
|
||||||
return !session->transport_stopped_or_stopping ();
|
return !_session->transport_stopped_or_stopping ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -457,79 +457,79 @@ BasicUI::redo ()
|
||||||
void
|
void
|
||||||
BasicUI::toggle_all_rec_enables ()
|
BasicUI::toggle_all_rec_enables ()
|
||||||
{
|
{
|
||||||
if (session->get_record_enabled()) {
|
if (_session->get_record_enabled()) {
|
||||||
// session->record_disenable_all ();
|
// _session->record_disenable_all ();
|
||||||
} else {
|
} else {
|
||||||
// session->record_enable_all ();
|
// _session->record_enable_all ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
BasicUI::toggle_punch_in ()
|
BasicUI::toggle_punch_in ()
|
||||||
{
|
{
|
||||||
session->config.set_punch_in (!session->config.get_punch_in());
|
_session->config.set_punch_in (!_session->config.get_punch_in());
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
BasicUI::toggle_punch_out ()
|
BasicUI::toggle_punch_out ()
|
||||||
{
|
{
|
||||||
session->config.set_punch_out (!session->config.get_punch_out());
|
_session->config.set_punch_out (!_session->config.get_punch_out());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
BasicUI::get_record_enabled ()
|
BasicUI::get_record_enabled ()
|
||||||
{
|
{
|
||||||
return session->get_record_enabled();
|
return _session->get_record_enabled();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
BasicUI::set_record_enable (bool yn)
|
BasicUI::set_record_enable (bool yn)
|
||||||
{
|
{
|
||||||
if (yn) {
|
if (yn) {
|
||||||
session->maybe_enable_record ();
|
_session->maybe_enable_record ();
|
||||||
} else {
|
} else {
|
||||||
session->disable_record (false, true);
|
_session->disable_record (false, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
samplepos_t
|
samplepos_t
|
||||||
BasicUI::transport_sample ()
|
BasicUI::transport_sample ()
|
||||||
{
|
{
|
||||||
return session->transport_sample();
|
return _session->transport_sample();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
BasicUI::locate (samplepos_t where, LocateTransportDisposition ltd)
|
BasicUI::locate (samplepos_t where, LocateTransportDisposition ltd)
|
||||||
{
|
{
|
||||||
session->request_locate (where, ltd);
|
_session->request_locate (where, ltd);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
BasicUI::locate (samplepos_t where, bool roll)
|
BasicUI::locate (samplepos_t where, bool roll)
|
||||||
{
|
{
|
||||||
session->request_locate (where, roll ? MustRoll : RollIfAppropriate);
|
_session->request_locate (where, roll ? MustRoll : RollIfAppropriate);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
BasicUI::jump_by_seconds (double secs, LocateTransportDisposition ltd)
|
BasicUI::jump_by_seconds (double secs, LocateTransportDisposition ltd)
|
||||||
{
|
{
|
||||||
samplepos_t current = session->transport_sample();
|
samplepos_t current = _session->transport_sample();
|
||||||
double s = (double) current / (double) session->nominal_sample_rate();
|
double s = (double) current / (double) _session->nominal_sample_rate();
|
||||||
|
|
||||||
s+= secs;
|
s+= secs;
|
||||||
if (s < 0) {
|
if (s < 0) {
|
||||||
s = 0;
|
s = 0;
|
||||||
}
|
}
|
||||||
s = s * session->nominal_sample_rate();
|
s = s * _session->nominal_sample_rate();
|
||||||
|
|
||||||
session->request_locate (floor(s), ltd);
|
_session->request_locate (floor(s), ltd);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
BasicUI::jump_by_bars (double bars, LocateTransportDisposition ltd)
|
BasicUI::jump_by_bars (double bars, LocateTransportDisposition ltd)
|
||||||
{
|
{
|
||||||
TempoMap& tmap (session->tempo_map());
|
TempoMap& tmap (_session->tempo_map());
|
||||||
Timecode::BBT_Time bbt (tmap.bbt_at_sample (session->transport_sample()));
|
Timecode::BBT_Time bbt (tmap.bbt_at_sample (_session->transport_sample()));
|
||||||
|
|
||||||
bars += bbt.bars;
|
bars += bbt.bars;
|
||||||
if (bars < 0) {
|
if (bars < 0) {
|
||||||
|
|
@ -540,25 +540,25 @@ BasicUI::jump_by_bars (double bars, LocateTransportDisposition ltd)
|
||||||
any.type = AnyTime::BBT;
|
any.type = AnyTime::BBT;
|
||||||
any.bbt.bars = bars;
|
any.bbt.bars = bars;
|
||||||
|
|
||||||
session->request_locate (session->convert_to_samples (any), ltd);
|
_session->request_locate (_session->convert_to_samples (any), ltd);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
BasicUI::jump_by_beats (double beats, LocateTransportDisposition ltd)
|
BasicUI::jump_by_beats (double beats, LocateTransportDisposition ltd)
|
||||||
{
|
{
|
||||||
TempoMap& tmap (session->tempo_map ());
|
TempoMap& tmap (_session->tempo_map ());
|
||||||
double qn_goal = tmap.quarter_note_at_sample (session->transport_sample ()) + beats;
|
double qn_goal = tmap.quarter_note_at_sample (_session->transport_sample ()) + beats;
|
||||||
if (qn_goal < 0.0) {
|
if (qn_goal < 0.0) {
|
||||||
qn_goal = 0.0;
|
qn_goal = 0.0;
|
||||||
}
|
}
|
||||||
session->request_locate (tmap.sample_at_quarter_note (qn_goal), ltd);
|
_session->request_locate (tmap.sample_at_quarter_note (qn_goal), ltd);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
BasicUI::toggle_monitor_mute ()
|
BasicUI::toggle_monitor_mute ()
|
||||||
{
|
{
|
||||||
if (session->monitor_out()) {
|
if (_session->monitor_out()) {
|
||||||
boost::shared_ptr<MonitorProcessor> mon = session->monitor_out()->monitor_control();
|
boost::shared_ptr<MonitorProcessor> mon = _session->monitor_out()->monitor_control();
|
||||||
if (mon->cut_all ()) {
|
if (mon->cut_all ()) {
|
||||||
mon->set_cut_all (false);
|
mon->set_cut_all (false);
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -570,8 +570,8 @@ BasicUI::toggle_monitor_mute ()
|
||||||
void
|
void
|
||||||
BasicUI::toggle_monitor_dim ()
|
BasicUI::toggle_monitor_dim ()
|
||||||
{
|
{
|
||||||
if (session->monitor_out()) {
|
if (_session->monitor_out()) {
|
||||||
boost::shared_ptr<MonitorProcessor> mon = session->monitor_out()->monitor_control();
|
boost::shared_ptr<MonitorProcessor> mon = _session->monitor_out()->monitor_control();
|
||||||
if (mon->dim_all ()) {
|
if (mon->dim_all ()) {
|
||||||
mon->set_dim_all (false);
|
mon->set_dim_all (false);
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -583,8 +583,8 @@ BasicUI::toggle_monitor_dim ()
|
||||||
void
|
void
|
||||||
BasicUI::toggle_monitor_mono ()
|
BasicUI::toggle_monitor_mono ()
|
||||||
{
|
{
|
||||||
if (session->monitor_out()) {
|
if (_session->monitor_out()) {
|
||||||
boost::shared_ptr<MonitorProcessor> mon = session->monitor_out()->monitor_control();
|
boost::shared_ptr<MonitorProcessor> mon = _session->monitor_out()->monitor_control();
|
||||||
if (mon->mono()) {
|
if (mon->mono()) {
|
||||||
mon->set_mono (false);
|
mon->set_mono (false);
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -596,7 +596,7 @@ BasicUI::toggle_monitor_mono ()
|
||||||
void
|
void
|
||||||
BasicUI::midi_panic ()
|
BasicUI::midi_panic ()
|
||||||
{
|
{
|
||||||
session->midi_panic ();
|
_session->midi_panic ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -611,16 +611,16 @@ BasicUI::toggle_roll (bool roll_out_of_bounded_mode)
|
||||||
{
|
{
|
||||||
/* TO BE KEPT IN SYNC WITH ARDOUR_UI::toggle_roll() */
|
/* TO BE KEPT IN SYNC WITH ARDOUR_UI::toggle_roll() */
|
||||||
|
|
||||||
if (!session) {
|
if (!_session) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (session->is_auditioning()) {
|
if (_session->is_auditioning()) {
|
||||||
session->cancel_audition ();
|
_session->cancel_audition ();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (session->config.get_external_sync()) {
|
if (_session->config.get_external_sync()) {
|
||||||
switch (TransportMasterManager::instance().current()->type()) {
|
switch (TransportMasterManager::instance().current()->type()) {
|
||||||
case Engine:
|
case Engine:
|
||||||
break;
|
break;
|
||||||
|
|
@ -637,34 +637,34 @@ BasicUI::toggle_roll (bool roll_out_of_bounded_mode)
|
||||||
if (roll_out_of_bounded_mode) {
|
if (roll_out_of_bounded_mode) {
|
||||||
/* drop out of loop/range playback but leave transport rolling */
|
/* drop out of loop/range playback but leave transport rolling */
|
||||||
|
|
||||||
if (session->get_play_loop()) {
|
if (_session->get_play_loop()) {
|
||||||
|
|
||||||
if (session->actively_recording()) {
|
if (_session->actively_recording()) {
|
||||||
/* actually stop transport because
|
/* actually stop transport because
|
||||||
otherwise the captured data will make
|
otherwise the captured data will make
|
||||||
no sense.
|
no sense.
|
||||||
*/
|
*/
|
||||||
session->request_play_loop (false, true);
|
_session->request_play_loop (false, true);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
session->request_play_loop (false, false);
|
_session->request_play_loop (false, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (session->get_play_range ()) {
|
} else if (_session->get_play_range ()) {
|
||||||
|
|
||||||
session->request_cancel_play_range ();
|
_session->request_cancel_play_range ();
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
session->request_stop (true, true);
|
_session->request_stop (true, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else { /* not rolling */
|
} else { /* not rolling */
|
||||||
|
|
||||||
if (session->get_play_loop() && Config->get_loop_is_mode()) {
|
if (_session->get_play_loop() && Config->get_loop_is_mode()) {
|
||||||
session->request_locate (session->locations()->auto_loop_location()->start(), MustRoll);
|
_session->request_locate (_session->locations()->auto_loop_location()->start(), MustRoll);
|
||||||
} else {
|
} else {
|
||||||
session->request_roll (TRS_UI);
|
_session->request_roll (TRS_UI);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -672,7 +672,7 @@ BasicUI::toggle_roll (bool roll_out_of_bounded_mode)
|
||||||
void
|
void
|
||||||
BasicUI::stop_forget ()
|
BasicUI::stop_forget ()
|
||||||
{
|
{
|
||||||
session->request_stop (true, true);
|
_session->request_stop (true, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BasicUI::mark_in () { access_action("Common/start-range-from-playhead"); }
|
void BasicUI::mark_in () { access_action("Common/start-range-from-playhead"); }
|
||||||
|
|
@ -713,26 +713,26 @@ void BasicUI::scroll_dn_1_page() { access_action("Editor/scroll-tracks-down"); }
|
||||||
bool
|
bool
|
||||||
BasicUI::locating ()
|
BasicUI::locating ()
|
||||||
{
|
{
|
||||||
return session->locate_pending();
|
return _session->locate_pending();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
BasicUI::locked ()
|
BasicUI::locked ()
|
||||||
{
|
{
|
||||||
return session->transport_locked ();
|
return _session->transport_locked ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
BasicUI::timecode_time (samplepos_t where, Timecode::Time& timecode)
|
BasicUI::timecode_time (samplepos_t where, Timecode::Time& timecode)
|
||||||
{
|
{
|
||||||
session->timecode_time (where, *((Timecode::Time *) &timecode));
|
_session->timecode_time (where, *((Timecode::Time *) &timecode));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
BasicUI::cancel_all_solo ()
|
BasicUI::cancel_all_solo ()
|
||||||
{
|
{
|
||||||
if (session) {
|
if (_session) {
|
||||||
session->cancel_all_solo ();
|
_session->cancel_all_solo ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -745,11 +745,11 @@ struct SortLocationsByPosition {
|
||||||
void
|
void
|
||||||
BasicUI::goto_nth_marker (int n)
|
BasicUI::goto_nth_marker (int n)
|
||||||
{
|
{
|
||||||
if (!session) {
|
if (!_session) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const Locations::LocationList& l (session->locations()->list());
|
const Locations::LocationList& l (_session->locations()->list());
|
||||||
Locations::LocationList ordered;
|
Locations::LocationList ordered;
|
||||||
ordered = l;
|
ordered = l;
|
||||||
|
|
||||||
|
|
@ -759,7 +759,7 @@ BasicUI::goto_nth_marker (int n)
|
||||||
for (Locations::LocationList::iterator i = ordered.begin(); n >= 0 && i != ordered.end(); ++i) {
|
for (Locations::LocationList::iterator i = ordered.begin(); n >= 0 && i != ordered.end(); ++i) {
|
||||||
if ((*i)->is_mark() && !(*i)->is_hidden() && !(*i)->is_session_range()) {
|
if ((*i)->is_mark() && !(*i)->is_hidden() && !(*i)->is_session_range()) {
|
||||||
if (n == 0) {
|
if (n == 0) {
|
||||||
session->request_locate ((*i)->start());
|
_session->request_locate ((*i)->start());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
--n;
|
--n;
|
||||||
|
|
|
||||||
|
|
@ -278,7 +278,7 @@ ControlProtocol::route_set_soloed (uint32_t table_index, bool yn)
|
||||||
boost::shared_ptr<Route> r = route_table[table_index];
|
boost::shared_ptr<Route> r = route_table[table_index];
|
||||||
|
|
||||||
if (r != 0) {
|
if (r != 0) {
|
||||||
session->set_control (r->solo_control(), yn ? 1.0 : 0.0, Controllable::UseGroup);
|
_session->set_control (r->solo_control(), yn ? 1.0 : 0.0, Controllable::UseGroup);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -329,37 +329,37 @@ ControlProtocol::set_state (XMLNode const & node, int /* version */)
|
||||||
boost::shared_ptr<Stripable>
|
boost::shared_ptr<Stripable>
|
||||||
ControlProtocol::first_selected_stripable () const
|
ControlProtocol::first_selected_stripable () const
|
||||||
{
|
{
|
||||||
return session->selection().first_selected_stripable ();
|
return _session->selection().first_selected_stripable ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ControlProtocol::add_stripable_to_selection (boost::shared_ptr<ARDOUR::Stripable> s)
|
ControlProtocol::add_stripable_to_selection (boost::shared_ptr<ARDOUR::Stripable> s)
|
||||||
{
|
{
|
||||||
session->selection().add (s, boost::shared_ptr<AutomationControl>());
|
_session->selection().add (s, boost::shared_ptr<AutomationControl>());
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ControlProtocol::set_stripable_selection (boost::shared_ptr<ARDOUR::Stripable> s)
|
ControlProtocol::set_stripable_selection (boost::shared_ptr<ARDOUR::Stripable> s)
|
||||||
{
|
{
|
||||||
session->selection().select_stripable_and_maybe_group (s, true, true, 0);
|
_session->selection().select_stripable_and_maybe_group (s, true, true, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ControlProtocol::toggle_stripable_selection (boost::shared_ptr<ARDOUR::Stripable> s)
|
ControlProtocol::toggle_stripable_selection (boost::shared_ptr<ARDOUR::Stripable> s)
|
||||||
{
|
{
|
||||||
session->selection().toggle (s, boost::shared_ptr<AutomationControl>());
|
_session->selection().toggle (s, boost::shared_ptr<AutomationControl>());
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ControlProtocol::remove_stripable_from_selection (boost::shared_ptr<ARDOUR::Stripable> s)
|
ControlProtocol::remove_stripable_from_selection (boost::shared_ptr<ARDOUR::Stripable> s)
|
||||||
{
|
{
|
||||||
session->selection().remove (s, boost::shared_ptr<AutomationControl>());
|
_session->selection().remove (s, boost::shared_ptr<AutomationControl>());
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ControlProtocol::clear_stripable_selection ()
|
ControlProtocol::clear_stripable_selection ()
|
||||||
{
|
{
|
||||||
session->selection().clear_stripables ();
|
_session->selection().clear_stripables ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
|
|
@ -150,7 +150,7 @@ class LIBCONTROLCP_API BasicUI {
|
||||||
bool loop_button_onoff() const;
|
bool loop_button_onoff() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
ARDOUR::Session* session;
|
ARDOUR::Session* _session;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* __ardour_basic_ui_h__ */
|
#endif /* __ardour_basic_ui_h__ */
|
||||||
|
|
|
||||||
|
|
@ -99,13 +99,13 @@ FaderPort::FaderPort (Session& s)
|
||||||
_input_bundle->add_channel (
|
_input_bundle->add_channel (
|
||||||
"",
|
"",
|
||||||
ARDOUR::DataType::MIDI,
|
ARDOUR::DataType::MIDI,
|
||||||
session->engine().make_port_name_non_relative (inp->name())
|
_session->engine().make_port_name_non_relative (inp->name())
|
||||||
);
|
);
|
||||||
|
|
||||||
_output_bundle->add_channel (
|
_output_bundle->add_channel (
|
||||||
"",
|
"",
|
||||||
ARDOUR::DataType::MIDI,
|
ARDOUR::DataType::MIDI,
|
||||||
session->engine().make_port_name_non_relative (outp->name())
|
_session->engine().make_port_name_non_relative (outp->name())
|
||||||
);
|
);
|
||||||
|
|
||||||
/* Catch port connections and disconnections */
|
/* Catch port connections and disconnections */
|
||||||
|
|
@ -367,7 +367,7 @@ FaderPort::button_handler (MIDI::Parser &, MIDI::EventTwoBytes* tb)
|
||||||
if (_current_stripable) {
|
if (_current_stripable) {
|
||||||
boost::shared_ptr<AutomationControl> gain = _current_stripable->gain_control ();
|
boost::shared_ptr<AutomationControl> gain = _current_stripable->gain_control ();
|
||||||
if (gain) {
|
if (gain) {
|
||||||
samplepos_t now = session->engine().sample_time();
|
samplepos_t now = _session->engine().sample_time();
|
||||||
if (tb->value) {
|
if (tb->value) {
|
||||||
gain->start_touch (now);
|
gain->start_touch (now);
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -659,7 +659,7 @@ FaderPort::map_recenable_state ()
|
||||||
|
|
||||||
bool onoff;
|
bool onoff;
|
||||||
|
|
||||||
switch (session->record_status()) {
|
switch (_session->record_status()) {
|
||||||
case Session::Disabled:
|
case Session::Disabled:
|
||||||
onoff = false;
|
onoff = false;
|
||||||
break;
|
break;
|
||||||
|
|
@ -667,7 +667,7 @@ FaderPort::map_recenable_state ()
|
||||||
onoff = blink_state;
|
onoff = blink_state;
|
||||||
break;
|
break;
|
||||||
case Session::Recording:
|
case Session::Recording:
|
||||||
if (session->have_rec_enabled_track ()) {
|
if (_session->have_rec_enabled_track ()) {
|
||||||
onoff = true;
|
onoff = true;
|
||||||
} else {
|
} else {
|
||||||
onoff = blink_state;
|
onoff = blink_state;
|
||||||
|
|
@ -684,7 +684,7 @@ FaderPort::map_recenable_state ()
|
||||||
void
|
void
|
||||||
FaderPort::map_transport_state ()
|
FaderPort::map_transport_state ()
|
||||||
{
|
{
|
||||||
get_button (Loop).set_led_state (_output_port, session->get_play_loop());
|
get_button (Loop).set_led_state (_output_port, _session->get_play_loop());
|
||||||
|
|
||||||
float ts = get_transport_speed();
|
float ts = get_transport_speed();
|
||||||
|
|
||||||
|
|
@ -706,8 +706,8 @@ void
|
||||||
FaderPort::parameter_changed (string what)
|
FaderPort::parameter_changed (string what)
|
||||||
{
|
{
|
||||||
if (what == "punch-in" || what == "punch-out") {
|
if (what == "punch-in" || what == "punch-out") {
|
||||||
bool in = session->config.get_punch_in ();
|
bool in = _session->config.get_punch_in ();
|
||||||
bool out = session->config.get_punch_out ();
|
bool out = _session->config.get_punch_out ();
|
||||||
if (in && out) {
|
if (in && out) {
|
||||||
get_button (Punch).set_led_state (_output_port, true);
|
get_button (Punch).set_led_state (_output_port, true);
|
||||||
blinkers.remove (Punch);
|
blinkers.remove (Punch);
|
||||||
|
|
@ -722,10 +722,10 @@ FaderPort::parameter_changed (string what)
|
||||||
void
|
void
|
||||||
FaderPort::connect_session_signals()
|
FaderPort::connect_session_signals()
|
||||||
{
|
{
|
||||||
session->RecordStateChanged.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort::map_recenable_state, this), this);
|
_session->RecordStateChanged.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort::map_recenable_state, this), this);
|
||||||
session->TransportStateChange.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort::map_transport_state, this), this);
|
_session->TransportStateChange.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort::map_transport_state, this), this);
|
||||||
/* not session, but treat it similarly */
|
/* not session, but treat it similarly */
|
||||||
session->config.ParameterChanged.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort::parameter_changed, this, _1), this);
|
_session->config.ParameterChanged.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort::parameter_changed, this, _1), this);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
|
@ -747,7 +747,7 @@ FaderPort::midi_input_handler (Glib::IOCondition ioc, boost::weak_ptr<ARDOUR::As
|
||||||
|
|
||||||
port->clear ();
|
port->clear ();
|
||||||
DEBUG_TRACE (DEBUG::FaderPort, string_compose ("data available on %1\n", boost::shared_ptr<MIDI::Port>(port)->name()));
|
DEBUG_TRACE (DEBUG::FaderPort, string_compose ("data available on %1\n", boost::shared_ptr<MIDI::Port>(port)->name()));
|
||||||
samplepos_t now = session->engine().sample_time();
|
samplepos_t now = _session->engine().sample_time();
|
||||||
port->parse (now);
|
port->parse (now);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1097,8 +1097,8 @@ void
|
||||||
FaderPort::drop_current_stripable ()
|
FaderPort::drop_current_stripable ()
|
||||||
{
|
{
|
||||||
if (_current_stripable) {
|
if (_current_stripable) {
|
||||||
if (_current_stripable == session->monitor_out()) {
|
if (_current_stripable == _session->monitor_out()) {
|
||||||
set_current_stripable (session->master_out());
|
set_current_stripable (_session->master_out());
|
||||||
} else {
|
} else {
|
||||||
set_current_stripable (boost::shared_ptr<Stripable>());
|
set_current_stripable (boost::shared_ptr<Stripable>());
|
||||||
}
|
}
|
||||||
|
|
@ -1300,7 +1300,7 @@ FaderPort::map_stripable_state ()
|
||||||
map_gain ();
|
map_gain ();
|
||||||
map_auto ();
|
map_auto ();
|
||||||
|
|
||||||
if (_current_stripable == session->monitor_out()) {
|
if (_current_stripable == _session->monitor_out()) {
|
||||||
map_cut ();
|
map_cut ();
|
||||||
} else {
|
} else {
|
||||||
map_mute ();
|
map_mute ();
|
||||||
|
|
|
||||||
|
|
@ -124,7 +124,7 @@ FaderPort::mute ()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_current_stripable == session->monitor_out()) {
|
if (_current_stripable == _session->monitor_out()) {
|
||||||
boost::shared_ptr<MonitorProcessor> mp = _current_stripable->monitor_control();
|
boost::shared_ptr<MonitorProcessor> mp = _current_stripable->monitor_control();
|
||||||
mp->set_cut_all (!mp->cut_all());
|
mp->set_cut_all (!mp->cut_all());
|
||||||
return;
|
return;
|
||||||
|
|
@ -140,7 +140,7 @@ FaderPort::solo ()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
session->set_control (_current_stripable->solo_control(), !_current_stripable->solo_control()->self_soloed(), PBD::Controllable::UseGroup);
|
_session->set_control (_current_stripable->solo_control(), !_current_stripable->solo_control()->self_soloed(), PBD::Controllable::UseGroup);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -162,7 +162,7 @@ FaderPort::rec_enable ()
|
||||||
void
|
void
|
||||||
FaderPort::use_master ()
|
FaderPort::use_master ()
|
||||||
{
|
{
|
||||||
boost::shared_ptr<Stripable> r = session->master_out();
|
boost::shared_ptr<Stripable> r = _session->master_out();
|
||||||
if (r) {
|
if (r) {
|
||||||
if (_current_stripable == r) {
|
if (_current_stripable == r) {
|
||||||
r = pre_master_stripable.lock();
|
r = pre_master_stripable.lock();
|
||||||
|
|
@ -170,7 +170,7 @@ FaderPort::use_master ()
|
||||||
get_button(Output).set_led_state (_output_port, false);
|
get_button(Output).set_led_state (_output_port, false);
|
||||||
blinkers.remove (Output);
|
blinkers.remove (Output);
|
||||||
} else {
|
} else {
|
||||||
if (_current_stripable != session->master_out() && _current_stripable != session->monitor_out()) {
|
if (_current_stripable != _session->master_out() && _current_stripable != _session->monitor_out()) {
|
||||||
pre_master_stripable = boost::weak_ptr<Stripable> (_current_stripable);
|
pre_master_stripable = boost::weak_ptr<Stripable> (_current_stripable);
|
||||||
}
|
}
|
||||||
set_current_stripable (r);
|
set_current_stripable (r);
|
||||||
|
|
@ -183,7 +183,7 @@ FaderPort::use_master ()
|
||||||
void
|
void
|
||||||
FaderPort::use_monitor ()
|
FaderPort::use_monitor ()
|
||||||
{
|
{
|
||||||
boost::shared_ptr<Stripable> r = session->monitor_out();
|
boost::shared_ptr<Stripable> r = _session->monitor_out();
|
||||||
|
|
||||||
if (r) {
|
if (r) {
|
||||||
if (_current_stripable == r) {
|
if (_current_stripable == r) {
|
||||||
|
|
@ -192,7 +192,7 @@ FaderPort::use_monitor ()
|
||||||
get_button(Output).set_led_state (_output_port, false);
|
get_button(Output).set_led_state (_output_port, false);
|
||||||
blinkers.remove (Output);
|
blinkers.remove (Output);
|
||||||
} else {
|
} else {
|
||||||
if (_current_stripable != session->master_out() && _current_stripable != session->monitor_out()) {
|
if (_current_stripable != _session->master_out() && _current_stripable != _session->monitor_out()) {
|
||||||
pre_monitor_stripable = boost::weak_ptr<Stripable> (_current_stripable);
|
pre_monitor_stripable = boost::weak_ptr<Stripable> (_current_stripable);
|
||||||
}
|
}
|
||||||
set_current_stripable (r);
|
set_current_stripable (r);
|
||||||
|
|
|
||||||
|
|
@ -137,7 +137,7 @@ FaderPort8::button_play ()
|
||||||
{
|
{
|
||||||
if (transport_rolling ()) {
|
if (transport_rolling ()) {
|
||||||
if (get_transport_speed() != 1.0) {
|
if (get_transport_speed() != 1.0) {
|
||||||
session->request_roll (TRS_UI);
|
_session->request_roll (TRS_UI);
|
||||||
} else {
|
} else {
|
||||||
transport_stop ();
|
transport_stop ();
|
||||||
}
|
}
|
||||||
|
|
@ -274,7 +274,7 @@ FaderPort8::button_automation (ARDOUR::AutoState as)
|
||||||
|
|
||||||
// apply to all selected tracks
|
// apply to all selected tracks
|
||||||
StripableList all;
|
StripableList all;
|
||||||
session->get_stripables (all);
|
_session->get_stripables (all);
|
||||||
for (StripableList::const_iterator i = all.begin(); i != all.end(); ++i) {
|
for (StripableList::const_iterator i = all.begin(); i != all.end(); ++i) {
|
||||||
if ((*i)->is_master() || (*i)->is_monitor()) {
|
if ((*i)->is_master() || (*i)->is_monitor()) {
|
||||||
continue;
|
continue;
|
||||||
|
|
@ -309,7 +309,7 @@ FaderPort8::button_varispeed (bool ffw)
|
||||||
// stop key-repeat
|
// stop key-repeat
|
||||||
dynamic_cast<FP8RepeatButton*>(&b_ffw)->stop_repeat();
|
dynamic_cast<FP8RepeatButton*>(&b_ffw)->stop_repeat();
|
||||||
dynamic_cast<FP8RepeatButton*>(&b_rew)->stop_repeat();
|
dynamic_cast<FP8RepeatButton*>(&b_rew)->stop_repeat();
|
||||||
session->request_locate (0, MustStop);
|
_session->request_locate (0, MustStop);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -320,13 +320,13 @@ FaderPort8::button_varispeed (bool ffw)
|
||||||
void
|
void
|
||||||
FaderPort8::button_solo_clear ()
|
FaderPort8::button_solo_clear ()
|
||||||
{
|
{
|
||||||
bool soloing = session->soloing() || session->listening();
|
bool soloing = _session->soloing() || _session->listening();
|
||||||
#ifdef MIXBUS
|
#ifdef MIXBUS
|
||||||
soloing |= session->mixbus_soloed();
|
soloing |= _session->mixbus_soloed();
|
||||||
#endif
|
#endif
|
||||||
if (soloing) {
|
if (soloing) {
|
||||||
StripableList all;
|
StripableList all;
|
||||||
session->get_stripables (all);
|
_session->get_stripables (all);
|
||||||
for (StripableList::const_iterator i = all.begin(); i != all.end(); ++i) {
|
for (StripableList::const_iterator i = all.begin(); i != all.end(); ++i) {
|
||||||
if ((*i)->is_master() || (*i)->is_auditioner() || (*i)->is_monitor()) {
|
if ((*i)->is_master() || (*i)->is_auditioner() || (*i)->is_monitor()) {
|
||||||
continue;
|
continue;
|
||||||
|
|
@ -349,7 +349,7 @@ FaderPort8::button_solo_clear ()
|
||||||
cl->push_back (ac);
|
cl->push_back (ac);
|
||||||
}
|
}
|
||||||
if (!cl->empty()) {
|
if (!cl->empty()) {
|
||||||
session->set_controls (cl, 1.0, PBD::Controllable::NoGroup);
|
_session->set_controls (cl, 1.0, PBD::Controllable::NoGroup);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -359,8 +359,8 @@ void
|
||||||
FaderPort8::button_mute_clear ()
|
FaderPort8::button_mute_clear ()
|
||||||
{
|
{
|
||||||
#ifdef FP8_MUTESOLO_UNDO
|
#ifdef FP8_MUTESOLO_UNDO
|
||||||
if (session->muted ()) {
|
if (_session->muted ()) {
|
||||||
_mute_state = session->cancel_all_mute ();
|
_mute_state = _session->cancel_all_mute ();
|
||||||
} else {
|
} else {
|
||||||
/* restore mute */
|
/* restore mute */
|
||||||
boost::shared_ptr<ControlList> cl (new ControlList);
|
boost::shared_ptr<ControlList> cl (new ControlList);
|
||||||
|
|
@ -373,11 +373,11 @@ FaderPort8::button_mute_clear ()
|
||||||
ac->start_touch (ac->session().transport_sample());
|
ac->start_touch (ac->session().transport_sample());
|
||||||
}
|
}
|
||||||
if (!cl->empty()) {
|
if (!cl->empty()) {
|
||||||
session->set_controls (cl, 1.0, PBD::Controllable::NoGroup);
|
_session->set_controls (cl, 1.0, PBD::Controllable::NoGroup);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
session->cancel_all_mute ();
|
_session->cancel_all_mute ();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -548,10 +548,10 @@ FaderPort8::button_encoder ()
|
||||||
{
|
{
|
||||||
/* master || monitor level -- reset to 0dB */
|
/* master || monitor level -- reset to 0dB */
|
||||||
boost::shared_ptr<AutomationControl> ac;
|
boost::shared_ptr<AutomationControl> ac;
|
||||||
if (session->monitor_active() && !_ctrls.button (FP8Controls::BtnMaster).is_pressed ()) {
|
if (_session->monitor_active() && !_ctrls.button (FP8Controls::BtnMaster).is_pressed ()) {
|
||||||
ac = session->monitor_out()->gain_control ();
|
ac = _session->monitor_out()->gain_control ();
|
||||||
} else if (session->master_out()) {
|
} else if (_session->master_out()) {
|
||||||
ac = session->master_out()->gain_control ();
|
ac = _session->master_out()->gain_control ();
|
||||||
}
|
}
|
||||||
if (ac) {
|
if (ac) {
|
||||||
ac->start_touch (ac->session().transport_sample());
|
ac->start_touch (ac->session().transport_sample());
|
||||||
|
|
@ -570,12 +570,12 @@ FaderPort8::button_encoder ()
|
||||||
/* Don't add another mark if one exists within 1/100th of a second of
|
/* Don't add another mark if one exists within 1/100th of a second of
|
||||||
* the current position and we're not rolling.
|
* the current position and we're not rolling.
|
||||||
*/
|
*/
|
||||||
samplepos_t where = session->audible_sample();
|
samplepos_t where = _session->audible_sample();
|
||||||
if (session->transport_stopped_or_stopping() && session->locations()->mark_at (where, session->sample_rate() / 100.0)) {
|
if (_session->transport_stopped_or_stopping() && _session->locations()->mark_at (where, _session->sample_rate() / 100.0)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
session->locations()->next_available_name (markername,"mark");
|
_session->locations()->next_available_name (markername,"mark");
|
||||||
add_marker (markername);
|
add_marker (markername);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
@ -628,10 +628,10 @@ FaderPort8::encoder_navigate (bool neg, int steps)
|
||||||
{
|
{
|
||||||
/* master || monitor level */
|
/* master || monitor level */
|
||||||
boost::shared_ptr<AutomationControl> ac;
|
boost::shared_ptr<AutomationControl> ac;
|
||||||
if (session->monitor_active() && !_ctrls.button (FP8Controls::BtnMaster).is_pressed ()) {
|
if (_session->monitor_active() && !_ctrls.button (FP8Controls::BtnMaster).is_pressed ()) {
|
||||||
ac = session->monitor_out()->gain_control ();
|
ac = _session->monitor_out()->gain_control ();
|
||||||
} else if (session->master_out()) {
|
} else if (_session->master_out()) {
|
||||||
ac = session->master_out()->gain_control ();
|
ac = _session->master_out()->gain_control ();
|
||||||
}
|
}
|
||||||
if (ac) {
|
if (ac) {
|
||||||
double v = ac->internal_to_interface (ac->get_value());
|
double v = ac->internal_to_interface (ac->get_value());
|
||||||
|
|
|
||||||
|
|
@ -38,20 +38,20 @@ using namespace ArdourSurface::FP_NAMESPACE::FP8Types;
|
||||||
void
|
void
|
||||||
FaderPort8::connect_session_signals ()
|
FaderPort8::connect_session_signals ()
|
||||||
{
|
{
|
||||||
session->RouteAdded.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort8::notify_stripable_added_or_removed, this), this);
|
_session->RouteAdded.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort8::notify_stripable_added_or_removed, this), this);
|
||||||
PresentationInfo::Change.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort8::notify_pi_property_changed, this, _1), this);
|
PresentationInfo::Change.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort8::notify_pi_property_changed, this, _1), this);
|
||||||
|
|
||||||
Config->ParameterChanged.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort8::notify_parameter_changed, this, _1), this);
|
Config->ParameterChanged.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort8::notify_parameter_changed, this, _1), this);
|
||||||
session->config.ParameterChanged.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort8::notify_parameter_changed, this, _1), this);
|
_session->config.ParameterChanged.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort8::notify_parameter_changed, this, _1), this);
|
||||||
|
|
||||||
session->TransportStateChange.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort8::notify_transport_state_changed, this), this);
|
_session->TransportStateChange.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort8::notify_transport_state_changed, this), this);
|
||||||
session->TransportLooped.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort8::notify_loop_state_changed, this), this);
|
_session->TransportLooped.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort8::notify_loop_state_changed, this), this);
|
||||||
session->RecordStateChanged.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort8::notify_record_state_changed, this), this);
|
_session->RecordStateChanged.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort8::notify_record_state_changed, this), this);
|
||||||
|
|
||||||
session->DirtyChanged.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort8::notify_session_dirty_changed, this), this);
|
_session->DirtyChanged.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort8::notify_session_dirty_changed, this), this);
|
||||||
session->SoloChanged.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort8::notify_solo_changed, this), this);
|
_session->SoloChanged.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort8::notify_solo_changed, this), this);
|
||||||
session->MuteChanged.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort8::notify_mute_changed, this), this);
|
_session->MuteChanged.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort8::notify_mute_changed, this), this);
|
||||||
session->history().Changed.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort8::notify_history_changed, this), this);
|
_session->history().Changed.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort8::notify_history_changed, this), this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -148,7 +148,7 @@ FaderPort8::notify_transport_state_changed ()
|
||||||
void
|
void
|
||||||
FaderPort8::notify_record_state_changed ()
|
FaderPort8::notify_record_state_changed ()
|
||||||
{
|
{
|
||||||
switch (session->record_status ()) {
|
switch (_session->record_status ()) {
|
||||||
case Session::Disabled:
|
case Session::Disabled:
|
||||||
_ctrls.button (FP8Controls::BtnRecord).set_active (0);
|
_ctrls.button (FP8Controls::BtnRecord).set_active (0);
|
||||||
_ctrls.button (FP8Controls::BtnRecord).set_blinking (false);
|
_ctrls.button (FP8Controls::BtnRecord).set_blinking (false);
|
||||||
|
|
@ -168,8 +168,8 @@ void
|
||||||
FaderPort8::notify_loop_state_changed ()
|
FaderPort8::notify_loop_state_changed ()
|
||||||
{
|
{
|
||||||
bool looping = false;
|
bool looping = false;
|
||||||
Location* looploc = session->locations ()->auto_loop_location ();
|
Location* looploc = _session->locations ()->auto_loop_location ();
|
||||||
if (looploc && session->get_play_loop ()) {
|
if (looploc && _session->get_play_loop ()) {
|
||||||
looping = true;
|
looping = true;
|
||||||
}
|
}
|
||||||
_ctrls.button (FP8Controls::BtnLoop).set_active (looping);
|
_ctrls.button (FP8Controls::BtnLoop).set_active (looping);
|
||||||
|
|
@ -178,7 +178,7 @@ FaderPort8::notify_loop_state_changed ()
|
||||||
void
|
void
|
||||||
FaderPort8::notify_session_dirty_changed ()
|
FaderPort8::notify_session_dirty_changed ()
|
||||||
{
|
{
|
||||||
const bool is_dirty = session->dirty ();
|
const bool is_dirty = _session->dirty ();
|
||||||
_ctrls.button (FP8Controls::BtnSave).set_active (is_dirty);
|
_ctrls.button (FP8Controls::BtnSave).set_active (is_dirty);
|
||||||
_ctrls.button (FP8Controls::BtnSave).set_color (is_dirty ? 0xff0000ff : 0x00ff00ff);
|
_ctrls.button (FP8Controls::BtnSave).set_color (is_dirty ? 0xff0000ff : 0x00ff00ff);
|
||||||
}
|
}
|
||||||
|
|
@ -186,16 +186,16 @@ FaderPort8::notify_session_dirty_changed ()
|
||||||
void
|
void
|
||||||
FaderPort8::notify_history_changed ()
|
FaderPort8::notify_history_changed ()
|
||||||
{
|
{
|
||||||
_ctrls.button (FP8Controls::BtnRedo).set_active (session->redo_depth() > 0);
|
_ctrls.button (FP8Controls::BtnRedo).set_active (_session->redo_depth() > 0);
|
||||||
_ctrls.button (FP8Controls::BtnUndo).set_active (session->undo_depth() > 0);
|
_ctrls.button (FP8Controls::BtnUndo).set_active (_session->undo_depth() > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
FaderPort8::notify_solo_changed ()
|
FaderPort8::notify_solo_changed ()
|
||||||
{
|
{
|
||||||
bool soloing = session->soloing() || session->listening();
|
bool soloing = _session->soloing() || _session->listening();
|
||||||
#ifdef MIXBUS
|
#ifdef MIXBUS
|
||||||
soloing |= session->mixbus_soloed();
|
soloing |= _session->mixbus_soloed();
|
||||||
#endif
|
#endif
|
||||||
_ctrls.button (FP8Controls::BtnSoloClear).set_active (soloing);
|
_ctrls.button (FP8Controls::BtnSoloClear).set_active (soloing);
|
||||||
#ifdef FP8_MUTESOLO_UNDO
|
#ifdef FP8_MUTESOLO_UNDO
|
||||||
|
|
@ -208,7 +208,7 @@ FaderPort8::notify_solo_changed ()
|
||||||
void
|
void
|
||||||
FaderPort8::notify_mute_changed ()
|
FaderPort8::notify_mute_changed ()
|
||||||
{
|
{
|
||||||
bool muted = session->muted ();
|
bool muted = _session->muted ();
|
||||||
#ifdef FP8_MUTESOLO_UNDO
|
#ifdef FP8_MUTESOLO_UNDO
|
||||||
if (muted) {
|
if (muted) {
|
||||||
_mute_state.clear ();
|
_mute_state.clear ();
|
||||||
|
|
|
||||||
|
|
@ -162,13 +162,13 @@ FaderPort8::FaderPort8 (Session& s)
|
||||||
_input_bundle->add_channel (
|
_input_bundle->add_channel (
|
||||||
"",
|
"",
|
||||||
ARDOUR::DataType::MIDI,
|
ARDOUR::DataType::MIDI,
|
||||||
session->engine().make_port_name_non_relative (inp->name())
|
_session->engine().make_port_name_non_relative (inp->name())
|
||||||
);
|
);
|
||||||
|
|
||||||
_output_bundle->add_channel (
|
_output_bundle->add_channel (
|
||||||
"",
|
"",
|
||||||
ARDOUR::DataType::MIDI,
|
ARDOUR::DataType::MIDI,
|
||||||
session->engine().make_port_name_non_relative (outp->name())
|
_session->engine().make_port_name_non_relative (outp->name())
|
||||||
);
|
);
|
||||||
|
|
||||||
ARDOUR::AudioEngine::instance()->PortConnectedOrDisconnected.connect (port_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort8::connection_handler, this, _2, _4), this);
|
ARDOUR::AudioEngine::instance()->PortConnectedOrDisconnected.connect (port_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort8::connection_handler, this, _2, _4), this);
|
||||||
|
|
@ -264,11 +264,11 @@ FaderPort8::periodic ()
|
||||||
*/
|
*/
|
||||||
if (_ctrls.display_timecode () && clock_mode ()) {
|
if (_ctrls.display_timecode () && clock_mode ()) {
|
||||||
Timecode::Time TC;
|
Timecode::Time TC;
|
||||||
session->timecode_time (TC);
|
_session->timecode_time (TC);
|
||||||
_timecode = Timecode::timecode_format_time(TC);
|
_timecode = Timecode::timecode_format_time(TC);
|
||||||
|
|
||||||
char buf[16];
|
char buf[16];
|
||||||
Timecode::BBT_Time BBT = session->tempo_map ().bbt_at_sample (session->transport_sample ());
|
Timecode::BBT_Time BBT = _session->tempo_map ().bbt_at_sample (_session->transport_sample ());
|
||||||
snprintf (buf, sizeof (buf),
|
snprintf (buf, sizeof (buf),
|
||||||
" %02" PRIu32 "|%02" PRIu32 "|%02" PRIu32 "|%02" PRIu32,
|
" %02" PRIu32 "|%02" PRIu32 "|%02" PRIu32 "|%02" PRIu32,
|
||||||
BBT.bars % 100, BBT.beats %100,
|
BBT.bars % 100, BBT.beats %100,
|
||||||
|
|
@ -526,7 +526,7 @@ FaderPort8::midi_input_handler (Glib::IOCondition ioc, boost::weak_ptr<ARDOUR::A
|
||||||
#ifdef VERBOSE_DEBUG
|
#ifdef VERBOSE_DEBUG
|
||||||
DEBUG_TRACE (DEBUG::FaderPort8, string_compose ("data available on %1\n", boost::shared_ptr<MIDI::Port>(port)->name()));
|
DEBUG_TRACE (DEBUG::FaderPort8, string_compose ("data available on %1\n", boost::shared_ptr<MIDI::Port>(port)->name()));
|
||||||
#endif
|
#endif
|
||||||
samplepos_t now = session->engine().sample_time();
|
samplepos_t now = _session->engine().sample_time();
|
||||||
port->parse (now);
|
port->parse (now);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -985,7 +985,7 @@ FaderPort8::filter_stripables (StripableList& strips) const
|
||||||
}
|
}
|
||||||
|
|
||||||
StripableList all;
|
StripableList all;
|
||||||
session->get_stripables (all);
|
_session->get_stripables (all);
|
||||||
|
|
||||||
for (StripableList::const_iterator s = all.begin(); s != all.end(); ++s) {
|
for (StripableList::const_iterator s = all.begin(); s != all.end(); ++s) {
|
||||||
if ((*s)->is_auditioner ()) { continue; }
|
if ((*s)->is_auditioner ()) { continue; }
|
||||||
|
|
@ -1792,7 +1792,7 @@ FaderPort8::notify_stripable_added_or_removed ()
|
||||||
{
|
{
|
||||||
/* called by
|
/* called by
|
||||||
* - DropReferences
|
* - DropReferences
|
||||||
* - session->RouteAdded
|
* - _session->RouteAdded
|
||||||
* - PresentationInfo::Change
|
* - PresentationInfo::Change
|
||||||
* - Properties::hidden
|
* - Properties::hidden
|
||||||
* - Properties::order
|
* - Properties::order
|
||||||
|
|
|
||||||
|
|
@ -99,16 +99,16 @@ GenericMidiControlProtocol::GenericMidiControlProtocol (Session& s)
|
||||||
_input_bundle->add_channel (
|
_input_bundle->add_channel (
|
||||||
"",
|
"",
|
||||||
ARDOUR::DataType::MIDI,
|
ARDOUR::DataType::MIDI,
|
||||||
session->engine().make_port_name_non_relative (inp->name())
|
_session->engine().make_port_name_non_relative (inp->name())
|
||||||
);
|
);
|
||||||
|
|
||||||
_output_bundle->add_channel (
|
_output_bundle->add_channel (
|
||||||
"",
|
"",
|
||||||
ARDOUR::DataType::MIDI,
|
ARDOUR::DataType::MIDI,
|
||||||
session->engine().make_port_name_non_relative (outp->name())
|
_session->engine().make_port_name_non_relative (outp->name())
|
||||||
);
|
);
|
||||||
|
|
||||||
session->BundleAddedOrRemoved ();
|
_session->BundleAddedOrRemoved ();
|
||||||
|
|
||||||
do_feedback = false;
|
do_feedback = false;
|
||||||
_feedback_interval = 10000; // microseconds
|
_feedback_interval = 10000; // microseconds
|
||||||
|
|
@ -1006,7 +1006,7 @@ GenericMidiControlProtocol::lookup_controllable (const string & str) const
|
||||||
|
|
||||||
DEBUG_TRACE (DEBUG::GenericMidi, string_compose ("lookup controllable from \"%1\"\n", str));
|
DEBUG_TRACE (DEBUG::GenericMidi, string_compose ("lookup controllable from \"%1\"\n", str));
|
||||||
|
|
||||||
if (!session) {
|
if (!_session) {
|
||||||
DEBUG_TRACE (DEBUG::GenericMidi, "no session\n");
|
DEBUG_TRACE (DEBUG::GenericMidi, "no session\n");
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
@ -1109,50 +1109,50 @@ GenericMidiControlProtocol::lookup_controllable (const string & str) const
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case PresentationOrder:
|
case PresentationOrder:
|
||||||
s = session->get_remote_nth_stripable (id, PresentationInfo::Route);
|
s = _session->get_remote_nth_stripable (id, PresentationInfo::Route);
|
||||||
break;
|
break;
|
||||||
case Named:
|
case Named:
|
||||||
/* name */
|
/* name */
|
||||||
name = rest[0];
|
name = rest[0];
|
||||||
|
|
||||||
if (name == "Master" || name == X_("master")) {
|
if (name == "Master" || name == X_("master")) {
|
||||||
s = session->master_out();
|
s = _session->master_out();
|
||||||
} else if (name == X_("control") || name == X_("listen") || name == X_("monitor") || name == "Monitor") {
|
} else if (name == X_("control") || name == X_("listen") || name == X_("monitor") || name == "Monitor") {
|
||||||
s = session->monitor_out();
|
s = _session->monitor_out();
|
||||||
} else if (name == X_("auditioner")) {
|
} else if (name == X_("auditioner")) {
|
||||||
s = session->the_auditioner();
|
s = _session->the_auditioner();
|
||||||
} else {
|
} else {
|
||||||
s = session->route_by_name (name);
|
s = _session->route_by_name (name);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Selection:
|
case Selection:
|
||||||
s = session->route_by_selected_count (id);
|
s = _session->route_by_selected_count (id);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (path[0] == X_("vca")) {
|
} else if (path[0] == X_("vca")) {
|
||||||
|
|
||||||
s = session->get_remote_nth_stripable (id, PresentationInfo::VCA);
|
s = _session->get_remote_nth_stripable (id, PresentationInfo::VCA);
|
||||||
|
|
||||||
} else if (path[0] == X_("bus")) {
|
} else if (path[0] == X_("bus")) {
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case Named:
|
case Named:
|
||||||
s = session->route_by_name (name);
|
s = _session->route_by_name (name);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
s = session->get_remote_nth_stripable (id, PresentationInfo::Bus);
|
s = _session->get_remote_nth_stripable (id, PresentationInfo::Bus);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (path[0] == X_("track")) {
|
} else if (path[0] == X_("track")) {
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case Named:
|
case Named:
|
||||||
s = session->route_by_name (name);
|
s = _session->route_by_name (name);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
s = session->get_remote_nth_stripable (id, PresentationInfo::Track);
|
s = _session->get_remote_nth_stripable (id, PresentationInfo::Track);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1611,7 +1611,7 @@ GenericMidiControlProtocol::maybe_start_touch (boost::shared_ptr<Controllable> c
|
||||||
{
|
{
|
||||||
boost::shared_ptr<AutomationControl> actl = boost::dynamic_pointer_cast<AutomationControl> (controllable);
|
boost::shared_ptr<AutomationControl> actl = boost::dynamic_pointer_cast<AutomationControl> (controllable);
|
||||||
if (actl) {
|
if (actl) {
|
||||||
actl->start_touch (session->audible_sample ());
|
actl->start_touch (_session->audible_sample ());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1657,7 +1657,7 @@ GenericMidiControlProtocol::midi_input_handler (Glib::IOCondition ioc, boost::we
|
||||||
|
|
||||||
port->clear ();
|
port->clear ();
|
||||||
DEBUG_TRACE (DEBUG::GenericMidi, string_compose ("data available on %1\n", boost::shared_ptr<MIDI::Port>(port)->name()));
|
DEBUG_TRACE (DEBUG::GenericMidi, string_compose ("data available on %1\n", boost::shared_ptr<MIDI::Port>(port)->name()));
|
||||||
samplepos_t now = session->engine().sample_time();
|
samplepos_t now = _session->engine().sample_time();
|
||||||
port->parse (now);
|
port->parse (now);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -932,7 +932,7 @@ LaunchControlXL::button_press_track_control(uint8_t n) {
|
||||||
boost::shared_ptr<AutomationControl> ac = get_ac_by_state(n);
|
boost::shared_ptr<AutomationControl> ac = get_ac_by_state(n);
|
||||||
|
|
||||||
if (ac) {
|
if (ac) {
|
||||||
session->set_control (ac, !ac->get_value(), PBD::Controllable::UseGroup);
|
_session->set_control (ac, !ac->get_value(), PBD::Controllable::UseGroup);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1012,7 +1012,7 @@ LaunchControlXL::button_mute()
|
||||||
void
|
void
|
||||||
LaunchControlXL::button_mute_long_press()
|
LaunchControlXL::button_mute_long_press()
|
||||||
{
|
{
|
||||||
session->cancel_all_mute();
|
_session->cancel_all_mute();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,7 @@ LaunchControlXL::LaunchControlXL (ARDOUR::Session& s)
|
||||||
/* we're going to need this */
|
/* we're going to need this */
|
||||||
|
|
||||||
/* master cannot be removed, so no need to connect to going-away signal */
|
/* master cannot be removed, so no need to connect to going-away signal */
|
||||||
master = session->master_out ();
|
master = _session->master_out ();
|
||||||
|
|
||||||
run_event_loop ();
|
run_event_loop ();
|
||||||
|
|
||||||
|
|
@ -105,8 +105,8 @@ LaunchControlXL::LaunchControlXL (ARDOUR::Session& s)
|
||||||
/* Catch port connections and disconnections */
|
/* Catch port connections and disconnections */
|
||||||
ARDOUR::AudioEngine::instance()->PortConnectedOrDisconnected.connect (port_connection, MISSING_INVALIDATOR, boost::bind (&LaunchControlXL::connection_handler, this, _1, _2, _3, _4, _5), this);
|
ARDOUR::AudioEngine::instance()->PortConnectedOrDisconnected.connect (port_connection, MISSING_INVALIDATOR, boost::bind (&LaunchControlXL::connection_handler, this, _1, _2, _3, _4, _5), this);
|
||||||
|
|
||||||
session->RouteAdded.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&LaunchControlXL::stripables_added, this), lcxl);
|
_session->RouteAdded.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&LaunchControlXL::stripables_added, this), lcxl);
|
||||||
session->vca_manager().VCAAdded.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&LaunchControlXL::stripables_added, this), lcxl);
|
_session->vca_manager().VCAAdded.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&LaunchControlXL::stripables_added, this), lcxl);
|
||||||
}
|
}
|
||||||
|
|
||||||
LaunchControlXL::~LaunchControlXL ()
|
LaunchControlXL::~LaunchControlXL ()
|
||||||
|
|
@ -214,7 +214,7 @@ LaunchControlXL::ports_acquire ()
|
||||||
_input_port = boost::dynamic_pointer_cast<AsyncMIDIPort>(_async_in).get();
|
_input_port = boost::dynamic_pointer_cast<AsyncMIDIPort>(_async_in).get();
|
||||||
_output_port = boost::dynamic_pointer_cast<AsyncMIDIPort>(_async_out).get();
|
_output_port = boost::dynamic_pointer_cast<AsyncMIDIPort>(_async_out).get();
|
||||||
|
|
||||||
session->BundleAddedOrRemoved ();
|
_session->BundleAddedOrRemoved ();
|
||||||
|
|
||||||
connect_to_parser ();
|
connect_to_parser ();
|
||||||
|
|
||||||
|
|
@ -695,16 +695,16 @@ void
|
||||||
LaunchControlXL::connect_session_signals()
|
LaunchControlXL::connect_session_signals()
|
||||||
{
|
{
|
||||||
// receive transport state changed
|
// receive transport state changed
|
||||||
session->TransportStateChange.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&LaunchControlXL::notify_transport_state_changed, this), this);
|
_session->TransportStateChange.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&LaunchControlXL::notify_transport_state_changed, this), this);
|
||||||
session->TransportLooped.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&LaunchControlXL::notify_loop_state_changed, this), this);
|
_session->TransportLooped.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&LaunchControlXL::notify_loop_state_changed, this), this);
|
||||||
// receive punch-in and punch-out
|
// receive punch-in and punch-out
|
||||||
Config->ParameterChanged.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&LaunchControlXL::notify_parameter_changed, this, _1), this);
|
Config->ParameterChanged.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&LaunchControlXL::notify_parameter_changed, this, _1), this);
|
||||||
session->config.ParameterChanged.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&LaunchControlXL::notify_parameter_changed, this, _1), this);
|
_session->config.ParameterChanged.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&LaunchControlXL::notify_parameter_changed, this, _1), this);
|
||||||
|
|
||||||
// receive rude solo changed
|
// receive rude solo changed
|
||||||
//session->SoloActive.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&LaunchControlXL::notify_solo_active_changed, this, _1), this);
|
//_session->SoloActive.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&LaunchControlXL::notify_solo_active_changed, this, _1), this);
|
||||||
// receive record state toggled
|
// receive record state toggled
|
||||||
//session->RecordStateChanged.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&LaunchControlXL::notify_record_state_changed, this), this);
|
//_session->RecordStateChanged.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&LaunchControlXL::notify_record_state_changed, this), this);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -714,7 +714,7 @@ LaunchControlXL::notify_transport_state_changed ()
|
||||||
{ /*
|
{ /*
|
||||||
Button* b = id_button_map[Play];
|
Button* b = id_button_map[Play];
|
||||||
|
|
||||||
if (session->transport_rolling()) {
|
if (_session->transport_rolling()) {
|
||||||
b->set_state (LED::OneShot24th);
|
b->set_state (LED::OneShot24th);
|
||||||
b->set_color (LED::GreenFull);
|
b->set_color (LED::GreenFull);
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -1053,7 +1053,7 @@ LaunchControlXL::filter_stripables(StripableList& strips) const
|
||||||
}
|
}
|
||||||
|
|
||||||
StripableList all;
|
StripableList all;
|
||||||
session->get_stripables (all);
|
_session->get_stripables (all);
|
||||||
|
|
||||||
for (StripableList::const_iterator s = all.begin(); s != all.end(); ++s) {
|
for (StripableList::const_iterator s = all.begin(); s != all.end(); ++s) {
|
||||||
if ((*s)->is_auditioner ()) { continue; }
|
if ((*s)->is_auditioner ()) { continue; }
|
||||||
|
|
|
||||||
|
|
@ -272,7 +272,7 @@ MackieControlProtocol::get_sorted_stripables()
|
||||||
// fetch all stripables
|
// fetch all stripables
|
||||||
StripableList stripables;
|
StripableList stripables;
|
||||||
|
|
||||||
session->get_stripables (stripables);
|
_session->get_stripables (stripables);
|
||||||
|
|
||||||
// sort in presentation order, and exclude master, control and hidden stripables
|
// sort in presentation order, and exclude master, control and hidden stripables
|
||||||
// and any stripables that are already set.
|
// and any stripables that are already set.
|
||||||
|
|
@ -441,7 +441,7 @@ MackieControlProtocol::switch_banks (uint32_t initial, bool force)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* current bank has not been saved */
|
/* current bank has not been saved */
|
||||||
session->set_dirty();
|
_session->set_dirty();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
@ -713,20 +713,20 @@ void
|
||||||
MackieControlProtocol::connect_session_signals()
|
MackieControlProtocol::connect_session_signals()
|
||||||
{
|
{
|
||||||
// receive routes added
|
// receive routes added
|
||||||
session->RouteAdded.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&MackieControlProtocol::notify_routes_added, this, _1), this);
|
_session->RouteAdded.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&MackieControlProtocol::notify_routes_added, this, _1), this);
|
||||||
// receive VCAs added
|
// receive VCAs added
|
||||||
session->vca_manager().VCAAdded.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&MackieControlProtocol::notify_vca_added, this, _1), this);
|
_session->vca_manager().VCAAdded.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&MackieControlProtocol::notify_vca_added, this, _1), this);
|
||||||
|
|
||||||
// receive record state toggled
|
// receive record state toggled
|
||||||
session->RecordStateChanged.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&MackieControlProtocol::notify_record_state_changed, this), this);
|
_session->RecordStateChanged.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&MackieControlProtocol::notify_record_state_changed, this), this);
|
||||||
// receive transport state changed
|
// receive transport state changed
|
||||||
session->TransportStateChange.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&MackieControlProtocol::notify_transport_state_changed, this), this);
|
_session->TransportStateChange.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&MackieControlProtocol::notify_transport_state_changed, this), this);
|
||||||
session->TransportLooped.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&MackieControlProtocol::notify_loop_state_changed, this), this);
|
_session->TransportLooped.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&MackieControlProtocol::notify_loop_state_changed, this), this);
|
||||||
// receive punch-in and punch-out
|
// receive punch-in and punch-out
|
||||||
Config->ParameterChanged.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&MackieControlProtocol::notify_parameter_changed, this, _1), this);
|
Config->ParameterChanged.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&MackieControlProtocol::notify_parameter_changed, this, _1), this);
|
||||||
session->config.ParameterChanged.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&MackieControlProtocol::notify_parameter_changed, this, _1), this);
|
_session->config.ParameterChanged.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&MackieControlProtocol::notify_parameter_changed, this, _1), this);
|
||||||
// receive rude solo changed
|
// receive rude solo changed
|
||||||
session->SoloActive.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&MackieControlProtocol::notify_solo_active_changed, this, _1), this);
|
_session->SoloActive.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&MackieControlProtocol::notify_solo_active_changed, this, _1), this);
|
||||||
|
|
||||||
// make sure remote id changed signals reach here
|
// make sure remote id changed signals reach here
|
||||||
// see also notify_stripable_added
|
// see also notify_stripable_added
|
||||||
|
|
@ -899,13 +899,13 @@ MackieControlProtocol::create_surfaces ()
|
||||||
_input_bundle->add_channel (
|
_input_bundle->add_channel (
|
||||||
"",
|
"",
|
||||||
ARDOUR::DataType::MIDI,
|
ARDOUR::DataType::MIDI,
|
||||||
session->engine().make_port_name_non_relative (surface->port().input_port().name())
|
_session->engine().make_port_name_non_relative (surface->port().input_port().name())
|
||||||
);
|
);
|
||||||
|
|
||||||
_output_bundle->add_channel (
|
_output_bundle->add_channel (
|
||||||
"",
|
"",
|
||||||
ARDOUR::DataType::MIDI,
|
ARDOUR::DataType::MIDI,
|
||||||
session->engine().make_port_name_non_relative (surface->port().output_port().name())
|
_session->engine().make_port_name_non_relative (surface->port().output_port().name())
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -961,7 +961,7 @@ MackieControlProtocol::create_surfaces ()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
session->BundleAddedOrRemoved ();
|
_session->BundleAddedOrRemoved ();
|
||||||
|
|
||||||
assert (_master_surface);
|
assert (_master_surface);
|
||||||
|
|
||||||
|
|
@ -1127,7 +1127,7 @@ MackieControlProtocol::format_bbt_timecode (samplepos_t now_sample)
|
||||||
{
|
{
|
||||||
Timecode::BBT_Time bbt_time;
|
Timecode::BBT_Time bbt_time;
|
||||||
|
|
||||||
session->bbt_time (now_sample, bbt_time);
|
_session->bbt_time (now_sample, bbt_time);
|
||||||
|
|
||||||
// The Mackie protocol spec is built around a BBT time display of
|
// The Mackie protocol spec is built around a BBT time display of
|
||||||
//
|
//
|
||||||
|
|
@ -1153,7 +1153,7 @@ string
|
||||||
MackieControlProtocol::format_timecode_timecode (samplepos_t now_sample)
|
MackieControlProtocol::format_timecode_timecode (samplepos_t now_sample)
|
||||||
{
|
{
|
||||||
Timecode::Time timecode;
|
Timecode::Time timecode;
|
||||||
session->timecode_time (now_sample, timecode);
|
_session->timecode_time (now_sample, timecode);
|
||||||
|
|
||||||
// According to the Logic docs
|
// According to the Logic docs
|
||||||
// digits: 888/88/88/888
|
// digits: 888/88/88/888
|
||||||
|
|
@ -1185,10 +1185,10 @@ MackieControlProtocol::update_timecode_display()
|
||||||
}
|
}
|
||||||
|
|
||||||
// do assignment here so current_sample is fixed
|
// do assignment here so current_sample is fixed
|
||||||
samplepos_t current_sample = session->transport_sample();
|
samplepos_t current_sample = _session->transport_sample();
|
||||||
string timecode;
|
string timecode;
|
||||||
// For large jumps in play head possition do full reset
|
// For large jumps in play head possition do full reset
|
||||||
int moved = (current_sample - _sample_last) / session->sample_rate ();
|
int moved = (current_sample - _sample_last) / _session->sample_rate ();
|
||||||
if (moved) {
|
if (moved) {
|
||||||
DEBUG_TRACE (DEBUG::MackieControl, "Timecode reset\n");
|
DEBUG_TRACE (DEBUG::MackieControl, "Timecode reset\n");
|
||||||
_timecode_last = string (10, ' ');
|
_timecode_last = string (10, ' ');
|
||||||
|
|
@ -1221,9 +1221,9 @@ MackieControlProtocol::update_timecode_display()
|
||||||
void MackieControlProtocol::notify_parameter_changed (std::string const & p)
|
void MackieControlProtocol::notify_parameter_changed (std::string const & p)
|
||||||
{
|
{
|
||||||
if (p == "punch-in") {
|
if (p == "punch-in") {
|
||||||
update_global_button (Button::Drop, session->config.get_punch_in() ? flashing : off);
|
update_global_button (Button::Drop, _session->config.get_punch_in() ? flashing : off);
|
||||||
} else if (p == "punch-out") {
|
} else if (p == "punch-out") {
|
||||||
update_global_button (Button::Replace, session->config.get_punch_out() ? flashing : off);
|
update_global_button (Button::Replace, _session->config.get_punch_out() ? flashing : off);
|
||||||
} else if (p == "clicking") {
|
} else if (p == "clicking") {
|
||||||
update_global_button (Button::Click, Config->get_clicking());
|
update_global_button (Button::Click, Config->get_clicking());
|
||||||
} else if (p == "follow-edits") {
|
} else if (p == "follow-edits") {
|
||||||
|
|
@ -1233,9 +1233,9 @@ void MackieControlProtocol::notify_parameter_changed (std::string const & p)
|
||||||
* this button (if there is one) won't reflect the setting.
|
* this button (if there is one) won't reflect the setting.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//update_global_button (Button::Enter, session->config.get_follow_edits() ? on : off);
|
//update_global_button (Button::Enter, _session->config.get_follow_edits() ? on : off);
|
||||||
} else if (p == "external-sync") {
|
} else if (p == "external-sync") {
|
||||||
update_global_button (Button::Cancel, session->config.get_external_sync() ? on : off);
|
update_global_button (Button::Cancel, _session->config.get_external_sync() ? on : off);
|
||||||
} else {
|
} else {
|
||||||
DEBUG_TRACE (DEBUG::MackieControl, string_compose ("parameter changed: %1\n", p));
|
DEBUG_TRACE (DEBUG::MackieControl, string_compose ("parameter changed: %1\n", p));
|
||||||
}
|
}
|
||||||
|
|
@ -1339,7 +1339,7 @@ MackieControlProtocol::notify_presentation_info_changed (PBD::PropertyChange con
|
||||||
void
|
void
|
||||||
MackieControlProtocol::notify_loop_state_changed()
|
MackieControlProtocol::notify_loop_state_changed()
|
||||||
{
|
{
|
||||||
update_global_button (Button::Loop, session->get_play_loop());
|
update_global_button (Button::Loop, _session->get_play_loop());
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -1397,7 +1397,7 @@ MackieControlProtocol::notify_record_state_changed ()
|
||||||
if (rec) {
|
if (rec) {
|
||||||
LedState ls;
|
LedState ls;
|
||||||
|
|
||||||
switch (session->record_status()) {
|
switch (_session->record_status()) {
|
||||||
case Session::Disabled:
|
case Session::Disabled:
|
||||||
DEBUG_TRACE (DEBUG::MackieControl, "record state changed to disabled, LED off\n");
|
DEBUG_TRACE (DEBUG::MackieControl, "record state changed to disabled, LED off\n");
|
||||||
ls = off;
|
ls = off;
|
||||||
|
|
@ -1679,7 +1679,7 @@ MackieControlProtocol::midi_input_handler (IOCondition ioc, MIDI::Port* port)
|
||||||
}
|
}
|
||||||
|
|
||||||
// DEBUG_TRACE (DEBUG::MackieControl, string_compose ("data available on %1\n", port->name()));
|
// DEBUG_TRACE (DEBUG::MackieControl, string_compose ("data available on %1\n", port->name()));
|
||||||
samplepos_t now = session->engine().sample_time();
|
samplepos_t now = _session->engine().sample_time();
|
||||||
port->parse (now);
|
port->parse (now);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1824,13 +1824,13 @@ MackieControlProtocol::set_flip_mode (FlipMode fm)
|
||||||
void
|
void
|
||||||
MackieControlProtocol::set_master_on_surface_strip (uint32_t surface, uint32_t strip_number)
|
MackieControlProtocol::set_master_on_surface_strip (uint32_t surface, uint32_t strip_number)
|
||||||
{
|
{
|
||||||
force_special_stripable_to_strip (session->master_out(), surface, strip_number);
|
force_special_stripable_to_strip (_session->master_out(), surface, strip_number);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
MackieControlProtocol::set_monitor_on_surface_strip (uint32_t surface, uint32_t strip_number)
|
MackieControlProtocol::set_monitor_on_surface_strip (uint32_t surface, uint32_t strip_number)
|
||||||
{
|
{
|
||||||
force_special_stripable_to_strip (session->monitor_out(), surface, strip_number);
|
force_special_stripable_to_strip (_session->monitor_out(), surface, strip_number);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -1846,7 +1846,7 @@ MackieControlProtocol::force_special_stripable_to_strip (boost::shared_ptr<Strip
|
||||||
if ((*s)->number() == surface) {
|
if ((*s)->number() == surface) {
|
||||||
Strip* strip = (*s)->nth_strip (strip_number);
|
Strip* strip = (*s)->nth_strip (strip_number);
|
||||||
if (strip) {
|
if (strip) {
|
||||||
strip->set_stripable (session->master_out());
|
strip->set_stripable (_session->master_out());
|
||||||
strip->lock_controls ();
|
strip->lock_controls ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1940,7 +1940,7 @@ MackieControlProtocol::update_fader_automation_state ()
|
||||||
samplepos_t
|
samplepos_t
|
||||||
MackieControlProtocol::transport_sample() const
|
MackieControlProtocol::transport_sample() const
|
||||||
{
|
{
|
||||||
return session->transport_sample();
|
return _session->transport_sample();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -2157,7 +2157,7 @@ MackieControlProtocol::set_ipmidi_base (int16_t portnum)
|
||||||
{
|
{
|
||||||
/* this will not be saved without a session save, so .. */
|
/* this will not be saved without a session save, so .. */
|
||||||
|
|
||||||
session->set_dirty ();
|
_session->set_dirty ();
|
||||||
|
|
||||||
_ipmidi_base = portnum;
|
_ipmidi_base = portnum;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -215,7 +215,7 @@ class MackieControlProtocol
|
||||||
void update_global_button (int id, Mackie::LedState);
|
void update_global_button (int id, Mackie::LedState);
|
||||||
void update_global_led (int id, Mackie::LedState);
|
void update_global_led (int id, Mackie::LedState);
|
||||||
|
|
||||||
ARDOUR::Session & get_session() { return *session; }
|
ARDOUR::Session & get_session() { return *_session; }
|
||||||
samplepos_t transport_sample() const;
|
samplepos_t transport_sample() const;
|
||||||
|
|
||||||
int modifier_state() const { return _modifier_state; }
|
int modifier_state() const { return _modifier_state; }
|
||||||
|
|
|
||||||
|
|
@ -483,13 +483,13 @@ MackieControlProtocol::marker_release (Button &)
|
||||||
* the current position and we're not rolling.
|
* the current position and we're not rolling.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
samplepos_t where = session->audible_sample();
|
samplepos_t where = _session->audible_sample();
|
||||||
|
|
||||||
if (session->transport_stopped_or_stopping() && session->locations()->mark_at (where, session->sample_rate() / 100.0)) {
|
if (_session->transport_stopped_or_stopping() && _session->locations()->mark_at (where, _session->sample_rate() / 100.0)) {
|
||||||
return off;
|
return off;
|
||||||
}
|
}
|
||||||
|
|
||||||
session->locations()->next_available_name (markername,"mark");
|
_session->locations()->next_available_name (markername,"mark");
|
||||||
add_marker (markername);
|
add_marker (markername);
|
||||||
|
|
||||||
return off;
|
return off;
|
||||||
|
|
@ -505,7 +505,7 @@ MackieControlProtocol::stop_press (Button &)
|
||||||
transport_stop ();
|
transport_stop ();
|
||||||
|
|
||||||
if (main_modifier_state() == MODIFIER_SHIFT) {
|
if (main_modifier_state() == MODIFIER_SHIFT) {
|
||||||
session->midi_panic();
|
_session->midi_panic();
|
||||||
}
|
}
|
||||||
|
|
||||||
return on;
|
return on;
|
||||||
|
|
@ -514,7 +514,7 @@ MackieControlProtocol::stop_press (Button &)
|
||||||
LedState
|
LedState
|
||||||
MackieControlProtocol::stop_release (Button &)
|
MackieControlProtocol::stop_release (Button &)
|
||||||
{
|
{
|
||||||
return session->transport_stopped_or_stopping();
|
return _session->transport_stopped_or_stopping();
|
||||||
}
|
}
|
||||||
|
|
||||||
LedState
|
LedState
|
||||||
|
|
@ -596,7 +596,7 @@ MackieControlProtocol::loop_press (Button &)
|
||||||
access_action ("Editor/set-loop-from-edit-range");
|
access_action ("Editor/set-loop-from-edit-range");
|
||||||
return off;
|
return off;
|
||||||
} else {
|
} else {
|
||||||
bool was_on = session->get_play_loop();
|
bool was_on = _session->get_play_loop();
|
||||||
loop_toggle ();
|
loop_toggle ();
|
||||||
return was_on ? off : on;
|
return was_on ? off : on;
|
||||||
}
|
}
|
||||||
|
|
@ -927,7 +927,7 @@ MackieControlProtocol::clearsolo_press (Mackie::Button&)
|
||||||
Mackie::LedState
|
Mackie::LedState
|
||||||
MackieControlProtocol::clearsolo_release (Mackie::Button&)
|
MackieControlProtocol::clearsolo_release (Mackie::Button&)
|
||||||
{
|
{
|
||||||
//return session->soloing();
|
//return _session->soloing();
|
||||||
return none;
|
return none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -40,13 +40,13 @@ Maschine2::connect_signals ()
|
||||||
// TODO: use some convenience macros here
|
// TODO: use some convenience macros here
|
||||||
|
|
||||||
/* Signals */
|
/* Signals */
|
||||||
session->TransportStateChange.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&Maschine2::notify_transport_state_changed, this), this);
|
_session->TransportStateChange.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&Maschine2::notify_transport_state_changed, this), this);
|
||||||
session->TransportLooped.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&Maschine2::notify_loop_state_changed, this), this);
|
_session->TransportLooped.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&Maschine2::notify_loop_state_changed, this), this);
|
||||||
session->RecordStateChanged.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&Maschine2::notify_record_state_changed, this), this);
|
_session->RecordStateChanged.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&Maschine2::notify_record_state_changed, this), this);
|
||||||
Config->ParameterChanged.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&Maschine2::notify_parameter_changed, this, _1), this);
|
Config->ParameterChanged.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&Maschine2::notify_parameter_changed, this, _1), this);
|
||||||
session->config.ParameterChanged.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&Maschine2::notify_parameter_changed, this, _1), this);
|
_session->config.ParameterChanged.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&Maschine2::notify_parameter_changed, this, _1), this);
|
||||||
session->DirtyChanged.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&Maschine2::notify_session_dirty_changed, this), this);
|
_session->DirtyChanged.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&Maschine2::notify_session_dirty_changed, this), this);
|
||||||
session->history().Changed.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&Maschine2::notify_history_changed, this), this);
|
_session->history().Changed.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&Maschine2::notify_history_changed, this), this);
|
||||||
|
|
||||||
/* Actions */
|
/* Actions */
|
||||||
Glib::RefPtr<Gtk::ToggleAction> tact;
|
Glib::RefPtr<Gtk::ToggleAction> tact;
|
||||||
|
|
@ -108,7 +108,7 @@ Maschine2::connect_signals ()
|
||||||
void
|
void
|
||||||
Maschine2::notify_record_state_changed ()
|
Maschine2::notify_record_state_changed ()
|
||||||
{
|
{
|
||||||
switch (session->record_status ()) {
|
switch (_session->record_status ()) {
|
||||||
case Session::Disabled:
|
case Session::Disabled:
|
||||||
_ctrl->button (M2Contols::Rec)->set_color (0);
|
_ctrl->button (M2Contols::Rec)->set_color (0);
|
||||||
_ctrl->button (M2Contols::Rec)->set_blinking (false);
|
_ctrl->button (M2Contols::Rec)->set_blinking (false);
|
||||||
|
|
@ -139,8 +139,8 @@ void
|
||||||
Maschine2::notify_loop_state_changed ()
|
Maschine2::notify_loop_state_changed ()
|
||||||
{
|
{
|
||||||
bool looping = false;
|
bool looping = false;
|
||||||
Location* looploc = session->locations ()->auto_loop_location ();
|
Location* looploc = _session->locations ()->auto_loop_location ();
|
||||||
if (looploc && session->get_play_loop ()) {
|
if (looploc && _session->get_play_loop ()) {
|
||||||
looping = true;
|
looping = true;
|
||||||
}
|
}
|
||||||
_ctrl->button (M2Contols::Loop)->set_color (looping ? COLOR_GRAY : 0);
|
_ctrl->button (M2Contols::Loop)->set_color (looping ? COLOR_GRAY : 0);
|
||||||
|
|
@ -182,7 +182,7 @@ Maschine2::notify_snap_change ()
|
||||||
void
|
void
|
||||||
Maschine2::notify_session_dirty_changed ()
|
Maschine2::notify_session_dirty_changed ()
|
||||||
{
|
{
|
||||||
bool is_dirty = session->dirty ();
|
bool is_dirty = _session->dirty ();
|
||||||
_ctrl->button (M2Contols::Save)->set_color (is_dirty ? COLOR_WHITE : COLOR_BLACK);
|
_ctrl->button (M2Contols::Save)->set_color (is_dirty ? COLOR_WHITE : COLOR_BLACK);
|
||||||
_ctrl->button (M2Contols::Save)->set_blinking (is_dirty);
|
_ctrl->button (M2Contols::Save)->set_blinking (is_dirty);
|
||||||
}
|
}
|
||||||
|
|
@ -190,8 +190,8 @@ Maschine2::notify_session_dirty_changed ()
|
||||||
void
|
void
|
||||||
Maschine2::notify_history_changed ()
|
Maschine2::notify_history_changed ()
|
||||||
{
|
{
|
||||||
_ctrl->button (M2Contols::Redo)->set_color (session->redo_depth() > 0 ? COLOR_WHITE : COLOR_BLACK);
|
_ctrl->button (M2Contols::Redo)->set_color (_session->redo_depth() > 0 ? COLOR_WHITE : COLOR_BLACK);
|
||||||
_ctrl->button (M2Contols::Undo)->set_color (session->undo_depth() > 0 ? COLOR_WHITE : COLOR_BLACK);
|
_ctrl->button (M2Contols::Undo)->set_color (_session->undo_depth() > 0 ? COLOR_WHITE : COLOR_BLACK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -362,7 +362,7 @@ Maschine2::encoder_master (int delta)
|
||||||
break;
|
break;
|
||||||
case MST_VOLUME:
|
case MST_VOLUME:
|
||||||
{
|
{
|
||||||
boost::shared_ptr<Route> master = session->master_out ();
|
boost::shared_ptr<Route> master = _session->master_out ();
|
||||||
if (master) {
|
if (master) {
|
||||||
// TODO consider _ctrl->button (M2Contols::EncoderWheel)->is_pressed() for fine grained
|
// TODO consider _ctrl->button (M2Contols::EncoderWheel)->is_pressed() for fine grained
|
||||||
const double factor = _ctrl->button (M2Contols::BtnShift, M2Contols::ModNone)->active () ? 256. : 32.;
|
const double factor = _ctrl->button (M2Contols::BtnShift, M2Contols::ModNone)->active () ? 256. : 32.;
|
||||||
|
|
|
||||||
|
|
@ -254,7 +254,7 @@ Maschine2::start ()
|
||||||
read_timeout->attach (main_loop ()->get_context());
|
read_timeout->attach (main_loop ()->get_context());
|
||||||
|
|
||||||
#if 1 // TEST
|
#if 1 // TEST
|
||||||
tl = new TestLayout (*this, *session, "test");
|
tl = new TestLayout (*this, *_session, "test");
|
||||||
tl->get_menu ()->set_control (_ctrl->encoder (1));
|
tl->get_menu ()->set_control (_ctrl->encoder (1));
|
||||||
tl->get_knob ()->set_control (_ctrl->encoder (2));
|
tl->get_knob ()->set_control (_ctrl->encoder (2));
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -122,7 +122,7 @@ OSC::OSC (Session& s, uint32_t port)
|
||||||
{
|
{
|
||||||
_instance = this;
|
_instance = this;
|
||||||
|
|
||||||
session->Exported.connect (*this, MISSING_INVALIDATOR, boost::bind (&OSC::session_exported, this, _1, _2), this);
|
_session->Exported.connect (*this, MISSING_INVALIDATOR, boost::bind (&OSC::session_exported, this, _1, _2), this);
|
||||||
}
|
}
|
||||||
|
|
||||||
OSC::~OSC()
|
OSC::~OSC()
|
||||||
|
|
@ -250,7 +250,7 @@ OSC::start ()
|
||||||
observer_busy = false;
|
observer_busy = false;
|
||||||
register_callbacks();
|
register_callbacks();
|
||||||
|
|
||||||
session_loaded (*session);
|
session_loaded (*_session);
|
||||||
|
|
||||||
// lo_server_thread_add_method(_sthread, NULL, NULL, OSC::_dummy_handler, this);
|
// lo_server_thread_add_method(_sthread, NULL, NULL, OSC::_dummy_handler, this);
|
||||||
|
|
||||||
|
|
@ -266,15 +266,15 @@ OSC::start ()
|
||||||
|
|
||||||
// catch track reordering
|
// catch track reordering
|
||||||
// receive routes added
|
// receive routes added
|
||||||
session->RouteAdded.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&OSC::notify_routes_added, this, _1), this);
|
_session->RouteAdded.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&OSC::notify_routes_added, this, _1), this);
|
||||||
// receive VCAs added
|
// receive VCAs added
|
||||||
session->vca_manager().VCAAdded.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&OSC::notify_vca_added, this, _1), this);
|
_session->vca_manager().VCAAdded.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&OSC::notify_vca_added, this, _1), this);
|
||||||
// order changed
|
// order changed
|
||||||
PresentationInfo::Change.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&OSC::recalcbanks, this), this);
|
PresentationInfo::Change.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&OSC::recalcbanks, this), this);
|
||||||
|
|
||||||
_select = ControlProtocol::first_selected_stripable();
|
_select = ControlProtocol::first_selected_stripable();
|
||||||
if(!_select) {
|
if(!_select) {
|
||||||
_select = session->master_out ();
|
_select = _session->master_out ();
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
@ -664,7 +664,7 @@ OSC::get_unix_server_url()
|
||||||
void
|
void
|
||||||
OSC::gui_changed ()
|
OSC::gui_changed ()
|
||||||
{
|
{
|
||||||
session->set_dirty();
|
_session->set_dirty();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -694,7 +694,7 @@ OSC::send_current_value (const char* path, lo_arg** argv, int argc, lo_message m
|
||||||
lo_message_add_string (reply, "bad syntax");
|
lo_message_add_string (reply, "bad syntax");
|
||||||
} else {
|
} else {
|
||||||
id = argv[0]->i;
|
id = argv[0]->i;
|
||||||
r = session->get_remote_nth_route (id);
|
r = _session->get_remote_nth_route (id);
|
||||||
|
|
||||||
if (!r) {
|
if (!r) {
|
||||||
lo_message_add_string (reply, "not found");
|
lo_message_add_string (reply, "not found");
|
||||||
|
|
@ -990,37 +990,37 @@ OSC::current_value (const char */*path*/, const char */*types*/, lo_arg **/*argv
|
||||||
if (strcmp (argv[0]->s, X_("transport_frame")) == 0) {
|
if (strcmp (argv[0]->s, X_("transport_frame")) == 0) {
|
||||||
|
|
||||||
if (session) {
|
if (session) {
|
||||||
lo_send (addr, retpath, "i", session->transport_sample());
|
lo_send (addr, retpath, "i", _session->transport_sample());
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (strcmp (argv[0]->s, X_("transport_speed")) == 0) {
|
} else if (strcmp (argv[0]->s, X_("transport_speed")) == 0) {
|
||||||
|
|
||||||
if (session) {
|
if (session) {
|
||||||
lo_send (addr, retpath, "i", session->transport_sample());
|
lo_send (addr, retpath, "i", _session->transport_sample());
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (strcmp (argv[0]->s, X_("transport_locked")) == 0) {
|
} else if (strcmp (argv[0]->s, X_("transport_locked")) == 0) {
|
||||||
|
|
||||||
if (session) {
|
if (session) {
|
||||||
lo_send (addr, retpath, "i", session->transport_sample());
|
lo_send (addr, retpath, "i", _session->transport_sample());
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (strcmp (argv[0]->s, X_("punch_in")) == 0) {
|
} else if (strcmp (argv[0]->s, X_("punch_in")) == 0) {
|
||||||
|
|
||||||
if (session) {
|
if (session) {
|
||||||
lo_send (addr, retpath, "i", session->transport_sample());
|
lo_send (addr, retpath, "i", _session->transport_sample());
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (strcmp (argv[0]->s, X_("punch_out")) == 0) {
|
} else if (strcmp (argv[0]->s, X_("punch_out")) == 0) {
|
||||||
|
|
||||||
if (session) {
|
if (session) {
|
||||||
lo_send (addr, retpath, "i", session->transport_sample());
|
lo_send (addr, retpath, "i", _session->transport_sample());
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (strcmp (argv[0]->s, X_("rec_enable")) == 0) {
|
} else if (strcmp (argv[0]->s, X_("rec_enable")) == 0) {
|
||||||
|
|
||||||
if (session) {
|
if (session) {
|
||||||
lo_send (addr, retpath, "i", session->transport_sample());
|
lo_send (addr, retpath, "i", _session->transport_sample());
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -1105,9 +1105,9 @@ OSC::routes_list (lo_message msg)
|
||||||
lo_message reply = lo_message_new ();
|
lo_message reply = lo_message_new ();
|
||||||
|
|
||||||
lo_message_add_string (reply, X_("end_route_list"));
|
lo_message_add_string (reply, X_("end_route_list"));
|
||||||
lo_message_add_int64 (reply, session->sample_rate());
|
lo_message_add_int64 (reply, _session->sample_rate());
|
||||||
lo_message_add_int64 (reply, session->current_end_sample());
|
lo_message_add_int64 (reply, _session->current_end_sample());
|
||||||
if (session->monitor_out()) {
|
if (_session->monitor_out()) {
|
||||||
// this session has a monitor section
|
// this session has a monitor section
|
||||||
lo_message_add_int32 (reply, 1);
|
lo_message_add_int32 (reply, 1);
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -1267,27 +1267,27 @@ OSC::_custom_mode (uint32_t state, lo_address addr)
|
||||||
int
|
int
|
||||||
OSC::cancel_all_solos ()
|
OSC::cancel_all_solos ()
|
||||||
{
|
{
|
||||||
session->cancel_all_solo ();
|
_session->cancel_all_solo ();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
OSC::osc_toggle_roll (bool ret2strt)
|
OSC::osc_toggle_roll (bool ret2strt)
|
||||||
{
|
{
|
||||||
if (session->is_auditioning()) {
|
if (_session->is_auditioning()) {
|
||||||
session->cancel_audition ();
|
_session->cancel_audition ();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool rolling = transport_rolling();
|
bool rolling = transport_rolling();
|
||||||
|
|
||||||
if (rolling) {
|
if (rolling) {
|
||||||
session->request_stop (ret2strt, true);
|
_session->request_stop (ret2strt, true);
|
||||||
} else {
|
} else {
|
||||||
if (session->get_play_loop() && Config->get_loop_is_mode()) {
|
if (_session->get_play_loop() && Config->get_loop_is_mode()) {
|
||||||
session->request_locate (session->locations()->auto_loop_location()->start(), MustRoll);
|
_session->request_locate (_session->locations()->auto_loop_location()->start(), MustRoll);
|
||||||
} else {
|
} else {
|
||||||
session->request_roll (TRS_UI);
|
_session->request_roll (TRS_UI);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
@ -2073,7 +2073,7 @@ OSC::global_feedback (OSCSurface* sur)
|
||||||
if (sur->feedback[4] || sur->feedback[3] || sur->feedback[5] || sur->feedback[6]) {
|
if (sur->feedback[4] || sur->feedback[3] || sur->feedback[5] || sur->feedback[6]) {
|
||||||
|
|
||||||
// create a new Global Observer for this surface
|
// create a new Global Observer for this surface
|
||||||
OSCGlobalObserver* o = new OSCGlobalObserver (*this, *session, sur);
|
OSCGlobalObserver* o = new OSCGlobalObserver (*this, *_session, sur);
|
||||||
sur->global_obs = o;
|
sur->global_obs = o;
|
||||||
o->jog_mode (sur->jogmode);
|
o->jog_mode (sur->jogmode);
|
||||||
}
|
}
|
||||||
|
|
@ -2222,7 +2222,7 @@ OSC::set_bank (uint32_t bank_start, lo_message msg)
|
||||||
int
|
int
|
||||||
OSC::_set_bank (uint32_t bank_start, lo_address addr)
|
OSC::_set_bank (uint32_t bank_start, lo_address addr)
|
||||||
{
|
{
|
||||||
if (!session->nroutes()) {
|
if (!_session->nroutes()) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2549,7 +2549,7 @@ boost::shared_ptr<VCA>
|
||||||
OSC::get_vca_by_name (std::string vname)
|
OSC::get_vca_by_name (std::string vname)
|
||||||
{
|
{
|
||||||
StripableList stripables;
|
StripableList stripables;
|
||||||
session->get_stripables (stripables);
|
_session->get_stripables (stripables);
|
||||||
for (StripableList::iterator it = stripables.begin(); it != stripables.end(); ++it) {
|
for (StripableList::iterator it = stripables.begin(); it != stripables.end(); ++it) {
|
||||||
boost::shared_ptr<Stripable> s = *it;
|
boost::shared_ptr<Stripable> s = *it;
|
||||||
boost::shared_ptr<VCA> v = boost::dynamic_pointer_cast<VCA> (s);
|
boost::shared_ptr<VCA> v = boost::dynamic_pointer_cast<VCA> (s);
|
||||||
|
|
@ -2584,7 +2584,7 @@ OSC::set_temp_mode (lo_address addr)
|
||||||
// check if this group feeds a bus or is slaved
|
// check if this group feeds a bus or is slaved
|
||||||
boost::shared_ptr<Stripable> mstr = boost::shared_ptr<Stripable> ();
|
boost::shared_ptr<Stripable> mstr = boost::shared_ptr<Stripable> ();
|
||||||
if (rg->has_control_master()) {
|
if (rg->has_control_master()) {
|
||||||
boost::shared_ptr<VCA> vca = session->vca_manager().vca_by_number (rg->group_master_number());
|
boost::shared_ptr<VCA> vca = _session->vca_manager().vca_by_number (rg->group_master_number());
|
||||||
if (vca) {
|
if (vca) {
|
||||||
mstr = boost::dynamic_pointer_cast<Stripable> (vca);
|
mstr = boost::dynamic_pointer_cast<Stripable> (vca);
|
||||||
}
|
}
|
||||||
|
|
@ -2607,7 +2607,7 @@ OSC::set_temp_mode (lo_address addr)
|
||||||
if (vca) {
|
if (vca) {
|
||||||
sur->temp_strips.clear();
|
sur->temp_strips.clear();
|
||||||
StripableList stripables;
|
StripableList stripables;
|
||||||
session->get_stripables (stripables);
|
_session->get_stripables (stripables);
|
||||||
for (StripableList::iterator it = stripables.begin(); it != stripables.end(); ++it) {
|
for (StripableList::iterator it = stripables.begin(); it != stripables.end(); ++it) {
|
||||||
boost::shared_ptr<Stripable> st = *it;
|
boost::shared_ptr<Stripable> st = *it;
|
||||||
if (st->slaved_to (vca)) {
|
if (st->slaved_to (vca)) {
|
||||||
|
|
@ -2626,7 +2626,7 @@ OSC::set_temp_mode (lo_address addr)
|
||||||
// this is a bus, but not master, monitor or audition
|
// this is a bus, but not master, monitor or audition
|
||||||
sur->temp_strips.clear();
|
sur->temp_strips.clear();
|
||||||
StripableList stripables;
|
StripableList stripables;
|
||||||
session->get_stripables (stripables, PresentationInfo::AllStripables);
|
_session->get_stripables (stripables, PresentationInfo::AllStripables);
|
||||||
for (StripableList::iterator it = stripables.begin(); it != stripables.end(); ++it) {
|
for (StripableList::iterator it = stripables.begin(); it != stripables.end(); ++it) {
|
||||||
boost::shared_ptr<Stripable> st = *it;
|
boost::shared_ptr<Stripable> st = *it;
|
||||||
boost::shared_ptr<Route> ri = boost::dynamic_pointer_cast<Route> (st);
|
boost::shared_ptr<Route> ri = boost::dynamic_pointer_cast<Route> (st);
|
||||||
|
|
@ -2687,7 +2687,7 @@ OSC::name_session (char *n, lo_message msg)
|
||||||
"session names may not contain a '%1' character"), illegal)) << endmsg;
|
"session names may not contain a '%1' character"), illegal)) << endmsg;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
switch (session->rename (new_name)) {
|
switch (_session->rename (new_name)) {
|
||||||
case -1:
|
case -1:
|
||||||
PBD::warning << (_("That name is already in use by another directory/folder. Please try again.")) << endmsg;
|
PBD::warning << (_("That name is already in use by another directory/folder. Please try again.")) << endmsg;
|
||||||
break;
|
break;
|
||||||
|
|
@ -2901,7 +2901,7 @@ void
|
||||||
OSC::transport_sample (lo_message msg)
|
OSC::transport_sample (lo_message msg)
|
||||||
{
|
{
|
||||||
check_surface (msg);
|
check_surface (msg);
|
||||||
samplepos_t pos = session->transport_sample ();
|
samplepos_t pos = _session->transport_sample ();
|
||||||
|
|
||||||
lo_message reply = lo_message_new ();
|
lo_message reply = lo_message_new ();
|
||||||
lo_message_add_int64 (reply, pos);
|
lo_message_add_int64 (reply, pos);
|
||||||
|
|
@ -2929,7 +2929,7 @@ void
|
||||||
OSC::record_enabled (lo_message msg)
|
OSC::record_enabled (lo_message msg)
|
||||||
{
|
{
|
||||||
check_surface (msg);
|
check_surface (msg);
|
||||||
int re = (int)session->get_record_enabled ();
|
int re = (int)_session->get_record_enabled ();
|
||||||
|
|
||||||
lo_message reply = lo_message_new ();
|
lo_message reply = lo_message_new ();
|
||||||
lo_message_add_int32 (reply, re);
|
lo_message_add_int32 (reply, re);
|
||||||
|
|
@ -2944,7 +2944,7 @@ OSC::scrub (float delta, lo_message msg)
|
||||||
{
|
{
|
||||||
check_surface (msg);
|
check_surface (msg);
|
||||||
|
|
||||||
scrub_place = session->transport_sample ();
|
scrub_place = _session->transport_sample ();
|
||||||
|
|
||||||
float speed;
|
float speed;
|
||||||
|
|
||||||
|
|
@ -2968,18 +2968,18 @@ OSC::scrub (float delta, lo_message msg)
|
||||||
|
|
||||||
if (speed > 0) {
|
if (speed > 0) {
|
||||||
if (speed == 1) {
|
if (speed == 1) {
|
||||||
session->request_transport_speed (.5);
|
_session->request_transport_speed (.5);
|
||||||
} else {
|
} else {
|
||||||
session->request_transport_speed (9.9);
|
_session->request_transport_speed (9.9);
|
||||||
}
|
}
|
||||||
} else if (speed < 0) {
|
} else if (speed < 0) {
|
||||||
if (speed == -1) {
|
if (speed == -1) {
|
||||||
session->request_transport_speed (-.5);
|
_session->request_transport_speed (-.5);
|
||||||
} else {
|
} else {
|
||||||
session->request_transport_speed (-1);
|
_session->request_transport_speed (-1);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
session->request_stop ();
|
_session->request_stop ();
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
@ -3084,7 +3084,7 @@ OSC::set_marker (const char* types, lo_arg **argv, int argc, lo_message msg)
|
||||||
PBD::warning << "Wrong number of parameters, one only." << endmsg;
|
PBD::warning << "Wrong number of parameters, one only." << endmsg;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
const Locations::LocationList& ll (session->locations ()->list ());
|
const Locations::LocationList& ll (_session->locations ()->list ());
|
||||||
uint32_t marker = 0;
|
uint32_t marker = 0;
|
||||||
|
|
||||||
switch (types[0]) {
|
switch (types[0]) {
|
||||||
|
|
@ -3094,9 +3094,9 @@ OSC::set_marker (const char* types, lo_arg **argv, int argc, lo_message msg)
|
||||||
for (Locations::LocationList::const_iterator l = ll.begin(); l != ll.end(); ++l) {
|
for (Locations::LocationList::const_iterator l = ll.begin(); l != ll.end(); ++l) {
|
||||||
if ((*l)->is_mark ()) {
|
if ((*l)->is_mark ()) {
|
||||||
if (strcmp (&argv[0]->s, (*l)->name().c_str()) == 0) {
|
if (strcmp (&argv[0]->s, (*l)->name().c_str()) == 0) {
|
||||||
session->request_locate ((*l)->start (), MustStop);
|
_session->request_locate ((*l)->start (), MustStop);
|
||||||
return 0;
|
return 0;
|
||||||
} else if ((*l)->start () == session->transport_sample()) {
|
} else if ((*l)->start () == _session->transport_sample()) {
|
||||||
cur_mark = (*l);
|
cur_mark = (*l);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -3131,7 +3131,7 @@ OSC::set_marker (const char* types, lo_arg **argv, int argc, lo_message msg)
|
||||||
std::sort (lm.begin(), lm.end(), location_marker_sort);
|
std::sort (lm.begin(), lm.end(), location_marker_sort);
|
||||||
// go there
|
// go there
|
||||||
if (marker < lm.size()) {
|
if (marker < lm.size()) {
|
||||||
session->request_locate (lm[marker].when, MustStop);
|
_session->request_locate (lm[marker].when, MustStop);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
// we were unable to deal with things
|
// we were unable to deal with things
|
||||||
|
|
@ -3152,7 +3152,7 @@ OSC::send_group_list (lo_address addr)
|
||||||
|
|
||||||
lo_message_add_string (reply, X_("none"));
|
lo_message_add_string (reply, X_("none"));
|
||||||
|
|
||||||
std::list<RouteGroup*> groups = session->route_groups ();
|
std::list<RouteGroup*> groups = _session->route_groups ();
|
||||||
for (std::list<RouteGroup *>::iterator i = groups.begin(); i != groups.end(); ++i) {
|
for (std::list<RouteGroup *>::iterator i = groups.begin(); i != groups.end(); ++i) {
|
||||||
RouteGroup *rg = *i;
|
RouteGroup *rg = *i;
|
||||||
lo_message_add_string (reply, rg->name().c_str());
|
lo_message_add_string (reply, rg->name().c_str());
|
||||||
|
|
@ -3165,8 +3165,8 @@ OSC::send_group_list (lo_address addr)
|
||||||
int
|
int
|
||||||
OSC::click_level (float position)
|
OSC::click_level (float position)
|
||||||
{
|
{
|
||||||
if (session->click_gain()->gain_control()) {
|
if (_session->click_gain()->gain_control()) {
|
||||||
session->click_gain()->gain_control()->set_value (session->click_gain()->gain_control()->interface_to_internal (position), PBD::Controllable::NoGroup);
|
_session->click_gain()->gain_control()->set_value (_session->click_gain()->gain_control()->interface_to_internal (position), PBD::Controllable::NoGroup);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
@ -3236,7 +3236,7 @@ OSC::route_get_receives(lo_message msg)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::shared_ptr<RouteList> route_list = session->get_routes();
|
boost::shared_ptr<RouteList> route_list = _session->get_routes();
|
||||||
|
|
||||||
lo_message reply = lo_message_new();
|
lo_message reply = lo_message_new();
|
||||||
lo_message_add_int32(reply, rid);
|
lo_message_add_int32(reply, rid);
|
||||||
|
|
@ -3293,7 +3293,7 @@ OSC::master_parse (const char *path, const char* types, lo_arg **argv, int argc,
|
||||||
}
|
}
|
||||||
|
|
||||||
//OSCSurface *sur = get_surface(get_address (msg));
|
//OSCSurface *sur = get_surface(get_address (msg));
|
||||||
boost::shared_ptr<Stripable> s = session->master_out();
|
boost::shared_ptr<Stripable> s = _session->master_out();
|
||||||
if (s) {
|
if (s) {
|
||||||
ret = _strip_parse (path, sub_path, types, argv, argc, s, 0, false, msg);
|
ret = _strip_parse (path, sub_path, types, argv, argc, s, 0, false, msg);
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -3316,9 +3316,9 @@ OSC::monitor_parse (const char *path, const char* types, lo_arg **argv, int argc
|
||||||
}
|
}
|
||||||
|
|
||||||
//OSCSurface *sur = get_surface(get_address (msg));
|
//OSCSurface *sur = get_surface(get_address (msg));
|
||||||
boost::shared_ptr<Stripable> s = session->monitor_out();
|
boost::shared_ptr<Stripable> s = _session->monitor_out();
|
||||||
if (s) {
|
if (s) {
|
||||||
boost::shared_ptr<MonitorProcessor> mon = session->monitor_out()->monitor_control();
|
boost::shared_ptr<MonitorProcessor> mon = _session->monitor_out()->monitor_control();
|
||||||
int state = 0;
|
int state = 0;
|
||||||
if (types[0] == 'f') {
|
if (types[0] == 'f') {
|
||||||
state = (uint32_t) argv[0]->f;
|
state = (uint32_t) argv[0]->f;
|
||||||
|
|
@ -3886,12 +3886,12 @@ OSC::_strip_parse (const char *path, const char *sub_path, const char* types, lo
|
||||||
strng = "none";
|
strng = "none";
|
||||||
}
|
}
|
||||||
|
|
||||||
RouteGroup* new_rg = session->route_group_by_name (strng);
|
RouteGroup* new_rg = _session->route_group_by_name (strng);
|
||||||
if (rg) {
|
if (rg) {
|
||||||
string old_group = rg->name();
|
string old_group = rg->name();
|
||||||
if (strng == "none") {
|
if (strng == "none") {
|
||||||
if (rg->size () == 1) {
|
if (rg->size () == 1) {
|
||||||
session->remove_route_group (*rg);
|
_session->remove_route_group (*rg);
|
||||||
} else {
|
} else {
|
||||||
rg->remove (rt);
|
rg->remove (rt);
|
||||||
}
|
}
|
||||||
|
|
@ -3900,7 +3900,7 @@ OSC::_strip_parse (const char *path, const char *sub_path, const char* types, lo
|
||||||
if (new_rg) {
|
if (new_rg) {
|
||||||
// group exists switch to it
|
// group exists switch to it
|
||||||
if (rg->size () == 1) {
|
if (rg->size () == 1) {
|
||||||
session->remove_route_group (rg);
|
_session->remove_route_group (rg);
|
||||||
} else {
|
} else {
|
||||||
rg->remove (rt);
|
rg->remove (rt);
|
||||||
}
|
}
|
||||||
|
|
@ -3921,8 +3921,8 @@ OSC::_strip_parse (const char *path, const char *sub_path, const char* types, lo
|
||||||
ret = 0;
|
ret = 0;
|
||||||
} else {
|
} else {
|
||||||
// create new group with this strip in it
|
// create new group with this strip in it
|
||||||
RouteGroup* new_rg = new RouteGroup (*session, strng);
|
RouteGroup* new_rg = new RouteGroup (*_session, strng);
|
||||||
session->add_route_group (new_rg);
|
_session->add_route_group (new_rg);
|
||||||
new_rg->add (rt);
|
new_rg->add (rt);
|
||||||
ret = 0;
|
ret = 0;
|
||||||
}
|
}
|
||||||
|
|
@ -4011,7 +4011,7 @@ OSC::_strip_parse (const char *path, const char *sub_path, const char* types, lo
|
||||||
lo_message_add_int32 (rmsg, sid);
|
lo_message_add_int32 (rmsg, sid);
|
||||||
}
|
}
|
||||||
StripableList stripables;
|
StripableList stripables;
|
||||||
session->get_stripables (stripables);
|
_session->get_stripables (stripables);
|
||||||
for (StripableList::iterator it = stripables.begin(); it != stripables.end(); ++it) {
|
for (StripableList::iterator it = stripables.begin(); it != stripables.end(); ++it) {
|
||||||
boost::shared_ptr<Stripable> st = *it;
|
boost::shared_ptr<Stripable> st = *it;
|
||||||
boost::shared_ptr<VCA> v = boost::dynamic_pointer_cast<VCA> (st);
|
boost::shared_ptr<VCA> v = boost::dynamic_pointer_cast<VCA> (st);
|
||||||
|
|
@ -4546,18 +4546,18 @@ OSC::sel_new_personal_send (char *foldback, lo_message msg)
|
||||||
if (foldbackbus.find ("- FB") == string::npos) {
|
if (foldbackbus.find ("- FB") == string::npos) {
|
||||||
foldback_name = string_compose ("%1 - FB", foldbackbus);
|
foldback_name = string_compose ("%1 - FB", foldbackbus);
|
||||||
}
|
}
|
||||||
boost::shared_ptr<Route> lsn_rt = session->route_by_name (foldback_name);
|
boost::shared_ptr<Route> lsn_rt = _session->route_by_name (foldback_name);
|
||||||
if (!lsn_rt) {
|
if (!lsn_rt) {
|
||||||
// doesn't exist but check if raw name does and is foldbackbus
|
// doesn't exist but check if raw name does and is foldbackbus
|
||||||
boost::shared_ptr<Route> raw_rt = session->route_by_name (foldbackbus);
|
boost::shared_ptr<Route> raw_rt = _session->route_by_name (foldbackbus);
|
||||||
if (raw_rt && raw_rt->is_foldbackbus()) {
|
if (raw_rt && raw_rt->is_foldbackbus()) {
|
||||||
lsn_rt = raw_rt;
|
lsn_rt = raw_rt;
|
||||||
} else {
|
} else {
|
||||||
// create the foldbackbus
|
// create the foldbackbus
|
||||||
RouteList list = session->new_audio_route (1, 1, 0, 1, foldback_name, PresentationInfo::FoldbackBus, (uint32_t) -1);
|
RouteList list = _session->new_audio_route (1, 1, 0, 1, foldback_name, PresentationInfo::FoldbackBus, (uint32_t) -1);
|
||||||
lsn_rt = *(list.begin());
|
lsn_rt = *(list.begin());
|
||||||
lsn_rt->presentation_info().set_hidden (true);
|
lsn_rt->presentation_info().set_hidden (true);
|
||||||
session->set_dirty();
|
_session->set_dirty();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (lsn_rt) {
|
if (lsn_rt) {
|
||||||
|
|
@ -4569,7 +4569,7 @@ OSC::sel_new_personal_send (char *foldback, lo_message msg)
|
||||||
// create send
|
// create send
|
||||||
rt->add_foldback_send (lsn_rt, false);
|
rt->add_foldback_send (lsn_rt, false);
|
||||||
//boost::shared_ptr<Send> snd = rt->internal_send_for (aux);
|
//boost::shared_ptr<Send> snd = rt->internal_send_for (aux);
|
||||||
session->dirty ();
|
_session->dirty ();
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
PBD::warning << "OSC: new_send - duplicate send, ignored." << endmsg;
|
PBD::warning << "OSC: new_send - duplicate send, ignored." << endmsg;
|
||||||
|
|
@ -4617,7 +4617,7 @@ OSC::_strip_select2 (boost::shared_ptr<Stripable> s, OSCSurface *sur, lo_address
|
||||||
if (ControlProtocol::first_selected_stripable()) {
|
if (ControlProtocol::first_selected_stripable()) {
|
||||||
s = ControlProtocol::first_selected_stripable();
|
s = ControlProtocol::first_selected_stripable();
|
||||||
} else {
|
} else {
|
||||||
s = session->master_out ();
|
s = _session->master_out ();
|
||||||
}
|
}
|
||||||
_select = s;
|
_select = s;
|
||||||
}
|
}
|
||||||
|
|
@ -4642,7 +4642,7 @@ OSC::_strip_select2 (boost::shared_ptr<Stripable> s, OSCSurface *sur, lo_address
|
||||||
if (so != 0) {
|
if (so != 0) {
|
||||||
so->refresh_strip (s, nsends, sur->gainmode, true);
|
so->refresh_strip (s, nsends, sur->gainmode, true);
|
||||||
} else {
|
} else {
|
||||||
OSCSelectObserver* sel_fb = new OSCSelectObserver (*this, *session, sur);
|
OSCSelectObserver* sel_fb = new OSCSelectObserver (*this, *_session, sur);
|
||||||
sur->sel_obs = sel_fb;
|
sur->sel_obs = sel_fb;
|
||||||
}
|
}
|
||||||
sur->sel_obs->set_expand (sur->expand_enable);
|
sur->sel_obs->set_expand (sur->expand_enable);
|
||||||
|
|
@ -5804,7 +5804,7 @@ OSC::periodic (void)
|
||||||
if (diff > 120000) {
|
if (diff > 120000) {
|
||||||
scrub_speed = 0;
|
scrub_speed = 0;
|
||||||
// locate to the place PH was at last tick
|
// locate to the place PH was at last tick
|
||||||
session->request_locate (scrub_place, MustStop);
|
_session->request_locate (scrub_place, MustStop);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (uint32_t it = 0; it < _surface.size(); it++) {
|
for (uint32_t it = 0; it < _surface.size(); it++) {
|
||||||
|
|
@ -5912,7 +5912,7 @@ OSC::get_sorted_stripables(std::bitset<32> types, bool cue, uint32_t custom, Sor
|
||||||
StripableList custom_list;
|
StripableList custom_list;
|
||||||
|
|
||||||
// fetch all stripables
|
// fetch all stripables
|
||||||
session->get_stripables (stripables, PresentationInfo::AllStripables);
|
_session->get_stripables (stripables, PresentationInfo::AllStripables);
|
||||||
if (custom) {
|
if (custom) {
|
||||||
uint32_t nstps = my_list.size ();
|
uint32_t nstps = my_list.size ();
|
||||||
// check each custom strip to see if it still exists
|
// check each custom strip to see if it still exists
|
||||||
|
|
@ -5995,13 +5995,13 @@ OSC::get_sorted_stripables(std::bitset<32> types, bool cue, uint32_t custom, Sor
|
||||||
if (!custom) {
|
if (!custom) {
|
||||||
// Master/Monitor might be anywhere... we put them at the end - Sorry ;)
|
// Master/Monitor might be anywhere... we put them at the end - Sorry ;)
|
||||||
if (types[5]) {
|
if (types[5]) {
|
||||||
if (session->master_out()) {
|
if (_session->master_out()) {
|
||||||
sorted.push_back (session->master_out());
|
sorted.push_back (_session->master_out());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (types[6]) {
|
if (types[6]) {
|
||||||
if (session->monitor_out()) {
|
if (_session->monitor_out()) {
|
||||||
sorted.push_back (session->monitor_out());
|
sorted.push_back (_session->monitor_out());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -6187,7 +6187,7 @@ OSC::cue_new_aux (string name, string dest_1, string dest_2, uint32_t count, lo_
|
||||||
RouteList list;
|
RouteList list;
|
||||||
boost::shared_ptr<Stripable> aux;
|
boost::shared_ptr<Stripable> aux;
|
||||||
name = string_compose ("%1 - FB", name);
|
name = string_compose ("%1 - FB", name);
|
||||||
list = session->new_audio_route (count, count, 0, 1, name, PresentationInfo::FoldbackBus, (uint32_t) -1);
|
list = _session->new_audio_route (count, count, 0, 1, name, PresentationInfo::FoldbackBus, (uint32_t) -1);
|
||||||
aux = *(list.begin());
|
aux = *(list.begin());
|
||||||
if (aux) {
|
if (aux) {
|
||||||
boost::shared_ptr<Route> r = boost::dynamic_pointer_cast<Route>(aux);
|
boost::shared_ptr<Route> r = boost::dynamic_pointer_cast<Route>(aux);
|
||||||
|
|
@ -6207,7 +6207,7 @@ OSC::cue_new_aux (string name, string dest_1, string dest_2, uint32_t count, lo_
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
cue_set ((uint32_t) -1, msg);
|
cue_set ((uint32_t) -1, msg);
|
||||||
session->set_dirty();
|
_session->set_dirty();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
|
|
@ -6220,7 +6220,7 @@ OSC::cue_new_send (string rt_name, lo_message msg)
|
||||||
if (sur->cue) {
|
if (sur->cue) {
|
||||||
boost::shared_ptr<Route> aux = boost::dynamic_pointer_cast<Route> (get_strip (sur->aux, get_address(msg)));
|
boost::shared_ptr<Route> aux = boost::dynamic_pointer_cast<Route> (get_strip (sur->aux, get_address(msg)));
|
||||||
if (aux) {
|
if (aux) {
|
||||||
boost::shared_ptr<Route> rt_send = session->route_by_name (rt_name);
|
boost::shared_ptr<Route> rt_send = _session->route_by_name (rt_name);
|
||||||
if (rt_send && (aux != rt_send)) {
|
if (rt_send && (aux != rt_send)) {
|
||||||
// make sure there isn't one already
|
// make sure there isn't one already
|
||||||
bool s_only = true;
|
bool s_only = true;
|
||||||
|
|
@ -6228,7 +6228,7 @@ OSC::cue_new_send (string rt_name, lo_message msg)
|
||||||
// create send
|
// create send
|
||||||
rt_send->add_foldback_send (aux, false);
|
rt_send->add_foldback_send (aux, false);
|
||||||
boost::shared_ptr<Send> snd = rt_send->internal_send_for (aux);
|
boost::shared_ptr<Send> snd = rt_send->internal_send_for (aux);
|
||||||
session->dirty ();
|
_session->dirty ();
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
PBD::warning << "OSC: new_send - duplicate send, ignored." << endmsg;
|
PBD::warning << "OSC: new_send - duplicate send, ignored." << endmsg;
|
||||||
|
|
@ -6260,7 +6260,7 @@ OSC::cue_connect_aux (std::string dest, lo_message msg)
|
||||||
}
|
}
|
||||||
PortSet& ports = rt->output()->ports ();
|
PortSet& ports = rt->output()->ports ();
|
||||||
rt->output ()->connect (*(ports.begin()), dest, this);
|
rt->output ()->connect (*(ports.begin()), dest, this);
|
||||||
session->set_dirty();
|
_session->set_dirty();
|
||||||
ret = 0;
|
ret = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -355,12 +355,12 @@ Push2::button_name_by_id (ButtonID id)
|
||||||
void
|
void
|
||||||
Push2::button_play ()
|
Push2::button_play ()
|
||||||
{
|
{
|
||||||
if (!session) {
|
if (!_session) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_modifier_state & ModShift) {
|
if (_modifier_state & ModShift) {
|
||||||
goto_start (session->transport_rolling());
|
goto_start (_session->transport_rolling());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -375,7 +375,7 @@ Push2::button_play ()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (session->transport_rolling ()) {
|
if (_session->transport_rolling ()) {
|
||||||
transport_stop ();
|
transport_stop ();
|
||||||
} else {
|
} else {
|
||||||
transport_play ();
|
transport_play ();
|
||||||
|
|
@ -739,7 +739,7 @@ Push2::button_mix_press ()
|
||||||
void
|
void
|
||||||
Push2::button_master ()
|
Push2::button_master ()
|
||||||
{
|
{
|
||||||
boost::shared_ptr<Stripable> main_out = session->master_out ();
|
boost::shared_ptr<Stripable> main_out = _session->master_out ();
|
||||||
|
|
||||||
if (!main_out) {
|
if (!main_out) {
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -108,15 +108,15 @@ Push2::Push2 (ARDOUR::Session& s)
|
||||||
fill_color_table ();
|
fill_color_table ();
|
||||||
|
|
||||||
/* master cannot be removed, so no need to connect to going-away signal */
|
/* master cannot be removed, so no need to connect to going-away signal */
|
||||||
master = session->master_out ();
|
master = _session->master_out ();
|
||||||
|
|
||||||
/* allocate graphics layouts, even though we're not using them yet */
|
/* allocate graphics layouts, even though we're not using them yet */
|
||||||
|
|
||||||
_canvas = new Push2Canvas (*this, 960, 160);
|
_canvas = new Push2Canvas (*this, 960, 160);
|
||||||
mix_layout = new MixLayout (*this, *session, "globalmix");
|
mix_layout = new MixLayout (*this, *_session, "globalmix");
|
||||||
scale_layout = new ScaleLayout (*this, *session, "scale");
|
scale_layout = new ScaleLayout (*this, *_session, "scale");
|
||||||
track_mix_layout = new TrackMixLayout (*this, *session, "trackmix");
|
track_mix_layout = new TrackMixLayout (*this, *_session, "trackmix");
|
||||||
splash_layout = new SplashLayout (*this, *session, "splash");
|
splash_layout = new SplashLayout (*this, *_session, "splash");
|
||||||
|
|
||||||
run_event_loop ();
|
run_event_loop ();
|
||||||
|
|
||||||
|
|
@ -266,11 +266,11 @@ Push2::ports_acquire ()
|
||||||
_output_bundle->add_channel (
|
_output_bundle->add_channel (
|
||||||
shadow_port->name(),
|
shadow_port->name(),
|
||||||
ARDOUR::DataType::MIDI,
|
ARDOUR::DataType::MIDI,
|
||||||
session->engine().make_port_name_non_relative (shadow_port->name())
|
_session->engine().make_port_name_non_relative (shadow_port->name())
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
session->BundleAddedOrRemoved ();
|
_session->BundleAddedOrRemoved ();
|
||||||
|
|
||||||
connect_to_parser ();
|
connect_to_parser ();
|
||||||
|
|
||||||
|
|
@ -862,20 +862,20 @@ void
|
||||||
Push2::connect_session_signals()
|
Push2::connect_session_signals()
|
||||||
{
|
{
|
||||||
// receive routes added
|
// receive routes added
|
||||||
//session->RouteAdded.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&MackieControlProtocol::notify_routes_added, this, _1), this);
|
//_session->RouteAdded.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&MackieControlProtocol::notify_routes_added, this, _1), this);
|
||||||
// receive VCAs added
|
// receive VCAs added
|
||||||
//session->vca_manager().VCAAdded.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&Push2::notify_vca_added, this, _1), this);
|
//_session->vca_manager().VCAAdded.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&Push2::notify_vca_added, this, _1), this);
|
||||||
|
|
||||||
// receive record state toggled
|
// receive record state toggled
|
||||||
session->RecordStateChanged.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&Push2::notify_record_state_changed, this), this);
|
_session->RecordStateChanged.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&Push2::notify_record_state_changed, this), this);
|
||||||
// receive transport state changed
|
// receive transport state changed
|
||||||
session->TransportStateChange.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&Push2::notify_transport_state_changed, this), this);
|
_session->TransportStateChange.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&Push2::notify_transport_state_changed, this), this);
|
||||||
session->TransportLooped.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&Push2::notify_loop_state_changed, this), this);
|
_session->TransportLooped.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&Push2::notify_loop_state_changed, this), this);
|
||||||
// receive punch-in and punch-out
|
// receive punch-in and punch-out
|
||||||
Config->ParameterChanged.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&Push2::notify_parameter_changed, this, _1), this);
|
Config->ParameterChanged.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&Push2::notify_parameter_changed, this, _1), this);
|
||||||
session->config.ParameterChanged.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&Push2::notify_parameter_changed, this, _1), this);
|
_session->config.ParameterChanged.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&Push2::notify_parameter_changed, this, _1), this);
|
||||||
// receive rude solo changed
|
// receive rude solo changed
|
||||||
session->SoloActive.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&Push2::notify_solo_active_changed, this, _1), this);
|
_session->SoloActive.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&Push2::notify_solo_active_changed, this, _1), this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -887,7 +887,7 @@ Push2::notify_record_state_changed ()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (session->record_status ()) {
|
switch (_session->record_status ()) {
|
||||||
case Session::Disabled:
|
case Session::Disabled:
|
||||||
b->second->set_color (LED::White);
|
b->second->set_color (LED::White);
|
||||||
b->second->set_state (LED::NoTransition);
|
b->second->set_state (LED::NoTransition);
|
||||||
|
|
@ -910,7 +910,7 @@ Push2::notify_transport_state_changed ()
|
||||||
{
|
{
|
||||||
boost::shared_ptr<Button> b = id_button_map[Play];
|
boost::shared_ptr<Button> b = id_button_map[Play];
|
||||||
|
|
||||||
if (session->transport_rolling()) {
|
if (_session->transport_rolling()) {
|
||||||
b->set_state (LED::OneShot24th);
|
b->set_state (LED::OneShot24th);
|
||||||
b->set_color (LED::Green);
|
b->set_color (LED::Green);
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -1042,7 +1042,7 @@ Push2::other_vpot (int n, int delta)
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
/* metronome gain control */
|
/* metronome gain control */
|
||||||
click_gain = session->click_gain();
|
click_gain = _session->click_gain();
|
||||||
if (click_gain) {
|
if (click_gain) {
|
||||||
boost::shared_ptr<AutomationControl> ac = click_gain->gain_control();
|
boost::shared_ptr<AutomationControl> ac = click_gain->gain_control();
|
||||||
if (ac) {
|
if (ac) {
|
||||||
|
|
@ -1079,9 +1079,9 @@ Push2::other_vpot_touch (int n, bool touching)
|
||||||
boost::shared_ptr<AutomationControl> ac = master->gain_control();
|
boost::shared_ptr<AutomationControl> ac = master->gain_control();
|
||||||
if (ac) {
|
if (ac) {
|
||||||
if (touching) {
|
if (touching) {
|
||||||
ac->start_touch (session->audible_sample());
|
ac->start_touch (_session->audible_sample());
|
||||||
} else {
|
} else {
|
||||||
ac->stop_touch (session->audible_sample());
|
ac->stop_touch (_session->audible_sample());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -456,13 +456,13 @@ US2400Protocol::marker_release (Button &)
|
||||||
* the current position and we're not rolling.
|
* the current position and we're not rolling.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
samplepos_t where = session->audible_sample();
|
samplepos_t where = _session->audible_sample();
|
||||||
|
|
||||||
if (session->transport_stopped_or_stopping() && session->locations()->mark_at (where, session->sample_rate() / 100.0)) {
|
if (_session->transport_stopped_or_stopping() && _session->locations()->mark_at (where, _session->sample_rate() / 100.0)) {
|
||||||
return off;
|
return off;
|
||||||
}
|
}
|
||||||
|
|
||||||
session->locations()->next_available_name (markername,"mark");
|
_session->locations()->next_available_name (markername,"mark");
|
||||||
add_marker (markername);
|
add_marker (markername);
|
||||||
|
|
||||||
return off;
|
return off;
|
||||||
|
|
@ -478,7 +478,7 @@ US2400Protocol::stop_press (Button &)
|
||||||
transport_stop ();
|
transport_stop ();
|
||||||
|
|
||||||
if (main_modifier_state() == MODIFIER_SHIFT) {
|
if (main_modifier_state() == MODIFIER_SHIFT) {
|
||||||
session->midi_panic();
|
_session->midi_panic();
|
||||||
}
|
}
|
||||||
|
|
||||||
return on;
|
return on;
|
||||||
|
|
@ -487,7 +487,7 @@ US2400Protocol::stop_press (Button &)
|
||||||
LedState
|
LedState
|
||||||
US2400Protocol::stop_release (Button &)
|
US2400Protocol::stop_release (Button &)
|
||||||
{
|
{
|
||||||
return session->transport_stopped_or_stopping();
|
return _session->transport_stopped_or_stopping();
|
||||||
}
|
}
|
||||||
|
|
||||||
LedState
|
LedState
|
||||||
|
|
@ -569,7 +569,7 @@ US2400Protocol::loop_press (Button &)
|
||||||
access_action ("Editor/set-loop-from-edit-range");
|
access_action ("Editor/set-loop-from-edit-range");
|
||||||
return off;
|
return off;
|
||||||
} else {
|
} else {
|
||||||
bool was_on = session->get_play_loop();
|
bool was_on = _session->get_play_loop();
|
||||||
loop_toggle ();
|
loop_toggle ();
|
||||||
return was_on ? off : on;
|
return was_on ? off : on;
|
||||||
}
|
}
|
||||||
|
|
@ -772,7 +772,7 @@ LedState
|
||||||
US2400Protocol::mstr_press (Button &)
|
US2400Protocol::mstr_press (Button &)
|
||||||
{
|
{
|
||||||
// access_action("Mixer/select-none");
|
// access_action("Mixer/select-none");
|
||||||
set_stripable_selection( session->master_out() );
|
set_stripable_selection( _session->master_out() );
|
||||||
return on;
|
return on;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -906,7 +906,7 @@ US2400Protocol::clearsolo_press (US2400::Button&)
|
||||||
US2400::LedState
|
US2400::LedState
|
||||||
US2400Protocol::clearsolo_release (US2400::Button&)
|
US2400Protocol::clearsolo_release (US2400::Button&)
|
||||||
{
|
{
|
||||||
//return session->soloing();
|
//return _session->soloing();
|
||||||
return none;
|
return none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -244,7 +244,7 @@ US2400Protocol::get_sorted_stripables()
|
||||||
// fetch all stripables
|
// fetch all stripables
|
||||||
StripableList stripables;
|
StripableList stripables;
|
||||||
|
|
||||||
session->get_stripables (stripables);
|
_session->get_stripables (stripables);
|
||||||
|
|
||||||
// sort in presentation order, and exclude master, control and hidden stripables
|
// sort in presentation order, and exclude master, control and hidden stripables
|
||||||
// and any stripables that are already set.
|
// and any stripables that are already set.
|
||||||
|
|
@ -382,7 +382,7 @@ US2400Protocol::switch_banks (uint32_t initial, bool force)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* current bank has not been saved */
|
/* current bank has not been saved */
|
||||||
session->set_dirty();
|
_session->set_dirty();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
@ -606,20 +606,20 @@ void
|
||||||
US2400Protocol::connect_session_signals()
|
US2400Protocol::connect_session_signals()
|
||||||
{
|
{
|
||||||
// receive routes added
|
// receive routes added
|
||||||
session->RouteAdded.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&US2400Protocol::notify_routes_added, this, _1), this);
|
_session->RouteAdded.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&US2400Protocol::notify_routes_added, this, _1), this);
|
||||||
// receive VCAs added
|
// receive VCAs added
|
||||||
session->vca_manager().VCAAdded.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&US2400Protocol::notify_vca_added, this, _1), this);
|
_session->vca_manager().VCAAdded.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&US2400Protocol::notify_vca_added, this, _1), this);
|
||||||
|
|
||||||
// receive record state toggled
|
// receive record state toggled
|
||||||
session->RecordStateChanged.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&US2400Protocol::notify_record_state_changed, this), this);
|
_session->RecordStateChanged.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&US2400Protocol::notify_record_state_changed, this), this);
|
||||||
// receive transport state changed
|
// receive transport state changed
|
||||||
session->TransportStateChange.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&US2400Protocol::notify_transport_state_changed, this), this);
|
_session->TransportStateChange.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&US2400Protocol::notify_transport_state_changed, this), this);
|
||||||
session->TransportLooped.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&US2400Protocol::notify_loop_state_changed, this), this);
|
_session->TransportLooped.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&US2400Protocol::notify_loop_state_changed, this), this);
|
||||||
// receive punch-in and punch-out
|
// receive punch-in and punch-out
|
||||||
Config->ParameterChanged.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&US2400Protocol::notify_parameter_changed, this, _1), this);
|
Config->ParameterChanged.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&US2400Protocol::notify_parameter_changed, this, _1), this);
|
||||||
session->config.ParameterChanged.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&US2400Protocol::notify_parameter_changed, this, _1), this);
|
_session->config.ParameterChanged.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&US2400Protocol::notify_parameter_changed, this, _1), this);
|
||||||
// receive rude solo changed
|
// receive rude solo changed
|
||||||
session->SoloActive.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&US2400Protocol::notify_solo_active_changed, this, _1), this);
|
_session->SoloActive.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&US2400Protocol::notify_solo_active_changed, this, _1), this);
|
||||||
|
|
||||||
// make sure remote id changed signals reach here
|
// make sure remote id changed signals reach here
|
||||||
// see also notify_stripable_added
|
// see also notify_stripable_added
|
||||||
|
|
@ -766,13 +766,13 @@ US2400Protocol::create_surfaces ()
|
||||||
_input_bundle->add_channel (
|
_input_bundle->add_channel (
|
||||||
surface->port().input_port().name(),
|
surface->port().input_port().name(),
|
||||||
ARDOUR::DataType::MIDI,
|
ARDOUR::DataType::MIDI,
|
||||||
session->engine().make_port_name_non_relative (surface->port().input_port().name())
|
_session->engine().make_port_name_non_relative (surface->port().input_port().name())
|
||||||
);
|
);
|
||||||
|
|
||||||
_output_bundle->add_channel (
|
_output_bundle->add_channel (
|
||||||
surface->port().output_port().name(),
|
surface->port().output_port().name(),
|
||||||
ARDOUR::DataType::MIDI,
|
ARDOUR::DataType::MIDI,
|
||||||
session->engine().make_port_name_non_relative (surface->port().output_port().name())
|
_session->engine().make_port_name_non_relative (surface->port().output_port().name())
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -794,7 +794,7 @@ US2400Protocol::create_surfaces ()
|
||||||
(*s)->port().reconnect ();
|
(*s)->port().reconnect ();
|
||||||
}
|
}
|
||||||
|
|
||||||
session->BundleAddedOrRemoved ();
|
_session->BundleAddedOrRemoved ();
|
||||||
|
|
||||||
assert (_master_surface);
|
assert (_master_surface);
|
||||||
|
|
||||||
|
|
@ -1109,7 +1109,7 @@ US2400Protocol::notify_record_state_changed ()
|
||||||
if (rec) {
|
if (rec) {
|
||||||
LedState ls;
|
LedState ls;
|
||||||
|
|
||||||
switch (session->record_status()) {
|
switch (_session->record_status()) {
|
||||||
case Session::Disabled:
|
case Session::Disabled:
|
||||||
DEBUG_TRACE (DEBUG::US2400, "record state changed to disabled, LED off\n");
|
DEBUG_TRACE (DEBUG::US2400, "record state changed to disabled, LED off\n");
|
||||||
ls = off;
|
ls = off;
|
||||||
|
|
@ -1323,7 +1323,7 @@ US2400Protocol::midi_input_handler (IOCondition ioc, MIDI::Port* port)
|
||||||
}
|
}
|
||||||
|
|
||||||
// DEBUG_TRACE (DEBUG::US2400, string_compose ("data available on %1\n", port->name()));
|
// DEBUG_TRACE (DEBUG::US2400, string_compose ("data available on %1\n", port->name()));
|
||||||
samplepos_t now = session->engine().sample_time();
|
samplepos_t now = _session->engine().sample_time();
|
||||||
port->parse (now);
|
port->parse (now);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1469,13 +1469,13 @@ US2400Protocol::display_view_mode ()
|
||||||
void
|
void
|
||||||
US2400Protocol::set_master_on_surface_strip (uint32_t surface, uint32_t strip_number)
|
US2400Protocol::set_master_on_surface_strip (uint32_t surface, uint32_t strip_number)
|
||||||
{
|
{
|
||||||
force_special_stripable_to_strip (session->master_out(), surface, strip_number);
|
force_special_stripable_to_strip (_session->master_out(), surface, strip_number);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
US2400Protocol::set_monitor_on_surface_strip (uint32_t surface, uint32_t strip_number)
|
US2400Protocol::set_monitor_on_surface_strip (uint32_t surface, uint32_t strip_number)
|
||||||
{
|
{
|
||||||
force_special_stripable_to_strip (session->monitor_out(), surface, strip_number);
|
force_special_stripable_to_strip (_session->monitor_out(), surface, strip_number);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -1491,7 +1491,7 @@ US2400Protocol::force_special_stripable_to_strip (boost::shared_ptr<Stripable> r
|
||||||
if ((*s)->number() == surface) {
|
if ((*s)->number() == surface) {
|
||||||
Strip* strip = (*s)->nth_strip (strip_number);
|
Strip* strip = (*s)->nth_strip (strip_number);
|
||||||
if (strip) {
|
if (strip) {
|
||||||
strip->set_stripable (session->master_out());
|
strip->set_stripable (_session->master_out());
|
||||||
strip->lock_controls ();
|
strip->lock_controls ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1511,7 +1511,7 @@ US2400Protocol::update_fader_automation_state ()
|
||||||
samplepos_t
|
samplepos_t
|
||||||
US2400Protocol::transport_sample() const
|
US2400Protocol::transport_sample() const
|
||||||
{
|
{
|
||||||
return session->transport_sample();
|
return _session->transport_sample();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
|
|
@ -198,7 +198,7 @@ class US2400Protocol
|
||||||
void update_global_button (int id, US2400::LedState);
|
void update_global_button (int id, US2400::LedState);
|
||||||
void update_global_led (int id, US2400::LedState);
|
void update_global_led (int id, US2400::LedState);
|
||||||
|
|
||||||
ARDOUR::Session & get_session() { return *session; }
|
ARDOUR::Session & get_session() { return *_session; }
|
||||||
samplepos_t transport_sample() const;
|
samplepos_t transport_sample() const;
|
||||||
|
|
||||||
int modifier_state() const { return _modifier_state; }
|
int modifier_state() const { return _modifier_state; }
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@ public:
|
||||||
|
|
||||||
ARDOUR::Session& ardour_session ()
|
ARDOUR::Session& ardour_session ()
|
||||||
{
|
{
|
||||||
return *session;
|
return *_session;
|
||||||
}
|
}
|
||||||
ArdourMixer& mixer_component ()
|
ArdourMixer& mixer_component ()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -118,8 +118,8 @@ WiimoteControlProtocol::start ()
|
||||||
DEBUG_TRACE (DEBUG::WiimoteControl, "WiimoteControlProtocol::start init\n");
|
DEBUG_TRACE (DEBUG::WiimoteControl, "WiimoteControlProtocol::start init\n");
|
||||||
|
|
||||||
// update LEDs whenever the transport or recording state changes
|
// update LEDs whenever the transport or recording state changes
|
||||||
session->TransportStateChange.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&WiimoteControlProtocol::update_led_state, this), this);
|
_session->TransportStateChange.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&WiimoteControlProtocol::update_led_state, this), this);
|
||||||
session->RecordStateChanged.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&WiimoteControlProtocol::update_led_state, this), this);
|
_session->RecordStateChanged.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&WiimoteControlProtocol::update_led_state, this), this);
|
||||||
|
|
||||||
// start the Wiimote control UI; it will run in its own thread context
|
// start the Wiimote control UI; it will run in its own thread context
|
||||||
BaseUI::run ();
|
BaseUI::run ();
|
||||||
|
|
@ -305,7 +305,7 @@ WiimoteControlProtocol::update_led_state ()
|
||||||
}
|
}
|
||||||
|
|
||||||
// enable LED4 if Ardour is recording
|
// enable LED4 if Ardour is recording
|
||||||
if (session->actively_recording ()) {
|
if (_session->actively_recording ()) {
|
||||||
DEBUG_TRACE (DEBUG::WiimoteControl, "WiimoteControlProtocol::update_led_state recording, activate LED4\n");
|
DEBUG_TRACE (DEBUG::WiimoteControl, "WiimoteControlProtocol::update_led_state recording, activate LED4\n");
|
||||||
state |= CWIID_LED4_ON;
|
state |= CWIID_LED4_ON;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue