Now it does!it didnt' just because I didn't know anything about this remainder ( I was thinking you made a mistake and you wanted to write reminder and I was saying by myself, a reminder for what? ) but then i checked it out on the web and wiki helped me.
yes its' a little complicated but yes I understand , in a easier way it is what happens when you push the button in Ableton live and the clip waits to start with another.
It's a good way to connect different patches together and mix them as you like.




On Thu, Sep 27, 2012 at 6:53 PM, Kassen <signal.automatique@gmail.com> wrote:
On Thu, Sep 27, 2012 at 02:36:20PM +0200, Alberto Alassio wrote:
> I was trying to open the otf examples you told me and I got a question
> about period.
> what does
>
> T - (now % T) => now;
>
> means?

The "%" operator means "modulo". X modulo Y means; the remainder of
dividing X by Y. So; "9 % 4" will be 1. Check?

What we are doing here is that we start counting in increments of T
since time 0. This line of code makes us wait for the next beat, being
a integer multiple of T. After all; (now % T) must be the time since
the last "beat", so "T - (now % T)" refers to the amount of time to go
until the next beat. The total expression will then advance time until
the next beat, more or less like you will wait a bit until falling in
on your guitar when entering a jam session.

That is actually exactly what happens in these examples; each file
will wait until the next beat, then start playing, so because they are
all aware of T and know we start at 0 they do not need to communicate
with each other about this.

Make sense now?

Kas.
_______________________________________________
chuck-users mailing list
chuck-users@lists.cs.princeton.edu
https://lists.cs.princeton.edu/mailman/listinfo/chuck-users