If you enjoy working with hardware and software, there are several hobbies more suitable than Arduino. Arduino — programmable logic controller which can do a lot of useful things depending on how creative you are with your code.
One particular «genre» of projects, if you will, involves using an Arduino to create or augment music. Some of them are just simple to implement and others are more complex, but they are all satisfying in the end.
Here are some of the more interesting ones you can try for yourself!
Are you a complete newbie? Consider Buying an Arduino Starter Kit and then read our guide to and start playing with these beginner arduino projects to get comfortable with it before proceeding.
Singing plant when touched
This project is exciting, especially in the sense that it uses the principles of conduction to do things most people don’t even think about. In short, this project allows you create ambient sounds by touching the plant .
The theory behind this is that when two conductive objects touch — in this case, the plant itself and human skin — the capacitance between these objects changes. With the right sensor, you can detect when something is touching the setup and convert that capacitance into sound.
For Arduino, you can use something like Touché as a capacitance sensor, which is what this project does. Customize it yourself and I guarantee your guests will always be impressed.
Hand Motion Techno
Here’s another touch project, except it’s based on external lighting, not physical touch . Specifically, Light Dependent Resistors (LDRs) are used to «read» light levels, and these readings are converted into musical notes.
By moving your hand to cover or expose more light to the sensor, you can change the notes that are generated. Do it well enough and you get a primitive techno look.
The cool thing is that the code for this project is amazingly simple once you understand what it does. Make a few tweaks, add a backing track, and you’ll end up with something like this:
coca royale and launch pad
This project is a kind of «two in one»: two different applications based on the same concept. The bottom line is that you connect a dozen or so aluminum cans to the Arduino, and each one produces a different sound or clip when touched .
The video above shows two examples. At first, it almost sounds like a glass harp is playing. In the second case, the setup resembles a Launchpad device (equipment often used by DJs to create collages, remixes, and more). The example even shows a black can of coke, which can change the sound pack used.
Unfortunately, there is 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.
Simple Tune Maker and Recorder
Here we have a neat little creation that looks 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 mastering because it’s easy. and full source code available.
The device works like this: there is a switch that you turn to select notes (only natural and sharp), and a button that you press whenever you want to record the current note. A blank note exists for when you want to rest with one hit.
When you are done you can play the whole recording and you can use the disc to speed up or slow down playback. It’s pretty cool, although, admittedly, the novelty will not be long in coming.
Arduino Tune Library
If you are looking for a clean and simple library that will let you play a tune with your Arduino then this is exactly what you need. This is one source file (actually a pair of .CPP and .H files that act as one) that you include in your Arduino code. Easy to set up and use.
To use this library, it’s easiest to define the melody as hardcoded values in your code (recommendations for this are available in the /songs/readme.h file). Then playing that tune is as easy as calling Melody.play()
.
One benefit is that the library makes it easy to change octaves ( Melody.setOctave()
) and tempo ( Melody.setTempo()
). Playback is non-blocking, so your Arduino can keep doing other things by playing a tune while you delay()
long enough for the pace.
Guitar
If you are an Arduino beginner who loves to play electric guitar, this Instructables outline for creating Lo-Fi guitar pedals may be at your disposal.