<div dir="ltr"><div>in the example before I wrote 0.5::sample , but it is 0.5::samp</div><div>sorry<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 11 Feb 2020 at 13:21, Mario Buoninfante &lt;<a href="mailto:mario.buoninfante@gmail.com">mario.buoninfante@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi Herman,</div><div><br></div><div>In ChucK you can also go sub-sample rate (ie 0.5::sample =&gt; now;). <br></div><div>I wouldn&#39;t worry about the <i>rate</i> of the events (how fast they&#39;re generated), I think it&#39;s slightly more complex than that. <br></div><div>I would assume (and I&#39;d like to ask someone on the list more expert than me to validate this statement) that as long as the event can be <i>captured</i> <i>at</i> <i>low level </i>by<i> </i>ChucK, then you can use it to trigger <i>now</i>.</div><div>In the case of USB MIDI then, there are also some aspects of the implementation of the various MIDI libraries that help in scenarios where too many msg are sent.</div><div>For example, the computer and/or the hardware connected to it, can communicate the fact that they&#39;re busy and thus whichever of the 2 is the one that sends the msg, can wait before sending the next one (all this assuming that both implemented USB MIDI the same way).</div><div>Now, as far as I know this mechanism is not always in place (both in USB MIDI libraries and hardware/software products), and I honestly don&#39;t know whether or not ChucK uses it (I suppose it would be the case of having a look at the source code - RtMidi and the way ChucK interfaces to it).</div><div><br></div><div>About<i> now</i>, this can work with <i>dur</i> and<i> time</i> data types and <i>events</i> (Event, MIDI, HID).</div><div>About the MIDI use case, your <i>MidiIn</i> objects receives a MIDI msg (so ChucK is aware of the msg already) and then triggers <i>now</i>.<br></div><div>At that point your script/program proceeds and go to the next instruction (ie whatever else in the code comes next).</div><div><br></div><div>Cheers,</div><div>Mario<br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 11 Feb 2020 at 11:56, herman verbaeten &lt;<a href="mailto:hverb54@hotmail.com" target="_blank">hverb54@hotmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">




<div dir="ltr">
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Thanks Mario,</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
So once you started the VM to run,  time floats at the speed of  44100 times  a sec. So the &quot;now&quot; can only see things if they&#39;r fed into it at a frequency less or even a 44100 th time of a second.   </div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Does this mean that i can feed anything into the &quot;now&quot;? Or only things that contain a kind of trigger? But in case of a midi message this trigger  &quot;min =&gt; now&quot; kind of wakes up chuck to do the nex thing on the list? e.g. read the incoming message?</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Cheers,</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Herman</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div>
<div id="gmail-m_-6777505265998269741gmail-m_3112254726841316931appendonsend"></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<hr style="display:inline-block;width:98%">
<div id="gmail-m_-6777505265998269741gmail-m_3112254726841316931divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>Van:</b> <a href="mailto:chuck-users-bounces@lists.cs.princeton.edu" target="_blank">chuck-users-bounces@lists.cs.princeton.edu</a> &lt;<a href="mailto:chuck-users-bounces@lists.cs.princeton.edu" target="_blank">chuck-users-bounces@lists.cs.princeton.edu</a>&gt; namens Mario Buoninfante &lt;<a href="mailto:mario.buoninfante@gmail.com" target="_blank">mario.buoninfante@gmail.com</a>&gt;<br>
<b>Verzonden:</b> dinsdag 11 februari 2020 11:07<br>
<b>Aan:</b> ChucK Users Mailing List &lt;<a href="mailto:chuck-users@lists.cs.princeton.edu" target="_blank">chuck-users@lists.cs.princeton.edu</a>&gt;<br>
<b>Onderwerp:</b> Re: [chuck-users] =&gt; now</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div>to be a bit more precise, when you have something like</div>
<div>min =&gt; now;</div>
<div>your program waits for a MIDI event in order to advance, but the ChucK time is still running.</div>
<div>Anyway, more info in the link I shared :)<br>
</div>
</div>
<br>
<div>
<div dir="ltr">On Tue, 11 Feb 2020 at 11:03, Mario Buoninfante &lt;<a href="mailto:mario.buoninfante@gmail.com" target="_blank">mario.buoninfante@gmail.com</a>&gt; wrote:<br>
</div>
<blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div>Hi Herman,</div>
<div><br>
</div>
<div>You can use Events/MIDI/HID to advance in time.</div>
<div>Have a look at this chapter if you want to know more about it <a href="https://en.flossmanuals.net/chuck/_full/#events" target="_blank">
https://en.flossmanuals.net/chuck/_full/#events</a></div>
<div>In a nutshell what happens is that a MIDI event is received and that turns into a
<i>trigger</i>, so your program advances in time. Otherwise it stays there until a MIDI even happens.</div>
<div>See it more as a trigger than a <i>time constant</i> if that makes sense.<br>
</div>
<div><br>
</div>
<div>Cheers,</div>
<div>Mario<br>
</div>
</div>
<br>
<div>
<div dir="ltr">On Tue, 11 Feb 2020 at 10:59, herman verbaeten &lt;<a href="mailto:hverb54@hotmail.com" target="_blank">hverb54@hotmail.com</a>&gt; wrote:<br>
</div>
<blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Hi,</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
I&#39;m trying to understand what&#39;s really  happening in chuck. </div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
I thought i did untill i saw some exemples of midi.</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Normaly you can only feed time or duration into now ( e.g. 10::ms =&gt; now)</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
But in case you are awaiting a midi-in message you write :</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
MidiIn min;</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
while (true)</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
{</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
min =&gt; now    </div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
}</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
So in fact do you assign the message to time? Total confusion!</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Thanks for your answer.</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Herman</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
</div>
_______________________________________________<br>
chuck-users mailing list<br>
<a href="mailto:chuck-users@lists.cs.princeton.edu" target="_blank">chuck-users@lists.cs.princeton.edu</a><br>
<a href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users" rel="noreferrer" target="_blank">https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a><br>
</blockquote>
</div>
</blockquote>
</div>
</div>
</div>
</div>

_______________________________________________<br>
chuck-users mailing list<br>
<a href="mailto:chuck-users@lists.cs.princeton.edu" target="_blank">chuck-users@lists.cs.princeton.edu</a><br>
<a href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users" rel="noreferrer" target="_blank">https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a><br>
</blockquote></div>
</blockquote></div>