Skip to main content

clean_up

Function clean_up 

Source
pub fn clean_up(
    decoded: &NoteList,
    run: &ModelRun,
    track: &PitchTrack,
    voicing: Voicing,
    mono: &[f64],
    rate: SampleRate,
) -> (NoteList, CleanupSteps)
Expand description

Cleans decoded notes in five steps, and counts the notes after each.

The steps are the octave check (a monophonic part only, since the track reads a chord as one low period), the merge of notes of one key that overlap, the split of notes at attacks inside them, the join of split notes, and the quiet-note guard at QUIET_GATE. mono is the stem at rate, as the guard reads it.