pub struct Partial {
pub frequency: Frequency,
pub amplitude: Amplitude,
pub phase: Phase,
pub tag: PartialTag,
}Expand description
A single sinusoidal component of a tone.
Fields§
§frequency: FrequencyFrequency of the component.
amplitude: AmplitudeLinear amplitude of the component.
phase: PhaseStarting phase of the component.
tag: PartialTagSemantic source of the component within a tone.
Implementations§
Source§impl Partial
impl Partial
Sourcepub fn new(
frequency: Frequency,
amplitude: Amplitude,
phase: Phase,
) -> Result<Self, SoundCoreError>
pub fn new( frequency: Frequency, amplitude: Amplitude, phase: Phase, ) -> Result<Self, SoundCoreError>
Builds a validated partial, normalizing the phase and rejecting invalid frequency or amplitude values.
Sourcepub fn tagged(
frequency: Frequency,
amplitude: Amplitude,
phase: Phase,
tag: PartialTag,
) -> Result<Self, SoundCoreError>
pub fn tagged( frequency: Frequency, amplitude: Amplitude, phase: Phase, tag: PartialTag, ) -> Result<Self, SoundCoreError>
Builds a validated tagged partial, normalizing the phase and rejecting invalid frequency, amplitude, phase, or tag values.
Trait Implementations§
impl Copy for Partial
impl StructuralPartialEq for Partial
Auto Trait Implementations§
impl Freeze for Partial
impl RefUnwindSafe for Partial
impl Send for Partial
impl Sync for Partial
impl Unpin for Partial
impl UnsafeUnpin for Partial
impl UnwindSafe for Partial
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