MUSICCONCERTSVIDEOS
VIDEO GAMESD.I.Y.CONTACT
fr | en
MAGMA Midi Synth Controller.


lire l'article en français

1. Introduction

For my last year of jazz piano studies at Saint-Étienne's Conservatory (France), I created a band project with some friends. But I wanted a synthesizer in order to stretch out the audio spectrum of my sounds, generally playing on an acoustic piano. But synths aren't cheap at all. Especially those used in jazz ? the MiniMoog... Since I didn't have such money to spend on that, I decided to make a MIDI controller to plug into MainStage on MacOS, which has killer replicas of vintage synths. I specify that I'm just a computer scientist who do woodworking and reaaaaly basic electronics on my free time ? I'm not an electronic genius, I just like to mess around with the Arduino. PS: The name that I gave to this controller comes from my all time favorite band Magma.

2. Recycling an old keyboard

Here is the naked old keyboard that I used for this project, recycled from a Casio whatever-the-name with really bad sounds. Maybe It was used for children to learn piano two decades from now ? whatever, the touch was pretty close to synthesizer's one, plus it has a nice built-in MIDI-out port that I kept.
The original recycled keyboard.
All the work now was to design the control panel and a case to fit around that thing.

3. Designing the control panels

3.1. Retro Synth on MainStage

First, let me briefly introduce you the so-called 'Retro Synth' VST (or probably an AU) on MainStage that I used before I even had the idea to make this project, first controlled by my good old vintage Yamaha DX7.
View of the nice 'Retro Synth' in MainStage

3.2. Main control panel

I designed the control panel on an app called 'Graphics'. The hardest and longest thing to do was to decide which controls to put at which place. I ended up using every control assigned to the VST, plus some other. Here is the order of the layout from left to right: Here is not the final version of this control panel:
The main control panel

3.3. Wheels and octave panel

Like on a large amount of synthesizers, the need of the pitch and modulation wheels is pretty obvious if you want to add expressivity to your play. This is why I designed a small panel who will stand on the left of the keyboard. I also added an octave shifter in a form of two buttons and five indicative LEDs.
The octave / wheels panel

3.4. Back panel

The MAGMA has the following inputs / outputs, located on the back of the case: I designed a simple back panel with these various ports, and of course, a nice name : "MAGMA - Midi Synth Controller".
The back panel

3.5. Prints

Once I was 100% sure of the last-ultimate-final version of the panels, I get to a local print shop and ordered a full sized paper-print of these. Here is what it looked like, with the potentiometer caps I ordered.
The printed panel
The printed panel with pot. caps
I didn't took pictures of the printed 'wheels-panel', but you get the feeling.

4. Modeling on SketchUp

I you're reading this and you work at the local print shop I talked a few lines above, maybe it's your fault if my synth is actually a little bit smaller that intended. Indeed, I didn't brought a tape measure to check if the dimensions of the panels was 100% accurate; but i should have. The main panel you saw was supposed to be exactly 970 mm wide, but the print is around 930. Which means that I had to shrink the octave and wheels panel down by 5 cm. I suppose it's not such a bad thing since it's pretty comfortable to the left hand not to have a bigger space between the two wheels. But I'm still mad. Grrr. I designed the whole MAGMA M.S.C. on SketchUp, which allowed me to provide any details on the construction of the case.
SketchUp Model - with textures
SketchUp Model - semi-transparent view

5. Let's build it!

Here is an almost detailed history of how I built the MAGMA.

5.1. Plexiglas panel and case

