How do I make music finish before stopping playback?
Quote from portal2companioncube on May 14, 2014, 9:47 pmI want to have music in my map change over time with some triggers. However, I want the previous track to finish before the next track starts. I have several ambient_generics to play the music, but how do I get one to finish playback before stopping and the new one to start when the previous one finishes? I thought of doing delays, but different players go through the map at different speeds. What should I do?
I want to have music in my map change over time with some triggers. However, I want the previous track to finish before the next track starts. I have several ambient_generics to play the music, but how do I get one to finish playback before stopping and the new one to start when the previous one finishes? I thought of doing delays, but different players go through the map at different speeds. What should I do?
Quote from TeamSpen210 on May 14, 2014, 10:16 pmMaking/editing the soundscript for the music could help do want you want to do (not sure how you want the music to change.) Valve uses it to synchronise things like the multi-part laser music tracks, the gel music tracks with the main track and things like that. Are the different tracks entirely separate songs, or parts/variations of one track?
Making/editing the soundscript for the music could help do want you want to do (not sure how you want the music to change.) Valve uses it to synchronise things like the multi-part laser music tracks, the gel music tracks with the main track and things like that. Are the different tracks entirely separate songs, or parts/variations of one track?
[spoiler]- BEE2 Addons | (BEE2)
- Hammer Addons
Maps:
- Crushed Gel
- Gel is Not Always Helpful[/spoiler]
Quote from josepezdj on May 15, 2014, 4:18 am@portal2companioncube: Apart from the soundscapes' operator_stacks that TeamSpen mentioned which are pretty complex, you could try to mount a system based in several ambient_generics and to fade them in and out.
Via some triggers, you can fire the FadeOut output to the first ambient_generic that is playing music. Don't forget to add a number of seconds in the 'With a parameter override of' output dialog box for the output to work out
Then use the FadeIn output on the 2nd ambient_generic to be played.... and so on. Go changing the number of seconds for each fade in-out in order to create a good transition between the 2 music tracks, avoiding any silence gap between them.
(Remember that you also have the Fade in and out properties into your ambient_generics where you can also set them to smooth the start/stop of yourr sound file)
Two Tips:
1. In order to cut out completely each music track, remember to add these 2 outputs to the triggers for each of the sounds played after you know the fade out has ended up:
- OnTrigger > [ambient_generic_name] > Volume 0
- OnTrigger > [ambient_generic_name] > StopSound2. Remember to:
- Tick the flag "Play everywhere" on your ambient_generics in the case you want them to be the main music sound.
- Untick the flag "Is NOT looped" in order to make your sound to resume playing after a quickload/loadgame.
@portal2companioncube: Apart from the soundscapes' operator_stacks that TeamSpen mentioned which are pretty complex, you could try to mount a system based in several ambient_generics and to fade them in and out.
Via some triggers, you can fire the FadeOut output to the first ambient_generic that is playing music. Don't forget to add a number of seconds in the 'With a parameter override of' output dialog box for the output to work out
Then use the FadeIn output on the 2nd ambient_generic to be played.... and so on. Go changing the number of seconds for each fade in-out in order to create a good transition between the 2 music tracks, avoiding any silence gap between them.
(Remember that you also have the Fade in and out properties into your ambient_generics where you can also set them to smooth the start/stop of yourr sound file)
Two Tips:
1. In order to cut out completely each music track, remember to add these 2 outputs to the triggers for each of the sounds played after you know the fade out has ended up:
- OnTrigger > [ambient_generic_name] > Volume 0
- OnTrigger > [ambient_generic_name] > StopSound
2. Remember to:
- Tick the flag "Play everywhere" on your ambient_generics in the case you want them to be the main music sound.
- Untick the flag "Is NOT looped" in order to make your sound to resume playing after a quickload/loadgame.