For my project, I need to draw the waveform of an audio file.
Ofgetspectrum is unavailable on embedded platform, and I thought to use ofxfft, but it seems to take an audio stream/buffer at source, and for what I seen we can’t pass from an audio player to an audio buffer/stream ( if I’m wrong, thanks to correct me).
So, how can I draw an audio file waveform, without playing it ?
I thought to use a third party software, like PureData, but I would like to keep it in of, as I will already use another software in background.
But now I have another question, except by playing with the speed parameters, how can I use it for draw the waveform in a second thread, at an accelerated speed, in fact the fatest possible as the rpi can ?
I think you mean spectrum, but this will draw the wav image. I needed something simple and reusable. xFactor is just the height (should really be yFactor).
Hey!
I haven´t tried ofxSoundObjects on the rpi.
As far as I can remember, OF on linux uses soundfile lib and not mpeg123. Not really sure.
You can safely remove the libs directory of ofxSoundObjects, as it only contains libaudiodecoder which is for win and mac.
The mpg123 error is because you are not adding the mpg123 lib. Take a look at ofxSoundFile. you could maybe force to undefine OF_USING_MPG123 so to avoid using it or add this lib correctly. Are the regular sound examples working on the raspi?
best
@arturo is this modification to ofxSoundFile.h something that I should apply and commit to the ofxSoundObjects repo or is it just a fix for this particular issue?
best!