[HN Gopher] Synthesizing Music from JSON
___________________________________________________________________
Synthesizing Music from JSON
Author : bangonkeyboard
Score : 117 points
Date : 2025-01-06 18:27 UTC (1 days ago)
(HTM) web link (phoboslab.org)
(TXT) w3m dump (phoboslab.org)
| elihu wrote:
| I get no audio when I try to use the live demo on Linux/Chromium,
| though Firefox is fine.
| a1o wrote:
| 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.
| bugglebeetle wrote:
| 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.
| chaosprint wrote:
| https://freesound.org/
|
| https://github.com/tidalcycles/Dirt-Samples
| bugglebeetle wrote:
| I dug around on Freesound, but the search UI is pretty poor
| and sometimes broken. Seems like a great resource, but in
| need of a lot of work on the discovery side of things.
| scraggo wrote:
| I wrote a small utility to create rhythmic melodies with
| Tone.js: https://github.com/scraggo/tone-rhythm
|
| It's used in a side project I've had around for a while:
| https://random-music-generators.onrender.com/
| chaosprint wrote:
| 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
| tomduncalf wrote:
| That's super cool!
|
| For WASM with C++, I recently created a simple example using
| the new-ish AudioWorklet support in Emscripten, showing how to
| create an AudioWorklet oscillator with parameters. It removes a
| lot of the boiler plate you used to have to do, but the docs
| are a bit lacking.
|
| https://github.com/tomduncalf/emscripten-audio-worklet-examp...
| to11mtm wrote:
| ... would be interesting to find a way to meld this with Sonic-Pi
| somehow...
| 8bitsrule wrote:
| Massively fine. Thanks much for sharing! The instrument-
| generating part alone is Csound-grade stuff.
| p0w3n3d wrote:
| This is from the same guy who created QOI - fast lossless
| compression
| bityard wrote:
| And the same guy that wrote a portable (+WASM) wipEout from
| leaked PSX sources:
| https://phoboslab.org/log/2023/08/rewriting-wipeout
| luismedel wrote:
| 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.
| omnibrain wrote:
| Because JSON today is some sort of "lingua franca" of data
| exchange and there is a vast library of tools to handle JSON.
| If you have something that "plays sound" from JSON it becomes
| easy to imagine using existing JSON based tools to create
| music. Building a "graphical music editor" for example would be
| easy for most web devs.
| deathanatos wrote:
| "Synthesizing Music from JSON" to me means something I could
| feed JSON into, and it would somehow transform it into music.
|
| This is just using JSON as an encoding format. (And as a
| "legacy" one, too, it seems like its moved to JS.)
|
| > _it becomes easy to imagine using existing JSON based tools
| to create music._
|
| No ... it really doesn't? I am trained in both music and
| JSON, and I have no idea how that'd work.
|
| Because you don't have "something that 'plays sound' from
| JSON" you have something that plays sound from
| application/sonant-x+json ; the interesting bits are in the
| "application/sonant-x" but your tooling only understands the
| "+json".
| throwaway2046 wrote:
| 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.
| ladyanita22 wrote:
| Looks really nice. Any similar projects in Rust?
___________________________________________________________________
(page generated 2025-01-07 23:02 UTC)