BTrack icon indicating copy to clipboard operation
BTrack copied to clipboard

A simple BTrack example

Open adv3006 opened this issue 7 years ago • 4 comments

Hi,

I'm having a little trouble on how to use your BTrack. Can you make a simple program using your BTrack?

I really appreciate it

adv3006 avatar Dec 21 '17 06:12 adv3006

Hi there,

I think the simplest explanation is on the README under "Usage - C++". Maybe try those steps and if you are having trouble i am happy to help! Let me know how you get on,

Thanks!

Adam

adamstark avatar Dec 27 '17 17:12 adamstark

Thanks for the reply,

I followed your instruction on the README, but part 3 is the part where I'm stuck. I don't know how to do with audio file like do something here to fill the frame with audio samples in Step 3.1 . It's my first time getting into audio analysis using C++

adv3006 avatar Jan 02 '18 18:01 adv3006

Ah, right. It kind of depends on your application - are you trying to build something that works in real-time? Or are you trying to detect beats in an audio file?

In short, you need to fill an audio frame (basically an array or vector) with audio samples. If it is real-time then some kind of audio callback based on whatever framework you are using will provide you with the samples. If it is an audio file then you want to copy chunks (e.g. 512 samples) into a frame at a time and pass it to the beat tracker.

adamstark avatar Jan 07 '18 23:01 adamstark

(if it is audio files you are working with I wrote a simple library here:

https://github.com/adamstark/AudioFile )

adamstark avatar Jan 07 '18 23:01 adamstark