|SamplerSound (const String &name, AudioFormatReader &source, const BigInteger &midiNotes, int midiNoteForNormalPitch, double attackTimeSecs, double releaseTimeSecs, double maxSampleLengthSeconds)|
|Creates a sampled sound from an audio reader. |
|const String &||getName () const|
|Returns the sample's name. |
|AudioSampleBuffer *||getAudioData () const|
|Returns the audio sample data. |
|bool||appliesToNote (const int midiNoteNumber)|
|Returns true if this sound should be played when a given midi note is pressed. |
|bool||appliesToChannel (const int midiChannel)|
|Returns true if the sound should be triggered by midi events on a given channel. |
|Public Member Functions inherited from SynthesiserSound|
|Public Member Functions inherited from ReferenceCountedObject|
|void||incReferenceCount () noexcept|
|Increments the object's reference count. |
|void||decReferenceCount () noexcept|
|Decreases the object's reference count. |
|int||getReferenceCount () const noexcept|
|Returns the object's current reference count. |
|Public Types inherited from SynthesiserSound|
< SynthesiserSound >
|Protected Member Functions inherited from SynthesiserSound|
A subclass of SynthesiserSound that represents a sampled audio clip.
This is a pretty basic sampler, and just attempts to load the whole audio stream into memory.
|SamplerSound::SamplerSound||(||const String &||name,|
|const BigInteger &||midiNotes,|
Creates a sampled sound from an audio reader.
This will attempt to load the audio from the source into memory and store it in this object.
|name||a name for the sample|
|source||the audio to load. This object can be safely deleted by the caller after this constructor returns|
|midiNotes||the set of midi keys that this sound should be played on. This is used by the SynthesiserSound::appliesToNote() method|
|midiNoteForNormalPitch||the midi note at which the sample should be played with its natural rate. All other notes will be pitched up or down relative to this one|
|attackTimeSecs||the attack (fade-in) time, in seconds|
|releaseTimeSecs||the decay (fade-out) time, in seconds|
|maxSampleLengthSeconds||a maximum length of audio to read from the audio source, in seconds|
|const String& SamplerSound::getName||(||)||const|
Returns the sample's name.
Returns the audio sample data.
This could be 0 if there was a problem loading it.