This is part of my journey on pybind11. I wrote a tiny FM Synthesis library in C++ and a Python wrapper for that using pybind11.
There is a command-line piano app in the examples directory if you want to play with it. Here is the link: https://github.com/charstorm/koelsynth/tree/main/examples/si...
My next target is to attach this to some kind of physics simulation - like a bunch of balls moving around in a box with some internal walls. When the ball hits certain trigger points, it produces the sound.
Omg..I have that physics simulation and made crappy sound tones in audacity for it. I want to use this to make better sounds.
I added a music block to Goober Dash level editor:
https//gooberdash.winterpixel.io/
When your Goober, or a physics crate, hits the music block, it plays a note. I didn't release this branch yet. Can I use the piano notes from this lib in our game? I wouldn't be adding the generator code to the game, I just need sound files.
Nice, I like simple projects like this.
However, Wikipedia has a better diagram and explanation of ADSR:
As a newbie I really enjoyed your explanation of the synthesis process and why everybody should Fourier-sum phases rather than amplitudes.
Why is it that FM synthesis was so well-suited to relatively simple early digital hardware (eg. Yamaha's DX/TX line)?
Does that also make for relatively simple software FM synthesis?
nice work!
Have you tried to port it to WASM?
Python can also call the wasm with wasmer
I ported https://github.com/chaosprint/glicol for my Python audio project using the same method
for your physics idea, with wasm, perhaps it can be something like this?
https://jackschaedler.github.io/karplus-stress-tester/