Struct sampler::map::Map [] [src]

pub struct Map<A> {
    pub pairs: Vec<SampleOverRange<A>>,
}

A type that maps frequncy and velocity ranges to audio samples.

Fields

Methods

impl<A> Map<A> where
    A: Audio
[src]

Construct an empty Map.

Construct a Map from a series of mappings, starting from (-C2, 1.0).

Creates a Map with a single sample mapped to the entire Step and Velocity range.

Inserts a range -> audio mapping into the Map.

Returns the Audio associated with the range within which the given hz and velocity exist.

TODO: This would probably be quicker with some sort of specialised RangeMap.

Trait Implementations

impl<A: Clone> Clone for Map<A>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<A: Debug> Debug for Map<A>
[src]

Formats the value using the given formatter.

impl<A: PartialEq> PartialEq for Map<A>
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.