As long as you're deviating from a Fourier representation of the signal, may I suggest one that's based on perceptual studies? The Bark scale (http://www-ccrma.stanford.edu/~jos/bbt/Bark_Frequency_Scale.html) is based on the idea of critical bands --- namely, people represent the ear as a series of band-pass filters, and the critical band at a given frequency is defined as the width of a rectangular filter that passes the same power as the ear's bandpass filter at that frequency. The key feature here is that the width of this filter varies with frequency. So an 8-band Bark-scale based representation would have bands corresponding to:
Band 1: 0 - 300 Hz Band 2: 300 - 630 Hz Band 3: 630 - 1080 Hz Band 4: 1080 - 1720 Hz Band 5: 1720 - 2700 Hz Band 6: 2700 - 4400 Hz Band 7: 4400 - 7700 Hz Band 8: >7700 Hz What you'll notice here is that the bands are smaller at lower frequencies - i.e., it's easier for us to tell the difference between 300 and 400 Hz than the difference between 8300 and 8400 Hz. After taking a quick peek at the code, though, I'm guessing that the FFT for the spectrum analyzer is computed within the Squeezebox 2 itself, so this particular change would have to be implemented in firmware (and maybe not even then, if the FFT is done in hardware). On 7/9/05, Milhouse <[EMAIL PROTECTED]> wrote: > > I've generated some test tones (100-3000 in 100Hz increments, then > 1000Hz incrememnts up to 14Khz) and it seems that the 8-bar Spectrum > Analyzer is not weighting the lower frequencies as strongly as it > possibly should. I tested using MP3 format as for some reason my SBG2 > wouldn't play the WAV formats. > > It would appear that the following frequencies correspond to each bar: > > > Code: > -------------------- > > Bar 1 - 0Hz - 1000Hz > Bar 1 & 2 - 1100Hz - 1900Hz > Bar 2 - 2000Hz - 2500Hz > Bar 2 & 3 - 2600Hz - 3000Hz > Bar 3 - 4000Hz > Bar 4 - 5000Hz > Bar 4 & 5 - 6000Hz > Bar 5 & 6 - 7000Hz > Bar 6 - 8000Hz > Bar 7 - 9000Hz > Bar 7 & 8 - 10,000Hz > Bar 8 - 11,000Hz > Bar 7 & 8 - 12,000Hz > Bar 7 - 13,000Hz > Bar 6 & 7 - 14,000Hz > Bar 8 > 14,000 > 13,000 > 12,000 > 11,000 > 4000 5000 6000 7000 8000 9000 10,000 > 2600-3000 > 2000-2500 > 1100-1900 > 0 - 1000 > Bar 1 | Bar 2 | Bar 3 | Bar 4 | Bar 5 | Bar 6 | Bar > 7 | Bar 8 | > > -------------------- > > > For some reason frequencies above 11K are begin to appear in lower bars > of the analyzer. > > It would better, I think, if the first 4 bars were used to represent > frquencies between 0-3500Hz, with the remaining 4 bars used for > frequencies above 3000Hz. This may give a better representation that at > present. > > eg. > > Code: > -------------------- > > 11,000+ > 10,000 > 9000 > 8000 > 7000 > 6000 > 5000 > 4000 > 3100-3500 > 2600-3000 > 2100-2500 > 1600-2000 > 1100-1500 > 600-1000 > 0 - 500 > Bar 1 | Bar 2 | Bar 3 | Bar 4 | Bar 5 | Bar 6 | Bar > 7 | Bar 8 | > > -------------------- > > > I'll take a look and see if I can tweak anything in squeezebox2.pm, but > as I know next to nothing about Perl I'm not expecting much success! :) > > > -- > Milhouse > _______________________________________________ > Discuss mailing list > Discuss@lists.slimdevices.com > http://lists.slimdevices.com/lists/listinfo/discuss > _______________________________________________ Discuss mailing list Discuss@lists.slimdevices.com http://lists.slimdevices.com/lists/listinfo/discuss