Discuss Scratch

townsendbrain
Scratcher
17 posts

motorcycle engine noise help DIFFICULT

http://scratch.mit.edu/projects/13626881/#editor <- link to my game
inside the “background” script is where the trouble lies.

ive come up with an algorithm for how often the “engine noise” gets played-which is dependent on the “acceleration” , simply the more acceleration-the more frequent the noise is played and the volume rises. The algorithm works pretty well but only if im using a simple “pop” sound effect.

The problem is i want something more realistic than a “popping” noise, but whenever i use a tiny clip of a real motorcycle engine sound effect, even copying and pasting it reversed i cant get the sound to overlap nicely. Its always botched haha

So please give me some suggestions as to what i can do to get a realistic and dynamic sound effect dependent on the “acceleration” variable in my game

and thanks for reading!
townsendbrain
Scratcher
17 posts

motorcycle engine noise help DIFFICULT

ive also tried using two realistic and short engine sound effects at the same time 180 degrees out of phase from one another in hopes of getting a smooth transition but no luck
blob8108
Scratcher
1000+ posts

motorcycle engine noise help DIFFICULT

Is your problem that if a sound file is already playing, using a “play sound” block with the same sound file cancels the existing sound (ie. restarts it from the beginning).

I think you need to choose between having a realistic sound that doesn't change in pitch:
whenclickedplaysoundmotorcycle-start-and-revs-02untildoneforeverplaysoundmotorcycle-start-and-revs-2wait0.3secs

Or an unrealistic sound that does change in pitch:
whenclickedforeverplaysoundbopwait0.3/1+accelerationbikesecs
(EDIT: values found by trial and error).

That said, the following script seems okay.
whenclickedplaysoundmotorcycle-start-and-revs-02untildoneforeverplaysoundmotorcycle-start-and-revs-2wait0.1/1+accelerationbikesecs

Last edited by blob8108 (Nov. 2, 2013 16:52:32)

derniersamourai
Scratcher
100+ posts

motorcycle engine noise help DIFFICULT

May be you can find free motorcycle sounds and fnd a sound ditor to play (and saving) it at different speeds.
Or wou will have to record different ounds of some motors (kitchen tools, …).
townsendbrain
Scratcher
17 posts

motorcycle engine noise help DIFFICULT

ya because i cant change the pitch in scratch, the method im going after is just making a couple files with different pitches and switching them accordingly
scubajerry
Scratcher
1000+ posts

motorcycle engine noise help DIFFICULT

Your project has come along way since the days you were just trying to keep the front wheel attached. Nice Job!!!
jji7skyline
Scratcher
1000+ posts

motorcycle engine noise help DIFFICULT

townsendbrain wrote:

ya because i cant change the pitch in scratch, the method im going after is just making a couple files with different pitches and switching them accordingly
My old 1.4 method was to use the Gunshot MIDI sound and then change the pitch. Worked pretty well offline, but not on the Java or Flash players. Now 2.0 doesn't even have the Gunshot sound effect so I'm still trying to work something else out.
townsendbrain
Scratcher
17 posts

motorcycle engine noise help DIFFICULT

jji7skyline wrote:

townsendbrain wrote:

ya because i cant change the pitch in scratch, the method im going after is just making a couple files with different pitches and switching them accordingly
My old 1.4 method was to use the Gunshot MIDI sound and then change the pitch. Worked pretty well offline, but not on the Java or Flash players. Now 2.0 doesn't even have the Gunshot sound effect so I'm still trying to work something else out.


keep me updated on what you find!
so far all i got is the frequency the noise is being played to change and the volume, as for the pitch im making a couple of different sound files and using different one when needed, annoying as heck to do tho, feels so sloppy

Powered by DjangoBB