[chuck-users] Getting Started with ChucK

Andrew C. Smith acsmith at willamette.edu
Mon Jul 20 21:13:43 EDT 2009


Totally true.  Except, it seems that once you get the hang of sporking
new shreds it's really not a big deal at all.  It's maybe a few extra
lines of code.  Is there a UGen param object?  Like, could you make a
general shred:

fun void mod(UGen a, UGen.etc() b) {
     a.last => b;
     64::samp => now;
}

Is there any way to achieve the same functionality as this?  This way
you could just do something like "spork mod(sine1, sine2.gain)" and
set up your modulation.  Honestly, this isn't any trouble once you get
used to it.  The main thing ChucK lacks is is the millions of UGens
that come with SC.  But I like to think of this as a minimalist
feature instead of a lack.

Andrew

On Mon, Jul 20, 2009 at 8:06 PM, Andrew Turley<aturley at acm.org> wrote:
> I think the strange thing with ChucK (coming from SC) is that there
> isn't a really easy way to modulate more than one parameter at a time.
> If you wanted to do FM and AM at the same time in ChucK you would need
> to create at least one new shred. In SC you could just pass in two
> generators to do the modulation.
>
> It would be cool if you could do something like this in ChucK:
>
> SinOsc car => dac;
> SinOsc mod;
> 440 => mod.dcOffset;
> 20 => mod.freq;
> 300 => mod.gain;
> mod => car.freq;
>
> andy
>
> On Mon, Jul 20, 2009 at 4:40 PM, Lucas Samaruga<samarugalucas at gmail.com> wrote:
>> Hi
>>
>> In ChucK you don't have .kr or .ar signal divided, the kr signals are
>> defined in the code with control structures related to the time
>> structure. And the programming paradigm is a bit different.
>>
>> SinOsc mod => blackhole;
>> SinOsc car => dac;
>>
>> 440 => float bfreq;
>> 20 => mod.freq;
>> 300 => mod.gain;
>>
>> // the connection between ugens is inside the loop
>> while( true ) {
>>    bfreq + mod.last() => car.freq;
>>    64::samp => now; // kr
>> }
>>
>> In the docs are a lot of examples. sync is other option, see
>> /examples/basic/fm*.ck
>>
>> best
>> Lucas
>>
>>
>>
>>
>> 2009/7/20, Andrew Turley <aturley at acm.org>:
>>> Yeah, it is a little different. You can always spork another shred
>>> that modulates a parameter, but it gets a little verbose.
>>>
>>> andy
>>>
>>> 2009/7/19 Greg Sabo <gregsabo at gmail.com>:
>>>> Hello, I've been interested in trying ChucK for several years now but I've
>>>> just recently started playing with it in earnest. I like what I see so far
>>>> :)
>>>> I have one thing that's bothering me - coming from SuperCollider, I'm used
>>>> to being able to put UGens in pretty much any argument, like this:
>>>> {a = SinOsc.kr(freq: 20, mul: 300);
>>>> SinOsc.ar(freq: a, mul: 0.8)}.play
>>>> If I wanted basic FM. So intuitively, trying out ChucK for the first time,
>>>> I
>>>> tried to do:
>>>> SinOsc mod => SinOsc car.freq => dac;
>>>> Which didn't work. After a bit of reading, I understand that UGens have
>>>> "inputs" in ChucK, by default set to modify the frequency, and if you want
>>>> to modulate a different parameter, you change that object's sync
>>>> attribute.
>>>> That seems kind of weird/unintuitive to me, is there something that I'm
>>>> missing that went into making the syntax like this?
>>>> Besides that, I find ChucK really fun to play with, and I look forward to
>>>> making some zany sounds with it :)
>>>> -Greg Sabo
>>>> _______________________________________________
>>>> chuck-users mailing list
>>>> chuck-users at lists.cs.princeton.edu
>>>> https://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
>>>
>>
> _______________________________________________
> chuck-users mailing list
> chuck-users at lists.cs.princeton.edu
> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
>


More information about the chuck-users mailing list