Introduction: Aetherharp-4 MIDI Air Piano

About: my inventions

I had a Theremin-based synthesizer instrument on my wishlist for many many years, but when I saw the Aetherharp from XenonJohnI decided to build this instrument also. The hardware is not very complicated and tinkering with the software is a very nice challenge to get the sounds you really want.

My Aetherharp is an upgrade from the original Aetherharp (it is now version 4), using the same Teensy 3.5 microcontroller and eight SHARP infra-red sensors laid out in a row, but now 8 notes in 6 octaves can be played, by hovering your hand in two positions above the note you wish to play and using the UP/DOWN octave buttons.

The information from the sensors is transmitted to a PC/laptop via USB and the MIDI protocol with 128 selectable instruments. This PC uses software to convert these signals into sound via the free software program Midi Player https://falcosoft.hu/softwares.html#midiplayer . This program uses soundfont (*sf2) files that can be downloaded from the internet, see step 5 of this instructable.

MIDI means Musical Instrument Digital Interface: a standard means of sending digitally encoded information about music between electronic devices, as between synthesizers and computers.

SoundFont is a brand name that collectively refers to a file format and associated technology that uses sample-based synthesis of musical instrument or other sounds to play MIDI files.


This Aetherharp-4 has many improvements compared with the original design:

The grounding system.

The Arduino software version. See the attached ino file in step 5.

Outliers removed via a Median filter (5x).

An LCD display with a rotary encoder for selecting and resetting MIDI instruments from a list.

Two pushbuttons to select (UP/DOWN) 5 octaves, starting with the middle octave (E4).

Three switches to toggle ON/OFF vibrato, duo and sustain effects.

Two Light Dependent Resistors (LDR) to allow pitch bending while playing by moving your hand above them.

The Sharp IR sensors (type GP2YA41SK0F) are turned 90 degrees for better reaction to hand movements.

The power supply for the sensors wired per sensor to a central connection with a large capacitor.

This minimizes noise on the power connections.

An indication LED is added for the 5VDC external power supply.

The sensors are mounted directly underneath the acrylic cover to avoid blocking of the IR sensor light.

Duo-color (blue an red) Indication LEDs are added for each sensor. They are ON when a note is played and when sustain is active. When the distance from your hand to a sensor is 5 cm. or less, the tone played is lowered one octave and the red LED is activated instead of the blue one.

How to use the Aetherharp-4 and play wondrful music or make funny noises is descibed in the attached user manual.

Supplies

See the attached PDF document for the components and tools needed for the construction of the Aetherharp-4.

Step 1: The Construction of the Enclosure

The enclosure is made from pinewood and glued together without using screws. See the attached construction drawing for the details and the supplies list for the exact dimensions. The top cover is made from a white plastic L-profile with a clear acrylic cover for the sensor part. The control unit has a hardboard cover. The outside of this enclosure is finished with a nice clear coating.



Step 2: The Hardware Components

The Teensy 3.5 microcontroller is very small and cannot be bolted in an enclosure. I used a small hardboard frame with four holes and used double sided tape for the Teensy. I soldered two rows of female headers on the Teensy and attached male connection pins for the wiring. The Sharp sensors are placed inside the enclosure with a spacing distance of 110 mm. I used additional 28 mm. plastic spacers and 40 mm. M3 bolts to mount the sensors just under the acrylic cover. This cover reflected and blocked the IR signals when the sensors were mounted on the pinewood bottom of the enclosure. Blue/Red duo color indication LEDs are added for each sensor. Leds are ON as long as a note is played and when the sustain setting is active.The ground connection from the external power supply for the analog infrared sensors is separated from the other ground connections. This minimizes noise from the digital components. This ground is connected to the AGND pin from the Teensy 3.5. This pin is connected to the normal GND via an internal noise filter.

The LEDs are mounted on a small cardboard strip and placed inside a plastic cable tray mounted on top of the cable tray with the sensor wiring. Each LED has two connections (red and blue, connected to the digital output pins of the Teensy 3.5) and a common wire connected via a 220 Ohm resistor to GND.

The Light Depending Resistors (LDR) are mounted on a small PCB together with the resistors.

See the wiring diagram for all details.

Step 3: The Power Supply

To avoid power supply disturbances and noises through the wiring the sensors are not powered in series but are each connected to a centralized connection board with a capacitor and GND and +5 VDC connections, mounted close to the Teensy. With this setup power fluctuations will be minimized for the sensors, the 4K7 resistors are for the I2C connections of the control display. The power for the sensors now comes from a separate external 5VDC power supply, the Teensy board and the LCD screen are powered via the USB connection.

Step 4: The Control Unit

The control unit consists of an LCD display with I2C connections, 3 toggle switches (vibrato, duo and sustain), two pushbuttons for octave selection UP/DOWN, a rotating encoder with pushbutton to reset and select an instrument by scrolling through the instrument list. A blue LED shows the presence of the external 5VDC power. For the pitchbend I used two Light Dependant Resistors, these are are mounted on a small circuit board strip with 5 mm. plastic spaces. To prevent a short-circuit between GND and +5 VDC when both LDR's have a low resistance 4K7 resistors are placed in series, both 12K resistors take care of a correct range setting for the pitchbend. (try-and-error designed).

The control unit is connected with colored wiring. The sensor wiring is neatly hidden inside a white cable tray. A second cable tray is used to add the blue/red duo color indication LED's. The Teensy is connected inside the enclosure with a 100 mm. USB cable to a pass-through connector mounted in the side of the enclosure. To avoid short-circuit on the Teensy connectors the wiring is insulated with shrink tube material. The sensors are connected to 8 analog input pins of the Teensy. The selected input pins are all 5 Volt tolerant, the sensors are powered with 5 VDC but the analog sensor output is never more than 3,3 Volt.



Step 5: The Software

This project does assume some familiarity with Arduino microcontroller projects.

The Teensy can be programmed with the Arduino IDE (Integrated Development Environment) using the TeensyDuino addition. There you can find the Arduino code that needs to be uploaded to the Teensy board. When you upload it you need to select "Serial + MIDI" in the options it gives you when setting up the connection between the laptop/PC and the Teensy. An usb MIDI library is not needed, all MIDI commands will be automatically accepted when Serial + MIDI is selected in the IDE settings. The neccessay libraries (links are attached to step 6) must be uploaded to the computer using "tools/manage libraries" and "install". For the LCD display, the sustain and vibrato switches, the octave selection, the pitchbend and the instrument selection subroutines are included.

I integrated not all instruments in the Teensy sketch, but it is easy to add all 128 instruments later.

See the attached PDF document for the instruments I included in the software.

The PC uses software to convert these MIDI signals into sound. I based my design on the free software sound program Midi Player, see https://falcosoft.hu/softwares.html#midiplayer.

This program does not install itself on your PC, it can be directly started from the directory you have downloaded it to. 

It uses soundfont midi files (*.sf2) with a set of 128 standarized instruments. These files can be downloaded for free, see the links in this step. There are also soundfont files with different sounds (like human voices or hiphop soundbites). Use Google to find these...

When you start making music you must first start the Aetherharp-4 and then the Midi Player on the PC. If you first start this software then you will hear no music.

Outliers from the sensor readings are minimized via the a median filter library. (5x). Each loop of the program one reading is added to an array of 5 and the oldest one is deleted. Then the median value is selected to play a tone.

When the distance from your hand to a sensor is 5 cm. or less, the tone played is lowered one octave and the red LED is activated instead of the blue one.

See the octave chart and the chart with the USB MIDI numbers versus the music notes.

In the duo mode two notes are played at the same time when a sensor is activated. This makes the music sound richer.

Instruments can be selected with a rotating knob. Push to start selection, rotate to select and push again to confirm.

Push this knob for 2 seconds and the instrument will be reset to the first one in the list (grand piano).

During selection all blue leds will light.

See the attached ino file for the latest version of the Arduino sketch.


free soundfont files can be downloaded here:

https://sites.google.com/site/soundfonts4u/

https://musical-artifacts.com/

https://www.zanderjaz.com/

You can use the 128 standard Midi instruments, but also other soundfonts with funny sounds...

the Fatboy soundfont bank is a nice one to start with..

The free MidiPlayer can be downloaded here:

https://falcosoft.hu/softwares.html#midiplayer

Step 6: Ardino Libraries

Step 7: Make Music !

See https://www.youtube.com/watch?v=Rhdkvoi8wBw