數字音頻處理的瑞士軍刀sox的音效算法以及用法
阿新 • • 發佈:2018-07-11
transform xaml RoCE cto pla effect fit num ups
SoX可以明確的寫出需要的音頻處理的效果,可以方便的重復使用,在目前的條件下是一個比較方便使用的項目。不過相信隨著Audacity的發展,很有可能在未來可以逐漸替代SoX的功能。
對於SoX主要關心的是她的音頻效果功能,因為文件格式轉換,播放,錄音功能在ffmpeg中已經更大程度上的得到實現了。SoX的效果列表如下:
Tone/filter effects [濾波器啦]
allpass: RBJ all-pass biquad IIR filter
bandpass: RBJ band-pass biquad IIR filter
bandreject: RBJ band-reject biquad IIR filter
band: SPKit resonator band-pass IIR filter
bass: Tone control: RBJ shelving biquad IIR filter
equalizer: RBJ peaking equalisation biquad IIR filter
firfit+: FFT convolution FIR filter using given freq. response (W.I.P.)
highpass: High-pass filter: Single pole or RBJ biquad IIR
hilbert: Hilbert transform filter (90 degrees phase shift)
lowpass: Low-pass filter: single pole or RBJ biquad IIR
sinc: Sinc-windowed low/high-pass/band-pass/reject FIR
treble: Tone control: RBJ shelving biquad IIR filter
example:
1 play file.wav bass -20
2 play file.wav bass +20
Production effects [合成效果]
chorus: Make a single instrument sound like many
delay: Delay one or more channels
echo: Add an echo
echos: Add a sequence of echos
flanger: Stereo flanger
overdrive: Non-linear distortion
phaser: Phase shifter
repeat: Loop the audio a number of times
reverb: Add reverberation
reverse: Reverse the audio (to search for Satanic messages ;-)
tremolo: Sinusoidal volume modulation
example:
1 play file.wav tremolo 3.5 60 //顫抖音效果
2 play file.xxx echo 0.8 0.88 60 0.4 //回音效果
Volume/level effects [音量效果]
compand: Signal level compression/expansion/limiting
contrast: Phase contrast volume enhancement
dcshift: Apply or remove DC offset
fade: Apply a fade-in and/or fade-out to the audio
gain: Apply gain or attenuation; normalise/equalise/balance/headroom
loudness: Gain control with ISO 226 loudness compensation
mcompand: Multi-band compression/expansion/limiting
norm: Normalise to 0dB (or other)
vol: Adjust audio volume
examle:
1 play *.wav fade t 00:00:50.09 00:01:00 00:00:06 //設置淡入淡出效果
Editing effects [音頻編輯效果,主要是添加、刪除一類的功能]
pad: Pad (usually) the ends of the audio with silence
silence: Remove portions of silence from the audio
splice: Perform the equivalent of a cross-faded tape splice
trim: Cuts portions out of the audio
vad: Voice activity detector
Mixing effects [混音效果]
channels: Auto mix or duplicate to change number of channels
divide+: Divide sample values by those in the 1st channel (W.I.P.)
remix: Produce arbitrarily mixed output channels
swap: Swap stereo channels
Pitch/tempo effects [節奏和音高的功能,pitch 就是那個傳說中調音高的算法了]
bend: Bend pitch at given times without changing tempo
pitch: Adjust pitch (= key) without changing tempo
speed: Adjust pitch & tempo together
stretch: Adjust tempo without changing pitch (simple alg.)
tempo: Adjust tempo without changing pitch (WSOLA alg.)
example:
1 sox file1.wav file2.wav speed 1.29
Mastering effects [這個不知道是啥意思,就下面兩個效果,一個是添加抖動來提升信噪比的,一個效果采樣率的。第一個效果不錯]
dither: Add dither noise to increase quantisation SNR
rate: Change audio sampling rate
example:
1 play file.wav dither 100
Specialised filters/mixers [比較奇怪的效果]
deemph: ISO 908 CD de-emphasis (shelving) IIR filter
earwax: Process CD audio to best effect for headphone use
noisered: Filter out noise from the audio
oops: Out Of Phase Stereo (or `Karaoke`) effect
riaa: RIAA vinyl playback equalisation
Analysis effects
[用來顯示統計信息的功能]
noiseprof: Produce a DFT profile of the audio (use with noisered)
spectrogram: graph signal level vs. frequency & time (needs `libpng`)
stat: Enumerate audio peak & RMS levels, approx. freq., etc.
stats: Multichannel aware `stat`
example:
1 sox 楊望.wav -n stat //統計信息
Miscellaneous effects [附加功能, 比較有意思]
ladspa: Apply LADSPA plug-in effects e.g. CMT (Computer Music Toolkit)
synth: Synthesise/modulate audio tones or noise signals
newfile: Create a new output file when an effects chain ends.
restart: Restart 1st effects chain when multiple chains exist.
Low-level signal processing effects [底層的處理功能,感覺和濾波器那組比較像啦]
biquad: 2nd-order IIR filter using externally provided coefficients
downsample: Reduce sample rate by discarding samples
fir: FFT convolution FIR filter using externally provided coefficients
upsample: Increase sample rate by zero stuffing
數字音頻處理的瑞士軍刀sox的音效算法以及用法