[−][src]Struct minstrel::Key
A collection of seven notes, categorised by a Mode
.
Implementations
impl Key
[src]
pub fn new(root_note: Note, mode: Mode) -> Self
[src]
Creates a new Key
based on the given root_note
and mode
.
Examples
use minstrel::{Key, Mode, Note}; let c_major = Key::new(Note::new(0), Mode::Ionian); let a_minor = Key::new(Note::new(9), Mode::Aeolian);
pub fn notes_disregarding_octave(self) -> [Note; 7]
[src]
Returns the key's seven notes without regard for octave numbers.
See Note::disregard_octave()
for more detail.
Examples
use minstrel::{Key, Mode, Note}; let e_phrygian = Key::new(Note::new(4), Mode::Phrygian); assert_eq!( e_phrygian.notes_disregarding_octave(), [ Note::new(4), Note::new(5), Note::new(7), Note::new(9), Note::new(11), Note::new(0), Note::new(2), ] );
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Key
impl Send for Key
impl Sync for Key
impl Unpin for Key
impl UnwindSafe for Key
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,