Fade music in Construct 2?

Get help using Construct 2

Post » Thu May 24, 2012 10:39 am

First of all, Construct 2's the best! This is the only program I know where you can make a full game in just a few minutes!

Anyway, I know it's a noobish question for you guys (I'm still quite new at this), but I've been searching on the forums how to do just that -- sadly, the only solution found applies only for Construct Classic.

Any help would be appreciated!
B
3
Posts: 3
Reputation: 356

Post » Thu May 24, 2012 11:07 am

Extract from the how do I FAQ (sticky in that forum) section "Audio" :
[quote]Volume control on a sound played - LINK[/quote]

This is for sounds, but should also apply to music.

Also to fade it, use the lerp expression (also explained in the how do I FAQ).Kyatric2012-05-24 11:08:43
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 7,000
Reputation: 57,795

Post » Thu May 24, 2012 12:09 pm

[QUOTE=Kyatric] Extract from the how do I FAQ (sticky in that forum) section "Audio" :
[quote]Volume control on a sound played - LINK[/quote]

This is for sounds, but should also apply to music.

Also to fade it, use the lerp expression (also explained in the how do I FAQ).[/QUOTE]

I did try that, but I don't have any idea how to implement lerp into Soundvol. I attempted adding a 'lerp (-40, 0, 2*dt)' to the 'add to' action for variable Soundvol, but it didn't work. Any ideas?
B
3
Posts: 3
Reputation: 356

Post » Thu May 24, 2012 4:06 pm

guess you should set the new value, instead of adding it.xeed2012-05-24 16:06:27
B
15
S
3
G
5
Posts: 396
Reputation: 4,977

Post » Thu May 24, 2012 4:29 pm

LERP volume fading audio capx exampleKyatric2012-05-24 16:29:24
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 7,000
Reputation: 57,795

Post » Thu May 24, 2012 5:14 pm

Thanks a lot! :D
B
3
Posts: 3
Reputation: 356

Post » Fri May 25, 2012 7:24 am

Thanks for example Kyatric .... really interesting ... hummm ... HAVE SOMEONE a formula for doing a Rlerp (Reverse Lerp) ... the fade out is really to fast !!

This give me a idea to improve this example :

-> With a jungle sound only on right stereo channel
-> And the same jungle sound only on left stereo channel

Seems easy to create a 2D positionnal system ajusting volume on the two channels no ?

I don't have tools to do this sounds but i'm really ready to create a bigger example with this 2D features !

naelian2012-05-25 07:24:54
B
16
S
5
G
3
Posts: 298
Reputation: 5,240

Post » Fri Jan 03, 2014 9:35 pm

@Kyatric Hi, I was just following this capx and I couldn't for the life of me work out what the number 40 was used for in the LoopVolume actions and conditions.

I was trying to modify this as to allow the music to start at -10, but really couldn't work out what was happening in the beginning - any help would be great :)
B
35
S
6
G
2
Posts: 121
Reputation: 3,585

Post » Fri Jan 03, 2014 10:52 pm

@Sean Noonan: Audio volume works in -10 (db) intervals.
-10 is half as loud as 0.

It's an old example so I can't remember exactly what the thought process was, but I think through trial and error that -40 ended up being a true "no sound volume anymore".
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 7,000
Reputation: 57,795

Post » Sat Jan 04, 2014 8:31 am

@Kyatric

I thought Ashley mention the true absolutely no sound to be -99.

When I put my computer and amplifier at max, I found -40 still audible and only -99 to produce no sound.

Just my experience.
B
36
S
18
G
11
Posts: 248
Reputation: 8,694

Next

Return to How do I....?

Who is online

Users browsing this forum: Zebbi and 27 guests