This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2008-11-03 15:17:09

JSO
Community Moderator
Registered: 2007-06-23
Posts: 1000+

Simulating a dynamic car engine sound

I tried to create a dynamic car engine sound with Scratch.
It seems to be quite difficult  big_smile

this is what I have done so far:
http://scratch.mit.edu/projects/JSOlabs/310631

I searched the web and I came up with some sounds/programming forums:
http://www.northernsounds.com/forum/showthread.php?t=22024
http://www.northernsounds.com/forum/archive/index.php/t-22610.html
and some others.

It seems the best way to do is to have multiple sounds of different frequency's and playing them together - together with cross fading.

So I started:
I first searched for a continuous engine sound (no acceleration etc.)
I used audacity, created multiple tracks with the same sound, changed pitch (+5% each track) and combined them - the result was nice.

Now I wanted to implement this into Scratch. I exported the tracks to WAVs - you can hear the result when you download my project. 11 different sounds, each 5% higher then the previous.

I wrote the script for the project but I still have a lot of trouble:

> It is broadcasting numbers so online it doesn't works at all.

> Scratch does combines different sounds, but only one "instance" of each sound. an example:
You have sound1 of 10 seconds long,
you play it using "play sound []"
wait 5 secs
you play it again. The sound stops and restarts.

This is braking up the effect, when the "rpm" stays +- the same the engine sound keeps stopping and restating. When you "accelerate" or "shift gear" the result is ok.

What do you think? How could this be improved? Is it possible to play the same sound twice without restart?

Please help...


http://oi48.tinypic.com/2v1q0e9.jpg

Offline

 

Board footer