a-delay: BPM is independent of the meter (quarter notes / min)

This commit is contained in:
Robin Gareus 2021-03-28 18:16:34 +02:00
parent 8fbde5860d
commit 7ea1b7c3c2
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
1 changed files with 2 additions and 1 deletions

View File

@ -450,7 +450,8 @@ run(LV2_Handle instance, uint32_t n_samples)
if (recalc) {
lpfRbj(adelay, adelay->lpfold, srate);
if (*(adelay->sync) > 0.5f && adelay->bpmvalid) {
*(adelay->delaytime) = adelay->beatunit * 1000.f * 60.f / (adelay->bpm * *(adelay->divisor));
/* quarter notes / min : 4 qn * 1000 ms/s * 60 s/min = 24k */
*(adelay->delaytime) = 240000.f / (adelay->bpm * *(adelay->divisor));
if (*(adelay->dotted) > 0.5f) {
*(adelay->delaytime) *= 1.5;
}