[CLAM] Questions about SMSTools (Frame Segmentation).

xavier at create.ucsb.edu xavier at create.ucsb.edu
Fri Feb 17 23:31:37 PST 2006


> 1. Does the time tag of a frame mark the beginning or the middle (or
> even something else) of the frame?

The time tag marks the center of the frame.

> 2. What does the first frame include? The samples 0 to FrameLength-1?
> Or first some zeros and then the samples 0 to (FrameLength-1)/2? Or
> maybe first some zeros and then the samples 0 to HopSize? Or something
> else?

The first frame fed to the analysis process contains zeros and only 
samples from 0 to HopSize. This means that this frame has usually a 
negative centerTime. These frames with negative center times are never 
used in the synthesis process so the first valid frame for synthesis is 
the one centered at t=0 having zeros in the first half and samples in the 
second.

> 3. How are the time-tags calculated? When I multiply the time-tags by
> the sample rate, I get more or less what I expect (integer multiples
> of the HopSize), but the values have a little error. This error could
> be just a round-off error, but I don't know. The strange thing is,
> that with bigger frame number this error increases. At about frame
> number 100 it had a value of about 10^-3.

The center times should be multiples of the HopSize indeed. If you look at 
the SMSAnalysis.cxx file (around line 146) this is the formulation:

TTime frameCenterTime=frameIndex*step/samplingRate;

(http://clam.iua.upf.es/CLAM-doxygen/SMSAnalysis_8cxx-source.html)

So yes there could be a rounding error but what you explain is weird.






More information about the clam-users mailing list