<br><br><div><span class="gmail_quote">On 9/17/07, <b class="gmail_sendername">AlgoMantra</b> &lt;<a href="mailto:algomantra@gmail.com">algomantra@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
(Kassen, I&#39;m here - we had a very brief exchange about ChucK with toplappers)
</blockquote><div><br>Very good, for a moment I feared you had gone up the mountain and started meditating until GlucK arrived!<br><br>&nbsp;</div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
usually<br>by someone too good to be true like Kassen.</blockquote><div><br>This online communications stuff is really great, nobody is ever confronted with morning moods or remembers the time one climbed in through the window while drunk and so on. :¬)
<br><br>&nbsp;</div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I want to know what people really
<br>&nbsp;mean by OTF (on the fly) or by &quot;livecoding&quot; in Chuck.</blockquote><div><br>Yes, very good, let&#39;s talk about this because you have a great point and IMHO it needs more emphasis so that we could perhaps persuade Spencer to set some time aside and help us because this would be a huge improvement to both livecoding and rapid prototyping.
<br><br>&nbsp;</div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">If you prepare your files and code in advance and then just chuck the <br>
shreds in and out of the VM, it really is a a bit like sequencing, rather
<br>than livecoding. And if I change the code in the file, save it, then the <br>effects don&#39;t appear live, do they? I really don&#39;t see how i&#39;m changing <br>the code &quot;while its running&quot; here. </blockquote>
<div><br>Yes, true. It&#39;s still better then sequencing waves because you can have random or rule-based variations but still. Changing, then saving files won&#39;t make them run, you need to replace them in the VM but to do that they indeed need to be saved (or be inside of a(mini) Audicle window.)
<br><br>So, you make a file called &quot;<a href="http://mantra.ck">mantra.ck</a>&quot; that does something marvellously interesting.<br><br>&gt;chuck --loop <a href="http://mantra.ck">mantra.ck</a><br><br>Now it&#39;s running. So; you edit it to something yet better, then save it.
<br>open a new terminal and go<br><br>&gt;chuck = 1 <a href="http://mantra.ck">mantra.ck</a><br><br>This will replace the first shred (being your original file) with the new one. Presto.<br><br>This is cool and this is what people do when livecoding though in that case the miniaudicle will make things a lot more convenient.
<br><br>Now for the bad news; all variables that your file had and all arrays that might by now be filled with data that determines what music is being generated will be re-initialised. At least all other running shreds will be unaffected and you can try to make the replacement at a musically sensible moment but if your old code had just written a random yet nice melody that you now wanted to add reverb to that melody will be gone.
<br><br><br>A workaround would be to store all such data in static members of public classes, those will survive until the end of the VM so those are dependable but doing this leads to significant overhead in code which is one of the last things you need when livecoding. I&#39;ve been meaning to experiment with this more and see how convenient I can make it for myself but it&#39;s still ugly.
<br><br>Now, ChucK does have a way to edit just parts of running code, it&#39;s part of the functionality of chuck --shell but it&#39;s hard to use (meaning I didn&#39;t get it to work) and almost completely un-documented (it was in some corner of the wiki). The problem was that you had to navigate through the name-space, like a directory structure, using the terminal, then type exactly what you wanted to do.
<br><br>What I would -perhaps naïvely- think would be *the* solution is having the MiniAudicle provide a graphical front-end to this aspect of chuck --shell with highlighting and hotkeys used to indicate what element in what scope we are trying to edit and replace/add.
<br><br>Last I heard on this was that Spencer (who manages the mini) seemed to find the idea interesting but I gather Spencer&#39;s time is limited (which I stress I have a lot of respect for) and I have to admit that this idea could fall squarely in the &quot;likely to explode if you sneeze&quot; category. What&#39;s slightly mysterious to me is that so far nobody else has been particularly vocal about how useful this would be so I&#39;m quite happy that you bring it up now.
<br><br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>What a royal mess. </blockquote><div><br>Let&#39;s not exaggerate, writing musical algorithms on stage is still exciting and fun, even if modifications mean re-starting them but there is certainly room for improvement.... That said; there is a lot of room for growth in a lot of aspects of ChucK and so there are priorities.
<br><br><br>Perhaps Ge, Graham and&nbsp; Perry who have been livecoding in ChucK more then I have and at a higher profile could&nbsp; share some ideas about how they deal with this? Perhaps I too am missing something fundamental.<br>
<br>Yours,<br>Kas.<br></div><br></div>