Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / [SOLVED] Changing the Sound Rate for a motor sound

Author
Message
Nickkall
7
Years of Service
User Offline
Joined: 19th Jul 2017
Location: Sydney, Australia
Posted: 18th Aug 2018 02:31
Hello Everyone.

I have been trying to work out how to change the note of a sound to mimic a car engine.

I have been trying to muck around with the SetSoundInstanceRate command but it sounds all synthesised.



I have an engine loop wav file 3 seconds long but I want to change the sound in the main loop according to the revs of the engine.

Doing this just plays a new sound together with the ones already playing from the previous loop.

I have also tried stopping the current sound at the start of the loop and then begin a new sound with the new rate. But this sounds jerky.

I would like to know if there is a way of changing the Rate (or pitch) of the sound that is already playing.

Does anybody know how this can be achieved?

Thank you for reading.

Nick

The author of this post has marked a post as an answer.

Go to answer

Bengismo
6
Years of Service
User Offline
Joined: 20th Nov 2017
Location: Yorkshire, England
Posted: 18th Aug 2018 02:49 Edited at: 18th Aug 2018 02:50
This post has been marked by the post author as the answer.
You almost had it working already i think. You dont need to start playing a new sound to change its playing rate, you can just alter the one you were already playing like this



This way just one sound plays and its playback rate (pitch) is altered.
Nickkall
7
Years of Service
User Offline
Joined: 19th Jul 2017
Location: Sydney, Australia
Posted: 18th Aug 2018 03:07
You Legend Bengismo.

Thank you very much.

Login to post a reply

Server time is: 2024-09-30 19:25:48
Your offset time is: 2024-09-30 19:25:48