How to make sounds fade into each other?

Vecc

L1: Registered
Feb 11, 2017
26
13
So, a portion of a map i'm working on is meant to be a DJ room. I was wondering how to make it so that if you have sounds (in my case songs) fade into each other when another button is pressed.

Like, lets say song 1 is on button 1 and I hit/use it so it starts playing, but then I hit/use button 2 to start playing song 2 how am I able to have them fade into each other?

I experienced this fade stuff on RP_Unioncity a couple days ago and thought it'd be nice to have on my map too :eek:
 

SuperLuxDeluxe

L3: Member
Mar 13, 2021
118
271
ambient_generics DO have keyvalues for fade-in and fade-out time, but the entity overall is very buggy. The FadeIn and FadeOut inputs as far as I know don't work, but maybe the aforementioned keyvalues affect the Play and Stop inputs. Setting the volume with AddOutput and the Volume inputs is also pretty glitchy. There's also a limit to how many you can have before the sound engine gets corrupted. Take a look at the VDC page for ambient_generic, it's full of glitches.

Soundscapes naturally have fade transitions of a second or so that may be a better option?

That much being said I'm not very experienced with adding music to maps. You might get more informed responses from people in our Discord server.