Skip to content

Replace detector ensemble with real pYIN + cepstrum fusion - #14

Open
denizyesilirmak wants to merge 1 commit into
mainfrom
feature/pyin-fusion-rework
Open

Replace detector ensemble with real pYIN + cepstrum fusion#14
denizyesilirmak wants to merge 1 commit into
mainfrom
feature/pyin-fusion-rework

Conversation

@denizyesilirmak

Copy link
Copy Markdown
Owner
  • Remove YinPitchDetector entirely; pYIN is now the sole time-domain detector
  • Rewrite PyinPitchDetector as real frame-wise pYIN (Mauch & Dixon 2014): Beta(2,18) threshold prior, per-candidate probability mass over all CMND minima, deepest-minimum fallback, and a light pitch-continuity bonus in place of the paper's HMM stage
  • Replace EnsembleSelector voting with DetectorFusion: pYIN is the precise primary, cepstrum a coarse corroborator; frequencies are never averaged and mismatched confidence scales are never compared (agree/clash/solo rules)
  • Fix cepstrum returning confident junk on pure tones: pick only strict local maxima (no range-boundary envelope tail) and use scale-invariant peak-vs-rival prominence instead of the saturating snr/5 confidence
  • Drop unused IPitchDetector::setThreshold; rename cryptic variables (diff_/cmnd_ → squaredDifference_/normalizedDifference_, etc.)
  • Rebuild tests around the new architecture (fusion decision tests with stub detectors, harmonic-tone cepstrum test); note tests were silently passing in Release builds with asserts compiled out

- Remove YinPitchDetector entirely; pYIN is now the sole time-domain detector
- Rewrite PyinPitchDetector as real frame-wise pYIN (Mauch & Dixon 2014):
  Beta(2,18) threshold prior, per-candidate probability mass over all CMND
  minima, deepest-minimum fallback, and a light pitch-continuity bonus in
  place of the paper's HMM stage
- Replace EnsembleSelector voting with DetectorFusion: pYIN is the precise
  primary, cepstrum a coarse corroborator; frequencies are never averaged
  and mismatched confidence scales are never compared (agree/clash/solo rules)
- Fix cepstrum returning confident junk on pure tones: pick only strict
  local maxima (no range-boundary envelope tail) and use scale-invariant
  peak-vs-rival prominence instead of the saturating snr/5 confidence
- Drop unused IPitchDetector::setThreshold; rename cryptic variables
  (diff_/cmnd_ → squaredDifference_/normalizedDifference_, etc.)
- Rebuild tests around the new architecture (fusion decision tests with
  stub detectors, harmonic-tone cepstrum test); note tests were silently
  passing in Release builds with asserts compiled out
@denizyesilirmak denizyesilirmak self-assigned this Jul 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant