Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /is/htdocs/wp10582507_LGPWONUTVE/www/wp-includes/wp-db.php on line 1038
April 18, 2013 - Max Did It
Max Did It
1 Comment

Generate Procedural Motor Sounds in Flash

When developing a racing game like Rubberband Racing, you will need decent motor sounds. Driving a silent car just feels weird (Maybe it won't 50 years from now?).

If I had a loop of a car engine, I could then change the volume and the pitch of the sound dynamically depending on the velocity of the car.

The MP3 Gap Problem

My problem was that usually, you can't make clean loops and save them as MP3 files. Doing so will always introduce gaps into the audio file that will prevent it from repeating seamlessly.

If you are using Adobe's Flash Authoring Software to save your MP3s in a SWF file, then you will be able to loop them, as the program uses a trick to avoid the gap introduced by the compression.

However, I am not using Adobe Flash and I am loading the sounds as single files during runtime, so I didn't have that option.

Instead, I decided create seamlessly looping engine audio by creating it procedurally during runtime.


  • RSS Feeds

    Notice: Undefined variable: output in /is/htdocs/wp10582507_LGPWONUTVE/www/wp-content/plugins/category-rss-widget-menu/rss.php on line 127

    Notice: Undefined variable: output in /is/htdocs/wp10582507_LGPWONUTVE/www/wp-content/plugins/category-rss-widget-menu/rss.php on line 90