pub struct Scale {
pub name: String,
pub intervals: Option<Vec<u8>>,
pub intervals_ascending: Option<Vec<u8>>,
pub intervals_descending: Option<Vec<u8>>,
pub notes: Option<Vec<u8>>,
pub notes_ascending: Option<Vec<u8>>,
pub notes_descending: Option<Vec<u8>>,
pub origin: Option<String>,
}Expand description
Represents a musical scale with various properties.
Fields§
§name: StringThe name of the scale (e.g., “Major”, “Dorian”).
intervals: Option<Vec<u8>>The intervals of the scale in semitones, if defined.
Example: A Major scale might have intervals [2, 2, 1, 2, 2, 2, 1].
intervals_ascending: Option<Vec<u8>>The non-standard ascending intervals of the scale in semitones, if distinct from the main intervals.
Example: For an Enigmatic scale, this might be [1, 3, 2, 2, 2, 1, 1].
intervals_descending: Option<Vec<u8>>The non-standard descending intervals of the scale in semitones, if distinct from the main intervals.
Example: For an Enigmatic scale, this might be [1, 3, 1, 3, 2, 1, 1].
notes: Option<Vec<u8>>The notes of the scale, expressed as offset from root, if defined.
Example: A C Major scale might have notes [0, 2, 4, 5, 7, 9, 11] corresponding to C, D, E, F, G, A, B.
notes_ascending: Option<Vec<u8>>The non-standard ascending notes of the scale, if distinct.
Example: For an Enigmatic scale, this might be [0, 1, 4, 6, 8, 10, 11].
notes_descending: Option<Vec<u8>>The non-standard descending notes of the scale, if distinct.
Example: For an Enigmatic scale, this might be [0, 1, 4, 5, 8, 10, 11].
origin: Option<String>The origin or cultural association of the scale, if available.
Example: A scale might have an origin like "Egypt" or "India".
Trait Implementations§
impl Eq for Scale
impl StructuralPartialEq for Scale
Auto Trait Implementations§
impl Freeze for Scale
impl RefUnwindSafe for Scale
impl Send for Scale
impl Sync for Scale
impl Unpin for Scale
impl UnwindSafe for Scale
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.