pub struct VoiceLeadingQuartet { /* private fields */ }Expand description
Two consecutive notes in each of two voices. Voice one is the upper voice.
Implementations§
Source§impl VoiceLeadingQuartet
impl VoiceLeadingQuartet
Sourcepub fn new(v1n1: Pitch, v1n2: Pitch, v2n1: Pitch, v2n2: Pitch) -> Result<Self>
pub fn new(v1n1: Pitch, v1n2: Pitch, v2n1: Pitch, v2n2: Pitch) -> Result<Self>
Builds a quartet from the first and second pitch of the upper voice, then the first and second pitch of the lower voice.
Sourcepub fn from_names(
v1n1: &str,
v1n2: &str,
v2n1: &str,
v2n2: &str,
) -> Result<Self>
pub fn from_names( v1n1: &str, v1n2: &str, v2n1: &str, v2n2: &str, ) -> Result<Self>
Builds a quartet from pitch names, in the same order as Self::new.
Sourcepub fn with_key(self, key: Key) -> Self
pub fn with_key(self, key: Key) -> Self
Attaches the key the progression is heard in, which
Self::is_proper_resolution and Self::clausula_vera consult.
Sourcepub fn is_proper_resolution(&self) -> Result<bool>
pub fn is_proper_resolution(&self) -> Result<bool>
Whether a dissonant first interval resolves the way voice-leading
rules expect: music21’s isProperResolution. A fourth wants the upper
voice to fall or stay; a tritone or a minor seventh wants the
leading tone up, the seventh down and the right contrary motion — and
with a key set, only when the notes really are those scale degrees.
Anything else, and no motion at all, is proper.
Sourcepub fn leap_not_set_with_step(&self) -> bool
pub fn leap_not_set_with_step(&self) -> bool
Whether one voice leaps while the other neither steps nor holds:
music21’s leapNotSetWithStep. Two thirds in contrary motion are let
through.
Sourcepub fn modal_opening(&self) -> Result<bool>
pub fn modal_opening(&self) -> Result<bool>
Whether the two voices open the way sixteenth-century counterpoint
opens: music21’s modalOpening. Errors without a key.
One of the two harmonic intervals must be a unison or a fifth — the second may be, to allow for an anacrusis — and the pair must establish the tonic or the dominant. Which of the two says so is whichever can be read at all: music21 asks the first, and only falls to the second when the first says nothing.
Sourcepub fn opens_incorrectly(&self) -> Result<bool>
pub fn opens_incorrectly(&self) -> Result<bool>
The opposite of Self::modal_opening: music21’s opensIncorrectly.
Sourcepub fn closes_incorrectly(&self) -> Result<bool>
pub fn closes_incorrectly(&self) -> Result<bool>
The opposite of Self::clausula_vera: music21’s closesIncorrectly.
Sourcepub fn clausula_vera(&self) -> Result<bool>
pub fn clausula_vera(&self) -> Result<bool>
Whether the two voices close a clausula vera: stepwise contrary motion, one voice by a semitone and the other by a tone, onto a unison or octave on the tonic. Errors without a key.
Sourcepub fn vertical_intervals(&self) -> &[Interval; 2]
pub fn vertical_intervals(&self) -> &[Interval; 2]
The harmonic intervals from the upper voice to the lower voice, at the first and second moment.
Sourcepub fn horizontal_intervals(&self) -> &[Interval; 2]
pub fn horizontal_intervals(&self) -> &[Interval; 2]
The melodic intervals each voice moves through, upper voice first.
Sourcepub fn motion_type(&self, allow_anti_parallel: bool) -> MotionType
pub fn motion_type(&self, allow_anti_parallel: bool) -> MotionType
Classifies the motion. Anti-parallel motion is reported as contrary
unless allow_anti_parallel is set.
Sourcepub fn oblique_motion(&self) -> bool
pub fn oblique_motion(&self) -> bool
Returns whether exactly one voice holds its pitch.
Sourcepub fn similar_motion(&self) -> bool
pub fn similar_motion(&self) -> bool
Returns whether both voices move in the same direction.
Sourcepub fn parallel_motion(
&self,
required: Option<&ParallelRequirement>,
allow_octave_displacement: bool,
) -> bool
pub fn parallel_motion( &self, required: Option<&ParallelRequirement>, allow_octave_displacement: bool, ) -> bool
Returns whether the voices move in the same direction keeping the same
generic interval. With required, the interval must also be that one;
allow_octave_displacement accepts a fifth answered by a twelfth.
Sourcepub fn contrary_motion(&self) -> bool
pub fn contrary_motion(&self) -> bool
Returns whether the voices move in opposite directions.
Sourcepub fn outward_contrary_motion(&self) -> bool
pub fn outward_contrary_motion(&self) -> bool
Returns whether the voices move apart.
Sourcepub fn inward_contrary_motion(&self) -> bool
pub fn inward_contrary_motion(&self) -> bool
Returns whether the voices move towards each other.
Sourcepub fn anti_parallel_motion(&self, required: Option<&Interval>) -> bool
pub fn anti_parallel_motion(&self, required: Option<&Interval>) -> bool
Returns whether contrary motion lands on the same simple interval it
left, such as a fifth opening out to a twelfth. With required, that
interval must also be the given one.
Sourcepub fn parallel_interval(&self, interval: &Interval) -> bool
pub fn parallel_interval(&self, interval: &Interval) -> bool
Returns whether the voices move in parallel or anti-parallel through the given interval, in any octave.
Sourcepub fn parallel_fifth(&self) -> bool
pub fn parallel_fifth(&self) -> bool
Returns whether the voices move in parallel fifths.
Sourcepub fn parallel_octave(&self) -> bool
pub fn parallel_octave(&self) -> bool
Returns whether the voices move in parallel octaves.
Sourcepub fn parallel_unison(&self) -> bool
pub fn parallel_unison(&self) -> bool
Returns whether the voices move in parallel unisons.
Sourcepub fn parallel_unison_or_octave(&self) -> bool
pub fn parallel_unison_or_octave(&self) -> bool
Returns whether the voices move in parallel unisons or octaves.
Returns whether similar motion arrives at the given interval without having started from it.
Returns whether similar motion arrives at a perfect fifth.
Returns whether similar motion arrives at a perfect octave.
Sourcepub fn voice_overlap(&self) -> bool
pub fn voice_overlap(&self) -> bool
Returns whether a voice moves past where the other voice just was.
Sourcepub fn voice_crossing(&self) -> bool
pub fn voice_crossing(&self) -> bool
Returns whether the lower voice is above the upper voice at either moment.
Trait Implementations§
Source§impl Clone for VoiceLeadingQuartet
impl Clone for VoiceLeadingQuartet
Source§fn clone(&self) -> VoiceLeadingQuartet
fn clone(&self) -> VoiceLeadingQuartet
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for VoiceLeadingQuartet
impl Debug for VoiceLeadingQuartet
Source§impl<'de> Deserialize<'de> for VoiceLeadingQuartet
Available on crate feature serde only.
impl<'de> Deserialize<'de> for VoiceLeadingQuartet
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>,
Auto Trait Implementations§
impl Freeze for VoiceLeadingQuartet
impl RefUnwindSafe for VoiceLeadingQuartet
impl Send for VoiceLeadingQuartet
impl Sync for VoiceLeadingQuartet
impl Unpin for VoiceLeadingQuartet
impl UnsafeUnpin for VoiceLeadingQuartet
impl UnwindSafe for VoiceLeadingQuartet
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