<div dir="ltr">Thanks Michael, this looks very interesting.<div><br></div><div>Arve<div class="gmail_extra"><br><div class="gmail_quote">On Sun, Dec 29, 2013 at 2:45 AM, Michael Heuer <span dir="ltr"><<a href="mailto:heuermh@gmail.com" target="_blank">heuermh@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On this topic I wanted to point out a project "inspired by ChucK" in<br>
the authors' words but not an implementation of the actual ChucK<br>
syntax, Charlie Roberts' Gibber<br>
<br>
<a href="https://github.com/charlieroberts/Gibber" target="_blank">https://github.com/charlieroberts/Gibber</a><br>
<br>
There is a lot of good stuff in there as far as live coding<br>
environment and cool audio APIs.  There might also be some useful<br>
stuff under the hood as far as javascript implementation goes.<br>
<span class="HOEnZb"><font color="#888888"><br>
   michael<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
<br>
On Sat, Dec 28, 2013 at 11:02 AM, Casper Schipper<br>
<<a href="mailto:casper.schipper@gmail.com">casper.schipper@gmail.com</a>> wrote:<br>
> Hello Arve,<br>
><br>
> I’ve been using ChucK for quite some time, but also started to get an<br>
> interest for the Web Audio API. I think I agree that having chuck compile in<br>
> a browser would give a huge boost for the language! It is very powerful to<br>
> be able to directly share musical programs through the internet, without the<br>
> receiver having to install or run external software. I do fear however that<br>
> there is a strong difference between ChucK and the way that Web Audio API is<br>
> designed not to mention the difference between C++ and JavaScript. ChucK has<br>
> a way of expressing time that is fundamentally different from any other<br>
> programming language I know.<br>
><br>
> Your implementation at first sight seems to me like like quite a thorough<br>
> port of the complete structure of ChucK, complete with VM etc.. Does that<br>
> mean that it will be possible to have sample accurate timing in your code<br>
> execution just like ChucK ? Playing a little bit with JavaScript I’ve<br>
> noticed that the JavaScript setTimeout clock is very unpredictable and found<br>
> it to be messy even for a simple drum machine. Of course there are ways of<br>
> dealing with that by scheduling ahead and using the WebAudio API clock, but<br>
> that would not work very well with the way ChucK deals with time. But maybe<br>
> your implementation doesn’t require the clock to be accurate ? I’m very<br>
> curious to hear what your experience has been!<br>
><br>
> Anyway what surprised me (shocked is maybe a better word, considering the<br>
> bad reputation of JavaScript) while playing with the Web Audio API, is that<br>
> JavaScript is quite interesting as an algorithmic composition scripting<br>
> language, since it is fundamentally a functional language not that unlike<br>
> Scheme or Lisp (and some powerful algorithmic musical tools have been built<br>
> in those like: AC toolbox, Niquist and AthenaCL in Python). Here JavaScript<br>
> could have an advantage above the more traditional way ChucK deals with<br>
> types and classes. When using ChucK I found that I almost always wanted to<br>
> add functionalities to the arrays like iterating, choosing, sorting, mapping<br>
> functions, lambda functions etc… These are also in the LicK library for<br>
> ChucK, but I haven’t seen many people use that, I guess because it<br>
> complicates the syntax a bit*. In JavaScript you get those things from the<br>
> start (or they are very simple to add). Also it’s easy to change behavior of<br>
> objects like adding methods dynamically to objects, which is very<br>
> interesting from the point of view of on the fly programming.<br>
><br>
> So summing this up, I think there is definitely a need for a good JavaScript<br>
> library to facilitate the generation of music with the Web Audio API.<br>
> ChucK could be a source of inspiration because it has some very good ideas:<br>
> - the => syntax is kind of cute and works well for uGens.<br>
> - the native time type and way of dealing with time (.2::second => now) is<br>
> very powerful.<br>
> - the fact that chuck allows 1::sample feedback loops is great!<br>
> - the control rate can be anything you need it to be.<br>
> - the ability to spork shreds is very handy when dealing with any type of<br>
> polyphony.<br>
>  but also perhaps:<br>
> - the timing system might not translate well (or at all) to JavaScript.<br>
> - JavaScript functional style programming has it’s own advantages that would<br>
> be perhaps a waste to overlook when simply putting ChucK into JavaScript.<br>
><br>
> Anyway keep me posted about your progress, I will closely watch your Github!<br>
> Perhaps I can be of help concerning ChucK, because I cannot really help you<br>
> with coffee script I’m afraid, since I don’t know it very well.<br>
><br>
> Cheers,<br>
> Casper<br>
><br>
> * although I must admit that I think it can’t be done any better than LicK<br>
> did.<br>
><br>
><br>
><br>
><br>
> Casper Schipper<br>
> <a href="mailto:casper.schipper@gmail.com">casper.schipper@gmail.com</a><br>
> <a href="http://www.casperschipper.nl" target="_blank">www.casperschipper.nl</a><br>
> <a href="tel:%2B316%2052322590" value="+31652322590">+316 52322590</a><br>
><br>
> On 27 dec. 2013, at 02:58, <a href="mailto:chuck-dev-request@lists.cs.princeton.edu">chuck-dev-request@lists.cs.princeton.edu</a> wrote:<br>
><br>
> Hi guys<br>
><br>
> I've begun work on a JavaScript (well, CoffeeScript) implementation of<br>
> ChucK, ChucKJS, for which I'm seeking feedback from ChucK developers in<br>
> particular. Web Audio API is used to produce sound. Very little of the<br>
> language is implemented so far, I've just today finished end-to-end support<br>
> (including a VM) for playing back a sine tone for a certain interval of time<br>
> as in the following program:<br>
><br>
>     SinOsc sin => dac;<br>
>     2::second => now;<br>
><br>
> Even though this may seem minor, I'm pretty happy that this is at all<br>
> possible just from within the browser :) As explained in the project's<br>
> README, there is a self-contained example (examples/example1.html) which<br>
> demonstrates the aforementioned sine wave playback capability.<br>
><br>
> What do you guys think, are anyone else interested in being able to run<br>
> ChucK programs in the browser? Anyone interested in helping out on ChucKJS<br>
> (like ChucK it's GPL licensed)?<br>
><br>
> My motivation for writing ChucKJS is to develop an online development<br>
> environment for ChucK where one can execute the programs directly in the<br>
> browser, I figure this will lower the threshold and make the language more<br>
> fun to work with.<br>
><br>
> Merry Christmas,<br>
> Arve<br>
><br>
><br>
><br>
</div></div><div class="HOEnZb"><div class="h5">> _______________________________________________<br>
> chuck-dev mailing list<br>
> <a href="mailto:chuck-dev@lists.cs.princeton.edu">chuck-dev@lists.cs.princeton.edu</a><br>
> <a href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-dev" target="_blank">https://lists.cs.princeton.edu/mailman/listinfo/chuck-dev</a><br>
><br>
_______________________________________________<br>
chuck-dev mailing list<br>
<a href="mailto:chuck-dev@lists.cs.princeton.edu">chuck-dev@lists.cs.princeton.edu</a><br>
<a href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-dev" target="_blank">https://lists.cs.princeton.edu/mailman/listinfo/chuck-dev</a><br>
</div></div></blockquote></div><br></div></div></div>