數位音訊

什麼是聲音呢？
聲音是空氣中的壓力波. 如果沒有空氣，我們將聽不到聲音. 所以在太空中是沒有聲音的.

我們聽得到聲音是因為耳朵偵測到空氣中的壓力波. 像是拍手擊掌這種短促的聲音也許就是最容易了解的一種聲波. 當你擊掌，在你手中的空氣被擠壓. 這讓雙手附近的空氣壓力增加. 因為更多的空氣分子暫時被壓縮到更小的空間. 這個高壓將空氣分子向四面八方擠壓，波速大約是340公尺/每秒，這就是音速. 當這鼓壓力到達你的耳中，它輕輕的擠壓你的鼓膜，讓您聽到這個掌聲. http://audacity.sourceforge.net/manual-1.2/images/waveform_clap.png

擊掌這個短促的事件所產生的單一壓力聲波很快就消失了. 上面的圖示可以看到掌聲的一般波形，波形的橫軸代表的是時間，而縱軸代表的是壓力值，聲音一開始的高壓力很快就衰減成低壓力值，而最終是消失掉的.

另一個聲波的類型是週期波，當你擊打一個鈴時，擊打下去的那一個瞬間跟拍手有一點相像，聲音由鈴的振動產生，當鈴持續發出聲音時，它的震動是以一個特別的頻率進行的，這個頻率與鈴的大小和形狀有關，而這個振動造成了鈴周圍的空氣也以相同的頻率振動，這使得鈴聲透過空氣的壓力波傳遞到更遠的地方，以聲音的既有速度進行，持續震動的壓力波看起來跟以下這個圖很像： http://audacity.sourceforge.net/manual-1.2/images/waveform_sine.png

聲音是如何被記錄下來呢？
麥克風內有一個可以自由振動的薄膜，利用一些機制將薄膜的振動轉換成電子訊號. (這些機制根據不同的麥克風有不同的作法. )所以聲音訊號可以用麥克風轉換成電子訊號. 通常，壓力大代表高振幅，反之亦然.

A tape recorder translates the waveform yet again - this time from an electrical signal on a wire, to a magnetic signal on a tape. When you play a tape, the process gets performed in reverse, with the magnetic signal transforming into an electrical signal, and the electrical signal causing a speaker to vibrate, usually using an electromagnet. 卡式錄音機此時再將波的形式轉換-這次是從電線傳來的電子訊號至卡帶上的磁訊號，當撥放一捲卡帶時，所有的過程即倒轉，也就是從磁訊號轉化成電子訊號，通常透過一個電磁鐵，電子訊號導致揚聲器產生震動進而發出聲波.

又如何用數位的方式錄音呢？
Recording onto a tape is an example of analog recording. Audacity deals with digital recordings - recordings that have been sampled so that they can be used by a digital computer, like the one you're using now. Digital recording has a lot of benefits over analog recording. Digital files can be copied as many times as you want, with no loss in quality, and they can be burned to an audio CD or shared via the Internet. Digital audio files can also be edited much more easily than analog tapes.

The main device used in digital recording is a Analog-to-Digital Converter (ADC). The ADC captures a snapshot of the electric voltage on an audio line and represents it as a digital number that can be sent to a computer. By capturing the voltage thousands of times per second, you can get a very good approximation to the original audio signal:

http://audacity.sourceforge.net/manual-1.2/images/waveform_sampled.png

上圖中的每一個點代表一個音訊取樣點. 數位音訊的品質可以由兩個參數來決定：


 * Sample rate: The rate at which the samples are captured or played back, measured in Hertz (Hz), or samples per second. An audio CD has a sample rate of 44,100 Hz, often written as 44 KHz for short. This is also the default sample rate that Audacity uses, because audio CDs are so prevalent.


 * Sample format or sample size: Essentially this is the number of digits in the digital representation of each sample. Think of the sample rate as the horizontal precision of the digital waveform, and the sample format as the vertical precision. An audio CD has a precision of 16 bits, which corresponds to about 5 decimal digits.

Higher sampling rates allow a digital recording to accurately record higher frequencies of sound. The sampling rate should be at least twice the highest frequency you want to represent. Humans can't hear frequencies above about 20,000 Hz, so 44,100 Hz was chosen as the rate for audio CDs to just include all human frequencies. Sample rates of 96 and 192 KHz are starting to become more common, particularly in DVD-Audio, but many people honestly can't hear the difference.

Higher sample sizes allow for more dynamic range - louder louds and softer softs. If you are familiar with the decibel (dB) scale, the dynamic range on an audio CD is theoretically about 90 dB, but realistically signals that are -24 dB or more in volume are greatly reduced in quality. Audacity supports two additional sample sizes: 24-bit, which is commonly used in digital recording, and 32-bit float, which has almost infinite dynamic range, and only takes up twice as much storage as 16-bit samples.

Playback of digital audio uses a Digital-to-Analog Converter (DAC). This takes the sample and sets a certain voltage on the analog outputs to recreate the signal, that the Analog-to-Digital Converter originally took to create the sample. The DAC does this as faithfully as possible and the first CD players did only that, which didn't sound good at all. Nowadays DACs use Oversampling to smooth out the audio signal. The quality of the filters in the DAC also contribute to the quality of the recreated analog audio signal. The filter is part of a multitude of stages that make up a DAC.

聲音是如何在你的電腦上數位化呢？
你的電腦上有音效卡-它可能是一張獨立的聲霸卡，或內建在主機板上. 不管是哪一種，音效卡都有Analog-to-Digital轉換器(ADC)來錄音，以及Digital-to-Analog轉換器(DAC)來播放聲音. 電腦的作業系統(Windows、Mac OS X、Linux等等)會與實際錄音及放音的音效卡溝通，而Audacity與作業系統溝通，所以你可以將聲音轉成電腦檔案、編輯它、然後用喇叭播放.

標準PCM音訊檔案格式
電腦上有兩種主要的音訊格式：


 * PCM格式，PCM是Pulse Code Modulation的縮寫. 這只是一個花俏的名詞讓人搞不懂而已，它只是描述一種格式，這種格式是說，一個波的每個取樣點都是一個數位的數值. 常見的檔案格式及副檔名有WAV、AIFF、Sound Designer II. Audacity支援WAV、AIFF、以及大多數的PCM檔案格式.


 * 另一種則是壓縮格式檔案. Earlier formats used logarithmic encodings to squeeze more dynamic range out of fewer bits for each sample, like the u-law or a-law encoding in the Sun AU format. Modern compressed audio files use sophisticated psychoacoustics algorithms to represent the essential frequencies of the audio signal in far less space. Examples include MP3 (MPEG I, layer 3), Ogg Vorbis, and WMA (Windows Media Audio). Audacity supports MP3 and Ogg Vorbis, but not the proprietary WMA format or the MPEG4 format (AAC) used by Apple's iTunes.

For details on the audio formats Audacity can import from and export to, please check out the Fileformats page of this documentation. Please remember that MP3 does not store uncompressed PCM audio data. When you create an MP3 file, you are deliberately losing some quality in order to use less disk space.