TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: Koelsynth – a simple FM synthesis library

58 pointsby graphitoutover 1 year ago
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.<p>There is a command-line piano app in the examples directory if you want to play with it. Here is the link: <a href="https:&#x2F;&#x2F;github.com&#x2F;charstorm&#x2F;koelsynth&#x2F;tree&#x2F;main&#x2F;examples&#x2F;simple">https:&#x2F;&#x2F;github.com&#x2F;charstorm&#x2F;koelsynth&#x2F;tree&#x2F;main&#x2F;examples&#x2F;si...</a><p>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.

5 comments

chaosprintover 1 year ago
nice work!<p>Have you tried to port it to WASM?<p>Python can also call the wasm with wasmer<p>I ported <a href="https:&#x2F;&#x2F;github.com&#x2F;chaosprint&#x2F;glicol">https:&#x2F;&#x2F;github.com&#x2F;chaosprint&#x2F;glicol</a> for my Python audio project using the same method<p>for your physics idea, with wasm, perhaps it can be something like this?<p><a href="https:&#x2F;&#x2F;jackschaedler.github.io&#x2F;karplus-stress-tester&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;jackschaedler.github.io&#x2F;karplus-stress-tester&#x2F;</a>
评论 #38239429 未加载
nightowl_gamesover 1 year ago
Omg..I have that physics simulation and made crappy sound tones in audacity for it. I want to use this to make better sounds.<p>I added a music block to Goober Dash level editor:<p>https&#x2F;&#x2F;gooberdash.winterpixel.io&#x2F;<p>When your Goober, or a physics crate, hits the music block, it plays a note. I didn&#x27;t release this branch yet. Can I use the piano notes from this lib in our game? I wouldn&#x27;t be adding the generator code to the game, I just need sound files.
评论 #38239447 未加载
评论 #38237708 未加载
tempodoxover 1 year ago
Nice, I like simple projects like this.<p>However, Wikipedia has a better diagram and explanation of ADSR:<p><a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Envelope_(music)" rel="nofollow noreferrer">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Envelope_(music)</a>
评论 #38239475 未加载
briancrover 1 year ago
As a newbie I really enjoyed your explanation of the synthesis process and why everybody should Fourier-sum phases rather than amplitudes.
driggsover 1 year ago
Why is it that FM synthesis was so well-suited to relatively simple early digital hardware (eg. Yamaha&#x27;s DX&#x2F;TX line)?<p>Does that also make for relatively simple software FM synthesis?
评论 #38247827 未加载
评论 #38238082 未加载
评论 #38237357 未加载
评论 #38239695 未加载