Hi, list.<br><br>At the moment I'm merrily ChucKing allong building a little &quot;groovebox&quot;. My idea here is that it's easier to put knobs on a laptop then it is to put a comand line on a groovebox.<br><br>The plan is to have one shred backed by a few sporked functions that will allow me to manipulate data in arrays using a midi controler (toggeling steps for beats, so far). Eventually this will use events to trigger the sounds in other shreds so those sounds could be re-compiled without ruining the data in the arrays. This is working nicely and seems like a good idea, even if at the moment it's not quite up to the level of a rs7000 or Live (yet!).
<br><br><br>For true groovebox functionality it would be nice to have some way of listening to a MIDI clock and this seems to be missing at the moment.<br>Of cource MIDI sync normally works quite differently from the typical structure of ChucK code but at least some way of relating to it would be nice.
<br><br>I'd like to sugest some new function for this.<br>What if we had something that would for example be able to output those midi clock &quot;sync&quot; pulses (I think they are properly defined as repeat &quot;play&quot; messages or something along those lines?) as events as well as the duration (in time) between the last two clock ticks of a incoming clock. Practically speaking it might be more sensible to average the time of -say- the last four of those, considdering how inacurate MIDI is and how quickly multiplied jitter might add up if looped.
<br><br>This would enable us to have chuck loops that would go something like;<br><br>//wait for next sync event<br>sync =&gt; now;<br>//main loop<br>while(true)<br>{<br>something_involving_realy_cool_beats;<br><br>//advance my sequencer
<br>1 +=&gt; steps;<br>(steps % 16) =&gt; steps;<br>//advance time by a quarter note<br>24::click =&gt; now;<br>}<br><br><br><br>Now; this example would probably start drifting unless the duration of &quot;click&quot; was updated frequently by some external loop (thus averaging out the jitter) and even then some more advanced form of syncing the whole loop up every once in while would be preferable, especially if the external master clock will be modulated in mid piece.... Still; I hope this demonstrates that Chuck programs could relate to a MIDI clock in a way that's at least somewhat similar to the way they normally relate to the internal ChucK &quot;now&quot;. 
<br><br>Bad; <br>Keeps MIDI alive while it realy should have died long ago.<br><br>Good; <br>Allows one to jam with friends who haven't yet realised MIDI should have been left in the 80's.<br>Not all that complicated to implement, I imagine.
<br><br>Alternatively it would also be welcome to point me at where it says we allready have something like this; I looked and couldn't find a thing.<br><br>Yours,<br>Kas.<br>