Author Topic: Live BPM detection  (Read 976 times)


  • Posts: 1
Live BPM detection
« on: 12 Sep '11 - 21:30 »
Hello everyone!

I'm trying to modify the BPM example from BASS FX to be able to display BPM value and run peak detection on the "Stereo Mix" in real time (just like the livespec example).
I thought I was very familiar to BASS but I don't have any clue on how to do it in Delphi (or even if it is possible)...

I would really appreciate any help...

Thanks in advance,



  • Guest
Re: Live BPM detection
« Reply #1 on: 20 Mar '12 - 16:13 »
Is it possible to get BMP from  a microphone? Normal code from example doesn't work, there is a BASS_POSITION_ERROR.
I want to record the music from the microphone and generate a some new object (OpenGL) depending on BPM and Fourier (i did the Fourier) from microphone. I think, there is a problem with the star and the end second. "hBPM" is stream from microphone.

Code: [Select]
QWORD pos=BASS_ChannelGetPosition(hBPM, BASS_POS_BYTE);
 double secs=BASS_ChannelBytes2Seconds(hBPM, pos);
BASS_FX_BPM_DecodeGet(hBPM, secs, secs+5, 0, BASS_FX_BPM_MULT2 , 0);
When i change it to more suitable code (i can't have a music from the microphone from now to 5 seconds ahead), a error is BASS_ERROR_ILLPARAM
Code: [Select]
BASS_FX_BPM_DecodeGet(hBPM, secs-5, secs, 0, BASS_FX_BPM_MULT2 , 0);
I don't really know, how stream contain after recording music from microphone.
I know, that there are couple of algorithm, which can detect BMP from Fourier. But this the hard way, maybe sb know the easy way?

Thanks in advance.