Crossfading Audio

Get help using Construct 2

Post » Sat Nov 09, 2013 12:05 pm

Hey!

I'm having some trouble figuring out how to crossfade audio with events, crossfading is a process where as one audio file fades out another one fades in. I need to be able to control the length of the crossfade, and if possible the 'type' of crossfade too. It's quite a core audio feature that many people will find useful.

Here's an image to demonstrate:



Thanks!
B
44
S
13
G
8
Posts: 622
Reputation: 7,417

Post » Sun Nov 10, 2013 2:07 pm

If you know the maths to plot these , you could probably had a function handle it - adjusting the volume for each sound/music tag independently, but I don't think there's an expression/action on Construct2 for it yet.

Would be very useful though, fading between level music and boss/ending music. :D
Image
B
27
S
9
G
5
Posts: 489
Reputation: 11,950

Post » Sun Nov 10, 2013 2:50 pm

Had a quick go, this example is just a straight angular move from one to the other, without any fancy curves.

http://johnnysix.net/games/xfade/

Download capx

http://johnnysix.net/games/xfade/xfade.capx


( forgot the @CrudeMik )
JohnnySix2013-11-10 14:50:36
Image
B
27
S
9
G
5
Posts: 489
Reputation: 11,950

Post » Sun Nov 10, 2013 3:20 pm

@JohnnySix

That's awesome thanks so much.

Now I just got to figure out how to use this to control engines...this is gonna be one hell of an event sheet haha.

Official crossfade support shouldn't be too hard to integrate, here's hoping we can do this soon :)
B
44
S
13
G
8
Posts: 622
Reputation: 7,417

Post » Fri Mar 14, 2014 2:15 am

Before crossfades... it would be cool to have some audio fade in/out behaviors. And add linear as well as other fade line shapes..

how do we put this on the wish list?
B
100
S
33
G
16
Posts: 1,204
Reputation: 16,865


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 6 guests