[−][src]Function minstrel::guess_keys
pub fn guess_keys(notes: Vec<Note>, root_note: Option<Note>) -> Vec<Key>
Guesses keys that the given collection of notes
could belong to.
Examples
use minstrel::{Key, Mode, Note}; let notes = vec![ Note::new(0), // C Note::new(2), // D Note::new(4), // E Note::new(7), // G Note::new(11), // B ]; assert_eq!(minstrel::guess_keys(notes.clone(), None).len(), 14); // Specifying that the key must start on a certain note (C in this case) // significantly reduces the number of possible keys assert_eq!(minstrel::guess_keys(notes, Some(Note::new(0))).len(), 2);