It Lives! A broomstick driven, photo interruptor sensor enabled pendulum that uses MIDI to make a sound for each half swing.
As part of my research for the Institute of BackYard Studies , I am prototyping various components for a Lightly Oscillating Linguistic Organ (LoLa) – a musical instrument that harnesses the sinusoidal beauty of the pendulum wave.
After much fecking around with magnetic reed switches, analog light sensors, mercury switches, mp3 players and android phones I have finally iterated toward a reliable setup.
- A $2 Opto (or Photo) Interrupter sensor. For two bucks you get a little plastic gizmo that has an IR LED and detector separated by a 3mm gap. A couple of resistors and some fancy PCB wiring and you can make a digital input for the Arduino.
- Arduino Sketch that detects a change of state on said digital input and sends a MIDI note command via the serial output.
- A very simple 3 wire connection to a DIN 5 Connector for MIDI Output (Not quite MIDI standards compliant – need an opto isolator circuit for that).
- MIDI to USB input to an old mac mini that was lying around (PowerPC – OSX 10.5).
- SimpleSynth midi synth running on OSX 10.5.
- MIDI Monitor for OSX to debug things.
- Headphone output from mac mini to an old ghetto blaster in my shed to make noise louder.
- A work of art! (in the making).
Here is what I learnt:
- MIDI can be deceptively simple and frustrating
- On arduino DUE when using the +5V MIDI DIN 5 circuit as per all the instructions out there just got jibberish. By pure chance I tried +3.3V and it works like a charm.
- I probably spent as much time getting the sketch to reliably start with the MIDI sound I wanted (church bell) as I did on the rest of the MIDI work, including cabling.
- I probably should have started with a photo interruptor already wired up as an Arduino sensor rather than go down the rabbit hole of circuit diagrams, datasheets and the futility of resistance!