A line that toggles on/off when a ball passes through it or collides with it would also be fantastic.
Also a trampoline line/shock absorber line(s).
The default/starting line should be a diagonal too, since it makes it more clear what is happening and you don't get that decaying bouncing thing.
very cool idea
I'm working from time to time on a similar concept. Except you can have multiple ball sources and each platform/line can play any combination of notes. [2] It's using phaser and tone.js under the hood and it's not very mobile friendly yet.
It would be very cool if there was a visible buffer of the balls that have yet to drop could see and control what will fall. The spacing could be controlled by clear no-op balls in the buffer that just pop like bubbles when they release. That way the composer could program the pitch and spacing of the notes.
Also having a infinite canvas would be really nice so one could pan around.
And different size lines should cause the bounce back to happen at different speeds.
Super awesome, thanks for sharing!
Draw: Standard black lines. Dots bounce off these and play a sound. The note is based on the line's length and angle.
Erase: Red lines used to delete other lines (including predrawn ones). Intersecting lines disappear.
Toggle: Black lines that switch between active (solid) and inactive (dashed). When inactive, dots pass through without interaction.
Silent: Dark gray lines that let dots bounce off but don’t produce any sound.
Burner: Dark red lines that destroy any dot that touches them, no sound.
Splitter: Magenta lines that split dots into two upon collision. The original dot is removed, and two new dots continue with altered trajectories.
also after some back and forth with somebody from the vienna philharmonics orchestra i now use this tonal scales Red: C major
Blue: G major
Green: E minor
Black: A minor
A couple of months ago I did a ShowHN for Billard, which also uses physics and collisions in 2D space to make music: https://billard.medusis.com/
Those are fun experiments.
Seems like it would be cool if there was some nonlinear elements, like walls that only reflect every Nth ball.
https://franzelio.franzai.com/?share=AQMKAAAHi2u2223VupMAAAF...
thx for all the feedback
Nb: the sound creation seems buggy on android mobile browsers (both firefox and chrome).
UPD: okay, toggle lines is game-changer here, very nice!
also hard not to picture building a mini transformer in here where can visual backprop and stuff-
some templates to load or get started - play X etc or let the computer just play semi-random
anyway love it well done clean simple
For example this quickly grows the url:
https://franzelio.franzai.com/?share=eyJsaW5lcyI6W3sieDEiOjA...