Struct sampler::Sampler [] [src]

pub struct Sampler<M, NFG, A> where
    NFG: NoteFreqGenerator,
    A: Audio
{ pub instrument: Instrument<M, NFG>, pub map: Map<A>, // some fields omitted }

A Sampler instrument.

Fields

Methods

impl<NFG, A> Sampler<Mono, NFG, A> where
    NFG: NoteFreqGenerator,
    A: Audio
[src]

Construct a Sampler with a Mono::Legato playback mode.

impl<NFG, A> Sampler<Mono, NFG, A> where
    NFG: NoteFreqGenerator,
    A: Audio
[src]

Construct a Sampler with a Mono::Retrigger playback mode.

impl<NFG, A> Sampler<Poly, NFG, A> where
    NFG: NoteFreqGenerator,
    A: Audio
[src]

Construct a Sampler with a Poly playback mode.

impl<M, NFG, A> Sampler<M, NFG, A> where
    NFG: NoteFreqGenerator,
    A: Audio
[src]

Construct a new Sampler.

Map the Instrument to a new Instrument in place.

This is useful for providing wrapper builder methods for the Synth.

Build the Sampler with the given number of voices.

Return the number of voices for use within the Sampler.

Detune the note_on hz by the given amount.

Set the attack.

Set the release.

Set the number of voices to use for

Begin playback of a note.

Stop playback of the note that was triggered with the matching frequency.

Stop playback and clear the current notes.

Produces an iterator that yields Frames of audio data.

Returns whether or not the Sampler is currently playing any notes.

Fills the given slice of frames with the Sampler::frames iterator.

Trait Implementations

impl<M: Clone, NFG: Clone, A: Clone> Clone for Sampler<M, NFG, A> where
    NFG: NoteFreqGenerator,
    A: Audio
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<M: Debug, NFG: Debug, A: Debug> Debug for Sampler<M, NFG, A> where
    NFG: NoteFreqGenerator,
    A: Audio
[src]

Formats the value using the given formatter.