[Pcomp] Mid-term Project – Music Painter (with Yuan Chen)

Music Painter

Yuan and I had a midterm plan to build a musical instrument that can also draw the note at the same time. We were also inspired by classic old music boxes or player pianos. They are using paper with notes to play. And we thought, how can we generate notes on paper when people play the piano.  Our goal is making a fun instrument with anyone who wants to play the piano or draw something on the paper. And we also wanted to make p5 sketch to digitalize the notes and play the music.

player-piano twinkly-music-box-81

To be honest, we made really many trials and errors… Really.

First mistake : 5V SOLENOID

We ordered 14 solenoids from Adafruit on the day we decided our plan. They are small and light. It seemed like a good idea at first. We tested, and we realized that these solenoids were really really weak. It could not hold a Sharpie. These are for just making a ticking sound or very light touch.


Second mistake : 9g Servo motor

Our backup plan was using servo motors to move pens. There are a lot of examples to use a servo motor and pen for drawing machines. And I built a circuit with soft push buttons and a servo motor driver. It worked nicely.

But the problem was the gap between each motors. They need more big gaps and they made lower density between lines. (about 2inches…)

mid_0019_img_5312 mid_0018_img_5328

<Source Code>

So we decided to make our own piano. We bought some woods and cut, sanded. And Both of us we took  ‘Intro to Fabrication’ class we make them pretty well. 🙂 We also made our own zig! for making drill holes with the certain angle. Thanks Ben!

mid_0016_img_5341 mid_0011_img_5359

mid_0013_img_5349 mid_0014_img_5350


Our awesome idea is wooden clips! we could make it quite simply!

I also used a prototyping pcb board to make a pulldown circuit for 10 push buttons and 10 signal pins.

mid_0009_img_5489 img_5517




And to roll the paper, we used a stepper motor and a stepper motor driver and a potentiometer. But the process for sending pushbutton state data to p5.js affect to stepper motor’s speed. So we used two Arduino and control them separately.




mid_0006_img_5496 mid_0004_img_5519 mid_0003_img_5521



mid_0000_img_5539 mid_0001_img_5529 mid_0002_img_5524

<p5.js Sketch>

There are two reasons that we used it. First, When Arduino send a data to P5, it plays the MIDI notes. And Our plan was that the drawing dots on paper transferred to the computer screen and going up continuously.

<My first rough sketch – Using MIDI notes>

P5 CODE : https://alpha.editor.p5js.org/projects/rk_srKreg 


Final P5 CODE : https://alpha.editor.p5js.org/projects/rk_srKreg 

To push multi buttons at the same time, I got the data using ‘Println’ function from Arduino like Sting type of [0,0,0,0,1,1,0,0,0,0] each time. And P5 also try to keep the data in Array and play the song.

<Final Photos>






6a0a0208_r 6a0a0235_r

<Things we should develop this>

  • Build pen and piano mechanism
  • Finding better pens.
  • remove p5, more focusing on drawing parts.
  • (Hope) On the other side of table, there will be reading note machine.

Working with Yuan, she is amazing we really had lots of errors and trials but we accepted positively, we actually tried to think that all of the experience we had were worthy! And really thanks Yuan for lots of nice and useful components.

We are not going to develop Music Painter for final projects but definitely we are going to develop it for another exhibition. And we got nice tips for developing drawing parts from Ben Light. It helped a lot.

Of course, thanks to Tom Igoe and Leon Eckert (He helped me a lot for programming.)

<Final Video>

Music Painter from yuan12chen on Vimeo.

Leave a Reply

Your email address will not be published. Required fields are marked *