2012-05-15 3 views
1

오디오 신호의 입력이 double 배열로되어 있습니다. 50 % 겹치는 윈도우 분석 프레임을 25ms 해밍으로 분할하여 해당 신호의 프레임을 만들고 싶습니다. 해밍 창 계산을위한 코드가 있습니다. 누군가 오디오 신호를 프레임으로 분할하는 방법을 보여줄 수 있습니까? 가짜 코드 또는 Java 코드가 선호됩니다.오디오 신호 세분화

답변

2

의사 코드 :

Fs = 44100;    // sample rate, e.g. 44.1 kHz 
overlap = 0.5;    // overlap = 50% 
nw = Fs * 0.025;   // no of samples in window 
ns = nw * (1.0 - overlap); // no of samples to increment n0, n1 
n0 = 0;     // window sample no begin 
n1 = n0 + nw;    // window sample no end 
N = 10 * Fs;    // N = total no of samples to process, e.g. 10 seconds 

do 
    get nw samples from n0 to (n1 - 1) into temporary buffer 
    apply window function to temporary buffer 
    apply FFT to temporary buffer 
    ... etc ... 
    n0 += ns; // increment window start/end by no of overlap samples 
    n1 += ns; 
while n1 <= N;