Skip to main content

Module audio_to_midi

Module audio_to_midi 

Source
Expand description

End-to-end audio → MIDI note transcription.

Pipeline: slice the mono signal into overlapping analysis frames → estimate a per-frame fundamental with yin_pitch → segment_notes that pitch track into MIDI note events. This is the composed convenience entry point; the two stages remain usable on their own.

Epistemic contract: the emitted notes are proposals carrying the mean voicing confidence of their frames — transcribed MIDI is never authoritative the way imported MIDI is.

Zero-heap hot path: the caller supplies the frame/hop geometry, the two per-frame track buffers (f0_scratch, conf_scratch), the YIN work buffer (yin_scratch), and the out note array. This function allocates nothing.

Functions§

audio_to_midi
Transcribe a mono samples buffer into MIDI note events.