Photoresistor Arduino Midi Theremin
Introduction: Photoresistor Arduino Midi Theremin
I call it the C041D-2020
I made this during the second COVID lockdown in UK, from ideas borrowed from about 5 other projects I found here on Instructables and also on Youtube. As you can see from the video it makes acidy noises by covering the photo resistors, or adding lighter to the photo resistors. The Arduino code is also borrowed from other projects here in Instructables.
The noises are produced by the software (Ableton Live/ Lite), using a Plugin called TAL-NoiseMaker, the potentiometers are MIDI-mapped to effects.
Supplies
PARTS
1) Just about any Arduino board, I used an 'Uno'
2) Some Photoresistors, I used 4, it also worked with just one
3) Some potentiometers, I used 5 potentiometers and a slider, - IMPORTANT - they need to be 10k (linear), they are called 'B10K'
4) A resistor, I used 300ohm, I have seen instructions to use a 10k
5) Make some kind of box or enclosure with a top panel or 3D print one
6) Some knobs for the potentiometers
SOFTWARE
1) Hairless MIDI to Serial Bridge
https://projectgus.github.io/hairless-midiserial/
2) Ableton Live or Lite (you can get a free version here)
https://splice.com/daws/38929163-live-10-lite-vst-...
3) TAL-NoiseMaker (free VST Plugin)
https://tal-software.com/products/tal-noisemaker
4) Arduino IDE
https://www.arduino.cc/en/software
Step 1: Make Some Kind of Box
Make some kind of box or enclosure with a top panel, or 3D print one. I used some scrap wood, and 1mm aluminum sheet, drilled hols for the potentiometers, and photoresistors. My dad milled a slot for the slider. I used duct tape to cover the sides of the box, made some rubber feet from an old car tyre innertube. Decorated the box (see pdf logo), and used clear Gorilla tape to stick on the cutout paper. 485
Add knobs to your potentiometers. I designed and 3D printed some stuff for this project, they may work with yours, you can download
here
Step 2: Wire Up the Device!
Just use the guide in the image gallery, to join all the parts together - I'm pretty sure this is correct (I drew up the schematic diagram from memory, a few days after I finished the project and closed up the box).
When I first made this, I didn't use the photoresistors, it was just controlled by the knobs, then added the photoresistors later.
Step 3: Add the Code to Your Arduino
If this is your first time using Arduino, have a search on google or youtube for a guide on how to setup your board for the first time using Arduino IDE
Then add the code to your board:
int val = 0; //Our initial pot values. We need one for the first value and a second to test if there has been a change made. This needs to be done for all 3 pots.
int lastVal = 0;
int val2 = 0; int lastVal2 = 0;
int val3 = 0; int lastVal3 = 0;
int val4 = 0; int lastVal4 = 0;
int val5 = 0; int lastVal5 = 0;
int val6 = 0; int lastVal6 = 0;
void setup() { Serial.begin(9600); // Set the speed of the midi port to the same as we will be using in the Hairless Midi software }
void loop() { val = analogRead(0)/8; // Divide by 8 to get range of 0-127 for midi if (val != lastVal) // If the value does not = the last value the following command is made. This is because the pot has been turned. Otherwise the pot remains the same and no midi message is output. { MIDImessage(176,1,val);} // 176 = CC command (channel 1 control change), 1 = Which Control, val = value read from Potentionmeter 1 NOTE THIS SAYS VAL not VA1 (lowercase of course) lastVal = val;
val2 = analogRead(1)/8; // Divide by 8 to get range of 0-127 for midi if (val2 ! 149