< Back to IRCAM Forum

Calculating some values for XG70 and XG71

Hi,
I would like to know how to calculate the correct values for inSegEndTime, frameStep and inframeStep in the matrix XG70; and the values for mNormFact and mEnergyNormFact in XG71. I guess that they can be calculated with a formula – like, for example, the window step – but I don’t know what formulas they require. Thanks in advance for your kind attention.
Best,
Francesco Vitale

Hi,
as for frameStep and inframeStep, I guess that the correct values can be calculated dividing the value of the window size by 8. I don’t know if it’s the right rule, but I see (in a 1GB7 SDIF obtained analyzing a sound) that with a window size = 512 both frameStep and inframeStep have the value 64. Is this correct? And what about inSegEndTime (for the XG70 matrix of the 1GB7 SDIF), mNormFact and mEnergyNormFact (for the matrix XG71)? Thanks for your attention.
Best regards,
Francesco Vitale

Hello Francesco,

inframestep is the difference between the present and last analysis frame taking into account the sample grid (that is the effective position of the analysis window)

framestep is the theoretically desired difference between the present and last analysis frame (not taking into account the sample grid). So you can have framestep = 0.01 and then inframe step would be 0 for most frames and 1 only for about every hundreds frame.)

For window size 81 and oversampling 8 you should get framesetp = 10.125 and inframestep alternating between 10 or 11

All these values are there to be able to ensure precise time sterecthing (meaning a time stretch by 2 of a file with 1111 samples should produce a file with 2222 samples). Now if you synthetically generate the analysis frames you most probably can set framestep = inframestep without changing the results very much. Anyway you don’t know what the number of samples in your virtual input file would be.

inSegEndTime i the position of the center of the analysis window again taking into account the sample grid (so this value is related to inframestep)

You should set the first to 0 (or 0.5/sample rate for even length windows) and then simply add inframestep/samplerate to derive the position of the following frames

mNormFact -> 2/sum(win)
mEnergyNormFact -> 4/sum(win^2)

where win is the vector containing the analysis window (hanning, blackman, …)
Those are not needed in many cases, so you may set those two to -1.
In case supervp tries to access them, and they are <0 then you should get an exception. If you encounter this case, then you know you bhave to set them correctly.

Best
Axel