Using a microcontroller + learning basic electronics
Initially for my experiments, I’ve been using an existing drum brain to receive signals from the piezos or pads and send MIDI notes to the computer.
However when I was planning out the design of the MIDI Marimba, I realised that if I wanted to have a large number of keys, I’d be plugging in a huge amount of cables every time I wanted to use it - it was looking like it was going to be 16 cables for the piezos, two power cables, two USB / MIDI cables... Way too much trouble, effort, and cables that could get damaged or unplug.
So I decided to look into other options.
I had initially wondered about using something called a microcontroller, which you can read more about here: https://electronics.howstuffworks.com/microcontroller.htm
I had asked around on the forum of a local electronics store and described my project and what I wanted to do - and had received the answer that it would be way too complicated and costly - so I initially abandoned the idea.
Luckily I decided to look into it again and ask different people, and it turned out that it couldn’t be further from the truth!
Microcontrollers are pretty inexpensive and there is an absolute wealth of information out there on how to use them and an insane amount of cool projects that people make with them.
Here’s an overview of using Arduino based microcontrollers, mainly for creating MIDI controllers
If i used a microcontroller to build my marimba, I would connect all the piezos and everything else to the controller, and then the ONLY cable I would need to plug in to use it would be the USB cable for power and receiving the MIDI signal, OR a separate physical MIDI cable if I wanted.
This sounded like a way better option and also opened a world of possibilities - I would be able to add my own knobs, buttons, faders, pedals, sensors - anything really to the marimba.
While it was going to be a steep learning curve without any background in electronics, I was very excited for all the possibilities and amazing things I could add to the instrument - so I went ahead and bought a cheap Arduino Uno copy board, some basic parts and started doing online tutorials.
I started with these tutorials by amandaghassaei and they were the perfect introduction! There are heaps of other ones on the instructables site as well as all over youtube!
https://www.instructables.com/Beginner-Arduino/
https://www.instructables.com/Arduino-Sensors-and-MIDI/
https://www.instructables.com/Intermediate-Arduino-Inputs-and-Outputs/
Following the tutorials was great, but as soon as I started trying to modify or build my own circuits I found I really needed to learn more electronics knowledge.
LEARNING BASIC ELECTRONICS
Sparkfun was my saviour, their tutorials are really straightforward and they use great demonstrations - it seems like it’s all focused more at kids and schools but it’s really well done.
I found I really needed this knowledge to make any changes to builds and figure out what parts I needed to buy!
https://learn.sparkfun.com/tutorials/what-is-a-circuit/short-and-open-circuits
https://learn.sparkfun.com/tutorials/voltage-current-resistance-and-ohms-law
I bought some extra parts to play around with, and experimented with potentiometers ( often you will you see this as knobs ), buttons, LEDs, MIDI ports and piezos.
In the beginning all the parts could fit right into a breadboard, which is a board that you use for making prototype circuits. The great thing about these is that they are electronically connected in a way that you can mostly plug parts and cables right into them, without any need for soldering anything.
Here’s a compilation of some of the tests I did with MIDI
The next test I wanted to do was to connect a 1/4″ jack to connect a sustain pedal or external pads. This meant that I needed to solder, so that I could connect the jack to wires that could plug into my breadboard.
This was a great place to start as soldering is a skill that is key to building anything with microcontrollers that is more permanent and stronger than a prototype.
Again I started with sparkfun tutorials
https://learn.sparkfun.com/tutorials/how-to-solder-through-hole-soldering/all
My first solders weren't very neat, but they worked!
Building on other projects that I found online, I then created the code to use a sustain pedal - which could be used to add one to a keyboard that doesn’t have one, or as part of a project like my marimba :D
After that I moved on to using the same pedal as a hi-hat controller pedal, to change the note being played by a piezo if the pedal is pressed. I was surprised at how hard it was to find similar code online, but with some trial and error I was able to combine different bits and pieces I found and come up with some bits of my own.
It was definetly a steep learning curve for all of this, but I got a lot out of it and the potential for customisation is so much greater now, my design for the marimba has really changed and I now know that I can include heaps of amazing features that I thought would be great but I dismissed as not being acheiveable.
Very excited to keep learning more and experimenting!