Skip to content

Commit c17700a

Browse files
committed
Say what a relative nudge key costs when two arrive together
The latency keys read the tracker's current offset and add to it. Two presses landing in the same round of the console's loop both read the same value, and the control queue keeps only the newer SetTempoOptions, so one five-millisecond step is lost. Key repeat is 33 ms apart and the line printed after each press shows the same number twice, so it takes a deliberate double-tap to hit and is obvious when you do — but the next thing to wire a control to post() should know the shape, because a UI slider sends an absolute value and does not have the question.
1 parent 960ae06 commit c17700a

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎src/cli/main.cpp‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1259,6 +1259,12 @@ int runTrackDevice(const TrackArgs& args, const takt4::model::ModelWeights& weig
12591259
break;
12601260
case '[':
12611261
case ']': {
1262+
// A relative nudge reads what is there and adds to it, so two presses landing
1263+
// in the same 1 ms round would both read the same value and the queue would
1264+
// keep only the second — one step of five milliseconds lost, and visible in
1265+
// the line below, which prints the same number twice. Key repeat is 33 ms
1266+
// apart, so it takes a deliberate double-tap. A UI with a real slider sends an
1267+
// absolute value and does not have the question.
12621268
takt4::tracking::TempoTracker::Options live = engine->tempoOptions();
12631269
live.latencyOffsetSeconds += key == '[' ? -0.005 : 0.005;
12641270
(void)engine->post(Command::setTempoOptions(live));

0 commit comments

Comments
 (0)