Latest patch has fixed CompressorSoundEffect and added the SideChain property.
What is SideChain?
You can point it at another Sound or SoundGroup to have the SideChain-ed sound drive the Compression effect.
How is this useful?
It’s used for a ducking effect, where one sound will make the other “fade out”. The canonical example of this would be for a DJ voiceover - someone speaking on a mic would “duck out” the playing music.
How can I use it in my game?
You can use this to give your sound effects more “punch”.
If you’ve got a background music soundgroup, try ducking it out (using this CompressorSoundEffect) from your in-game SFX soundgroup.
If you do some sort of major audio cue in your game, try ducking out your background music and sound effects while that cue is playing. Think something like:
See it for yourself here:
And as always, post if you’ve got any problems or have something to share.
I think it’s that by pointing the SideChain toward a playing Sound or SoundGroup, the loudness of the playing Sound/Group directly affects the amount of the Compression effect that’s pointing at it, such that when the Sound/Group on the SideChain gets louder, the Sound/Group that the Compression effect is on gets quieter, at the same time.
So basically if one sound is super quiet and the next sound is super loud:
-Sound 1 sounds quiet
-As it nears the end it’s “loudness” increases/decreases to match the next sound’s “loudness”
-Sound 2 (super loud) now isn’t such a sudden and loud noise
More like:
-Sound 1 is playing, comfortable volume music
-Sound 2 is not playing, super ear screech jumpscare
-Sound 2 plays while Sound 1 is in the middle of playing at any point
-Sound 2’s loudness drowns out Sound 1, as opposed to playing on top of each other and becoming even louder
-Sound 2 stops playing, Sound 1’s volume returns to normal immediately
@spotco
The place you linked has the sound just stop like it freezes after messing around with the effects.
Equalizer, echo and pitch shift contribute a lot to the sound just stopping to play.
I don’t know if this is intended, I can provide some video tomorrow.
It’s a pretty silly memory leak in the sidechain code. This will be fixed. The audio error happens when the “Current” goes over the “Max” limit. This is visible in the diagnostics panel in studio.
I’ll probably add some analytics to this. If you see any other audio errors, check this first.