Is there a way to effect the wet mix of a sound playing on a channel that has a reverb DSP attached somewhere down the line independently of the dry mix for that sound?
My sound designer are asking me for a way to basically play sounds with more or less reverb based on how far away the sound is from the player, i.e. a sound far away has very little volume, but the reverb is turned up, but if the sound is close, then the reverb is turned down and the sound has really high volume.
- werlkjh asked 9 years ago
Check out set3DOcclussion. Depending on how you are doing your reverb, that might just do the trick. You can also use it to add a lowpass filter to distant objects, which, for us, has been quite nice. You need to be sure to FMOD_INIT_SOFTWARE_OCCLUSION.
- audiodev answered 9 years ago
[quote="audiodev":yi9c3o5d]Check out set3DOcclussion. Depending on how you are doing your reverb, that might just do the trick. You can also use it to add a lowpass filter to distant objects, which, for us, has been quite nice. You need to be sure to FMOD_INIT_SOFTWARE_OCCLUSION.[/quote:yi9c3o5d]
From the docs:
All platforms – All FMOD_SOFTWARE with FMOD_3D based voices will add a software lowpass filter effect into the DSP chain which is automatically used when Channel::set3DOcclusion is used or the geometry API."
This seems like just a hack. I want a more direct way to do exactly what I’m saying. In the event editor there is an effect you can add that has a wet and dry parameter, and i assume that those are for the global reverb, but it’d be nice to have that same control for reverbs attached anywhere in the DSP chain. Even if I had to attach the reverb directly to the channel instaed of a channel group so that there is no intermediate mixer would be fine.
So here’s something else i was trying that isn’t working:
DSPConnection->setMix( .5f );
I thought that the point of FMOD::DSPConnection was to let you effect the DSP on the channel, but setting that mix also scales the volume of the actual sound. (the parameter to that function is called "volume" so I assume it’s volume of the DSP)
So I guess another related question is, what is the point of the DSPConnection if it messes with the dry mix as well?
on an arbitrary dsp unit if you want wet/dry you have to do it yourself, you would play a sound (ie a standard dry path), then have a separate dsp unit connected to system somewhere (via System::getDSPHead then sysdsphead->addInput(mydsp) ), then inside your playsound routine you would call mydsp->addInput(channel_dsphead).
channel_dsphead is retrieved from Channel::getDSPHead.
That connection between your dsp effect and the channeldsphead is the one you would call setMix on.
Note this gets complicated if there are virtual voices involved. Your connections will get disconnected behind your back. This is why we implemented the callback FMOD_CHANNEL_CALLBACKTYPE_VIRTUALVOICE to aid with this.
What Kyle is after though can be solved through using our Reverb API.
Channel::setReverbProperties allows you to set the wet/dry mix per channel for any number of reverbs.
Please login first to submit.