Skip to content

Final Project

My project will be about music. I already own 2 keybeds, so only keys and contacts. Each key has 2 contacts : one at rest position, one at action position. Calculating the time to switch from rest to action position gives a measurement of the velocity of the key, which is a must have for a playable keyboard, and is fully implemented in the MIDI norm.

My goal will be to interface correctly the keybed and contacts to an Arduino, that will be recognized by an external pc/MAC as a standard MIDI class compliant interface.

Useful add-ons include :

- Sustain pedal
- Volume pedal
- Buttons to switch the MIDI channel, transpose by 1/2 tones, store the settings
- LCD or simple LED display for infos

If possible with the used Arduino, implement it also as a standard audio class compliant sound card, so that the computer is used as a sound generator, and the audio output comes back to the MIDI/audio keyboard of the player.

Here a link to an existing product of that kind

And a picture of another one,
a bit older, but somehow more close to what I would like to do.

The body to be developped will allow to hold a USB audio external interface, a place for a PC/Mac wherefrom it cannot fall, and a metal tube placed vertically but rotatable, that can hold a tablet on its holder.

Research

It already exits commercialy, from Icon and Studiologic.
For me, both miss an important part : the usability in live situation.

Algorithmic matters

The hart of the software is a state table, with one cell per key, each key can cycle the status in the following order :
- REST: the key is in idle up position
- TRAVEL_DOWN_STARTED: the key has left the rest position (rest contact broken) and travels to the action posisiton. During this travel, a counter is running, to measure the travel time.
- TRAVEL_DOWN: The key is travelling to the action position, the counter is running.
- ACTION_REACHED: the action contact is reached. Stop and read the travel time counter, generate the MIDI message NOTE ON(key, channel, velocity).
- ACTION: the action contact is activated, all actions are completed.
- TRAVEL_UP_STARTED: the action contact is broken, the key starts its travel up position, and starts a travel time counter.
- REST_REACHED: the rest contact is activated. Generate the MIDI NOTE OFF message. Go back to REST status.
-

A variation of this table is possible, by sending the MIDI ON message as soon as the note leaves the REST position.
This is used mainly for organ emulation where the keyboard has this early trigger behaviour.

Electronics

The decoding of the keybed requires to read the logic state of 2 contacts per key, plus the position of 2 rotating wheels (pitch bend and modulation), plus some buttons that will allow to modify parameters. The electronic cabling of the keyboard already groups the keys in blocks of 8 contiguous keys, the different blocks have to be activated one by one successively, in order to cover the entire key contacts range.

61 keys => 8 blocks => 16 blocks in total (2 contacts per key)
(76 keys => 10 blocks => 20 blocks)

=> 4 bits to multiplex 4 to 16 bloc selection

=> 8 bits to read the datas of each bloc

=> 2 analog inputs

=> 1 digital input for a sustain pedal

THE REST OF THE PAGE IS NOT EDITED YET.

Materials

Qty Description Price Link Notes
1 Arduino Due 35€ https://docs.arduino.cc/hardware/due lots of digital and analog inputs
  • example
  • [another bulleted example] (http://www.google.be)

Code Example

Use the three backticks to separate code.

// that makes this section look very cool

Video

From Vimeo

Sound Waves from George Gally (Radarboy) on Vimeo.

From Youtube

3D Models


Last update: February 17, 2022