Hi,
On Fri, 2008-01-18 at 14:04 +0100, matteo sisti sette wrote:
Jamie Bullock wrote:
I find spectral irregularity to be quite a good noisiness metric, [...] Krimphoff: Irregularity = \sum_{k=2}^{N-1} |a_k - \frac{a_{k-1} + a_k + a_{k+1}}{3}| Jensen: Irregularity = \frac{\sum_{k=1}^{N} (a_k - a_{k+1})} {\sum_{k=1}^Na_k^2} [...] Where a_k is the amplitude of the kth coefficient in the magnitude spectrum.
I googled a little bit, and as far as I understand, these definitions seem to apply to an harmonic sound, and a_k seems to be the amplitude of the k-th partial... that is the sound is supposed to be pitch and its spectral peaks (partials) have already been extracted...
The irregularity metric is generally computed on the magnitude spectrum, but there is no reason not use it on the harmonic spectrum, as some authors do. It is just giving you a measure of the 'jaggedness' of a given sequence of numbers, you could use it on any distribution, e.g. you could take the irregularity measure of the numbers of Pd mailing list postings over a 12 month period!
For the purposes of computing noise content it makes sense to use the mag spectrum. Some authors e.g. Park (2004) use the log magnitude spectrum.
Would it make any sense to apply the above formulas using just the magnitude spectrum coefficients of the whole spectrum as a_k?? If so, I'm not sure whether a high irregularity should be expected to correspond to a high or low noisiness.....
It depends which formula you use. Using Krimphoff ('Irregularity I' in libxtract), a high irregularity value corresponds to high noise content. The relationship is approximately inverted if you use Jensen.
I performed an analysis in Sonic Visualiser using a sound that contains a linear crossfade between a 440Hz sine wave and white noise. The results can be found at:
http://www.postlude.co.uk/incoming/sine-noise/sine-noise.png
The red line shows Irregularity calculated via Krimphoff's method, the blue line shows Jensen.
The audio file I used is at:
http://www.postlude.co.uk/incoming/sine-noise/sine-noise.wav
Jamie