Build your own MIDI circuits
FAQ
Frequently Asked Questions.
Details
 
MIDI & Music
MIDI and Music Information
Details
 
Infrared Sensors to MIDI Control Change Commands

Infrared Sensors to MIDI

This design uses Infrared distance sensors to convert physical movement/gestures (e.g. hand, leg, head etc.) to MIDI Control Change messages. These MIDI messages can be used to control various elements within a MIDI software or hardware synthesiser/module.

 

The 6 Infrared (IR) distance sensors control MIDI Control Change data numbers 48 to 61 inclusive. The MSB is first (0 to 127 e.g. CC#48), then the LSB is second (0 to 7 eg CC#49). This is the first pair of CC messages for a 10 bit data output.

 

These values can be assigned in MIDI programmes e.g. Reason, Live, Sonar, Cubase etc. to control various parameters within these programmes. The MIDI output channel (1 to 16) can be selected by the 4-way DIP switch.

 

 

 

 

6 IR SENSORS TO MIDI CC

ITEM#: 6IR2MIDI

PRICE:  €35.00


 

 

 

 

 

 

The MIDI  6-way IR Sensor unit utilizes:

  • A Miduino kit including a suitable pre-programmed Atmega168,
  • A 2.1mm power socket, and associated LED, 
  • A 4-way DIP switch, which selects the MIDI channel at power-on, or in programme mode, shown in table 1
  • A MIDI 5-pin DIN input socket,
  • A MIDI 5-pin DIN output socket,
  • A MIDI activity LED,
  • 6 off 0.1" pin-terminal potentiometer inputs,
  • The circuit schematic is available,

 

 

  

  

The MIDI  6-way IR Sensor unit requires:

  • A 9 Volt battery or equivalent 9 Volt DC power source
  • 6 Infrared Distance Sensors, Analogue Outputs

 

Operation:

The design uses Sharp analogue output Infrared distance sensors. There are various types available with different sensor ranges. Some examples are of 4-30 cm distance GP2D120XJ00F and 10-80 cm distance GP2D12J0000F.  The MIDI channel, that the volume controller affects, is set by the 4-way DIP switch selection, shown in Table 1 below.

 

Circuit Schematic:

A circuit schematic of the Miduino, combined with the Infrared distance sensors, shows the Input/Output connections. The Miduino is designed to connect to external breadboards or matrix boards on a 0.1" grid.

 

Assembly:

The kit includes all parts necessary, the assembly is straightforward and well documented. This design does not include a USB chip, it is designed to use a FTDI USB 232-TTL cable to program the microcontroller.  However since the cable plugs directly into the Miduino, you can use one cable for multiple Miduinos.

   

MIDI Wiring:

The MIDI  OUT connector uses a  5-Pin 180 degree DIN sockets. Note that the MIDI IN/OUT wiring is polarised and the correct pins should be used.

 

Download:

Open the  source code file and copy and paste it into the Arduino programme and save it as a .PDE file.

 

Programming:

Note, because the MIDI IN Opto-coupler shares the same serial input as the USB interface, when programming the Miduino the MIDI IN connection has to be disconnected. Also the the current needs  of the IR sensors require the use of an external power supply if the sensors are connected when programming the ATmega168 microcontroller via the USB-TTL serial interface.

 

 

 

 

 

DIP Switch Selections

MIDI 

Channel

4 3 2 1
on on on on 1
on on on off 2
on  on  off on 3
on on off off 4
on off on on 5
on off on off 6
on off off on 7
on off off off 8
off on on on 9
off on on off 10
off on  off on 11
off on off off 12
off off on on 13
off off on off 14
off off off on 15
off off off off 16

Table 1 MIDI Channel