u/wataru_y

I made two small Streamlit apps for visualizing pitch detection and pitch tracking algorithms.
▲ 15 r/DSP

I made two small Streamlit apps for visualizing pitch detection and pitch tracking algorithms.

I made two small Streamlit apps for visualizing pitch detection and pitch tracking algorithms.

Pitch Detection Lab focuses on single-frame periodicity functions and compares FFT, YIN, Autocorrelation, and my own periodicity measure.

Pitch Tracking Lab extends this to the time domain and compares:

- YIN

- pYIN

- Bayesian tracking

- Viterbi tracking

- my own bedcmm method

The apps visualize not only the final pitch estimates, but also score maps and the trajectories selected by each algorithm.

I originally built them to understand why different algorithms choose different pitches in ambiguous regions.

Feedback is welcome.

Github:

https://github.com/YASUHARA-Wataru/Periodicity_Analysis_Lab

u/wataru_y — 12 days ago
▲ 17 r/DSP

Experimenting with Bayesian and Viterbi tracking on a periodicity-based pitch detector

I've been experimenting with a pitch detector based on periodicity analysis.

The detector computes a periodicity score over candidate periods and estimates the fundamental frequency from the score peaks.

Initially, each frame was processed independently. To improve temporal consistency, I added two tracking approaches:

- Online Bayesian tracking
- Offline Viterbi decoding

What surprised me was that the periodicity score itself was usually not the source of the errors. In many failure cases, the correct F0 candidate was already present in the score distribution, but the temporal model caused octave jumps.

After some debugging, two changes improved the results significantly:

  1. Adding a parameter to balance the influence of the current observation against the prediction from previous frames.

I also found that the Viterbi approach was generally more robust than the Bayesian tracker. For my test signals, Viterbi could track both guitar and singing voice with roughly the same parameters, while the Bayesian tracker required more tuning.

The most interesting result for me was that the bottleneck turned out to be the temporal tracking stage rather than the periodicity analysis itself.

GitHub:

https://github.com/YASUHARA-Wataru/bedcmmPitch

Article(Japanese):

https://qiita.com/YASUHARA-Wataru/items/99158a45321c8a0d024a

u/wataru_y — 23 days ago
▲ 2 r/DSP

I was testing pitch detection under impulsive noise.

It seems methods like pYIN break down quite quickly as noise increases.

I tried a different approach, and it seems to degrade more gradually under noise.

Here is the detection rate vs noise level:

https://preview.redd.it/likx02wxv2yg1.png?width=640&format=png&auto=webp&s=6a5fec315c2b98bd9ea0afe210ec49677715573c

In time-domain examples, pYIN starts producing incorrect or missing estimates,

while the proposed method still tracks the pitch more consistently.

I’m aware that preprocessing like HPSS could help, but here I focus on robustness without preprocessing.

If you're interested, I’ve shared the implementation and simulation here:

https://github.com/YASUHARA-Wataru/bedcmmPitch

Not sure if this is the right way to evaluate it, so any feedback would be appreciated.

reddit.com
u/wataru_y — 2 months ago
▲ 5 r/DSP

I've been experimenting with pitch detection and noticed that methods like pYIN can become unstable or even fail to estimate pitch when impulse-like noise (sudden spikes in the signal) is present.

I tried a simple alternative approach, and it seems to remain more stable under these conditions.

For example, I was testing with artificially added spikes to simulate noisy conditions.

I'm curious about the practical side:

- Do you actually encounter this kind of impulse noise in real-world audio?

- If so, in what scenarios does it become a problem?

I’d really appreciate any insights or experiences.

reddit.com
u/wataru_y — 2 months ago