Thursday, January 29, 2009

[Audio] Rate Got You Down?

Ever had to try and resample a piece of audio at a lower rate, but whenever you make the changes it makes your pitch and speed go WAAAAAY down? Well, never fear... Here may be the answer you were looking for.

Regardless of the audio file you are trying to open (i.e. wav, mp3, etc.) you should be able to open it in the totally free, useful sound editing tool:

Using Audacity, you can do a ton of sound editing and have none of the cost of expensive alternatives. So, yeah, this isn't a sales pitch for Audacity... So we'll get on with the show.

As an example, I'm going to resample an MP3 at 44100 Hz and resample it to 8000 Hz. Now, to most people we'd say "Why would you EVER want to lower the quality of the audio?" Well, the answer is that some hardware systems (like Cisco, Shoretel and the like) require a low-quality wav file in order to play prompts. Some of them can support 16000 Hz as well, but 8000 Hz is a pretty "bottom of the line" option that will give you ok quality while making it compatible with most systems (think hold music, ringtones, voicemail prompts, etc.). So, now the process:

Step 1 : Open File in AudacityPhotobucket
Photobucket Upon opening up an MP3 file with Audacity, you'll find some information to the left of the audio track that looks similar to what you see to the left. This information gives you the specifics about how the file was recorded initially including that track's rate, whether it is stereo or mono, the ability to mute the channel (each part of the track is called a channel) or all of the other channels at once, and sliders to adjust both the channel's output volume in perportion to the original version and a fade slider to fade that channel to the left or right speaker channels (think surround sound... Being able to make a cricket chirp to the right of you as the character in the movie walks past a bush).

The fun thing about this information is that you can change it all up and mix and match, making the channel do your own bidding... Want to slow down the track to make a Chop'n'Screw? Easy as pie... Just click the arrow next to the file name and set the rate (Set Rate) to something lower. This will slow down the whole track, giving you that "slow jams" type feel. You can also select a part (or whole) of the track, then using the Effects>Change Speed option slow the track or portion of track down to get the effect. You can see the process of doing so over to the right.

Step 2 : Change the Project Rate
Photobucket

If you look to the lower left-hand corner of the track editing screen, you'll see an entry that says "Project Rate" with a number beside it. By default, it will likely be 44100 Hz as this seems to be the common MP3 rate; however, if you have changed your default rate in the preferences then this number may be different.

Changing the rate to 8000 Hz will degrade the quality of the audio SLIGHTLY; however, the resulting filesize will be pretty much a fraction of the original file size which seems to weigh heavily on whether or not these systems will actually be able to play the file (remember, compression method is important as well which we will go through, but the file size seems to have some effect on it as well).

Now that we've got that sorted out, we'll move along in the process and actually set the export compression method as well as change the stereo audio into mono.


Step 3 : Edit Export Preferences
Now, obviously we're going to be looking at things a little deeper in the future; however, for this project I'm going to assume that your system requires the u-law compression formatting as it is one of the most simple compression methods you can use (from what I have been able to determine based off of reading other people's information on the format). You can modify these settings by going to the Edit menu and choosing Preferences. Once the Preferences window is open, go to the File Format tab.

Once you get into the File Format tab (you can click on the image to the right if you need to see the image more clearly), you can modify the settings with which Audacity will save the file. This is where you will specify what compression will be used and which format to export (i.e. au, wav, etc.). In this example, we're going to select "Other." This is going to open up a File Format dialog box. Under Header, we're going to choose "WAV (Microsoft)" and "U-Law" under Encoding. Again, you can click the image to view the settings more clearly. Go ahead and click Ok on both of these windows to save the settings. This will take you back to the track editing window.


Step 4 : Split the Stereo
When you are ready to split the audio into two channels (stereo audio contains two channels, left and right, by default), you do this by clicking on the arrow beside the file name and choose "Split Stereo Track" which will do exactly that, split the stereo track into left and right channels (it will then look like over to the left there).
Now we're going to close the "Right" track because we're going to create a mono audio clip. This will leave a single channel on the track, "Left," which will then need to be changed to mono mode. Currently it's still a stereo channel, so you'd only hear sound on the left side of your headphones, speaker system, etc. You can see what the track editing window will look like if you look at the image to the right.
We're going to go ahead and change the mode from stereo to mono on the remaining channel.
Step 5 : Export the File

Photobucket
The last step in the whole process is to save the file and let the Audicity software get to work on the compression method, outputting a file in the correct format from the original high quality audio file. You can obviously do this through the file menu and choosing the "Export as WAV" option.
So, I hope this has helped some people out. If you used these steps (or need more defined directions), if they helped you do this or something else similar or pointed you in the right direction please feel free to leave a comment and I'll respond as soon as I get it.
Than you for taking the time to read the message and make sure to share your newfound knowledge with as many people as you can. Remember, knowledge unshared is a legacy unlived.
Take care.

No comments:

Post a Comment