Contour Extractor
class ContourExtractor
Pitch contour extractor for batch processing of complete audio files.
Creates a complete pitch contour from raw audio, suitable for:
Offline melody evaluation
Pitch analysis of recorded audio
Comparing reference and student performances
The extractor is reusable - call extract() on multiple audio files with the same configuration, then release() when done.
Includes artifact rejection and correction:
Amplitude gating: Rejects frames below RMS threshold (configurable in dB)
Confidence thresholding: Rejects frames with low confidence
Octave correction: Fixes octave detection errors (frequency doubling/halving)
Outlier rejection: Rejects isolated pitch points based on continuity