PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Looking for a frequency-domain sound library

Is there any such thing out there? It seems that all the sound libraries (including FMOD) are mixing sound in the temporal domain.

This doesn't allow sound effects to be easily implemented / mixed.
which effects do you have in mind that can be easier done in frequency domain?

i think that FMOD is quite close to perfect. so i'd be interested in what you are missing... :)

bye,
DANIEL
I was thinking stuff like Doppler effects and 3D panning... But I just read some more on www.fmod.org and they support that. MMmm...

I must admit that my experience with sound is pretty limited... But I do know that all of our games (Homeworld2, Impossible Creature, Warhammer 40K, NSP4) are all doing stuff in the frequency domain.

At one point we were looking for a sound library and I suggested FMOD, having heard how good it was and all that. One knowledgeable programmer told me that FMOD was not even under consideration because it couldn't handle the frequency domain. His main reason was that it was a requirement for some of the sound FX we were doing. I assumed (perhaps wrongly) that the sound FX were Doppler, 3D panning and so on. I think he also mentionned something about WAV/PCM files taking way too much space.

I guess I will have to ask him more details =)
Did some research and it all make sense now: it is much faster to calculate convolution in the frequency domain (hell, I am not sure it can be done otherwise).

Game Programming Gems II mention that it is faster to convert your signals to the frequence domain and use the FFT.

For those who don't know, convolution is a mathematical operation. In the case of sound mixing, the convolution is used to fake 3D audio positioning and modify the "ambiance". Think playing your sound in a cathedral or a stadium and having the mixer figure it all out.

So yeah, I am still looking for such a sound engine. Anything?
If you dont have that many taps, you are better off with doing convolution in time domain. I dont know exactly where the break even point is though.

You can estimate the runtime of convolution in time domain as k MAC operations per output sample, where k is your FIR length.

In frequency domain convolution is only a multiplication per sample but the runtime of FFT is O(k log k) or c*log k operations per output sample.

Given k is large enough, k will be eventually exceed c* log k, until then you better do convolution in time domain.