[chuck-users] Begin the beguine
Alberto Alassio
alberto.alassio at gmail.com
Sun Sep 30 17:21:36 EDT 2012
Really helpful thank you! I'm going to look at it tomorrow morning
On Sun, Sep 30, 2012 at 11:14 PM, Joel Matthys <jwmatthys at yahoo.com> wrote:
> I'd like to point out that "count" is a variable name, not a built-in
> ChucK thing. In this example, "count" is just the name someone has chosen
> to keep track of a number that keeps increasing by 1.
>
> You might want to look at the ChucK tutorials I made for our Intro to
> Electronic Music course here at the University of Cincinnati. There are 7
> tutorials that start from a simple SinOsc and introduce variables,
> functions, STK instruments, and sporking. They were intended as notes to
> accompany the class but they might be useful.
>
> I uploaded them here:
>
> https://github.com/jwmatthys/chuck-tutorials
>
> Joel
>
>
>
> On 09/30/2012 04:08 PM, Alberto Alassio wrote:
>
> Ok, to me it wasn't so easy to understand count < steps. so it counts till
> the steps end, right? And in this patch count refers to steps but it is
> also the one who makes the freq increases by inc, I mean, for each count we
> have, then the freq increases.
> Is it correct?
> Thank you Kas, it always helps!
>
> On Sun, Sep 30, 2012 at 9:59 PM, Kassen <signal.automatique at gmail.com>wrote:
>
>> On Sun, Sep 30, 2012 at 09:41:13PM +0200, Alberto Alassio wrote:
>> > Me again.
>> > Looking at the examples, now I'm messing with Chirp.
>> > I cannot understand what Tinc and Inc are. I think that tinc is
>> something
>> > like the time of every step from a freq to another one, is it right?
>> > And Inc is how much freq increases according to tinc's time, is it
>> correct?
>> >
>> That seems to be exactly right, yes.
>>
>> > But what is -count-? A counter of what? And what " while ( count <
>> steps )
>> > " and " 1+ => count " mean?
>>
>> "count" refers to the current step. It starts out as zero and
>> increases until the desired number of steps has been reached.
>> "1 +=> count" adds one to the "count" and also stores the result back
>> in "count".
>>
>> It is not so clear to me why a float is used here for "count",
>> instead of a integer, which would make more sense and enable us to
>> simply increment by using;
>>
>> count++;
>>
>> Better yet would be a "for" loop. Maybe this example is deliberately
>> doing unusual stuff to encourage people like you to spend some time
>> picking it apart and figuring it out? It might also be very old and
>> pre-dating something like comparing floats to integers. To me it looks
>> like Ge's style which would make sense in both cases.
>>
>> Hope that helps,
>> Kas.
>> _______________________________________________
>> chuck-users mailing list
>> chuck-users at lists.cs.princeton.edu
>> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
>>
>
>
>
> _______________________________________________
> chuck-users mailing listchuck-users at lists.cs.princeton.eduhttps://lists.cs.princeton.edu/mailman/listinfo/chuck-users
>
>
>
> _______________________________________________
> chuck-users mailing list
> chuck-users at lists.cs.princeton.edu
> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20120930/6cf9215b/attachment.htm>
More information about the chuck-users
mailing list