JUCE:Projucer hex color paste patch

JUCE is C++ framework for multi-platform VSTi and audio application development (https://juce.com/). It comes with JUCE Projucer IDE that helps a lot with GUI part of plugin development workflow. It is great tool, but color selector GUI component annoyingly lacked ability to accept pasted hex color code. Therefore, I’ve patched color selector GUI component with “paste”…

Sending struct via SPI between Arduino Nano and Arduino Mega 2560

In this experiment, Arduino Nano is SPI Master, sending structured data (struct customMessage) via SPI link to Arduino Mega 2560, which is SPI Slave. The struct is wrapped into union allowing byte level access, used both to read and to write data used in SPI transfer. typedef struct customMessage { unsigned int parameterA; unsigned int…

Controlling 8 digital potentiometers using shift register to save pins

digPotCluster class is part of imbAVR.SynthControl library, in imbAVR.ArduinoSynth GitHub repository. It controls 8 digpots (MPC410-10) using shift register (74CH595N). Purpose of shift register is to reduce number of pins used for CS (chip selection): Normally, you would use 2 (SCLK, MOSI) + 8 (CS for each MPC410-10) = 10 pins Like this, you use…

Doing SPI.Write from class constructor will brick Arduino Pro Micro

I had a small class to manage digpots (MPC410-10), and it all worked well. Until I’ve introduced write call in class constructor (now commented out). void DigPotUnitClass::Write(byte value) { digitalWrite(ChipSelectPin, LOW); SPI.transfer(B00010001); // This tells the chip to set the pot SPI.transfer(value); // This tells it the pot position digitalWrite(ChipSelectPin, HIGH); } DigPotUnitClass::DigPotUnitClass(byte chipSelectPin) { ChipSelectPin…

imbAVR.BassZero: MIDI synth based on Arduino

  Project goal To build USB Midi, monophonic, Bass line synth based on Arduino Pro Micro board. Concept Waveforms are analog modulations of single digital frequency source (digital pin, Arduino tone() method) with pure square waveform. Key (hardware) components: Arduino Pro Micro Microchip MPC 410 10 CP digital potentiometers (10kOhm, 8bit / 256 values) UL741…