17.01.2013 Views

musicdsp.org source code archive - WSInf

musicdsp.org source code archive - WSInf

musicdsp.org source code archive - WSInf

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Time compression-expansion using standard phase vo<strong>code</strong>r (click this to go back to the index)<br />

Type : vo<strong>code</strong>r phase time stretching<br />

References : Posted by Cournape<br />

Linked file : vo<strong>code</strong>r.m (this linked file is included below)<br />

Notes :<br />

Standard phase vo<strong>code</strong>r. For imporved techniques ( faster ), see paper of Laroche : "Improved phase vo<strong>code</strong>r time-scale modification of<br />

audio"<br />

Laroche, J.; Dolson, M.<br />

Speech and Audio Processing, IEEE Transactions on , Volume: 7 Issue: 3 , May 1999<br />

Page(s): 323 -332<br />

Comments<br />

from : dsp[at]rymix.net<br />

comment : Anyone know what language this is in? It really would be nice to understand the syntax.<br />

from : null@null.null<br />

comment : It's matlab <strong>code</strong> see mathworks.<br />

/Daniel<br />

from : dsp@rymix.net<br />

comment : thanks =)<br />

from : ericlee280.at.hotmail.com<br />

comment : The <strong>code</strong> seems to contain an undefined variable lss_frame, can someone explain what this is?<br />

from : yyc@cad.el.yuntech.edu.tw<br />

comment : The <strong>code</strong> seems to contain an undefined variable lss_frame, can someone explain what this is?<br />

from : cournape[at]enst[dot]fr<br />

comment : There is indeed an error in the script. I will post the correction to the administrator.<br />

For now, here is the correction. You have to replace<br />

lss_frame by Ls ( which is properly defined before the main loop in the script which is online ). When I checked the <strong>code</strong>, there can be also some out<br />

of range error for the output vector : a change in the max variable definition seems to solve the problem ( at least for overlapp below 0.75 ).<br />

replace max = (nb_frame-2)*La+Nfft<br />

by max = (nb_frame)*La+Nfft.<br />

from : yyc@cad.el.yuntech.edu.tw<br />

comment : is it really follow this paper "Improved phase vo<strong>code</strong>r time-scale modification of audio"??<br />

because i get the another <strong>source</strong> <strong>code</strong> for original phase vo<strong>code</strong>r on net, and the performence is better than the <strong>code</strong>....<br />

it is let me confuse....<br />

have anyone can slove my question?<br />

and thanks......<br />

ps:the sorce <strong>code</strong> from"http://www.ee.columbia.edu/~dpwe/re<strong>source</strong>s/matlab/pvoc/" .<br />

Linked files<br />

function [S] = vo<strong>code</strong>r(E,Nfft,over,alpha)<br />

% Phase vo<strong>code</strong>r time-scaling :<br />

% - E : input vector<br />

% - Nfft : size per frame<br />

% - over : overlapp ( between 0 et 1 )<br />

% - alpha : time-expansion/compression factor ( alpha < 1 : compression; alpha > 1 : expansion ).<br />

%<br />

% 30.11.02. Cournapeau David.<br />

%<br />

% Time expansion using standart phase vo<strong>code</strong>r technique. Based on Dolson and Laroche's paper :<br />

% "NEW PHASE-VOCODER TECHNIQUES FOR PITCH-SHIFTING, HARMONIZING AND<br />

% OTHER EXOTIC EFFECTS", in<br />

%===================================================================%<br />

% The synthesis signal's length isn't exactly alpha*input's length. %<br />

%===================================================================%<br />

% Verifiy the overlapp

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!