A component that displays the waveform of a sample. More...
Public Member Functions | |
void | drawSampleStartBar (Graphics &g) |
draws a vertical ruler at the position where the sample was recently started. More... | |
SamplerSoundWaveform (const ModulatorSampler *ownerSampler) | |
Creates a new SamplerSoundWaveform. More... | |
void | setSoundToDisplay (const ModulatorSamplerSound *s, int multiMicIndex=0) |
Sets the currently displayed sound. More... | |
void | timerCallback () override |
used to display the playing positions / sample start position. More... | |
void | toggleRangeEnabled (AreaTypes type) |
enables the range (makes it possible to drag the edges). More... | |
void | updateRanges (SampleArea *areaToSkip=nullptr) override |
Call this whenever the sample ranges change. More... | |
Public Member Functions inherited from AudioDisplayComponent | |
void | addAreaListener (Listener *l) |
Adds an AreaListener that will be informed whenever a Area was dragged. More... | |
void | drawPlaybackBar (Graphics &g) |
draws a vertical ruler to display the current playing position. More... | |
void | setCurrentArea (SampleArea *area) |
Sets the current Area . More... | |
void | setPlaybackPosition (double normalizedPlaybackPosition) |
Sets the playback position for (0 ... More... | |
virtual | ~AudioDisplayComponent () |
Removes all listeners. More... | |
A component that displays the waveform of a sample.
It uses a thumbnail data to display the waveform of the selected ModulatorSamplerSound and has some SampleArea objects that allow changing of its sample ranges (playback range, loop range etc.)
It uses a timer to display the current playbar.
SamplerSoundWaveform | ( | const ModulatorSampler * | ownerSampler | ) |
Creates a new SamplerSoundWaveform.
ownerSampler | the ModulatorSampler that the SamplerSoundWaveform should use. |
void drawSampleStartBar | ( | Graphics & | g | ) |
draws a vertical ruler at the position where the sample was recently started.
void setSoundToDisplay | ( | const ModulatorSamplerSound * | s, |
int | multiMicIndex = 0 |
||
) |
Sets the currently displayed sound.
It listens for the global sound selection and displays the last selected sound if the selection changes.
|
override |
used to display the playing positions / sample start position.
void toggleRangeEnabled | ( | AreaTypes | type | ) |
enables the range (makes it possible to drag the edges).
|
overridevirtual |
Call this whenever the sample ranges change.
If you only want to refresh the sample area (while dragging), use refreshSampleAreaBounds() instead.
Implements AudioDisplayComponent.