#include <bpm.h>

Public Member Functions | |
| BpmCounter (FILE *l, stereo_sample2 *block, unsigned4 sample_length, int wavrate, float8 lower_boundary, float8 higher_boundary) | |
| ~BpmCounter () | |
| void | init (unsigned4 sample_length, stereo_sample2 *block, int wavrate, float8 lower_boundary, float8 higher_boundary) |
| float8 | measure () |
------------------------------------------- Imports ------------------------------------------- ------------------------------------------- Imports -------------------------------------------
| BpmCounter::BpmCounter | ( | FILE * | l, | |
| stereo_sample2 * | block, | |||
| unsigned4 | sample_length, | |||
| int | wavrate, | |||
| float8 | lower_boundary, | |||
| float8 | higher_boundary | |||
| ) | [inline] |
References init().
| BpmCounter::~BpmCounter | ( | ) |
References bpmdj_deallocate.
| void BpmCounter::init | ( | unsigned4 | sample_length, | |
| stereo_sample2 * | block, | |||
| int | wavrate, | |||
| float8 | lower_boundary, | |||
| float8 | higher_boundary | |||
| ) |
We calculate the length of an analysis block. We aim to include all frequencies starting from at least 50 Hz. If we start at 44100 Hz we must halve the value 11 times. Which means that we must have at least a buffer of 1<<11
Preparation of the Fourier windows, for every band we will have a separate plan available. All output is stored in the energy array, which is then used to compute the autocorrelation sequence
References bpmdj_allocate, fclose(), and FILE.
Referenced by BpmCounter().
| float8 BpmCounter::measure | ( | ) |
References assert(), bpmdj_allocate, bpmdj_deallocate, differentiate(), energize(), i, and normalize_abs_max().
Referenced by main().
1.6.2