The spectrum size depends on the audio size, we normally do zero padding (plus windowing) to get higher spectral resolution so, if the final goal is to display (not analysing) just take smaller windows or don't do zero padding. Or if you still need higher resolution for analysis, do a different processing branch for visualizing. But still I don't fully understand your motivation to get smaller spectrums. SpectrumView shows the spectrum to whatever size just by compressing the line drawing. If you don't mind to be aproximate you can also get the bin with nearest frequency to the frequency that corresponds to the pixel or being more acurate and do a pondered mean of the nearer n bins.
A Dimecres, 3 de juny de 2009 06:28:16, Саня Девайкин va escriure: > Hi! > I need to resize spectrum from some random size to 800. For example, I have > to draw the whole file on the widget with the width 800px, but don't know > how to compress spectrum to fit it. > > Thank you! > > > _______________________________________________ > CLAM mailing list > [email protected] > http://clam.iua.upf.edu -- David García Garzón (Work) dgarcia at iua dot upf anotherdot edu http://www.iua.upf.edu/~dgarcia _______________________________________________ CLAM mailing list [email protected] http://clam.iua.upf.edu
