[PD] about fiddle~

Jamie Bullock jamie at postlude.co.uk
Fri Jan 11 20:59:21 CET 2008


On Fri, 2008-01-11 at 18:30 +0100, Matteo Sisti Sette wrote:

> 
> > With the default fiddle~ settings, it seems to output 0 about 15% of the
> > time, which seems quite a lot to me.
> 
> With pure noise as an input? Quite a lot?????
> IF it is supposed to output 0 when it can't find a pitch, I would expect to 
> output 0 about 90% of the time with pure noise as input!!

The thing is that fiddle~'s Maximum Liklihood pitch detector, like most
other PDAs takes a relatively small 'window' of sample data and tries to
find periodicity in it. It doesn't care about anything else.

Most small 'windows' taken from noise generators have some discernable
periodicity. There are two important things about this i) the very fact
of windowing the signal imposes an artificial periodicity on it, ii) any
PDA based on an FFT/STFT assumes that the windowed signal is periodic,
because the FFT assumes this. You can try this as an experiment: take a
1024 sample of a noise wave form, and play it back with tabosc~. It will
have a disernable sense of pitch.

I said that 15% seems like quite a lot because generally speaking noise
tolerance is generally considered to be a good quality in PDAs. Given
the same test conditions as I used above, The 'f0' function in libxtract
failed to find a fundamental less than 0.5% of the time and over 5000
frames 'failsafe_f0' failed 0% of the time. However, these functions are
a _lot_ less efficient than fiddle~ and have different design goals. 


> 
> > Anyhow, I think this is a case of using the wrong tool for the job.
> > Pitch/f0 estimators (PDAs) are designed to find pitch in a signal, not
> > to measure noisiness. There are other tools to measure this
> 
> Maybe. The fact is that I do want to find a pitch, but I consider "none" as 
> a possible value, i.e. I want to find the pitch if the signal reasonably has 
> one, and ignore it when it is most probably garbage.

I think that's reasonable. Both 'f0' and 'failsafe_f0' give their output
on a block-by-block basis, and will give '0' if they can't find a pitch.
In addition the function have a return code that indicates whether the
function has failed or succeeded, but this isn't accessible from the Pd
extern.

> I thought there were two kinds of pitch trackers: those which do have a 
> "none" value, and those which assume a pitch must exist and output their 
> best estimation always. (well and a "fuzzy" third type, which always give 
> both a pitch value and an estimated reliability value).

I think the estimated reliability is quite difficult. But should be
possible if another metric is used in combination with f0.

> How do you measure (or define) spectral irregularity?

There are two definitions, one by Krimphoff (1994), and one by Jensen
(1999). 

In Latex maths code:

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}^N
a_k^2}


> 
> I may want to use spectral irregularity to estimate whether the signal is 
> non-noisy and then use fiddle to get the pitch when it is supposed to exist; 
> I just thought that nobody better than the pitchtracker itself could tell me 
> how difficult it is for it to find the pitch!

You might want to look at some other features as well, there is quite a
good Noisiness measure based on (I think) the spectral flatness measure
(SFM) of Bark coefficients.

Jamie

-- 
www.postlude.co.uk





More information about the Pd-list mailing list