summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libs/ardour/midi_clock_slave.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/libs/ardour/midi_clock_slave.cc b/libs/ardour/midi_clock_slave.cc
index 53dd186384..2df440ae11 100644
--- a/libs/ardour/midi_clock_slave.cc
+++ b/libs/ardour/midi_clock_slave.cc
@@ -43,7 +43,7 @@ using namespace PBD;
MIDIClock_Slave::MIDIClock_Slave (Session& s, MIDI::Port& p, int ppqn)
: ppqn (ppqn)
- , bandwidth (1.0 / 60.0) // 1 BpM = 1 / 60 Hz
+ , bandwidth (10.0 / 60.0) // 1 BpM = 1 / 60 Hz
{
session = (ISlaveSessionProxy *) new SlaveSessionProxy(s);
rebind (p);
@@ -53,7 +53,7 @@ MIDIClock_Slave::MIDIClock_Slave (Session& s, MIDI::Port& p, int ppqn)
MIDIClock_Slave::MIDIClock_Slave (ISlaveSessionProxy* session_proxy, int ppqn)
: session(session_proxy)
, ppqn (ppqn)
- , bandwidth (1.0 / 60.0) // 1 BpM = 1 / 60 Hz
+ , bandwidth (10.0 / 60.0) // 1 BpM = 1 / 60 Hz
{
reset ();
}
@@ -149,10 +149,10 @@ MIDIClock_Slave::update_midi_clock (Parser& /*parser*/, framepos_t timestamp)
calculate_filter_coefficients();
// calculate loop error
- // we use session->audible_frame() instead of t1 here
+ // we use session->transport_frame() instead of t1 here
// because t1 is used to calculate the transport speed,
// so the loop will compensate for accumulating rounding errors
- error = (double(should_be_position) - double(session->audible_frame()));
+ error = (double(should_be_position) - double(session->transport_frame()));
e = error / double(session->frame_rate());
// update DLL
@@ -328,8 +328,8 @@ MIDIClock_Slave::speed_and_position (double& speed, framepos_t& pos)
// calculate speed
speed = ((t1 - t0) * session->frame_rate()) / one_ppqn_in_frames;
- // provide a 3% deadzone to lock the speed
- if (fabs(speed - 1.0) <= 0.03)
+ // provide a 0.1% deadzone to lock the speed
+ if (fabs(speed - 1.0) <= 0.001)
speed = 1.0;
// calculate position