1
QB64 Discussion / Re: HOW do i sample (not play) audio?
« on: April 30, 2020, 08:07:29 am »By chance does anyone have any idea / experience with what method is used to figure out frequencies?
Possibly similar to FFT?
I tried measuring every time the wave crosses 0, but that only works for the loudest frequency.
I tried measuring every peak and valley, but that only works for the smallest frequency.
Wondering what process would normally be employed if you want to know strengths of certain frequencies in the sound.
Crossing zero only works well with a single cycle style of waveform.
I have been porting over some of my own code that I made in C for one of my "Teensy 4.0" microprocessor into QB64; however, it is far from being ready to share as is it implements the Laplace Transform.
QB64 user "_vince" made a real nice clean sample of a fast algorithm for computing the DFT for N=2^k in QB64. He also list a optimization for real only input FFT in the same thread, take a look at his post in this link:
https://www.qb64.org/forum/index.php?topic=1938.msg111661;topicseen#msg111661
-MB