456 CHAPTER 12: Digital Audio: Providing Aural Feedback for UI Designs Using SoundPool
Exporting Lossy Ogg Vorbis: OGG audio files
Use the File ➤ Export work process, as we have been previously to open the Export File dialog,
and select the Ogg Vorbis Files from the Save as type: drop-down menu. I named the file
buttonaudio, which will produce a buttonaudio.ogg file name, and put it into the CH12 folder, as
you can see in Figure 12-10.
Figure 12-10. Export an OggVorbis file named buttonaudio.ogg with Level 10 quality and 16-bit sample resolution
Click on the Options button and select a Quality setting level between 0 and 10. I used the
maximum setting of 10 to start with; during a real data footprint optimization, you would try several
settings to see how the data footprint to quality trade-off was affected by the Quality slider setting.
Play around with this, if you have time.
Once you have output your buttonaudio.ogg audio asset, go into your file manager and take a look
at the file size. You will see that it is 72KB, or reduced by 300% in file size (72KB divided by 219KB
is 0.33, or equal to one-third, which is three times smaller, or a 300% reduction in size). This is a
significant size reduction, and the audio sounds the same as it did before using lossy (quality =
maximum) compression. Pretty impressive stuff!
Next, let’s take a look at MP3, the most common lossy audio format on the market. It should be
interesting to see if MP3 can give us an even smaller data footprint than the Ogg Vorbis open source
codec did.
Exporting Lossy MPEG3 Format: MP3 audio files
Use the File ➤ Export menu sequence again to bring up the Audacity Export File dialog, and set
the Save as type: drop-down selector to MP3 Files, as is shown in Figure 12-11. I named the file
buttonaudio and selected the CH12 folder, and then clicked on the MP3 Options button to open up
the Specify MP3 Options dialog that is shown in the middle of Figure 12-11. I used the maximum
Quality Bit Rate setting of 320 kbps, which is quite high for audio data, and a Constant Bit Rate
Mode setting and a Stereo Channel Mode, since the file is in stereo. If you like, you can try different
Quality Bit Rate settings, as well as Variable and Average Bit Rate Modes, to see how it affects the
MP3 audio file data footprint. If you do this, to differentiate the files from each other, simply name
the file with the settings in the file name. For instance, a file with a 320 kbps Quality setting and a
Variable Bit Rate Mode could be named: buttonaudio_320kbps_vbr.mp3.