Pages

Friday, November 06, 2015

How I used Audacity to create sound files for my Ford(ish) railbus

Introduction

Having just modified a cheap USB MP3 Player to enable a Deltang receiver to trigger movement from file to file (see How I modified an MP3 Player to provide sound for my railbus), I needed to create some appropriate sound files to use with it.

I decided that I needed five sound files:
  1. 20 min of silence (when the railbus was stationary with no engine running)
  2. Engine start-up and idle (for 20 minutes)
  3. Horn, gears and acceleration through the gears before running sound (for 20 mins)
  4. Deceleration, brake squeal and idle (for 20 mins)
  5. Engine stop
I figured that I could move forward and back through these files using the direction switch on my Deltang Tx22 transmitter to cover all eventualities under which the railbus might operate.

Locating suitable sound files

The internet is a wonderful place. I searched for appropriate sound files of antiquated Ford motor vehicles which I could use. Initially, I searched for Model T Ford sounds as I had previously used some of these to dub sounds on to a video of the railbus in action (see A Day in the Life of Peckforton Station).

 These sounds had been suitable for lineside shots, with the railbus moving towards and away from the camera, but I needed engine sounds which were more constant.

Eventually, I managed to track down the sound of a Model A Ford on the StockMusic.com website. For a modest sum (just under $10), I was equipped with the sound of a car running past, the car starting, idling and stopping, and the sound of a car horn.

I was now ready to start editing in Audacity, which is a free open-source sound editing program available from SourceForge. To demonstrate the editing processes involved in producing the sound files, I'll show you how I produced the most complicated one - the third file with the horn, gear change and acceleration to running speed.

The first step was to start up Audacity and then open the downloaded file containing the idling engine sound. The engine start and engine stop sections of the file were highlighted and then deleted, leaving just the sound of the idling engine.

Part of the engine sound was highlighted and then Adjustable fade ... was selected from the Effects menu

 The opening volume was set to 100% and the closing volume was set to 200%. You may need to experiment with these values to suit the sound file you are working with.

 Once the rising effect of the volume was checked, the same section was highlighted once more and the Sliding Time Scale/Pitch Shift tool was selected from the Effects menu.

 The initial tempo change was set to 0 and the final tempo change was set to 200%. Again this final value was determined by experimentation. After some checking I decided the pitch needed to be changed as well to give a rising pitch to the engine as it increased in speed. The final pitch shift was set to 100%.

 The effect was tested to check the settings sounded satisfactory.

 The edited section of sound was highlighted, copied and pasted into the sound track and another section of the original idling sound was edited to give a slightly different and shorter section of rising sound, which was copied and pasted again to give the effect of working through four gears.

I decided the sound would be enhanced with the addition of the gearbox whining in the background. I tracked down the video of a vintage bus on the internet and extracted the sound using another piece of free software - Any Video Converter.

Once a suitable section of whining gearbox was found it was imported into the Audacity .......

.... where it opened as a new track

The short section of whine was copied and pasted a few times....

 The section of whine sound before the rising engine sound was highlighted and then, using the Amplify tool from the Effects menu, its volume was reduced to zero (there would be no gearbox whine while the railbus is stationary).

A section about twice as long as the rising engine sound was highlighted and amplified, rising from 0 to 400% using the Adjustable fade tool from the Effects menu (again some experimentation was necessary to find the most appropriate value).

The tempo and pitch of the same section was edited with the Sliding Time Scale/Pitch Shift tool from the Effects menu. The tempo was changed from 0 to 200, and the pitch from 0 to 100%.

The effect was applied again and copied and pasted to match the other sections of the engine sound track.

After some tweaking and adjustment, the sound of a grating gearbox (found on a free sound effects website - https://www.freesound.org/ ) was then imported and copied and pasted on to a new track to occur at appropriate places alongside the engine and gearbox sounds.

Finally, the sound of the Ford's klaxon horn was imported and added on a track near the start of the recording.

 A similar approach was used to create the other files needed (ie start and idle, decelerate and idle, idle and engine stop). These were exported from Audacity as MP3s and then transferred, one at a time (to ensure they appeared in the correct order) on to the micro SD card.

The SD card was then installed into the MP3 player on the railbus and tested to ensure everything worked as intended.

As you can see, there is a 1 second pause when moving from one track to another. I may look into the possibility of using a recordable sound module triggered by a Picaxe chip to mask this pause, but for now I am happy to live with the pause - my imagination disguises the gap in sound and when making videos of the railbus, I can edit out the pauses.




3 comments:

  1. Brilliantly done. Some great ideas on how to create the effects

    ReplyDelete
  2. Thanks Greg
    I do like Audacity. Such a versatile program and Open Source - which makes it even better! :-)
    Rik

    ReplyDelete