A SamplerVoice that streams the data from a StreamingSamplerSound.
More...
Inherits SynthesiserVoice.
|
bool | canPlaySound (SynthesiserSound *) |
| Always returns true. More...
|
|
virtual void | controllerMoved (int, int) override |
| Not implemented.
|
|
double | getDiskUsage () |
| Returns the disk usage of the voice. More...
|
|
hlac::HiseSampleBuffer * | getTemporaryVoiceBuffer () |
| Returns the sampler's temp buffer. More...
|
|
virtual void | pitchWheelMoved (int) override |
| Not implemented.
|
|
void | prepareToPlay (double sampleRate, int samplesPerBlock) |
| Initializes its sampleBuffer. More...
|
|
void | renderNextBlock (AudioSampleBuffer &outputBuffer, int startSample, int numSamples) override |
| Adds it's output to the outputBuffer. More...
|
|
void | resetVoice () |
| resets everything. More...
|
|
void | setDynamicPitchFactor (double pitchMultiplier) |
| Changes the pitch of the voice after the voice start with the given multiplier. More...
|
|
void | setPitchFactor (int midiNote, int rootNote, StreamingSamplerSound *sound, double globalPitchFactor) |
| You have to call this before startNote() to calculate the pitch factor. More...
|
|
void | setPitchValues (const float *pitchDataForBlock) |
| You can pass a pointer with float values containing pitch information for each sample and the delta pitch value for each sample. More...
|
|
void | setStreamingBufferDataType (bool shouldBeFloat) |
| Set this to false if you're using HLAC compressed monoliths. More...
|
|
void | setTemporaryVoiceBuffer (hlac::HiseSampleBuffer *buffer) |
| Gives the voice a reference to the sampler temp buffer. More...
|
|
void | startNote (int midiNoteNumber, float velocity, SynthesiserSound *s, int) override |
| starts the streaming of the sound. More...
|
|
void | stopNote (float, bool) |
| Clears the note data and resets the loader. More...
|
|
A SamplerVoice that streams the data from a StreamingSamplerSound.
It uses a SampleLoader object to fetch the data and copies the values into an internal buffer, so you don't have to bother with the SampleLoader's internals.
bool canPlaySound |
( |
SynthesiserSound * |
| ) |
|
|
inline |
Returns the disk usage of the voice.
To get the disk usage of all voices, simply iterate over the voice list and add all disk usages.
hlac::HiseSampleBuffer * getTemporaryVoiceBuffer |
( |
| ) |
|
Returns the sampler's temp buffer.
void initTemporaryVoiceBuffer |
( |
hlac::HiseSampleBuffer * |
bufferToUse, |
|
|
int |
samplesPerBlock |
|
) |
| |
|
static |
Call this once for every sampler.
void prepareToPlay |
( |
double |
sampleRate, |
|
|
int |
samplesPerBlock |
|
) |
| |
Initializes its sampleBuffer.
You have to call this manually, since there is no base class function.
void renderNextBlock |
( |
AudioSampleBuffer & |
outputBuffer, |
|
|
int |
startSample, |
|
|
int |
numSamples |
|
) |
| |
|
override |
Adds it's output to the outputBuffer.
void setDynamicPitchFactor |
( |
double |
pitchMultiplier | ) |
|
|
inline |
Changes the pitch of the voice after the voice start with the given multiplier.
void setPitchFactor |
( |
int |
midiNote, |
|
|
int |
rootNote, |
|
|
StreamingSamplerSound * |
sound, |
|
|
double |
globalPitchFactor |
|
) |
| |
You have to call this before startNote() to calculate the pitch factor.
This is necessary because a StreamingSamplerSound can have multiple instances with different root notes.
void setPitchValues |
( |
const float * |
pitchDataForBlock | ) |
|
|
inline |
You can pass a pointer with float values containing pitch information for each sample and the delta pitch value for each sample.
The array size should be exactly the number of samples that are calculated in the current renderNextBlock method.
void setStreamingBufferDataType |
( |
bool |
shouldBeFloat | ) |
|
Set this to false if you're using HLAC compressed monoliths.
void setTemporaryVoiceBuffer |
( |
hlac::HiseSampleBuffer * |
buffer | ) |
|
Gives the voice a reference to the sampler temp buffer.
void startNote |
( |
int |
midiNoteNumber, |
|
|
float |
velocity, |
|
|
SynthesiserSound * |
s, |
|
|
int |
|
|
) |
| |
|
override |
starts the streaming of the sound.
void stopNote |
( |
float |
, |
|
|
bool |
|
|
) |
| |
Clears the note data and resets the loader.