pub enum KeyProfile {
KrumhanslSchmuckler,
AardenEssen,
SimpleWeights,
BellmanBudge,
TemperleyKostkaPayne,
}Expand description
A set of key-finding weights for the Krumhansl-Schmuckler algorithm.
These are the profiles music21’s analysis.discrete ships, with the
characterisations Craig Sapp gives them in the Humdrum keycor manual.
Variants§
KrumhanslSchmuckler
Krumhansl and Kessler’s 1982 probe-tone ratings. Strong tendency to name the dominant as the tonic.
AardenEssen
Aarden’s 2003 profile from the Essen folksong collection, music21’s default. Weak tendency to name the subdominant as the tonic.
SimpleWeights
Sapp’s simple weights, most consistent over long stretches of music.
BellmanBudge
Bellman and Budge’s profile, with no particular neighbouring-key bias.
TemperleyKostkaPayne
Temperley’s Kostka-Payne corpus profile. Strong tendency to name the relative major in minor keys.
Implementations§
Source§impl KeyProfile
impl KeyProfile
Sourcepub const ALL: [KeyProfile; 5]
pub const ALL: [KeyProfile; 5]
Every profile, in music21’s order.
Sourcepub fn major_weights(self) -> [FloatType; 12]
pub fn major_weights(self) -> [FloatType; 12]
The weights for the twelve pitch classes above a major tonic.
Sourcepub fn minor_weights(self) -> [FloatType; 12]
pub fn minor_weights(self) -> [FloatType; 12]
The weights for the twelve pitch classes above a minor tonic.
Sourcepub fn music21_class_name(self) -> &'static str
pub fn music21_class_name(self) -> &'static str
The name of the music21 class carrying these weights.
Trait Implementations§
Source§impl Clone for KeyProfile
impl Clone for KeyProfile
Source§fn clone(&self) -> KeyProfile
fn clone(&self) -> KeyProfile
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for KeyProfile
Source§impl Debug for KeyProfile
impl Debug for KeyProfile
Source§impl<'de> Deserialize<'de> for KeyProfile
Available on crate feature serde only.
impl<'de> Deserialize<'de> for KeyProfile
serde only.Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for KeyProfile
Source§impl Hash for KeyProfile
impl Hash for KeyProfile
Source§impl Ord for KeyProfile
impl Ord for KeyProfile
Source§fn cmp(&self, other: &KeyProfile) -> Ordering
fn cmp(&self, other: &KeyProfile) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for KeyProfile
impl PartialEq for KeyProfile
Source§impl PartialOrd for KeyProfile
impl PartialOrd for KeyProfile
Source§impl Serialize for KeyProfile
Available on crate feature serde only.
impl Serialize for KeyProfile
serde only.impl StructuralPartialEq for KeyProfile
Auto Trait Implementations§
impl Freeze for KeyProfile
impl RefUnwindSafe for KeyProfile
impl Send for KeyProfile
impl Sync for KeyProfile
impl Unpin for KeyProfile
impl UnsafeUnpin for KeyProfile
impl UnwindSafe for KeyProfile
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more