3 ms·
This project differs from things like supercollider in that it doesn't generate static files, the sounds you hear are being created dynamically via WebAudio. S
by fenomas 6y ago
This project differs from things like supercollider in that it doesn't generate static files, the sounds you hear are being created dynamically via WebAudio.
So for something like a web game, one can use this project to make a sound effect, then copy/paste the code at the bottom of the page to play that sound in the game. (And since the sounds aren't pre-rendered, one can also twiddle the parameters at runtime to add variation to the sound each time it plays.)
- PaulDavisThe1st 6y agoSupercollider (and Chuck and others) do not just render to static files. They can all be used to generate real time audio and be manipulated in real time. They have oodles of synthesis and processing models already present. It is possible to write stuff in these languages that cannot be rendered in realtime by any current computer, but these days you have to work pretty hard to do that. Even on a phone, you'd have a lot of possibilities.
- fenomas 6y agoI meant that playing supercollider sound effects in a web browser would normally mean rendering static files. Naturally I wasn't suggesting it can't play audio in realtime.
- PaulDavisThe1st 6y agoJust cook up a WebAudio backend for SC, and you're done :)
- fenomas 6y agoSC is a programming language. A back end for it would mean a compiler, interpreter, GC, etc. This project is a GUI for creating WebAudio node graphs. It does not parse or interpret a programming language; it's not functionally or structurally similar to things like chuck or supercollider.
- PaulDavisThe1st 6y agoThis is the "playback code" you generate for one of the sounds: // import Gen from 'wasgen' // var gen = new Gen() gen.play([ {type:"n0", gain:{a:0.027,h:0,d:0.013,s:0.45,r:0.054}}, {type:"bandpass", freq:{t:2,p:0.4,q:0.01},Q:0.8}, ], 999, 1, gen.now(), gen.now() + 0.084) This is structurally extremely isomorphic to SC or Chuck etc., and could become more powerful if it was SC with a WebAudio backend for output. I know what the differences are - I've worked in this field for 20 years. I was just trying to give you a gentle smiley faced nudge to jump in on a "better" version of what you've already done in order to Make The World A Better Place. Really :)
- fenomas 6y ago> This is structurally extremely isomorphic to SC or Chuck etc., Negatory. A sound program in wasgen (i.e. the thing you pass to the "play" function) is a static object; comparable programs in SC/Chuck are code. They are as different as JSON and JS. As such, porting SC/Chuck to the browser would mean building a compiler/transpiler/VM/etc. > I was just trying to give you a gentle smiley faced nudge ...to Make The World A Better Place. By saying my project reinvents a wheel that's already been reinvented over and over and over so I should "just" write a port of a different project instead? Fair enough.