Skip to main content

read_note

Function read_note 

Source
pub fn read_note(
    text: &str,
    range: Option<[u8; 2]>,
) -> Result<NoteReading, MusicError>
Expand description

Reads a note name when the producer names no convention.

Picks the one convention whose pitch lies in range; when several or none do, takes scientific pitch. The reading is flagged as an assumption either way.

ยงErrors

MusicError::UnknownNote when no convention reads the text.