Repository navigation
Commit d8c7e67
committed
Keep a round every millisecond minimised or not; quiet the outputs before STOP waits on the driver; let an outage let go of the rig; drop presses made while stopped
- The output thread's rounds keep to a 1 ms grid on a high-resolution waitable timer. Measured on
the exe: 1016 to 1034 wake-ups a second with the window normal, minimised and covered, where
1.3.2 made 684 to 689 (every wait Windows offers ends a timer tick late, and a wait timed from
the end of a round added that tick to every round). And the process opts out of Windows' power
throttling at startup, both kinds, so Windows 11 keeps its timer requests and its speed while
the window is minimised or covered. The console does the same.
- STOP posts to the outputs before it stops the tracker, and quitting does too: the tracker's stop
waits on the driver, and the outputs went on firing the beats they predicted meanwhile.
- An input outage tells the outputs, which let go of the rig as the input going quiet does: the
lasers disarmed, every held note and clip released, held fires dropped, nothing predicted from
the last beats, Link snapped again on the next lock. An unplugged interface sends no audio at
all, so the tracker never heard a silence, and the lasers held their last clip through it.
- ÷2, ×2, a tap, a pin or DOWNBEAT pressed on a control surface while stopped is dropped at
START: START applied them to the run that had ended, and a tap moved the next run's BPM window.
A setting is never refused by a queue full of presses — the oldest press gives way — so the
latency and window sliders always reach the tracker. The console's --hold-bpm is posted after
its tracker starts, where START no longer lets go of it.
- RtMidi's errors go to a callback and are thrown after the call as before, instead of being
written to stderr — takt4.log beside the executable, unbuffered — on the output thread every
round while a pulled-out device failed.
- Rule sets, patches and previews posted back to back are applied once, as the newest (a drag in
the rule editor posts the whole set each step), a snapshot is taken only by a command that
changes what it holds, and a flood of presses past 1024 waiting is refused and counted.
- The input's supervision — the watchdog, ASIO reset and rate events — also runs from a Windows
timer that a file dialog, the system menu or a message box goes on serving, where Slint's timers
stop: a rate change met while IMPORT's dialog was open waited until it closed.1 parent 3e78ab3 commit d8c7e67
24 files changed
Lines changed: 945 additions & 40 deletions
File tree
- src
- cli
- core
- control
- engine
- output
- rt
- ui
- tests
- engine
- output
- ui
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
1202 | 1203 | | |
1203 | 1204 | | |
1204 | 1205 | | |
1205 | | - | |
1206 | | - | |
1207 | | - | |
1208 | 1206 | | |
1209 | 1207 | | |
1210 | 1208 | | |
| |||
1232 | 1230 | | |
1233 | 1231 | | |
1234 | 1232 | | |
| 1233 | + | |
| 1234 | + | |
| 1235 | + | |
| 1236 | + | |
| 1237 | + | |
1235 | 1238 | | |
1236 | 1239 | | |
1237 | 1240 | | |
| |||
1505 | 1508 | | |
1506 | 1509 | | |
1507 | 1510 | | |
| 1511 | + | |
| 1512 | + | |
| 1513 | + | |
1508 | 1514 | | |
1509 | 1515 | | |
1510 | 1516 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
| 174 | + | |
174 | 175 | | |
175 | 176 | | |
176 | 177 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
| 54 | + | |
| 55 | + | |
53 | 56 | | |
54 | 57 | | |
55 | 58 | | |
| |||
77 | 80 | | |
78 | 81 | | |
79 | 82 | | |
| 83 | + | |
80 | 84 | | |
81 | 85 | | |
82 | 86 | | |
83 | 87 | | |
84 | 88 | | |
| 89 | + | |
85 | 90 | | |
86 | 91 | | |
87 | 92 | | |
| |||
92 | 97 | | |
93 | 98 | | |
94 | 99 | | |
| 100 | + | |
95 | 101 | | |
96 | 102 | | |
97 | 103 | | |
| |||
140 | 146 | | |
141 | 147 | | |
142 | 148 | | |
| 149 | + | |
143 | 150 | | |
144 | 151 | | |
145 | 152 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
87 | 94 | | |
88 | 95 | | |
89 | 96 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
27 | 35 | | |
28 | 36 | | |
29 | 37 | | |
| |||
32 | 40 | | |
33 | 41 | | |
34 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
35 | 48 | | |
36 | 49 | | |
37 | 50 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
76 | 85 | | |
77 | 86 | | |
78 | 87 | | |
| |||
96 | 105 | | |
97 | 106 | | |
98 | 107 | | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
99 | 113 | | |
100 | 114 | | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
101 | 120 | | |
102 | 121 | | |
103 | 122 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
3 | 5 | | |
4 | 6 | | |
5 | 7 | | |
| |||
57 | 59 | | |
58 | 60 | | |
59 | 61 | | |
| 62 | + | |
60 | 63 | | |
61 | 64 | | |
62 | 65 | | |
| |||
81 | 84 | | |
82 | 85 | | |
83 | 86 | | |
| 87 | + | |
84 | 88 | | |
85 | 89 | | |
86 | 90 | | |
| |||
92 | 96 | | |
93 | 97 | | |
94 | 98 | | |
| 99 | + | |
95 | 100 | | |
96 | 101 | | |
97 | 102 | | |
| |||
108 | 113 | | |
109 | 114 | | |
110 | 115 | | |
| 116 | + | |
111 | 117 | | |
112 | 118 | | |
113 | 119 | | |
| |||
123 | 129 | | |
124 | 130 | | |
125 | 131 | | |
| 132 | + | |
126 | 133 | | |
127 | 134 | | |
128 | 135 | | |
| 136 | + | |
| 137 | + | |
129 | 138 | | |
130 | 139 | | |
131 | 140 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
3 | 5 | | |
4 | 6 | | |
5 | 7 | | |
| |||
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
| 32 | + | |
30 | 33 | | |
| 34 | + | |
31 | 35 | | |
32 | 36 | | |
33 | 37 | | |
34 | 38 | | |
35 | 39 | | |
| 40 | + | |
36 | 41 | | |
37 | 42 | | |
38 | 43 | | |
| |||
0 commit comments