CSL
6.0
|
#include <JCSL_Widgets.h>
Public Types | |
enum | { Vertical = 1, Horizontal, Analog } |
enum | { None = 1, Left, Right, Above, Below } |
Public Member Functions | |
VUMeter () | |
VUMeter (int channel, int type, int segments=0, int markerWidth=2, const juce::Colour &minColour=juce::Colours::green, const juce::Colour &thresholdColour=juce::Colours::yellow, const juce::Colour &maxColour=juce::Colours::red, const juce::Colour &back=juce::Colours::black, float threshold=0.707f) | |
VUMeter (int channel, juce::Image *background, juce::Image *overlay, float minPosition, float maxPosition, juce::Point< int > &needleCenter, int needleLength, int needleWidth=2, int arrowLength=4, int arrowWidth=4, const juce::Colour &needleColour=juce::Colours::black, int needleDropShadow=None, int dropDistance=0) | |
~VUMeter () | |
void | setBounds (int x, int y, int width, int height) |
void | setFrame (int inset, bool raised=false) |
void | setColours (juce::Colour &min, juce::Colour &threshold, juce::Colour &max, juce::Colour &back) |
void | setDecay (int decay, int hold, float percent=0.707f) |
void | setChannel (unsigned channel) |
void | setValue (float v) |
void | setScale (float v) |
float | getValue () |
void | setSkewFactor (float skew) |
void | audioDeviceIOCallback (const float **inputChannelData, int totalNumInputChannels, float **outputChannelData, int totalNumOutputChannels, int numSamples) |
void | audioDeviceAboutToStart (double sampleRate, int numSamplesPerBlock) |
void | audioDeviceStopped () |
void | audioDeviceAboutToStart (juce::AudioIODevice *device) |
Protected Member Functions | |
void | paint (juce::Graphics &g) |
Private Member Functions | |
void | buildImage (void) |
virtual void | timerCallback () |
Private Attributes | |
juce::Image * | m_img |
float | m_value |
float | m_skew |
float | m_threshold |
int | m_meterType |
int | m_segments |
int | m_markerWidth |
int | m_inset |
unsigned | m_channel |
bool | m_raised |
juce::Colour | m_minColour |
juce::Colour | m_thresholdColour |
juce::Colour | m_maxColour |
juce::Colour | m_backgroundColour |
int | m_decayTime |
float | m_decayPercent |
float | m_decayToValue |
int | m_hold |
int | m_monostable |
juce::Image * | m_background |
juce::Image * | m_overlay |
float | m_minPosition |
float | m_maxPosition |
juce::Point< int > | m_needleCenter |
int | m_needleLength |
int | m_needleWidth |
int | m_arrowLength |
int | m_arrowWidth |
juce::Colour | m_needleColour |
int | m_needleDropShadow |
int | m_dropDistance |
float | m_scale = 1.0f |
Definition at line 123 of file JCSL_Widgets.h.
anonymous enum |
Enumerator | |
---|---|
Vertical |
The type of meters to use. |
Horizontal | |
Analog |
Definition at line 128 of file JCSL_Widgets.h.
anonymous enum |
Enumerator | |
---|---|
None |
Needle drop shadow type |
Left | |
Right | |
Above | |
Below |
Definition at line 134 of file JCSL_Widgets.h.
VUMeter::VUMeter | ( | ) |
Definition at line 384 of file JCSL_Widgets.cpp.
References m_decayTime.
VUMeter::VUMeter | ( | int | channel, |
int | type, | ||
int | segments = 0 , |
||
int | markerWidth = 2 , |
||
const juce::Colour & | minColour = juce::Colours::green , |
||
const juce::Colour & | thresholdColour = juce::Colours::yellow , |
||
const juce::Colour & | maxColour = juce::Colours::red , |
||
const juce::Colour & | back = juce::Colours::black , |
||
float | threshold = 0.707f |
||
) |
Definition at line 414 of file JCSL_Widgets.cpp.
References Analog, m_decayTime, m_meterType, and m_segments.
VUMeter::VUMeter | ( | int | channel, |
juce::Image * | background, | ||
juce::Image * | overlay, | ||
float | minPosition, | ||
float | maxPosition, | ||
juce::Point< int > & | needleCenter, | ||
int | needleLength, | ||
int | needleWidth = 2 , |
||
int | arrowLength = 4 , |
||
int | arrowWidth = 4 , |
||
const juce::Colour & | needleColour = juce::Colours::black , |
||
int | needleDropShadow = None , |
||
int | dropDistance = 0 |
||
) |
Definition at line 456 of file JCSL_Widgets.cpp.
References m_background, m_decayTime, m_needleCenter, m_needleColour, and m_overlay.
VUMeter::~VUMeter | ( | ) |
Definition at line 508 of file JCSL_Widgets.cpp.
References m_background, m_img, and m_overlay.
void VUMeter::setBounds | ( | int | x, |
int | y, | ||
int | width, | ||
int | height | ||
) |
Definition at line 619 of file JCSL_Widgets.cpp.
References buildImage().
Referenced by CSLSignalComponent::resized().
void VUMeter::setFrame | ( | int | inset, |
bool | raised = false |
||
) |
Definition at line 624 of file JCSL_Widgets.cpp.
References buildImage(), m_inset, and m_raised.
void VUMeter::setColours | ( | juce::Colour & | min, |
juce::Colour & | threshold, | ||
juce::Colour & | max, | ||
juce::Colour & | back | ||
) |
Definition at line 630 of file JCSL_Widgets.cpp.
References buildImage(), m_backgroundColour, m_maxColour, m_minColour, m_thresholdColour, max, and min.
void VUMeter::setDecay | ( | int | decay, |
int | hold, | ||
float | percent = 0.707f |
||
) |
Definition at line 659 of file JCSL_Widgets.cpp.
References m_decayPercent, m_decayTime, and m_hold.
|
inline |
Definition at line 174 of file JCSL_Widgets.h.
References m_channel.
Referenced by CSLSignalComponent::CSLSignalComponent().
void VUMeter::setValue | ( | float | v | ) |
Definition at line 638 of file JCSL_Widgets.cpp.
References csl_max, csl_min, m_decayTime, m_decayToValue, m_hold, m_monostable, m_skew, and m_value.
Referenced by audioDeviceIOCallback().
|
inline |
Definition at line 176 of file JCSL_Widgets.h.
References m_scale.
|
inline |
Definition at line 177 of file JCSL_Widgets.h.
References m_value.
|
inline |
Definition at line 178 of file JCSL_Widgets.h.
References m_skew.
void VUMeter::audioDeviceIOCallback | ( | const float ** | inputChannelData, |
int | totalNumInputChannels, | ||
float ** | outputChannelData, | ||
int | totalNumOutputChannels, | ||
int | numSamples | ||
) |
Definition at line 793 of file JCSL_Widgets.cpp.
References m_channel, m_scale, and setValue().
Referenced by CSLSignalComponent::audioDeviceIOCallback().
|
inline |
Definition at line 182 of file JCSL_Widgets.h.
|
inline |
Definition at line 183 of file JCSL_Widgets.h.
|
inline |
Definition at line 184 of file JCSL_Widgets.h.
|
protected |
Definition at line 690 of file JCSL_Widgets.cpp.
References Above, Analog, Below, Horizontal, Left, m_background, m_backgroundColour, m_dropDistance, m_img, m_inset, m_maxPosition, m_meterType, m_minPosition, m_needleColour, m_needleDropShadow, m_needleLength, m_overlay, m_raised, m_segments, m_value, Right, and Vertical.
|
private |
Definition at line 515 of file JCSL_Widgets.cpp.
References Analog, csl_max, Horizontal, m_background, m_backgroundColour, m_img, m_inset, m_markerWidth, m_maxColour, m_maxPosition, m_meterType, m_minColour, m_minPosition, m_needleLength, m_overlay, m_segments, m_threshold, m_thresholdColour, and Vertical.
Referenced by setBounds(), setColours(), and setFrame().
|
privatevirtual |
Definition at line 670 of file JCSL_Widgets.cpp.
References m_decayPercent, m_decayToValue, m_monostable, and m_value.
|
private |
Definition at line 192 of file JCSL_Widgets.h.
Referenced by buildImage(), paint(), and ~VUMeter().
|
private |
Definition at line 193 of file JCSL_Widgets.h.
Referenced by getValue(), paint(), setValue(), and timerCallback().
|
private |
Definition at line 194 of file JCSL_Widgets.h.
Referenced by setSkewFactor(), and setValue().
|
private |
Definition at line 195 of file JCSL_Widgets.h.
Referenced by buildImage().
|
private |
Definition at line 196 of file JCSL_Widgets.h.
Referenced by buildImage(), paint(), and VUMeter().
|
private |
Definition at line 197 of file JCSL_Widgets.h.
Referenced by buildImage(), paint(), and VUMeter().
|
private |
Definition at line 198 of file JCSL_Widgets.h.
Referenced by buildImage().
|
private |
Definition at line 199 of file JCSL_Widgets.h.
Referenced by buildImage(), paint(), and setFrame().
|
private |
Definition at line 200 of file JCSL_Widgets.h.
Referenced by audioDeviceIOCallback(), and setChannel().
|
private |
Definition at line 201 of file JCSL_Widgets.h.
Referenced by paint(), and setFrame().
|
private |
Definition at line 202 of file JCSL_Widgets.h.
Referenced by buildImage(), and setColours().
|
private |
Definition at line 203 of file JCSL_Widgets.h.
Referenced by buildImage(), and setColours().
|
private |
Definition at line 204 of file JCSL_Widgets.h.
Referenced by buildImage(), and setColours().
|
private |
Definition at line 205 of file JCSL_Widgets.h.
Referenced by buildImage(), paint(), and setColours().
|
private |
Definition at line 206 of file JCSL_Widgets.h.
Referenced by setDecay(), setValue(), and VUMeter().
|
private |
Definition at line 207 of file JCSL_Widgets.h.
Referenced by setDecay(), and timerCallback().
|
private |
Definition at line 208 of file JCSL_Widgets.h.
Referenced by setValue(), and timerCallback().
|
private |
Definition at line 209 of file JCSL_Widgets.h.
Referenced by setDecay(), and setValue().
|
private |
Definition at line 210 of file JCSL_Widgets.h.
Referenced by setValue(), and timerCallback().
|
private |
Definition at line 211 of file JCSL_Widgets.h.
Referenced by buildImage(), paint(), VUMeter(), and ~VUMeter().
|
private |
Definition at line 212 of file JCSL_Widgets.h.
Referenced by buildImage(), paint(), VUMeter(), and ~VUMeter().
|
private |
Definition at line 213 of file JCSL_Widgets.h.
Referenced by buildImage(), and paint().
|
private |
Definition at line 214 of file JCSL_Widgets.h.
Referenced by buildImage(), and paint().
|
private |
Definition at line 215 of file JCSL_Widgets.h.
Referenced by VUMeter().
|
private |
Definition at line 216 of file JCSL_Widgets.h.
Referenced by buildImage(), and paint().
|
private |
Definition at line 217 of file JCSL_Widgets.h.
|
private |
Definition at line 218 of file JCSL_Widgets.h.
|
private |
Definition at line 219 of file JCSL_Widgets.h.
|
private |
Definition at line 220 of file JCSL_Widgets.h.
|
private |
Definition at line 221 of file JCSL_Widgets.h.
Referenced by paint().
|
private |
Definition at line 222 of file JCSL_Widgets.h.
Referenced by paint().
|
private |
Definition at line 223 of file JCSL_Widgets.h.
Referenced by audioDeviceIOCallback(), and setScale().