pub struct AmplitudeModulator<P: Pattern, M: Pattern> {
pub pattern: P,
pub modulator: M,
}Expand description
Modulates the amplitude of a pattern by another pattern.
Effectively a multiply combinator.
Fields§
§pattern: P§modulator: MTrait Implementations§
Source§impl<P: Clone + Pattern, M: Clone + Pattern> Clone for AmplitudeModulator<P, M>
impl<P: Clone + Pattern, M: Clone + Pattern> Clone for AmplitudeModulator<P, M>
Source§fn clone(&self) -> AmplitudeModulator<P, M>
fn clone(&self) -> AmplitudeModulator<P, M>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<P: PartialEq + Pattern, M: PartialEq + Pattern> PartialEq for AmplitudeModulator<P, M>
impl<P: PartialEq + Pattern, M: PartialEq + Pattern> PartialEq for AmplitudeModulator<P, M>
Source§fn eq(&self, other: &AmplitudeModulator<P, M>) -> bool
fn eq(&self, other: &AmplitudeModulator<P, M>) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl<P: Pattern, M: Pattern> PatternGenerator for AmplitudeModulator<P, M>
impl<P: Pattern, M: Pattern> PatternGenerator for AmplitudeModulator<P, M>
impl<P: PartialEq + Pattern, M: PartialEq + Pattern> StructuralPartialEq for AmplitudeModulator<P, M>
Auto Trait Implementations§
impl<P, M> Freeze for AmplitudeModulator<P, M>
impl<P, M> RefUnwindSafe for AmplitudeModulator<P, M>where
P: RefUnwindSafe,
M: RefUnwindSafe,
impl<P, M> Send for AmplitudeModulator<P, M>
impl<P, M> Sync for AmplitudeModulator<P, M>
impl<P, M> Unpin for AmplitudeModulator<P, M>
impl<P, M> UnsafeUnpin for AmplitudeModulator<P, M>where
P: UnsafeUnpin,
M: UnsafeUnpin,
impl<P, M> UnwindSafe for AmplitudeModulator<P, M>where
P: UnwindSafe,
M: UnwindSafe,
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,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Pattern for Twhere
T: PatternGenerator,
impl<T> Pattern for Twhere
T: PatternGenerator,
Source§fn scale_time(self, scalar: f64) -> ScaleTime<Self>
fn scale_time(self, scalar: f64) -> ScaleTime<Self>
Scales the pattern in the time domain by a given
scalar. Read moreSource§fn scale_intensity(self, scalar: f64) -> ScaleIntensity<Self>
fn scale_intensity(self, scalar: f64) -> ScaleIntensity<Self>
Scales the pattern in the intensity domain by a given
scalar. Read moreSource§fn subtract<Q: Pattern>(self, other: Q) -> Subtract<Self, Q>
fn subtract<Q: Pattern>(self, other: Q) -> Subtract<Self, Q>
Takes the difference of two patterns. Read more
Source§fn average<Q: Pattern>(self, other: Q) -> Average<Self, Q>
fn average<Q: Pattern>(self, other: Q) -> Average<Self, Q>
Takes the average of two patterns. Read more
Source§fn clamp(self, floor: f64, ceiling: f64) -> Clamp<Self>
fn clamp(self, floor: f64, ceiling: f64) -> Clamp<Self>
Clamps the pattern to a given range. Read more
Source§fn clamp_valid(self) -> Clamp<Self>
fn clamp_valid(self) -> Clamp<Self>
Clamps the pattern to a valid scalar value for a buttplug command.
This is in the range of 0.0 to 1.0.
Source§fn scale_valid(self) -> ValidScale<Self>
fn scale_valid(self) -> ValidScale<Self>
Scales a pattern to a valid range for a buttplug command. Read more
fn shift(self, time_shift: f64) -> Shift<Self>
Source§fn repeat(self, count: f64) -> Repeat<Self>
fn repeat(self, count: f64) -> Repeat<Self>
Repeats a pattern
count times, fractional repeats are supported, so pattern.repeat(1.5) is validSource§fn chain<Q: Pattern>(self, other: Q) -> Chain<Self, Q>
fn chain<Q: Pattern>(self, other: Q) -> Chain<Self, Q>
Chains two patterns together,
other is run after self’s duration.Source§fn multiply<M: Pattern>(self, modulator: M) -> AmplitudeModulator<Self, M>
fn multiply<M: Pattern>(self, modulator: M) -> AmplitudeModulator<Self, M>
Modulates the amplitude of the pattern by another pattern.