A music box that can help you improvise with random melodies

We designed this music box that can give you inspiration by generating random melodies, and also allow you to play as you wish. In this video, I combined the random melodies with improvised melodies to make a whole music piece.

My role:

  • acquired data from a soft pot and a force sensor, and send then via serial communication with Arduino
  • developed a program that can map the input to melodies using p5.js, a touch event from force sensor is mapped to random tones, and a touch event from soft pot is mapped to a tone with certain frequency according to where you touch it (like a piano).
  • made a visualization of the frequencies and intensity of each tone using p5.js


[Week 05] A great many shooting stars!

Screen Shot 2015-10-07 at 3.33.38 AM

By drawing your cursor on the screen, you can create a great many shooting stars!

Portal: https://sunwangshu.com/projects/fall-2015/icm/week05/


How to play:

  • draw your cursor on the screen to create a lot of stars
  • one click on the screen will create a source of stars that remains on the screen, another click will cancel it
  • use scroll button to change the radius of stars created



Having learned objects and arrays, I felt really want to do something great. I got Inspired by fireworks and Yiting Liu’s great homework and decided to create my own version of shooting stars.

Since last time it got really slow when I draw a lot of flowers, I decided to create my own png files instead of drawing directly by p5, and it turned out to be really good with transparency.



Screen Shot 2015-10-07 at 4.02.44 AM

I created a single star in Illustrator and leave some transparency by the help of PNG.


I started like creating a lot of not bouncing balls and it seemed appealing.Screen Shot 2015-10-07 at 1.39.00 AM

Then I made them each rotating with different speed, and the faster it falls, the faster it rotates.

Screen Shot 2015-10-07 at 2.33.56 AM

I also made it appear within a range of the location of cursor, instead of simply appear at where you point to. It is changeable by scrolling up and down and a circle will appear shortly if some change is made.

Screen Shot 2015-10-07 at 4.21.35 AM

A last good feature is that when you click at some point, then it will automatically be a source of stars and no need to wave anymore, just relax and enjoy 😀

Play together is also full of fun~

Screen Shot 2015-10-07 at 3.33.38 AM