We are trying to set up a system where we can have areas defined that have a certain reverb applied to any events playing in that area and also apply DSP lowpass/hipass effects to events when heard from a different area. I see that fmod can create area specific reverb or eventreverb objects but these are restricted to affecting sounds in a sphere of influence, we are thinking of all sounds in a specific volume that we create being affected. So my first thought was to put all of the event instances that we determine are in an area that we are interested in into a channelgroup, which we can then set reverb properties on.
However, from what I can understand from the documentation, it seems that when working with the event system that there are already channelgroups set up based on the eventcategory structure and that you can’t have a sound in two channelgroups. So if I was to put a gunshot sound into our “reverbarea1” channelgroup say, it would be removed from our “master/sfx/weapons” channelgroup and no longer be affected by the sfx volume that we’d decided upon? Is there a way to affect a group of sounds that ordinarily have no relation to each other with the same reverb, while still being able to control their categories in the normal way? I notice that you can set reverb properties on individual channels/events but I would guess that this is quite an expensive way of doing things on a large number of sounds or does it not make much difference?
If we can find some way of doing something like this, I’ve also run into the problem of how to affect multiple sounds with one low pass dsp effect but with different amounts of the effect applied, like a reverb wet and dry level but for effects on individual sounds. Reading the documentation it sounds like using the DSPConnection class is the way to do this but I can’t really find any good information on how this would work in practice? I assume all channels will have a DSPConnection to the channel group they are in at least; would they have to have multiple connections to a separate DSP filter so that I could set the mix on both of them depending on how much of the sound we want to filter? Also is there anything more event system centric for doing this or would I have to dig into the event playing to get its channels?
You may be able to tell that this sounds like it’s for an occlusion system, which it is and I’m aware of the ability to set the occlusion amount on events, which will result in some filtering of the sound. We could use that but I’d like to investigate this idea first, so that we can have complete control over occluded sounds, modifying the cutoff of a low pass filter depending on the density of the material it is passing through etc.
Any code snippets to help explain some of this better would be most apprecitated, especially how to get different sounds routed through a dsp effect with different mix levels.
- identitycrisisuk asked 8 years ago
- You must login to post comments
you can’t have a sound in 2 channelgroups that is correct. You could try having effect sends, from the event to pre defined DSP filters that are simply added to the System dsphead with DSP::addInput (so by default the effects themselves have no inputs).
When you get an event, get it’s channelgroup, then get the channelgroup’s dsp, then do a DSP::addInput using the effect as the source, and the channelgroup’s dsp as the input.
That will set up a new path from the event to the effect.
Note that this would make it twice as loud, so you have to multiply the event’s volume by the inverse of the effect link’s volume.
ie fully dry = event volume = 1.0, wet link = 0.0
fully wet = event volume = 0.0, wet link = 1.0
If you do that category volumes will not work, and to scale the event volume you would have to do a getOutputByIndex using 0 as the index, from the event channelgroup’s dsp.
In each case you use DSPConnection::SetMix to control the volume of the link.
This is just a quick overview I can go into more detail if you want it and answer any questions about it.
- You must login to post comments
Please login first to submit.