[Clam-devel] Spectral Analysis/Synthesis
Xavier Amatriain
xavier at amatriain.net
Mon Feb 18 06:39:54 PST 2008
Comments below...
> Configure-Stuff:
>
I can't see anything wrong with configuration but I am wondering... why
did you decide to use KaiserBessel35??
> This is the way I create the temporary buffer in WindowSize (package is a
> CLAM::Frame) :
>
> Analysis:
> CLAM::Audio tmpAudio;
> tmpAudio.SetSize(package->frameSize()*4);
> CLAM::TIndex index = (package->frameSize()*2)-(package->frameSize()/2);
> tmpAudio.SetAudioChunk(index, package->GetAudioFrame());
>
Wait! index is constant? That means you are using some sort of zero
padding but then not
removing it properly at synthesis. What you should do is concatenate all
the frameSize samples
you get into your tmpAudio until you got enough to send it to the
analysis (i.e. do it four times and then
start sending). After that, you need to append the new frameSize samples
at the end of your buffer while
keeping the last frameSize*3 before those.
> this->_specAnal.Do(tmpAudio, package->GetSpectrum())
>
> Synthesis:
>
> CLAM::Audio tmpAudio;
> tmpAudio.SetSize(package->frameSize()*2);
>
> this->_specSynth.Do(package->GetSpectrum(), tmpAudio);
> this->_overlapAdd.Do(tmpAudio, package->GetAudioFrame())
>
Also this is not correct :-( You can't just take the first frameSize*2
samples and feed them to the OLA.
You need to take the center frameSize*2. Else the inverse window you are
applying does not correspond to
the one you applied in the analysis (in terms of where the center is).
Hope it helps!
More information about the clam-devel
mailing list