I’ve never worked with real-time audio features.
I would like to know whether there are ruby libraries out there that would allow me to create something like a guitar tuner.
I’ve never worked with real-time audio features. I would like to know whether there
Share
There are two orthogonal tasks: 1) read the audio, 2) process it. To get the audio you could check ruby-audio though, to be honest, I’ve never used it and its documentation seems scarce. Personally I’d resort to whatever your operating system provides; for example in GNU/Linux we have handy tools like bplay. The second issue is how to calculate the FFT of audio, this should be easy with FFTW3.
Here is a quick and dirty example that gets the peak point of the FFT from stdin (16 bits, mono):
To be called, for example: