4.VULEDs
This example demonstrates the use of the VULEDs class that displays the VU or level meters from your DAW as an LED bar graph.
Shift registers are used to drive the LEDs.
- Boards: 🛈
- AVR, AVR USB, Nano Every, Nano 33 IoT, Nano 33 BLE, UNO R4, Pi Pico, Due, Teensy 3.x, ESP8266, ESP32
Connections
- SS: 74HC595 ST_CP
- MOSI: 74HC595 DS
- SCK: 74HC595 SH_CP
- A0: Push button (to ground, internal pull-up resistor will be used)
Connect an LED (and series resistor) between each of the first 12 outputs of the shift registers and ground.
Remember to connect the enable pin of the shift register to ground and the master reset pin to Vcc in order to enable it.
Behavior
The LEDs display the level of the first track in your DAW.
When the push button is pressed, the VU meter switches from bar mode to dot mode and back.
Mapping
Map the Arduino as a Mackie Control Universal in your DAW.
Written by PieterP, 2019-12-09
https://github.com/tttapa/Control-Surface
SPIShiftRegisterOut<16> sreg {SPI, SS, MSBFIRST};
sreg.pins().slice<0, 11>(),
1,
};
Button dotBarModeButton = A0;
void setup() {
dotBarModeButton.begin();
}
void loop() {
if (dotBarModeButton.update() == Button::Falling)
vu.toggleMode();
}
The main header file that includes all Control-Surface header files.
Control_Surface_ & Control_Surface
A predefined instance of the Control Surface to use in the Arduino sketches.
void begin()
Initialize the Control_Surface.
void loop()
Update all MIDI elements, send MIDI events and read MIDI input.
A MIDI input element that represents a Mackie Control Universal VU meter and displays its value using...
A class for MIDI interfaces sending MIDI messages over a USB MIDI connection.
constexpr unsigned int Default
Decay one segment/block every 150 ms if no new values are received.