If you take a look to the back of the control panel, you'll see that the case of it is made of Plexiglas! Why? Some time (often), people are telling me that we see all the cables and it's ugly, but the idea was precisely to make it transparent in order to see the back of the potentiometers, the Arduino and Multiplexers (that we'll see below), and the whole bunch of multicolor cables that needed no less than 800 solders by hand. I know it's messy, it's not made in a factory in China, but in my uncle's garage, and I wanted people to know the work that has be done on this controller. Plus, with the animated LEDs, it's just marvelous. ;-)
Whatever, I made this box by laying out the 2mm Plexiglas on top of the printed panel to draw the exact dimensions, then cutting two same rectangles, which will take the print in sandwich. Then I had to plane the sides of them because table saw gives really raw and ugly results on this material.
Drawing the exact dimensions
My uncle cutting the the Plexiglas
Remember to always protect your ears and eyes!
Planing the sides of the Plexiglas sheets
If you are probably wondering how the two Plexiglas sheets surrounding the panel print stays together, just look at the picture below: the electromechanical components who are fixed on both sides of the panel and clamp the whole Plexiglas sandwich down.
Two Plexiglas sheets clamped together by a potentiometer (and my big fat pianist fingers).
Laying out the holes positions
Punching softly the holes for a more precise drilling
Drilling vertically using this convenient plunging adapter
Laying out the PCBs (see bellow). You can see the holes.
Then, I made the other sides of the box using 4 mm Plexiglas, brought together using aluminum angles and rivets. I know what you think: "rivets on Plexiglas? Won't it break??". And yes: it did. But it was on the bottom of the case (we can't see anything), so I fixed up the small broken parts on the corners, and more important: I understood why! The thing is just to drill the holes in the Plexiglas really straight. And then, when the rivets shrink, the pressure is evenly distributed and there is no more breaks! Close one...
Drilling holes through aluminum and Plexiglas
A view of the angles in the corner of the box
The whole "bottom" box ready to be riveted
A rivet who will be installed soon
Riveting on the corner
The control panel with the potentiometers installed
As we will see later (6.2.), I needed a whole bunch of multiplexers chips on PCBs. The way they are attached into the front panel is with small parts of aluminum tubing and machine screw, mounted on the back sheet of Plexiglas of the panel sandwich (seems like this sentence is not understandable but it's simple).
A piece of tubing preventing the PCB rail to touch the potentiometers
The PCB rail under the front panel, attached with the machine screw though the tube
Unfortunately I don't have more pictures of that, I will take new one on the next clean / maintenance.

5.2. Solid wood frame

The frame is built with solid spruce that my uncle gave me, on which I applied several coats of a wildness "exotic wood" varnish and a glossy finish for more sexyness.
First time with the solid frame in place
The crossing board how splits the control panel from the keyboard as a slight bevel that matches the slope of the slides, as you can see in the SketchUp model:
The left wooden side
The internal wooden structure seen from the left
We can see the crossing board in the middle
A lot of sanding was needed in order to make the sides look better.
I used three different sandpapers, and since I had three sanders on hand...
How to sharpen a pencil with a drill...
Before / after sanding
Some varnishing, and we're good!
A side board after a first coat of varnish and a fine sanding
The three spruce boards after the final coat of varnish.

5.3. Plywood frame

The front part being clamped down, ready to be glued and screwed in place
A little jig to drill pilot-holes right at 5 mm from the border of the plywood
The pilot-holes jig in action
A special ring used to countersink the holes

5.4. Installing the keyboard

The original old Casio's keyboard has a very strong metallic frame that was used to be attached onto the plastic mold. I had to make little blocks in order to fit the keyboard perfectly into the wooden case.
How is screwed the right part of the keyboard

5.5. Pitch and Modulation wheels

First I had to cut the Plexiglas for the octave / wheels panel. You will absolutely need some kind of multi-tool or a scroll-saw to do this step.
The octave / wheels panel cut in the Plexiglas (not on the left)
Then, the more stressing part of this build: the pitch and modulation wheels. I made them with three layers of Plexiglas (4 + 2 + 4 = 10 mm), that I cut from square pieces to round on the table saw by gradually moving closer to the blade (picture bellow), gluing them together with hot glue, and finally turning them flat and smooth on the drill press (which I will not recommend).
First cutting small parts of the square...
... and gradually moving towards the blade
This method is not recommended for children and I advise you not to do it unless you are really comfortable with the table-saw. Concerning the return mechanism of the pitch wheel, the following short video will explain it much more simply that a long sentence:
Here is a picture of the final panel with wheels and buttons:
The octave / wheels panel

5.6. Back panel

5.7. Wiring

Internal wiring: Inputs / Outputs:
My workspace during the long process of cutting, stripping and soldering a lot and a lot of wires.
Just for fun, a bit of calculus:
(((60 pots + 2 wheels) * 3 pins) + (27 buttons * 2 pins) + (26 LEDs * 2 pins)) * (2 extremities of cable) = 584 solders [1]
. Of course we can add the multiplexing:
((8 mux for pots LEV1) + (4 mux for buttons) + (1 mux for pots LEV2) + (2 mux for LEDs)) * (16 pins) = 240 solders. [2]
And obviously the arduino I/O:
(3 * 4 mux pins) + (6 * 1 inputs) + (1 * VCC) + (1 * GND) = 20 solders on the Arduino [3]
Which gives us a total of:
[1] + [2] + [3] = 584 + 240 + 20 = 844 solders.
And now, if we take in account the time of cutting (~1s), stripping (~2s), placing (~1s) and soldering (~1s) the wires, we get:
844 solders * 5 seconds = 4220 seconds = 1h 10m 20s
Of course, it took way longer than that (I spent all night from 9PM to 6AM to to all the soldering), because I had to check everything, and this takes a very long time. Here is a video about checking the switches positions using the Arduino and the multiplexers:

5.8. Adding the backlight

I added the backlight a couple of months after the whole projects was done (at least I thought so), and didn't took any picture during the installation. It was quite easy though: I just glued strips of RGB LEDs inside the aluminum corners of the Plexiglas control panel, which are controlled by a small unit just next to the Arduino via a small remote. Now we can see the wires better (as I wanted to), and it provides an excellent backlight to the control panel, which is more than convenient when playing on a dark stage.

6. Electronics: how it works

6.1. Arduino

The Arduino board is an open-source micro-controller based on the ATMEGA128 or ATMEGA328 chip. A smaller but as efficient version of the standard Arduino UNO, the Arduino Nano (Rev. 3) is what I used for this project. It's really simple to used, and even if you have no experience in programming, you can make some funny projects pretty quickly. If you want to learn more about it, there is a huge community of makers that shares their various ideas and problems to the others, such as the Arduino Officiel Tutorials website or (my personal favorite) the Instructables DIY tutorials website, which is really really wonderful.

6.2. Multiplexing / De-multiplexing

If you know the Arduino a little bit, you'll know that there is a limited number of inputs and outputs (analog or digital). This is where multiplexing and de-multiplexing becomes necessary. Here is how it works: with 3 binary digits, you can count from 0 to 7 (000, 001, 010, 011, 100, 101, 110, 111). Now let's say that we have a chip that has 8 analog or digital inputs, and one output ; using 3 binary voltage controls A, B, C (HIGH or LOW for 1 or 0), you can select the input which will be redirected the the output of the chip. And it's exactly what does the CD4051 chip. If now, you want to light up one LED at the time among 8, you can revert the process by setting the previously called output pin to a input voltage of 5V, and then simply select which of the 8 outputs you want to pass the 5V to with three controls A, B, C.
Pinout of the CD4051 chip
Of course, if you do the maths, you've seen that I had 60 potentiometers and near 30 buttons, which will output after multiplexing 8 + 4 = 12 wires, which is still to much to input into the Arduino, knowing that we have 3 outputs connected in parallel to the A, B and C control pins of the CD4051's. So what I've done is to take the 8 outputs from the multiplexed voltages coming from the potentiometers, and multiplexed them again with the help of three new control pins (let's say D, E and F) connected to the arduino, resulting on having a single wire coming to the analog read pin of the Arduino the read the whole set of potentiometers! Pretty cool isn't it?
It's fairly simple to implement on the programmer (I do it in one line of code), but requires a bit of a headache on the soldering phase.

7. Programming!

Alright friends ! You may know that I'm actually an computer scientist, so I loved this part, and actually written all the code even before receiving all the electronic components. I'll explain the general algorithm and enter in some details by trying to be understandable by most of you.

7.1. MIDI code

Let's start with the core of the whole project: the MIDI protocol. This simple way to communicate between instruments without loosing any information exists since the early 80's, and has now become a grand standard for every single musical controller (and even machine and show controls), either using the original 5-pins DIN connector, or from several years now, USB. A MIDI code is just a sequence of three consecutive bytes (8 bits): As you can see, MIDI is quite simple. In order to play notes, you use the message (144 + chn, note number, velocity) for a note ON, and (128 + chn, note number, velocity) for a note OFF, with chn being the channel (0 - 15) you want to use to transmit the data. In our case, we want to control things on the computer. So we use "Control Changes" messages, defined as follows : (176 + chn, ID of the control, value of the control). Simple as that. We just have a small variation for the pitch-bend wheel : (224, 0, pitch value)

7.2. A basic algorithm

7.3. The real Arduino Code

8. That's it! ? Final product

8.1. Various pictures of the MAGMA in its natural habitat

At his home, where he lives most of the year...
Here is the digestive system of the MAGMA
Surgery is sometimes necessary...
He likes to be with other synth friends.
A little selfie.
The mouth wide open, ready to talk!
He can stand up easily on his two glassy feet.
He's a little bit blueish, wonder if he's ok.
Into the wild, he needs a lot a external resources to survive
And a few days every month, he likes to shows up on stage...
Meditating with his guru.
Big stage this night!
Taking a sunbath at the "Jazz à Vienne" festival...

8.2. Time consumption of the whole project

A little timeline of the built: I estimated that I passed something like 300 or 400 hours to entirely do this project, from the first hand-drawing to the last solder. Designing and soldering was the most time-consuming.

8.3. How much did it cost?

Here is two tables detailing the material costs:
Woodworking stuff
ArticlesDimensionsPrice / pce# PiecesTotal Price
ply wood1200 x 600 x 510.5110.50
plexiglas1000 x 500 x 2.510.6221.20
plexiglas1000 x 500 x 519.9119.90
piano hinge2000 x 323.513.50
wood glue100g5.415.40
dowels50p1.9911.99
wood screws313.00
Total65.49
Electronics
ArticlePrice / pce# PiecesTotal Price
pots0.1676410.706
PCBs0.10640.424
LEDs0.0108200.216
CD40510.1335131.7355
USB female1.1911.19
12v jacks0.19710.197
jacks socket0.4220.84
power supply0.8710.87
resistors0.0176100.076
Arduino Nano1.58511.585
pot caps (A02)0.3056018.34
pot caps (A03)212
pot caps (A04)0.31710.317
switches0.187132.431
flat (ribbon) wire6.1416.14
buttons0.0855151.2825
bumpers0.09540.38
totals19747.44
Knowing that I get for free the following items: The total cost of the MAGMA is around 112.93 ?. The cost of a MIDI controller with 16 pots and 8 buttons around 150?, and an controller as complete as the MAGMA simply does not exists. A real analog synthesizers with the same capabilities between 800? and 4000?, it's seems like a good deal! Of course, if you count 400 hours of man labor at 9?/h, you add an extra 3600?. Which means that if someone want to order one from me, I'll ask him probably 4000?. Ouch...

8.4. Does it worth it?

Yep, totally. As attended, I used it on my final jazz exam at the conservatory, and I get my diploma with a really good grade. It's not all due to the MAGMA, but I was able to make a beautiful long solo on the synth that I think people enjoyed. The jury did ;-)
Moreover, I use it for every jazz and funk gigs since I built it. I can play various synths (generally basses), and even other well-sampled Rhodes, organs and clavinets, until I bought my KORG SV-1 almost two years later to play the piano and rhodes sounds.
I absolutely love it, and I hope you like the design and the idea of it!

8.5. Demo in Video

Here is a cover of the magnificent Stranger Things series O.S.T. that I make exclusively on the MAGMA M.S.C. There is any other sounds or sample. Every single note (the arpeggiators has been set off camera), 'heart-beats' and effects has been done on the MAGMA on MainStage. It gives a good idea of what I can do in real time. Hope you'll like it.

9. Next things to do

Appendix A: an homemade FlightCase, of course!

A really solid flightcase, 10mm Plywood, covered with fake leather
A nice place for my MAGMA to travel, plus some storage for pedals, cables and stuff

Appendix B: some original drawings

This are some inverted scans of my early drawings:
The multiplexing circuit
The emplacement of the potentiometers view from behind the panel
(used to locate pots during soldering and maintenance)
Some algorithmic notes

Thanks.

I would like to thanks my uncle for letting me work in his garage at full time for some weeks, he helped me a lot too, since he had a electronic training and professionnal experience.
Thanks to you to have take the time to read my story of this adventure.

Don't hesitate to contact me via the "contact" tab on the top bar for any question of thoughts, I'm always happy to talk to people about music, electronics, woodworking, and so.
Have a nice day.

J.M.