We can even use Emscripten to convert an entire C/C++ codebase to
JavaScript:
http://emscripten.org/
Currently I'm working on a livecoding environment for Web using Audiolet:
http://github.com/automata/vivace
@Tom, impressing demo. Please, let's keep in touch.
All the best.
Em 20 de abril de 2012 13:51, henrique matias
Hum, i couldn't expect less from chuck users. High level talk here.
About the syntax you might be able to workaround the time yielding thing with a "pre-script-language"
For instance coffee Script ( The language Tom pointed ), has a "runtime compiler" that would parse the code and convert to javascript almost in no time..
On 20 April 2012 16:18, Tom Lieber
wrote: On Thu, Apr 19, 2012 at 6:10 PM, Matt Diamond
wrote: Has anyone had any experience with using ChucK in a web context? For example, two things I'd be interested in as a web developer:
1) streaming ChucK audio output from a NodeJS server to the browser 2) a javascript client-side ChucK implementation utilizing the Web Audio API
Has there been any work on either of these?
Links to these projects came up on the TOPLAP mailing list (worth subscribing and perhaps asking there too):
http://livecoder.net/ http://www.charlie-roberts.com/gibber/
Some friends from undergrad made a collaborative browser-based ChucK editor that sounds like Noah's, though theirs was also not published. Someone should release something!
At any rate, I've found the JavaScriptAudioNode interface to be fairly friendly and somewhat performant:
https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html
This experiment of mine works pretty well on my computer, though for some reason falls over on Windows without a much wider window size that kills interactivity:
http://people.csail.mit.edu/tl/vocal/ http://people.csail.mit.edu/tl/vocal/audio.js
It's a port of this ChucK script designed for joystick control:
http://smelt.cs.princeton.edu/pieces/JoyOfChant/JoyOfChant.ck
Anyway, running a virtual machine on top of Javascript in the audio callback would probably not work, but if you could compile the code to Javascript then you ought to be able to get away with a lot. Maybe extend CoffeeScript? (The only reason you'd want the compile step at all is that there's no easy way to emulate ChucK's syntax for yielding time because Javascript lacks continuation support in most implementations.)
-- Tom Lieber http://AllTom.com/ http://infinite-sketchpad.com/ _______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
-- Vilson Vieira vilson@void.cc ((( http://automata.cc ))) ((( http://musa.cc ))) ((( http://labmacambira.sourceforge.net )))