6 Musical Projects for Arduino Beginners
If you like tinkering with both hardware and software, then there are few hobbies more fitting than Arduino. Arduino is a programmable logic controller which can do lots of neat things depending on how creative you are with your code.
One particular “genre” of projects, if you will, involves using the Arduino to create or augment music. Some are dead simple to implement while others are more complex, but they’re all quite satisfying in the end.
Here are some of the more interesting ones that you may want to try for yourself!
Are you a complete newbie? Consider buying the Arduino Starter Kit , then read our Arduino beginner’s guide and start playing around with these beginner Arduino projects to get comfortable with it before continuing.
This project is fascinating, particularly in the way it employs the principles of conductivity to do something most wouldn’t ever think of doing. In short, this project let’s you produce ambient sounds by touching a plant.
The theory behind it: when two conductive objects touch — in this case, the plant itself and human skin — the capacitance between said objects changes. With the right sensor, you can detect when something is touching the plant and convert that capacitance into sound.
For Arduino, you can use something like Touché as the capacitance sensor, which is what this project does. Set one up yourself and I guarantee your guests will always be impressed.
Here’s another sensor-based project, except this one relies on ambient light rather than physical touch. Specifically, light-dependent resistors (LDRs) are used to “read” light levels, and these readings are converted into musical notes.
By shifting your hand to cover up or reveal more light to the sensor, you can change the notes that are produced. Do it well enough and you get a primitive kind of techno.
What’s cool is that the code for this project is surprisingly simple once you understand what it’s doing. Make a few tweaks, add a backing track, and you get something like this:
Coke Piano and Launchpad
This project is sort of a two-in-one: two different applications that are based on the same concept. The gist of it is that you hook up a dozen or so aluminum cans to an Arduino, and each can produces a different sound or clip when touched.
The video above shows two examples. In the first, it almost feels like a glass harp performance. In the second, the setup is reminiscent of a Launchpad device (a piece of equipment often used by DJs to create mashups, remixes, and what not). The example even shows a black coke can that can change the sound pack being used.
Unfortunately there’s no walkthrough for replicating this project yourself, but the full source code is available on Pastebin. The script was written using the PyAudio library and can loop any .WAV file.
Here we have a neat little creation that plays more like a toy than an actual practical device, but it’s awesome nonetheless. At the very least, it’s a great way to learn about Arduino tinkering because it’s simple and the full source is available.
The device works like this: there’s a dial that you turn to select notes (naturals and sharps only), and a button that you click whenever you want to record the current note. A blank note exists for when you want a one-beat rest.
When you’re done you can play back the entire recording, and you can use the dial to speed up or slow down playback. It’s pretty cool, though, admittedly, the novelty won’t take long to wear off.
If you’re looking for a clean and straightforward library that lets you play a melody line with your Arduino, this is the one you want. It’s a single source file (actually, a pair of .CPP and .H files that act as one unit) that you include in your Arduino code. Simple to set up and easy to use.
To use this library, it’s easiest to define the melody as hardcoded values in your code (guidelines for doing this are available in the /songs/readme.h file). Then, playing that melody is as simple as calling
One bonus is that the library makes it trivial to change octaves (
Melody.setOctave()) and to change tempo (
Melody.setTempo()). The playback is non-blocking so your Arduino can keep doing other things as it plays the melody as long as you
delay() long enough for the tempo.
If you’re an adventurous Arduino newbie who likes to play electric guitar, this Instructables blueprint for creating a Lo-Fi guitar pedal might be right up your alley.
Why adventurous? Because this one’s a bit more complex than the project ideas above. We don’t recommend it as an absolute first time endeavor, but if you have some prior experience and you follow the directions properly, you’ll be fine. Who doesn’t love a good challenge, anyway?
This pedal has three different effects: a sample rate control, a bitcrusher, and a bitshifter (all of which can be seen in action in the video above). It’s fun to play around with and highly practical, which is about as good as it get when it comes to hobbies like Arduino.
Your Arduino Project Ideas
It’s interesting how much you can do with something as tiny as an Arduino, and obviously there are hundreds of other ideas floating around on the Internet. But what about you? What musical project have you accomplished with your Arduino?
Share with us in the comments below, whether you have questions, comments, or ideas of your own!
Affiliate Disclosure: By buying the products we recommend, you help keep the site alive. Read more.