mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 16:46:35 +01:00
Toggled automation fixes.
- don't attempt to insert two points on toggle. - remove forced touch->write mode change on toggle - initial state still wrong, but works much better overall.
This commit is contained in:
parent
5afb645c9f
commit
877b258c74
2 changed files with 12 additions and 13 deletions
|
|
@ -86,7 +86,6 @@ AutomationController::AutomationController(boost::shared_ptr<Automatable>
|
||||||
but->set_controllable(ac);
|
but->set_controllable(ac);
|
||||||
but->signal_clicked.connect(
|
but->signal_clicked.connect(
|
||||||
sigc::mem_fun(*this, &AutomationController::toggled));
|
sigc::mem_fun(*this, &AutomationController::toggled));
|
||||||
|
|
||||||
_widget = but;
|
_widget = but;
|
||||||
} else {
|
} else {
|
||||||
AutomationBarController* bar = manage(new AutomationBarController(_printer, ac, adj));
|
AutomationBarController* bar = manage(new AutomationBarController(_printer, ac, adj));
|
||||||
|
|
@ -198,14 +197,6 @@ AutomationController::toggled ()
|
||||||
{
|
{
|
||||||
ArdourButton* but = dynamic_cast<ArdourButton*>(_widget);
|
ArdourButton* but = dynamic_cast<ArdourButton*>(_widget);
|
||||||
if (but) {
|
if (but) {
|
||||||
if (_controllable->session().transport_rolling()) {
|
|
||||||
if (_controllable->automation_state() == Touch) {
|
|
||||||
_controllable->set_automation_state(Write);
|
|
||||||
}
|
|
||||||
if (_controllable->list()) {
|
|
||||||
_controllable->list()->set_in_write_pass(true, true, _controllable->session().audible_frame());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const bool was_active = _controllable->get_value() >= 0.5;
|
const bool was_active = _controllable->get_value() >= 0.5;
|
||||||
if (was_active && but->get_active()) {
|
if (was_active && but->get_active()) {
|
||||||
_adjustment->set_value(0.0);
|
_adjustment->set_value(0.0);
|
||||||
|
|
|
||||||
|
|
@ -3900,7 +3900,16 @@ Route::MuteControllable::set_superficial_value(bool muted)
|
||||||
/* Note we can not use AutomationControl::set_value here since it will emit
|
/* Note we can not use AutomationControl::set_value here since it will emit
|
||||||
Changed(), but the value will not be correct to the observer. */
|
Changed(), but the value will not be correct to the observer. */
|
||||||
|
|
||||||
bool to_list = _list && ((AutomationList*)_list.get())->automation_write();
|
/* this is a tweak of ControlList::automation_write ()
|
||||||
|
as currently MuteControllable can't be touching.
|
||||||
|
bool to_list = _list && ((AutomationList*)_list.get())->automation_write();
|
||||||
|
*/
|
||||||
|
const AutoState as = ((AutomationList*)_list.get())->automation_state ();
|
||||||
|
bool to_list = _list && _session.transport_rolling () && (as == Touch || as == Write);
|
||||||
|
|
||||||
|
if (to_list) {
|
||||||
|
_list->set_in_write_pass(true, false, _session.audible_frame ());
|
||||||
|
}
|
||||||
|
|
||||||
Control::set_double (muted, _session.transport_frame(), to_list);
|
Control::set_double (muted, _session.transport_frame(), to_list);
|
||||||
}
|
}
|
||||||
|
|
@ -3916,6 +3925,8 @@ Route::MuteControllable::set_value (double val)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_list && ((AutomationList*)_list.get())->automation_playback()) {
|
if (_list && ((AutomationList*)_list.get())->automation_playback()) {
|
||||||
|
// Set superficial/automation value to drive controller (and possibly record)
|
||||||
|
set_superficial_value (bval);
|
||||||
// Playing back automation, set route mute directly
|
// Playing back automation, set route mute directly
|
||||||
r->set_mute (bval, this);
|
r->set_mute (bval, this);
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -3924,9 +3935,6 @@ Route::MuteControllable::set_value (double val)
|
||||||
rl->push_back (r);
|
rl->push_back (r);
|
||||||
_session.set_mute (rl, bval, Session::rt_cleanup);
|
_session.set_mute (rl, bval, Session::rt_cleanup);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set superficial/automation value to drive controller (and possibly record)
|
|
||||||
set_superficial_value(bval);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
double
|
double
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue