I have a wave file. I go through 1025 bytes samples and read the wav
std::vector<float> floatVect[ 1024 ];
while (inFile->eof() == 0) {
// Read a chunk of samples from the input file
num = inFile->read(shortBuffer, BUFF_SIZE);
samples = num / nChannels;
//// here we calculate FFT with AccelerateToolbox in output vector
////// short int shortBuffer go to FFT samples in output
///// now convert to float
for(int i=0;i<samples;i++) {
float fSample = output[ i ] / 32768.0f;
floatVect->push_back(fSample); //// <---- push to the float vector
}
}
/// calculate BPM
bpmDetect->process( inFile->getLengthMS()/1000.0f, *floatVect);
bpm = bpmDetect->winning_bpm;
bpmDetect->reset();
inFile->rewind();
The resulting bpm is always bpm = 0.
Is that right to accumulate the float samples from the FFT and then pass the vector to the process() method with the wav duration expressed in seconds ?
I have a wave file. I go through 1025 bytes samples and read the wav
The resulting bpm is always bpm = 0.
Is that right to accumulate the float samples from the FFT and then pass the vector to the process() method with the wav duration expressed in seconds ?