owned this note
owned this note
Published
Linked with GitHub
---
tags: 多媒體
---
# 多媒體(四)Digital Audio Representation
## 相位角:Phase angle
- 
## 相位差
- 
## 角頻率 (w):Angular Frequency
- 每秒鐘轉了多少角度稱為角頻率或角速度,以 w 來表示,單位為 rad/sec。rad 為弳度,1 個週期或 1 個振盪的角度為 2p 個弳度,相當於 360。頻率 (f) 與角頻率 (w) 的不同:
- 頻率 f :每秒振盪多少次。
- 角頻率 w :每秒振盪多少弳度。
- 振盪 1 次是 2p 個弳度,因此 w = 2pf
## Decibels(分貝)
- The definition of decibel (dB) is:
- 1 𝑑𝐵 = 10 log10(𝐼/𝐼0), I and I0 are the intensities (power) of two signals
- The relationship between power I, amplitude E and resistance R:𝐼 =$𝐸^2/𝑅$, you can verify two definitions are the same by assuming the R is constant for the two signals
## Decibels of Sound
- 
## Audio Dithering
- 是在數位訊號處理領域的中一項用於降低量化誤差的技術。通過在較低位元中加入雜訊,藉此破壞諧波的排序,使諧波的影響受到壓制,並減少量化誤差在低頻的影響。
- Audio dithering is a way to compensate for quantization error
- Quantized signals would sound ‘granular(顆粒狀)’ because of the stair-step effect. (又稱aliasing,主要來自於對連續時間訊號作取樣以數位化時,取樣頻率低於兩倍奈奎斯特頻率)
- The quantized signals sound like the original signals plus the noise.(量化後的訊號聽起來=原始訊號+噪音)
- The noise follows the same pattern as the original wave,human ear mistakes it as the original signal.
- 
- Adding a random noise(dither) to the original wave eliminates the sharp stair-step effect in the quantized signal.
- 做完dithering,原始聲音比較能維持正常,但後面的雜音會很大
- 如果只有做Quantized,原始聲音會壞掉
## Noise Shaping
- Noise shaping is another way to compensate for the quantization error. Noise shaping is not dithering, but it is often used along with dithering.(噪聲整形是一種通常用於數字音頻,圖像和視頻處理的技術,通常與dithering結合使用,作為數字信號量化或位深縮減過程的一部分。其目的是增加合成信號的視在信噪比。)
- 
- What does noise shaping do
- Move noise’s frequency to above the Nyquist frequency,and filter it out. We are not losing anything we care about in the sound.
- 
- 可看到資料的頻率越來越高
## Non-Linear Quantization
- Nonlinear encoding, or companding, is an encoding method that arose from the need for compression of telephone signals across low bandwidth lines
- Companding means compression and then expansion
- Reasons for non-linear quantization
- Human auditory system is perceptually non-uniform. Humans can perceive small differences between quiet sounds, but not for louder sounds
- 人耳聽覺在每個頻段不一樣
- Quantization error generally has more impact on low amplitudes than on high ones, why?
- 0.499 -> 0, err=(0.499-0)/0.499 = 100%
- 126.499 -> 126, err=(126.499-126)/126.499 = 0.4%
## μ-law Function
- 
- 
- 靠近0的地方變化比較大,切得比較細,兩側可切比較粗
- 用non-linear的方法,可以減小數值很小的時候的quantization error
## Comparison of Quantization Interval Size
- 
## The Fourier Series
- 
- 𝑓(𝑡) : a complex audio wave
- 𝜔 = 2𝜋𝑓: fundamental angular frequency
- 𝑓: fundamental frequency
- 
- When n=0, cos(0) = 1 and sin(0) = 0. Only a0 left.
- a0 is the DC component, which gives the average amplitude value over one period
- 
- 
- 
- 
## What is Fourier Series ?
- 
## Discrete Fourier Transform
- 
## Phase Information
- 
## FFT
- You CANNOT perform any kind of Fourier transform on a single sample. You need a block of samples.
- The FFT algorithm has to operate on blocks of samples where the number of samples is a power of 2.(要是2的次方的資料大小才行)
- For DFT, it can work with a sample set of any block size.
- the larger the FFT size, the greater the frequency resolution. However, the larger the FFT size, the smaller the time resolution
- 
- 左邊就可以取12次,右邊4次
- Due to this phenomenon(called spectral leakage), the FFT may assume the original signal looks like Fig.4.21
- 
## Spectral Leakage
- A simple sinusoidal wave of 300Hz
- After FFT, some frequencies other than 300Hz appear due to spectral leakage
- 
- 在300HZ旁邊還有一些不乾淨的值
## Window Function
- 用window function雖然比較準確,但是值的強度會比較不明顯
## Musical Acoustics and Notation
- 差八度音就是,頻率差兩倍