from Hacker News

Synthesizing Music from JSON

by bangonkeyboard on 1/6/25, 6:27 PM with 18 comments

  • by a1o on 1/6/25, 10:05 PM

    I wrote this JS thing 9 years ago and it still runs in the browser

    https://ericoporto.github.io/bgmJs/

    Much simpler implementation, you can read the JS code that was manually written. There is a link to the repository in the page.

  • by bugglebeetle on 1/6/25, 10:20 PM

    I’ve been working with Tone.Js recently and it’s been quite pleasant! Seems like it could handle this use case as well, fairly trivially. Worst part has been finding good royalty free sample sources for instruments.
  • by luismedel on 1/7/25, 9:36 AM

    Why the "from JSON" part? JSON is the storage/representation format and, IMHO, the less interesting thing about this.

    Is like saying "Synthesizing Music from a binary file" if you write a S3M player.

    Outside of that, congrats. I think the author has enough "fame credits" to make any project an instant success. Kudos for that.

  • by throwaway2046 on 1/7/25, 10:42 AM

    It's amazing to see FOSS music trackers still being made, each time a bit more modernized. Although the new "single instrument tracks" model may take a while to click for me, I think it may allow for more dynamic songs.

    P.S. what's the license for pl_synth? I couldn't find one on the repo.

  • by chaosprint on 1/6/25, 11:09 PM

    very nice. really love the ui.

    for wasm you can have a look on my work:

    https://glicol.org/

    https://github.com/chaosprint/glicol

    I wrote the audio engine in Rust and load it in JS with AudioWorklet and SharedArrayBuffer

  • by p0w3n3d on 1/7/25, 6:37 AM

    This is from the same guy who created QOI - fast lossless compression
  • by 8bitsrule on 1/7/25, 3:23 AM

    Massively fine. Thanks much for sharing! The instrument-generating part alone is Csound-grade stuff.
  • by elihu on 1/6/25, 9:16 PM

    I get no audio when I try to use the live demo on Linux/Chromium, though Firefox is fine.
  • by ladyanita22 on 1/7/25, 1:12 PM

    Looks really nice. Any similar projects in Rust?
  • by to11mtm on 1/7/25, 12:14 AM

    ... would be interesting to find a way to meld this with Sonic-Pi somehow...