Make Music With a Banana!

Make Music With a Banana!

Takumi Ogata · 03/31/26

Have you ever wondered what it would be like to make music with a banana? Of course you have! But is it even possible?

Well, let's ask another question: Can you make music with a button? If we look at a commercial hardware synth like the Roland S-1, it's full of buttons.

Buttons are used as synth keyboards

If you press one of the keyboard buttons, a note plays. The synth engine detects that a specific button has been pressed and plays the corresponding note. So yes, you can make music with a button!

But what if, instead of a button, it’s a banana?

The first task is to figure out how the synth can detect whether a banana is being touched. Is there such magical technology out there?

Whenever you're watching a video on your smartphone, how do you pause it? You would tap the screen once to make the pause icon appear and then tap that to stop the video from playing. In other words, you interact with a smartphone by simply touching the screen. This is capacitive sensing in action!

You know where this is going, right? By turning the banana into a capacitive sensor like your smartphone screen, the synth can detect whether it’s being touched or not! But is it even possible to turn a banana into a capacitive sensor? Luckily, the MPR121 breakout board by Adafruit makes this possible. Let’s use it to build a banana synth!

Items Needed

Electronics

It's not easy to connect the MPR121 to a commercial hardware synth, so let's use a microcontroller to program and flash the banana synth firmware. For this, the Daisy Seed will be used. To connect the Daisy's audio output to an audio interface, an audio jack needs to be connected to the audio output pin.

  • Connect the jack's tip to one of the Seed's audio out pins
  • Bridge the Seed's DGND and AGND together and connect the jack's sleeve to this bridged ground

Next step is to connect the MPR121 to the Seed.

  • MPR121's SDA pin to the Seed's D12 pin
  • MPR121's SCL pin to the Seed's D11 pin
  • MPR121's VIN pin to the Seed's 3V3 pin
  • MPR121's GND pin to ground

Now, any conductive material that is connected to one of these 12 pins should become a capacitive sensor!

To test this, let’s connect a wire with an exposed end to the MPR121's channel 0 pin. When the exposed end is touched, the MPR121 board should notify the microcontroller know that a conductive material has been touched.

Adafruit provides a library with an example code that can be flashed to the Seed for testing. In the Arduino IDE, go to "Sketch" in the toolbar, select "Include Library", and then click "Manage Libraries...". Next, search for "Adafruit_MPR121" by Adafruit. After installing it, open the included "mpr121test" example.

After flashing the example code (you can watch this video to learn how to set up the Arduino IDE for the Daisy), touch the exposed end of the wire and check the Serial Monitor. You should see the following when you touch and release it.

You can, of course, add more wires and test them out. However, while you don't need to modify the code, you will need to power off the board when connecting additional conductive materials, as the MPR121 appears to require initialization with the conductive material(s) already connected.

Programming 

Now that capacitive sensing is working, let’s put together a simple touch synth! As for programming, different languages can be used to program a DIY synth for the Daisy platform! For this tutorial, let's use Plugdata as it is quick to set up and easy to program with any Daisy board. You can install it from their download page.

Here’s a simple patch that turns the volume/amplitude ([*~]) of an oscillator ([osc~ 440]) on or off, depending on whether you touch a conductive material. This patch, along with other files in this blog, can be downloaded from this link.

2_MPR121_Wire_Test.pd

By compiling this patch with the custom JSON file mpr121_synth.json, the receive object [r mpr121_driver_ch0 @hv_param ] in the patch will output the touch state of the conductive material connected to pin 0.

Here's what mpr121_synth.json looks like:


{
    "name": "customseed",
    "som": "seed",
    "parents": {
        "mpr121_driver": {
           "component": "Mpr121"
        }
    }
}

In the [r mpr121_driver_ch0 @hv_param] object, do you notice the number after the word “ch”? That corresponds to the channel number on the MPR121. This object will output a 1 when the material is being touched and a 0 when it's released. The [line~] object is used to smooth out volume changes, with a 15-millisecond transition. Let’s flash this program to the Daisy Seed!

Click the "Main menu" icon at the top and select "Compile". After installing the toolchain, select "Custom JSON..." as the target board and open the custom JSON file mentioned earlier. Before flashing a program, the Daisy needs to be put into a flash-able state. Hold down the BOOT button while inserting the USB cable into the Daisy. Now, click the "Flash" button in Plugdata. Now, see if you can play a note by touching the wire!

You should hear a beep when you touch the wire

Testing the Banana Synth

Ok, the moment of truth. Is it possible to play a note like this with a banana? Better yet, let’s play a harmonically rich tone so that it’ll feel even more exciting when it works! Here’s a similar patch from before but it uses detuned sawtooth oscillators and a low-pass filter ([vcf~]) this time.

3_MPR121_Banana_Test.pd

You only need the exposed end of the wire to make contact with the banana. A small piece of tape will help hold the wire in place.

Electrical tape to hold the wire in place

Now that the banana is connected to the wire, touch and see if you hear a sound! It's surreal to touch a banana and then you hear a note, isn't it? It’s super responsive too, which adds to this whole magical experience.

Let’s add more bananas and explore what else is possible!

Banana Synth (Melodic)

Here’s a melodic example where each banana plays a different pitch. When you touch a banana, the [sel 1] object triggers an envelope, causing both the volume and filter cutoff frequency to change over time. You need to release the banana before you can play that note again.

Because each banana has its own synth voice, you can play multiple notes at once.

4_Banana_Melody.pd

Voice.pd (Synth voice subpatcher)

Banana Synth (Bass)

Next up, banana bass! For this example, the synth is monophonic so only one note can be played at a time. That’s intentional because you usually don’t play multiple bass notes at once. Besides, it's fun to glide between the notes which can be achieved by simply adding the [line~] object. The signal chain on the right, which includes the [expr] object, checks whether at least one of the bananas is being touched. If none are touched, the amplitude will be zero.

5_Banana_Bass.pd

Banana Synth (Chord)

The sound of a note gliding to a new pitch is really cool so let’s explore that more! How about stacking two more synth voices (3rd and 5th of a chord) and shift the pitches up by an octave? Now, you have chords that glide into one another!

6_Banana_Chords.pd

Banana Synth (More Notes!)

Of course, you can keep adding more bananas! Here is a patch for banana synth with 5 keys.

Banana synth with 5 keys

7_Banana_Five_Keys.pd

Conclusion

Hope you have fun making music with a banana! Of course, you don’t need to use something that’ll make you feel hungry. Copper tape is a great material for making a touch synth.

Copper tape keyboard

Would love to see all the wild materials that you end up choosing to make music with!

To have this project be even more standalone, you can add a speaker which you can learn more about from this tutorial!

 

 

Back to blog

Leave a comment

Please note, comments need to be approved before they are published.