3D Music Interface w/ Makey Makey

This project is a physical interface I made out of cardboard and tinfoil which I hooked up to a Makey Makey. It triggers 3D animations in p5.js as well as sends MIDI signals to Sonic Pi to create the sounds.
A homemade MIDI controller using Makey Makey, p5.js and Sonic Pi This was a short project I put together to experiment with creating a 3D interface in the physical world that could also connect to 3D visuals in the digital world. The code in p5.js uses keyPress events to work with the Makey Makey. It also is sending MIDI messages using the webMidi to trigger sounds in Sonic Pi.

p5.js Code: https://editor.p5js.org/mrbombmusic/sketches/1dAWOwawY

Note: If you want to use this, you'll need to change the part of the code for which midi device is used for sending output. It is indicated in the code and all available outputs will appear in the console when the sketch begins.

(This code was adapted from this tutorial by Luisa Pereira: https://medium.com/@luisa.ph/making-your-own-musical-instruments-with-p5-js-arduino-and-webmidi-2422b9596791)


Sonic Pi code:
live_loop :midi_box do
use_real_time
note, velocity = sync "/midi*/note_on"
puts note, velocity
set :b, note
synth :square, note: note + 24, release: 1
end

Frequently Asked Questions
What inspired you to do this?
I was playing around with sending MIDI messages from p5.js to SOnic PI and I wanted to make some sort of physical MIDI controller. I have done a lot of projects with Makey Makey and p5.js but I wanted to play around with the 3D shapes in p5 as corresponding visuals to the sounds. So I liked the idea of having 3D shapes in both the digital and physical space.
How long did it take to make it?
Code: I had been tinkering with different versions of this code for a while, so not too long.
Physical Controller: Maybe an hour or cutting cardboard, hot glueing it together, and pasting on the tin foil.
How long have you been doing things like this?
I've been playing around with Makey Makey for about 4 years.
p5.js for 3 years.
How much did this cost to do?
Besides the Makey Makey, just a few cents in tinfoil and hot glue.
Have you done other things like this?
Yes. You can see a lot of projects like this on my youtube page and twitter feed
Are there plans available to make this? Do you sell this?
Nope. Just a project to amuse myself.
What’s next?
I'm constantly playing around with Music projects with code and hardware.
Resoures?
Here's a link to the p5 code: https://editor.p5js.org/mrbombmusic/sketches/1dAWOwawY

Info about receiving MIDI messages in Sonic PI: https://sonic-pi.net/tutorial#section-11-1

Liam Baum : Musician / Educator / Creative Coder / Tinkerer
The maker Liam Baum
I am a musician and educator who teaches at a public middle school in Queens NY. I have spent the past several years exploring how coding and technology can be incorporated into creative music making experiences. I work with coding and hardware to make musical instruments and interfaces that can be played in the physical world as well as strictly code based projects that can used as instruments.

I do this as a hobby but also have found ways to bring the experience of creative coding and physical computing to my students. I also have led several workshops both in person and virtually about combining music with coding and technology using different languages and hardware.

Connect with Liam Baum
How I can help you:
I have several coding tutorials on youtube for p5.js and Sonic pi.
Send me an email if you have any questions about one of my projects.
Check out my github for code for certain projects: https://github.com/mrbombmusic
How you can help me:
Check out my other projects and tutorials on youtube.
Follow me on twitter.
Book for a workshop.