MIDI Control Surface library for Arduino
|
Go to the documentation of this file.
40 for (uint8_t i = 0; i < value; i++)
51 if (newPeak >=
peak) {
virtual float getFloatValue()
Get the VU meter value as a floating point number.
void updatePeak(uint8_t value)
An interface for elements that draw to a display.
An abstract interface for VU meters.
An interface for displays.
Names and note and controller numbers for the Mackie Control Universal (MCU) protocol.
virtual void drawPixel(int16_t x, int16_t y, uint16_t color)=0
Paint a single pixel with the given color.
#define BEGIN_CS_NAMESPACE
constexpr unsigned long VU_PEAK_HOLD_TIME
The time in milliseconds that a VU meter display peak bar stays at the peak before decaying.
void draw() override
Draw this DisplayElement to the display buffer.
VUDisplay(DisplayInterface &display, IVU &vu, PixelLocation loc, uint16_t width, uint8_t blockheight, uint8_t spacing, uint16_t color)
virtual void drawPeak(uint8_t peak)
A simple struct representing a pixel with integer coordinates.
AnalogVUDisplay(DisplayInterface &display, IVU &vu, PixelLocation loc, uint16_t radius, float theta_min, float theta_diff, uint16_t color)
constexpr unsigned long VU_PEAK_DECAY_TIME
The time in milliseconds it takes for the VU meter display peak bar to drop one unit (i....
virtual void drawBlocks(uint8_t value)
void draw() override
Draw this DisplayElement to the display buffer.
Line rasterization algorithm for drawing lines to the display.
virtual uint8_t getValue()=0
Return the VU meter value as an integer.
DisplayInterface & display
constexpr bool VU_PEAK_SMOOTH_DECAY
If set to true, the VU meter display peak bars will decay smoothly (i.e.
virtual void fillRect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color)
Draw a filled rectangle.
unsigned long previousDecay
virtual void drawFastHLine(int16_t x, int16_t y, int16_t w, uint16_t color)=0
Draw a horizontal line.
unsigned int distanceSquared(Pixel other) const
void drawNeedle(float angle)