How do i Fade out audio in C3 ?

Get help using Construct 3!

Post » Tue Sep 19, 2017 12:57 pm

Is there a way to do it?
B
5
Posts: 25
Reputation: 271

Post » Wed Sep 20, 2017 3:10 pm

@chrisyamao

To fade out a sound:

add a tag "volume" to the play action for the sound
add the following global variables and starting values:
vol -10
volMax -10
volMin -50
fadeRate -0.5

Every tick:
System|set vol to clamp(vol+fadeRate,volMin,volMax)
Audio|set volume: tag: "volume" dB: volume

You can adjust the fadeRate to change the speed and direction of the fade.

To fade out all sounds:

Every tick:
System|set vol to clamp(vol+fadeRate,volMin,volMax)
Audio|set master volume: dB: volume
B
22
S
9
G
4
Posts: 476
Reputation: 4,327

Post » Wed Sep 20, 2017 6:32 pm

yeah you have to code it manually...

I'm sure Rex has a plugin for it though..
B
100
S
33
G
16
Posts: 1,204
Reputation: 16,865

Post » Thu Sep 21, 2017 2:49 pm

mekonbekon wrote:@chrisyamao

To fade out a sound:

add a tag "volume" to the play action for the sound
add the following global variables and starting values:
vol -10
volMax -10
volMin -50
fadeRate -0.5

Every tick:
System|set vol to clamp(vol+fadeRate,volMin,volMax)
Audio|set volume: tag: "volume" dB: volume

You can adjust the fadeRate to change the speed and direction of the fade.

To fade out all sounds:

Every tick:
System|set vol to clamp(vol+fadeRate,volMin,volMax)
Audio|set master volume: dB: volume



thanks a lot!
B
5
Posts: 25
Reputation: 271

Post » Fri Sep 22, 2017 10:33 am

You're welcome :)
B
22
S
9
G
4
Posts: 476
Reputation: 4,327


Return to How do I...?

Who is online

Users browsing this forum: No registered users and 1 guest