There was an error while loading. Please reload this page.
1 parent 7ec2fc9 commit f34d7d1Copy full SHA for f34d7d1
1 file changed
src/effects/backends/builtin/keycomparisoneffect.cpp
@@ -263,7 +263,12 @@ void KeyComparisonEffect::processChannel(
263
264
if (enableState == EffectEnableState::Enabling) {
265
if (shouldSync && hasBeatInfo) {
266
- // In sync mode, wait silently for the first beat.
+ // If the user enabled within the first quarter of a beat they
267
+ // were just a split second late — fire immediately so it feels
268
+ // like it started on the downbeat. Otherwise wait for the next beat.
269
+ const bool justMissedBeat =
270
+ *groupFeatures.beat_fraction_buffer_end < 0.25;
271
+ pGroupState->m_fireImmediately = justMissedBeat;
272
pGroupState->m_srcFramePos =
273
static_cast<double>(pianoSample.size());
274
pGroupState->framesSinceLastNote = pianoSample.size();
0 commit comments