A simple musical web toy. 

  • Click anywhere within the box to create a ball that bounces back and forth horizontally. 
  • The slider controls the speed of all balls and can be adjusted by clicking and dragging its node.
  • Spacebar to clear the screen of balls.

The ball will play its note when it collides with the edges.
The height of the balls' position determines its note.

Balls.

Made in p5.js. Source code available on GitHub here. Suggestions welcome and encouraged!

Comments

Log in with itch.io to leave a comment.

Oh this is fun, love audio toys! I'm noticing when I add two notes somewhat close together the audio pops. Also when you tab away I think the tab just slows way down bc I think it has stopped playing but then out of nowhere I hear a note haha! You might also be interested in this, was really helpful for me when I was messing around w/ writing my own ADSR real-time synth stuff in Unity https://pages.mtu.edu/~suits/NoteFreqCalcs.html

this feedback and resources are all awesome, thank you so much!! i'll check it out!