ofSoundGetSpectrum on an ofSoundStream?


I’m an utter newbie to openframeworks and c++, seasoned actionscripter tho.

I’m hoping to be able to do something with spectrum analysis on an audio stream from mic input - there are examples in the distribution for both audioInputExample, and soundPlayerFFTExample, and what I’m wondering is how I can audioInputFFT , so to speak - my crude attempts to merge code from both into one doesn’t work, and I’m wondering if fundamentally a soundStream is different to a soudPlayer and doesn’t have the getSpectrum method available to it? Or if it does, then maybe it’s just that I need to get a firmer grasp of c++ and openframeworks fundamentals in order to write the correct logic.

If anyone can shed any light on this issue I’d be hugely grateful - can I get the spectrum of a stream, and what would be the approach?

Many many thanks


also, is ofSoundSetUseSpectrum deprecated? the docs says you must set this before calling ofSoundGetSpectrum, yet when I set it, I get error message
‘ofSoundSetUseSpectrum’ was not declared in this scope…

…and certainly no such method exists in either ofSoundPlayer, or ofSoundStream, tho its ofSoundStream I’m really concerned with.

so I’m scratching my head and wondering if I need to get deep in the bowels of RTAudio and figure out how a person would go about doing spectral analysis on RTAudio

what am I missing? is getting the spectrum of a stream easy and I’m being dumb? or is it as it seems, and that getting spectrum of a stream is not currently implemented? and am I the only person who wants to get the spectrum of a stream? surely someone else has done this/wants this?



I’m on the same way, you could use

But the spectrum will not be as you expect… have a look.
I had an old conversation
about that and began something around bark and logscale.

It’s approximative and i’m now also looking for a better solution.