pub fn notes(
request: &NotesRequest<'_>,
transcriber: &Transcriber,
) -> Result<NotesReport, AnalyzeError>Expand description
Transcribes a stem and writes notes.mid into the output folder,
creating it.
The tempo is refined from the stem unless the request says
bpm_exact. The stem runs through transcribe_stem at that tempo
with the detected settings, or those of the profile, and the file
carries that tempo. The file is written to a hidden temporary sibling
and renamed into place, so a failure leaves the old file. Nothing else
in the folder changes, except that force removes a layers.json
that describes the final notes once the new file is in place, so no
report describes a file that is gone.
§Errors
Returns an AnalyzeError when the stem gives no folder name and no
out is given, when the output folder is a file, or, without force,
when it holds a layers.json that describes the final notes, a report
or notes of another stem, a report of the same name with other content,
a layers.json or notes.mid that is not this tool’s, or the backup
that a killed run left; when the stem cannot be decoded or transcribed,
when it gives no note, or when the file cannot be written.