pub trait Notes {
// Required method
fn notes(&self) -> Vec<Note>;
// Provided method
fn print_notes(&self) { ... }
}
Expand description
A type that can produce a sequence of notes.
Required Methods§
Provided Methods§
Sourcefn print_notes(&self)
fn print_notes(&self)
Print the sequence of notes.
By default this function will print out each notes’ index and its pitch class. For example, printing out C major would look like:
Notes:
1: C
2: E
3: G