pub struct PitchOptions {
pub name: Option<PitchName>,
pub step: Option<char>,
pub octave: Octave,
pub accidental: Option<AccidentalSpecifier>,
pub microtone: Option<MicrotoneSpecifier>,
pub pitch_class: Option<PitchClassSpecifier>,
pub midi: Option<IntegerType>,
pub ps: Option<FloatType>,
pub fundamental: Option<Pitch>,
}Expand description
Builder options for constructing a Pitch.
Fields§
§name: Option<PitchName>Pitch name or pitch-space number.
step: Option<char>Diatonic step name.
octave: OctaveOctave number.
accidental: Option<AccidentalSpecifier>Accidental name or alteration.
microtone: Option<MicrotoneSpecifier>Microtone cent offset.
pitch_class: Option<PitchClassSpecifier>Pitch class to realize as a pitch.
midi: Option<IntegerType>MIDI note number.
ps: Option<FloatType>Pitch-space value.
fundamental: Option<Pitch>Fundamental pitch used for harmonic construction.
Implementations§
Source§impl PitchOptions
impl PitchOptions
Sourcepub fn name(self, name: impl Into<PitchName>) -> Self
pub fn name(self, name: impl Into<PitchName>) -> Self
Sets the pitch name or pitch-space number.
Sourcepub fn octave(self, octave: IntegerType) -> Self
pub fn octave(self, octave: IntegerType) -> Self
Sets the octave.
Sourcepub fn accidental(self, accidental: impl Into<AccidentalSpecifier>) -> Self
pub fn accidental(self, accidental: impl Into<AccidentalSpecifier>) -> Self
Sets the accidental.
Sourcepub fn microtone(self, microtone: impl Into<MicrotoneSpecifier>) -> Self
pub fn microtone(self, microtone: impl Into<MicrotoneSpecifier>) -> Self
Sets the microtone.
Sourcepub fn pitch_class(self, pitch_class: impl Into<PitchClassSpecifier>) -> Self
pub fn pitch_class(self, pitch_class: impl Into<PitchClassSpecifier>) -> Self
Sets the pitch class.
Sourcepub fn midi(self, midi: IntegerType) -> Self
pub fn midi(self, midi: IntegerType) -> Self
Sets the MIDI note number.
Sourcepub fn pitch_space(self, pitch_space: FloatType) -> Self
pub fn pitch_space(self, pitch_space: FloatType) -> Self
Sets the pitch-space value.
Sourcepub fn fundamental(self, fundamental: Pitch) -> Self
pub fn fundamental(self, fundamental: Pitch) -> Self
Sets the fundamental pitch.
Trait Implementations§
Source§impl Clone for PitchOptions
impl Clone for PitchOptions
Source§fn clone(&self) -> PitchOptions
fn clone(&self) -> PitchOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PitchOptions
impl Debug for PitchOptions
Source§impl Default for PitchOptions
impl Default for PitchOptions
Source§fn default() -> PitchOptions
fn default() -> PitchOptions
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PitchOptions
impl<'de> Deserialize<'de> for PitchOptions
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for PitchOptions
impl PartialEq for PitchOptions
Source§impl Serialize for PitchOptions
impl Serialize for PitchOptions
impl StructuralPartialEq for PitchOptions
Auto Trait Implementations§
impl Freeze for PitchOptions
impl RefUnwindSafe for PitchOptions
impl Send for PitchOptions
impl Sync for PitchOptions
impl Unpin for PitchOptions
impl UnsafeUnpin for PitchOptions
impl UnwindSafe for PitchOptions
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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