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.
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…)
<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!
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.
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.
<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>
<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.