Skip to main content

detect

Function detect 

Source
pub fn detect(
    run: &ModelRun,
    track: &PitchTrack,
    bpm: Bpm,
) -> Result<Detection, TranscribeError>
Expand description

Detects the register and voicing of a stem from its model run and its f0 track, and builds the settings for the final decode.

A monophonic part takes the BPM rule for its minimum length, as the bass and lead profiles do; a polyphonic part keeps the decoder default, as the pad profile does.

The f0 register reads the voiced frames within REGISTER_WINDOW of the loudest frame.

ยงErrors

Returns a TranscribeError when the probe decode fails.