pub struct Map<S, F> { /* private fields */ }Expand description
Source returned from Source::map
Trait Implementations§
source§impl<S, F, B> Source for Map<S, F>where
S: Source,
F: Fn(S::Frame) -> B,
B: Frame,
impl<S, F, B> Source for Map<S, F>where S: Source, F: Fn(S::Frame) -> B, B: Frame,
source§fn amplify<A>(self, amp: A) -> Amplify<Self, A>where
Self: Sized,
A: Automation,
fn amplify<A>(self, amp: A) -> Amplify<Self, A>where Self: Sized, A: Automation,
Amplify the source by some multiplier
source§fn take(self, dur: impl ToDuration) -> Take<Self, f64>where
Self: Sized,
fn take(self, dur: impl ToDuration) -> Take<Self, f64>where Self: Sized,
End the source after some duration
source§fn take_release<R>(self, dur: impl ToDuration, release: R) -> Take<Self, R>where
Self: Sized,
R: Automation,
fn take_release<R>(self, dur: impl ToDuration, release: R) -> Take<Self, R>where Self: Sized, R: Automation,
End the source after some duration and apply a release envelope
source§fn chain<B>(self, next: B) -> Chain<Self, B>where
Self: Sized,
B: Source<Frame = Self::Frame>,
fn chain<B>(self, next: B) -> Chain<Self, B>where Self: Sized, B: Source<Frame = Self::Frame>,
Chain the source with another
source§fn low_pass<F>(self, freq: F) -> LowPass<Self, F>where
Self: Sized,
F: Automation,
fn low_pass<F>(self, freq: F) -> LowPass<Self, F>where Self: Sized, F: Automation,
Apply a low-pass filter with the given cut-off frequency
source§fn map<F, B>(self, f: F) -> Map<Self, F>where
Self: Sized,
F: Fn(Self::Frame) -> B,
fn map<F, B>(self, f: F) -> Map<Self, F>where Self: Sized, F: Fn(Self::Frame) -> B,
Transform each frame with the given function
source§fn zip<F, B>(self, other: B, f: F) -> Zip<Self, B, F>where
Self: Sized,
B: Source,
F: Fn(Self::Frame, B::Frame) -> Self::Frame,
fn zip<F, B>(self, other: B, f: F) -> Zip<Self, B, F>where Self: Sized, B: Source, F: Fn(Self::Frame, B::Frame) -> Self::Frame,
Combine this source with another using the given frame-combining function
source§fn mix<B>(
self,
other: B
) -> Zip<Self, B, fn(_: Self::Frame, _: Self::Frame) -> Self::Frame>where
Self: Sized,
B: Source<Frame = Self::Frame>,
fn mix<B>( self, other: B ) -> Zip<Self, B, fn(_: Self::Frame, _: Self::Frame) -> Self::Frame>where Self: Sized, B: Source<Frame = Self::Frame>,
Combine this source with another by adding their frames
source§fn pan<P>(self, pan: P) -> Pan<Self, P>where
Self: Sized,
P: Automation,
fn pan<P>(self, pan: P) -> Pan<Self, P>where Self: Sized, P: Automation,
Apply a pan to the source Read more
source§fn positive(self) -> Positive<Self>where
Self: Sized,
fn positive(self) -> Positive<Self>where Self: Sized,
Map the source’s amplitude’s range from [-1, 1] to [0, 1] Read more
source§fn repeat_indefinitely(self) -> Repeat<Self, f64>where
Self: Sized,
fn repeat_indefinitely(self) -> Repeat<Self, f64>where Self: Sized,
Repeat a source indefinitely
source§fn no_repeat(self) -> NoRepeat<Self>where
Self: Sized,
fn no_repeat(self) -> NoRepeat<Self>where Self: Sized,
When repeated, make the source continue where it left off instead of starting over Read more
source§fn ads<A, D, S>(self, envelope: AdsEnvelope<A, D, S>) -> Ads<Self, A, D, S>where
Self: Sized,
A: Automation,
D: Automation,
S: Automation,
fn ads<A, D, S>(self, envelope: AdsEnvelope<A, D, S>) -> Ads<Self, A, D, S>where Self: Sized, A: Automation, D: Automation, S: Automation,
Apply an attack-decay-sustain envelope to the source Read more
source§fn maintained<R>(self, maintainer: &Maintainer<R>) -> Maintained<Self, R>where
Self: Sized,
R: Automation + Clone,
fn maintained<R>(self, maintainer: &Maintainer<R>) -> Maintained<Self, R>where Self: Sized, R: Automation + Clone,
Keep playing this source as long as the given
Maintainer is not droppedsource§fn inspect(self) -> (SourceInspector<Self::Frame>, InspectedSource<Self>)where
Self: Sized,
fn inspect(self) -> (SourceInspector<Self::Frame>, InspectedSource<Self>)where Self: Sized,
Allow the current frame of the source to be inspected
impl<S: Copy, F: Copy> Copy for Map<S, F>
Auto Trait Implementations§
impl<S, F> RefUnwindSafe for Map<S, F>where F: RefUnwindSafe, S: RefUnwindSafe,
impl<S, F> Send for Map<S, F>where F: Send, S: Send,
impl<S, F> Sync for Map<S, F>where F: Sync, S: Sync,
impl<S, F> Unpin for Map<S, F>where F: Unpin, S: Unpin,
impl<S, F> UnwindSafe for Map<S, F>where F: UnwindSafe, S: UnwindSafe,
Blanket Implementations§
source§impl<S> Automation for Swhere
S: Source<Frame = f64>,
impl<S> Automation for Swhere S: Source<Frame = f64>,
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