How can I get current position in DSP chain?

I did all the thing I can do, and I frantically search all functions. But No way to get the current position in DSP processing.

I want to check Beat with this. Is there any way?

Next is prototype of DSP function, in which I have to pick out beat position.

[quote]void* F_CALLBACKAPI BeatDetectionCallBack(void *originalbuffer, void *newbuffer, int length, int param) [/quote]

  • You must to post comments

Sorry. I’m not english native. So I’m not good at english.

I did enveloping, rectifying, differentiation, combfiltering at “BeatDetectionCallBack”. So. I got a information about where is strongest beat, And BPM.

My current problem is pick the position of the strongest beat. ( should be signal out when the just time of Beat Sound Out Timming. So I used FSOUND_Stream_SetSyncCallback for this.)

I’m currently doing that really crude way.

FSOUND_Stream_GetTime(song[0].stream) * 441/10 + 44100*-3 + 44100 * 5 * maxAmplitudePosition / beatDetectionBufferLegth, NULL);

I made “beatDetectionBuffer” which has 43*5 element. which cover 5 sec. I choosed “FSOUND_Stream_GetTime” because I think It returns the playing Position of current stream.

44100-3 means -3 sec samples.
5 means 5 sec samples. -3 ~ 2( this 2 sec means the latency brette said)

maxAmplitudePosition / beatDetectionBufferLegth is relational position of beat in 5 sec beatDetectionBuffer.

Really Crude way! And Please tell me otherway if there are.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.