r/musicprogramming • u/Sentinelcmd • Jan 28 '26
Using physics simulation for procedural music generation.
Enable HLS to view with audio, or disable this notification
I wanted to share with this community a project I have been working on for a few months now on what some may regard as a physics based music making tool.
The way it works is you place note spawners that spawn blue balls at different intervals according to the set BPM. If you left click and drag, you can draw a "vine". There are 7 vines with different sounds for each. When a ball from the spawner falls and bounces off a vine, it creates a musical tone. Every subsequent bounce generates a new pitch that fits the key, scale, and pattern that has been set. I created a quantizer that takes a subdivision of the BPM (1/16th) and queues each sound on a quantized tick synced with the physics timing. Therefore, everything is on beat and the BPM can be changed in real-time. Each vine also has FX you can set such as reverb, delay, flanger, and chorus. Since the sounds for the vines are sample based, you can also change them out to create your own "soundbanks" to experiment with new sounds. I've created some basic plugins with the JUCE API in the past, so I am exploring how to integrate it as a VST so you can sync it with your project and record directly into your DAW with midi or audio.
It makes music creation super easy and fun. You don't need to know music theory because the physics and underlying logic handles it all. It brings a whole new approach to music production I think.
I'm really excited to share it with this community and see what people think.
8
u/soundisloud Jan 28 '26
Throwback to the legendary Ball Droppings by JT Nimoy from the late 2000s. That has been defunct for a long time and also yours looks beautiful and is much more evolved with the modern tools we have, so I'm glad you kept the spirit alive by making this project.
4
u/Connect_Group6232 Jan 28 '26
This is hanenbow
4
u/soundslogical Jan 29 '26
Do you 'tweak' the physics to make the balls hit a vine on a quantized time step? It seems like, even with the balls created in a time-synched way, the different distances between bounces mean it's not in time. So I'm guessing you have to 'cheat' the physics a bit for that?
2
u/Loan_Routine Jan 30 '26 edited Jan 30 '26
I don,t see the delay and other options down. Do I miss some info?
2
u/Jakdracula Jan 30 '26
I'd like to try it!
2
u/Foreign-Presence-555 Jan 30 '26
Excellent work! Thanks for sharing. Was this made entirely with JUCE?
2
u/piou_pio Jan 31 '26
Magnificent, the sounds are pure and the set design is stunning. Is there a GitHub repository?
5
u/R_U_READY_2_ROCK Jan 29 '26
there's a similar iOS app called musyc
Fingerlab https://www.fingerlab.net Musyc
1
u/b00tl04d3r Jan 28 '26
Omg did you release this?
2
u/dQD34nkw Jan 28 '26
This is fucking awesome
2
u/Iampepeu Jan 28 '26
Aaaah! This is amazing!
2
u/stmaximus Jan 29 '26
reminds me of the nintendo DS game electroplankton
2
u/vitriolix Jan 30 '26
This sounds really good. Nice work!
2
u/emedan_mc Jan 31 '26
This is amazing. I did a similar game thing once but the balls would play a determined song instead like popcorn. Didn’t quite work out because the changing beat from the bounce mattered more than I thought. When I saw this my first thought was that it was automated. - any song could have the instrument vines placed automatically because the next contact point can be calculated and a vine curve generated to pass through this point.
2
u/lxr417 Jan 30 '26
awesome idea and execution!!