How do I make an accelerating engine sound?

Get help using Construct 2

Post » Sat Jun 11, 2016 9:32 pm

Trying to set the engine sound to match speed of car. Any help would be appreciated
B
21
S
6
Posts: 58
Reputation: 1,385

Post » Sun Jun 12, 2016 1:25 am

Just use the audio object and change pitch
Using R243 for all examples
B
69
S
20
G
6
Posts: 379
Reputation: 9,699

Post » Tue Jun 21, 2016 1:11 am

I don't see pitch anywhere
B
21
S
6
Posts: 58
Reputation: 1,385

Post » Wed Jun 22, 2016 12:50 am

You do it by setting the playback rate to different numerical values.
Using R243 for all examples
B
69
S
20
G
6
Posts: 379
Reputation: 9,699

Post » Sat Jul 02, 2016 2:13 am

Thanks, found the playback rate but I cannot figure out how to set it to the car speed? Any ideas..tried for a very, very long time to figure it out and can't
B
21
S
6
Posts: 58
Reputation: 1,385

Post » Sat Jul 02, 2016 3:19 am

@lovjc7

it would help to have a test capx file to look at, otherwise you are only going to get vague suggestions...

but what you want to do is "scale" the speed to a range of playback rates.

so, in the Set Playback Rate action, you would set Playback rate to:

1.0 * car.Platform.Speed / car.Platform.MaxSpeed


obviously, that is assuming you are using the Platform behavior. Also, you would have to find what range of rates sound good with the sound effect you are using - what would be the minimum rate and what would be the maximum.

if the minimum rate you want is 0.5 and the maximum is 1.4, then you would need to set the rate to:

0.5 + 0.9 * Sprite2.Platform.Speed / Sprite2.Platform.MaxSpeed

or as a general function: set playback rate to: min rate + (max rate - min rate) x current car speed / max car speed

you might want to adjust the volume of the engine sound by scaling it in a similar way...
B
94
S
33
G
20
Posts: 438
Reputation: 17,615

Post » Thu Jul 21, 2016 3:22 am

Wow!..I feel like you just gave me some gold..thanks alot. I'll give it a try
B
21
S
6
Posts: 58
Reputation: 1,385


Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go, Allardje, R0J0hound, Rudi55, sublimate, Vinterstille and 1 guest