Proximidi Controller with Arduino

//26/03/2026//

Short Description

I’ve been experimenting with Arduino and MIDI integration, and this is my latest project: a proximity sensor that acts as a MIDI controller in Ableton, with LEDs providing visual feedback.

This project was quite straightforward, because I just made a few connections from the sensor to my Arduino Leonardo + I made a simple code, and it worked already perfectly as a midi controller in ableton. The Led’s are not necessary; It’s simply to make it more fun to use and have feedback!

How It Works

This project uses:

  • Proximity Sensor HC-SR04 (detects your hand and sends data into the Arduino, that is converted to MIDI data for ableton)
  • One LED (reacts directly to the sensor’s distance)
  • Four LEDs (react to MIDI data from Ableton, using separate channels to send it back out to the Arduino)
  • Arduino Leonardo (handles sensor reading and MIDI output)

Pinout

HC-SR04 Proximity SensorArduino Pin
Trigger2
Echo3
GNDGND
VCC5V
LED’s (Long legs)Arduino Pin
Proximity LED (sensor feedback)5
LED 1 (MIDI channel 1)6
LED 2 (MIDI channel 2)9
LED 3 (MIDI channel 3)10
LED 4 (MIDI channel 4)11
LED’s (Short legs)
Proximity LED (sensor feedback)-> 220 Ohm ->GND
LED 1 (MIDI channel 1)
-> 220 Ohm ->
GND
LED 2 (MIDI channel 2)
-> 220 Ohm ->
GND
LED 3 (MIDI channel 3)
-> 220 Ohm ->
GND
LED 4 (MIDI channel 4)
-> 220 Ohm ->
GND

How the Code Works

  1. Reading the sensor
    The ultrasonic sensor measures your hand distance. The reading is smoothed using a simple averaging method to prevent sudden jumps.
  2. Mapping distance to MIDI
    The sensor’s distance (2–25 cm) is mapped to a MIDI CC value (0–127), which is sent to Ableton in real time. This lets you control effects, filters, volume, or other parameters just by moving your hand in front of the sensor.
  3. Controlling LEDs
    • Proximity LED: brightness reflects the sensor’s distance in real time.
    • LEDs 1–4: brightness reflects MIDI data received from Ableton, with each LED assigned to a specific MIDI channel. This provides a visual representation of what your MIDI control is doing.
  4. Sending MIDI
    Only significant changes in sensor distance are sent as MIDI CC messages to avoid noise or rapid fluctuations.

Using With Ableton

  1. Connect your Arduino as a MIDI device in Ableton.
  2. Press Command + M (Mac) / Ctrl + M (Windows) to enter MIDI Map Mode.
  3. Move your hand in front of the sensor and assign the CC to any Ableton parameter.

Now you can control Ableton hands-free, with real-time visual feedback from the LEDs.

Here is a link to the Arduino code (to use the proximity sensor + have 1 LED reacting to the sensor + 4 LED’s reacting to ableton): https://docs.google.com/document/d/1jxaoTyvuMMwguVWDEPPiVaX0w0uTGiUuZyqbC143xI4/edit?usp=sharing

I am still learning how to do this, and discovering what I can create, so feel free to leave a comment with suggestions/advice. Thank you!


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *