OpenTheremin MIDI implementation on V3

Attention: open in a new window. PDFPrintE-mail

It's finally done! We have a true and clean MIDI implementation for the Open.Theremin! While the Open.Theremin has it's own sound generator and can be played as stand alone instrument the MIDI software allows you to connect your theremin to any MIDI device or various MIDI synthesizers installed on you computer. This largely extend the functionality and is just great fun to play.

The following MIDI implementation and instructions for Open.Theremin V3 were developed by Vincent Dhamelincourt. Vincent is an experienced electronics and firmware engineer from Lunel, France. He plays keyboards and theremin in a local band. *** A great thank you! ***

Installation:

Download and install the arduino code from the following git repository and carefully read the instruction below. I recommend to first setup and test the theremin as described in the instruction that came with the theremin (using built in sound generator) and then move to MIDI.

https://github.com/MrDham/OpenTheremin_V3_with_MIDI

MIDI synthesizer on the computer

OpenTheremin MIDI is sending at 115200 baud through USB serial.

Use a serial to MIDI router on your computer such as "hairless-midiserial" (http://projectgus.github.com/hairless-midiserial/)
And to generate sound from the MIDI signal use a software MIDI synthesizer such as Gforce's Minimonsta (commercial), Minimogue VA or QSynth (free).



Real DIN MIDI interface

You can also use the OpenTheremin MIDI implemented to communicate with a real MIDI device.

To do so add a DIN connection. See here (https://www.arduino.cc/en/Tutorial/Midi) for the hardware required.
Set the baud rate to 31250 by changing Serial.begin(115200); to Serial.begin(31250); in the code (-> application.cpp -> midi_setup() )

USB-MIDI (HID) device

Through the code provided in the HIDUINO project the Open.Theremin MIDI implemented can be turned into a class-compliant USB-MIDI device. HIDUINO takes advantage of the ATmega (8u2/16u2) chip on the Arduino UNO. So you get a true USB-MIDI device for plug-and-play compatibility on Windows, OSX, and Linux - just like a commercial MIDI controller. Code and documentation can be found here (https://github.com/ddiakopoulos/hiduino).



Implementation:

PITCH :
It uses first note detected at volume rise to generate a NOTEON.
Then it uses PITCHBEND to reach pitch as long as pitch bend range will do.
Beyond it generates a new NOTEON  followed by a NOTEOFF for the previous note (legato).
Pitch bend range can be configured to align with synth's maximum capabilities (1, 2, 7, 12 or 24 semitones - One exception is that I deactivated pitch bend in 1 semitone mode because portamento does a better job then).

VOLUME:
It generates VOLUME continuous controller, starting NOTEON and ending NOTE OFF (when playing Staccato).
The trigger volume can be configured so as we have some volume at note attack on percussive sounds.

CONFIGURATION:
There is two calibration mode. Best use a speaker connected to the theremin to verify calibration and timbre variation.

Normal calibration of antennas: turn REGISTER POT counter clockwise (all left) and press button for 3 seconds -> Runs normal calibration of antennas (yellow LED blinks until finished)

MIDI configuration: turn REGISTER POT clockwise (all to the right), set the configuration with the pots (as shown below) and press button for 3 seconds -> Records the settings (short blink of yellow LED).
  VOLUME POT : sets volume trigger level
  PITCH POT : sets pitch bend range (1, 2, 7, 12 or 24 semitones). Use exactly same pitch bend range on your synth. Maximum setting possible is recommended.
  TIMBRE POT : sets Channel. In the absence of graduation, timbre variation may help (Wave Form 1 low = CH1, WF 1 High = CH2, WF 2 Low = CH3, etc...)

Finally set pots as for audio settings.



MUTE BUTTON:
Sends ALL NOTE OFF on selected channel and stay in mute until it's pushed again. 

Results:
As long as you are inside pitch bend range you can play with the same linearity as with device's sound (same pitch is audible on stable notes without vibrato).
On 24 semitones wide pitch bend range capable monophonic SW synth (tested with Gforce's Minimonsta), the effect is rather good: We play on 4 octaves just like a normal theremin. 
12 semitones capable synth are also good but sometime note transition can be heard. 

SEE VIDEO: