Perform Realtime Audio Analysis on Speaker Output

Currently, the FFTSpectrum example from the Sound library achieves the effect I’m looking for, but the sound it’s listening to is not. I want to know how to access the speaker output of my device and apply FFT to it in realtime, rather than the program listen to a provided sound file.

Do you mean you need mic example? If yes here is it

No, I’m looking to perform FFT on the sounds I play from my device.

Hello @BrandMChaos,

You can select devices as per example:

I added this to FFT example:

Sound s = new Sound(this, 44100, 3, 7, 1); < This will be different for your PC devices.

The Sound JavaDocs have details on the constructor:

Sound reference also has details on constructor:

:)

Same thing you can use mic sketch and at the same time on your PC you can use line in or microphone input to connect your music device with PC

I know that playing from the speakers and capturing with the mic is not the best option as you perhaps lose a big part of the low frequency band. However it’s a great way to test it quick and dirty, and I think it’s good that you brought it up. You can also use Voicemeeter on windows to virtually wire the output to the input

A further note…

I use “Stereo Mix” and have it enabled on my system.

:)