pub fn layers_json(
stem: &Stem,
descriptors: &Descriptors,
synth: Synth,
(source, source_sha256): (&str, &str),
tempo: &Tempo,
(transcription, notes): (Option<&TranscriptionRecord>, Option<&FinalNotes>),
((pitch, envelope, voices), mapped): ((&PitchLayer, &EnvelopeLayer, &VoicesLayer), &Mapped),
) -> Result<String, Error>Expand description
Renders the report of a stem as pretty-printed JSON with a final newline. The same stem always gives the same bytes.
source is the stem’s file name without its folder and the SHA-256 of
the file’s bytes in lower-case hex, tempo the
given and refined tempo, transcription the record of the
transcriber that gave the notes, or None when none ran, and
notes the final note list that notes.mid holds, or None without
notes, and layers the pitch, envelope and voices layers with the
mapper’s output for them, which each group splits by its name.
§Errors
Returns a serde_json::Error only if a value cannot be written, which
the finite unit types never cause.