Code review comment for lp:~mixxxcontributors/mixxx/features_vamp

Revision history for this message
RAFFI TEA (raffitea) wrote :

hmmm just reviewed your BPM computation a second time. There might be some errors:

> The second one is by following the manual computation you did.
> If I understood, you are taking BPM=60/H as track bpm, where H is the harmonic
> mean of the distance between two beats in seconds.

Correct, this is valid if you measure the time between two subsequent beats.

For a beat grid of size N the BPM will be computed as follows:

BPM = N * SUM(60/H)
BPM = 60 * N * SUM (1/H) //hence a 4 beat count yield 240/<second to count for 4 beats>

You will start at beat number 2 to compute the time difference between beat 1 and 2 and so in.

=========================
double sum = 0;
FOR i=2 TO N STEP 1
  sum += 1/H
END FOR
sum = sum *60 *N

« Back to merge proposal