Playing a song and accessing its spectrum data


(Ben) #1

Hi guys, I know this is an incredibly noobish question so I hope you’re patient with me - I just cannot find the resources on this.

I am using UE4 and I have the fmod plugin installed.
Ideally using blueprints, I wanted to play a song using the FMOD plugin (not 3d positional or anything) and access its spectrum data as it’s playing.

I remember many years ago (2010) FMOD could run an FFT over the audio playing with a given window size and this information was available in the C++ library back then - but I simply cannot find a way to make this happen in UE4s blueprints. Do I need to use FMOD Ex for this?

Any help would be very, very, very appreciated :slight_smile:

Thank you!


(Brett Paterson) #2

If you using the low level API and System::createDSP, you can create a DSP with the FMOD_DSP_TYPE_FFT type, and add it with ChannelGroup::addDSP command (a channelgroup can be retrieved from an eventinstance or a businstance) You can then grab the spectrum of a bus using DSP::getParameterData