SampleLibrary

Inherits: Resource < Reference < Object

Category: Core

Brief Description

Library that contains a collection of samples.

Member Functions

void add_sample ( String name, Sample sample )
Sample get_sample ( String name ) const
bool has_sample ( String name ) const
void remove_sample ( String name )
float sample_get_pitch_scale ( String name ) const
float sample_get_volume_db ( String name ) const
void sample_set_pitch_scale ( String name, float pitch )
void sample_set_volume_db ( String name, float db )

Description

Library that contains a collection of Sample, each identified by a text ID. This is used as a data container for the majority of the SamplePlayer classes and derivatives.

Member Function Description

Add a sample to the library, with a given text ID.

Return the sample from the library matching the given text ID. Return null if the sample is not found.

Return true if the sample text ID exists in the library.

  • void remove_sample ( String name )

Remove the sample matching the given text ID.

Return the pitch scale for the given sample.

Return the volume (in dB) for the given sample.

  • void sample_set_pitch_scale ( String name, float pitch )

Set the pitch scale for the given sample.

Set the volume (in dB) for the given sample.