Rough frequency analysis

Hello. I want to drive visuals using energy in different frequency bands for a given unity event instance. I only need very rough granularity (lows, mids, highs). Typically, frequency analysis would be done using FFT, but this overkill and not really feasible given performance constraints. I’m looking into using a set of three simple (biquad or similar) DSP filters, then use getMeteringInfo to have an estimate for each frequency band. A few questions:

Thanks for any help or guidance

If you only need low granularity, filtering the signal and obtaining metering info for each band would probably be the best option.

Yes, you can do this by either by using Send DSPs, or by outputting to multiple DSPs using DSPConnections. You can then connect the filter DSP for each band back to the signal chain at a later point, but mute their output with DSP::setWetDryMix to ensure they don’t contribute to the mix.

The dsp_effect_per_speaker Core API example included with the FMOD Engine installer should serve as an example of how to go about outputting to multiple DSPs like this.

You won’t need to create 3 channels for each sound, but you will need to create the 3 filtering DSPs, and set each of them up to receive a signal, filter, and so on for a given sound.

3EQ or Multiband EQ should both work for your purposes - 3EQ is probably a little simpler to interact with and match crossovers, while Multiband is more flexible.

Thanks for all this info, really useful. Got it working with the send/return and using wet/dry mix to avoid the filtered signals contributing the the mix.

1 Like