FastTrackiverse / fasttrackpy

A fasttrack implementation in python
https://fasttrackiverse.github.io/fasttrackpy/
MIT License
9 stars 0 forks source link

fasttrackpy / fasttrack inconsistency #59

Closed JoFrhwld closed 7 months ago

JoFrhwld commented 7 months ago

Problem description

There's currently an inconsistency between how fasttrackpy and fasttrack implement

In fasttrack:

In fasttrackpy

The reason $o \le x$ is because some formants may not be tracked with just $2x$ LPC coefficients, so the number of formants optimized over is dynamically adjusted downwards to the largest number of formants in common within a set of candidate tracks.

Proposal

We should adjust the fasttrackpy behavior to be like fasttrack, adding an additional 3 LPC coefficients prior to formant tracking.

Consequences

The documentation will need to be updated to communicate that 3 more LPC coefficients are added prior to audio processing. That is

Since we're still at v0.x.x, we may not need to release a 1.0 version, even though this is a breaking change within fasttrackpy.

santiagobarreda commented 7 months ago

The behavior in fast track (praat original) is:

This ensures that at least 4 non-zero formants can be tracked in any (?) situation. My proposed solutions would be to fix coefficients at 11 and not make it be 2*n_formants+3. The latter solution would mean maximum formant ranges are analysis specific. Also pushing the Nyquist frequency away from the formant of interest is usually good within these frequency ranges. At the very least I believe this should be under the control of the user if we are going to have the number of coefficients vary. For example some people may desire to optimize over 3 formants but still use 11 coefficients.

JoFrhwld commented 7 months ago

I've created a branch to work on this.