Introduction: Make Your MIDI Accordion
Playing myself concertina i was searching about a solution to fit my needs
- i wanted to play with a headset for my neighboorhood
- i wanted to try computer assister music
There was no good solution on the market so i have buy two arduinos and that was the begining of this adventure
Step 1: Accordion Introduction
What we need to reproduce an accordion
- a keyboard
- a air emulation system
- Midi way to interract with our computer
Step 2: The Keyboard
The mainpoint of this tutorial is to choose wich switch you need
I have try with cheap buttons bought in my electronic store but there where quite bad
So after a few reading on reddit i found what i we need
Cherry MX are the best way to interract with your Arduino
- There is a big community of people doing there own custom keyboard
- A lot of 3D printable keycaps models
- web based app to do your own layout
So you have to buy some cherry MX switchs to reproduce the instrument:
Personnaly black switch are good but i will soon make an other instrument maybe with other switch colors
you have to buy one switch per button you have on your accordion.
Step 3: Keyboard Layout
Now you have to think about the switchs places on your futur instrument
You can go on this website to try as much layout as you want and select one
http://www.keyboard-layout-editor.com/#/
i have made an example for my prototype
note: i use a cherry MX switch for air control
Step 4: From Layout to the Plate
I have used this website to switch beetwen the layout and the plates
http://builder.swillkb.com/
Here you can import your layout and chose the switch enclosure,
I have ask to a friend who have cut for me two inox plates
but i'm sure that you can cut it yourself in a lab or order a cutted version on the web
Sure you can also use the CAD file to build a full box with the enclosures
If you do that please send me a message i'm curious about that
Step 5: Air Control
Probably the most touchy issue i had
Here is two option
you can reproduce an accordion air system but it's very complex and hard to make yourself
or you can use a switch or electronical way to reproduce push and pull on your instrument
i will explain what i have tested and why i'm know using a Cherry MX switch
Footswitch : was hard to press and not reactive at all
Arcade switch : less hard but it was in a bad place and produce a clicky sound louder than cherry mx
Analog joystick : good feeling with it, use your thumb to go up and down (push and pull) but after a few time of use calibration was bad
Cherry MX switch : better than all other solutions, playing is intuitive and really speed up my instrument
Futur test:
I want to try a air system used by mouth objective is to use air flow intensity to reproduce it in midi but i will try it later
Step 6: Arduino Choice
Know that you have ordered your switch and began the box of your MIDI accordion we will see what arduino is good for you
Lets go !
- You want to reproduce both accordion hands
- You want to have the same push pull state on both hands
- You want only one push pull system for both arduino
So if you want to make two boxs (one for each hands) you'll need two arduino's
personnaly i have bought two arduinos pro
Like with your real instrument you'll need to press many buttons in the same time and you'll want to listen all the notes
So be sure that your arduinos had enough free pin because we will not make a multiplex system
Step 7: It's Time to Connect
First put your switch on the plate and you'll have to solder all the pin connector
You'll have to connect one pin of each switch to the ground and the other pin of each switch to an analog pin of your arduino
Step 8: It's Time to Code
All the code i have made is available here
https://github.com/PierreBanwarth/MIDI-concertina
this a platformIO code project so you can install it on your computer and upload to your arduino
What you have to change
// left hand
// this first array is for arduino pins so put in this array the pin you use
uint8_t pinButton[] = {A2,A1,A0,A4,12,11,10,9,8,7,6,5,4,3,2};
// this two arrays are used to affect a midi note to your arduino pins so A2 is 28 in push state and 29 in pull state
uint8_t push[] = {28,33,37,45,44,24,31,36,40,43,35,38,43,47,50};
uint8_t pull[] = {29,34,39,43,46,31,35,38,41,45,38,42,45,48,52};
// the pin you use for air control sytem
uint8_t pousseTirerPin = A3;
A good way is to test your layout and your note configuration with airless MIDI serial who in debug mode will tell you wich note you are playing
Step 9: Software Use
You'll need to use a software like ableton who use MIDI notes (The free version is enough to let you play)
But before you'll need to install hairless midi serial who make the link beetwen MIDI and Serial Port
after you'll need to emulate a MIDI port on your computer
Windows : http://www.tobias-erichsen.de/software/loopmidi.ht...
Linux (not tested) https://ubuntuforums.org/showthread.php?t=1445186...
Mac (not tested) https://ubuntuforums.org/showthread.php?t=1445186...
after that you have to tell to hairless midi serial
to talk with
IN : your arduino
OUT : your virtual midi port
in your "Ableton Like" software you'll have to take your virtual midi port in input
Step 10: Let's Play
Let me know if you have any issue with any part of this tutorial
Hope you'll enjoy !