I have to create realistic engine sound for traffic noise simulation (yes, another engine sound post 😕 ).
I use three samples (low, med, high) for this. I know using more samples would probably be better, but apparently it’s hard to find (non race-car) engine samples.
For engine stress I’m planning to use fixed coefficient high- and low-pass butterworth IIR filters, scale the high frequencies according to acceleration and finally add the two buffers together. In the code samples the input buffer is left untouched and “userdata” is the new buffer that gets returned, this would be a good way since I can use the input and history output to calculate the new output. But I need two separate buffers…
Another thing I was wondering about is how to get the acceleration parameter in the dsp unit for scaling the high frequencies. The filter needs to be applied to several cars at the same time, but with different acceleration parameters of course. For engine sound I use FSOUND_PlaySoundEx and FSOUND_SetLoopMode(channel,FSOUND_LOOP_NORMAL) and crossfade between 3 samples.
Also, do I need to worry about stereo interleaving? I use 3D sound for passing cars so the samples are mono. On top of that I use EAX reverb, but I don’t know if this has any effect on my own filters.
edit: I use FMOD 3.74
- KO asked 11 years ago
- You must login to post comments