[Request / Suggestion] Random sound pitch

Discussion and feedback on Construct 2

Post » Sat Jan 31, 2015 5:28 pm

A way to control the sounds pitch would have been really useful. Especially sounds that are used more often than others, like gunshots for example. It will quickly start to sound a bit static to listen to the exactly same tone over and over.

Request / Suggestion:
- Can set the sound to play at a RANDOM pitch value everytime it is being played.
- Can set the sound to play at a STATIC pitch value everytime it is being played.
- Can set a number value on how much the sound should pitch up and/or pitch down.
B
11
S
2
Posts: 23
Reputation: 788

Post » Sat Jan 31, 2015 5:35 pm

Have a look here (Audio Effects):

https://www.scirra.com/manual/109/audio

I think more HTML5 doesn't allow for now. But for short sounds you can
provide different versions without having too big files. Put three sounds in
one file, then chose the playing position with code. (with "Seek to")
Last edited by Chupup Games on Sat Jan 31, 2015 5:36 pm, edited 1 time in total.
B
11
S
2
Posts: 213
Reputation: 1,266

Post » Sat Jan 31, 2015 5:35 pm

You can get more or less achieve this by setting the playback rate to something like 0.8 + random(0.4)
Image
B
242
S
29
G
13
Posts: 1,787
Reputation: 18,685

Post » Sat Jan 31, 2015 6:31 pm

Tokinsom wrote:You can get more or less achieve this by setting the playback rate to something like 0.8 + random(0.4)


Ah, thank you for the clarifying! But, doesn't that also affect the speed of the sound?

Also, just found out about something called "Doppler factor" in Audio properties. Seem to be some sort of pitch controller. Unfortunately, it will affect all the sounds in the project.
B
11
S
2
Posts: 23
Reputation: 788

Post » Sat Jan 31, 2015 6:38 pm

Yes, that's exactly what it does...but if it's for small repeating sounds like foot steps, gun shots, etc. then you don't even notice it being shorter.

Alternatively you can make multiple versions of the sound using some program of your choice, name them Sound_1, Sound_2, etc., then use "Play by name" and append a random integer variable to the end...The first method is much easier though if you just want to change the pitch and not use different samples.
Image
B
242
S
29
G
13
Posts: 1,787
Reputation: 18,685

Post » Sat Jan 31, 2015 7:08 pm

Tokinsom wrote:Yes, that's exactly what it does...but if it's for small repeating sounds like foot steps, gun shots, etc. then you don't even notice it being shorter.

Alternatively you can make multiple versions of the sound using some program of your choice, name them Sound_1, Sound_2, etc., then use "Play by name" and append a random integer variable to the end...The first method is much easier though if you just want to change the pitch and not use different samples.


That's true! I'll have to give it a try.. I really don't want to make several sounds with varied pre-set pitch values. I think it's kind of a cheap solution, and also unnecessary.
B
11
S
2
Posts: 23
Reputation: 788


Return to Construct 2 General

Who is online

Users browsing this forum: jefftrier, vikuserro and 6 guests