[chuck-users] STK shakers wrench rattling?

Stephen Sinclair radarsat1 at gmail.com
Mon Sep 22 16:00:07 EDT 2008


On Mon, Sep 22, 2008 at 2:11 PM, Kassen <signal.automatique at gmail.com> wrote:
> Stephen;
>
>> In the Shaker's setupNum() function (uget_stk.cpp:12387), the
>> frequencies of each resonator are set depending on the instrument
>> type.  It looks like they are set to specific values depending on the
>> instrument.  This is probably because they are designed to emulate
>> very specific sounds.
>
> Yes, that side to it I understood. It seems the underlying code is
> relatively complex because the character of the different emulations (for
> example the number of partials) varies quite a bit. It's a nice and
> versatile UGen, I like it.
>
>>
>> You could probably get some interesting effects if you modified this
>> code to multiply all frequencies by a variable such as freq, so that
>> you'd have control over it at runtime.  But the answer is, I think in
>> generate .freq() is not used for Shakers.
>
> Ok, yes. for some of the presets, like the pebbles, tuning would make
> relatively little sense and I can see how this could be the case. For
> others, like the bamboo, I'm getting the impression like they *are* supposed
> to be suitable for more melodic/tuned applications. I'd imagine that the
> tuned bamboo is supposed to be capable of being a part of a anklung (sp?) or
> similar instrument that's based on both particle behaviour *and* tuning.
>
> In any case; the docs do state that .freq() does work so either the docs or
> .freq() will have to change to line the two up. Personally I'd prefer tuned
> particles over a extra line in the manual/reference but admittedly that
> option is far more work.... :¬). BTW, I just looked up the speciffic example
> for this UGen in /examples/stk/ and in line 21 of "shake-o-matic.ck" the
> frequency *is* being set, though that might be a plain mistake, of course.
>
> Perhaps Perry or Gary will have some time to comment on the intended
> behaviour? There are quite a few exceptions for ChucK in the code so I could
> even imagine this functionality differes between the plain STK and it's
> ChucKist child by accident. I can well see your case here but I'm not
> abandoning all hope for (cheap & easy) tuned rain and anklungs :¬).


Sorry, I was totally wrong.  I was looking only at the initialization
code when I answered originally.
Later, when frequency is set, the center frequencies are multiplied by
the desired frequency value.
(This is in the controlChange() function, handling the ModWheel parameter.)

Does the following code work for you?
For me it creates the bamboo sound decending in frequency.



Shakers s => dac;
Phasor lfo => blackhole;

5 => s.preset; // Bamboo
1 => s.noteOn;

0.1 => lfo.freq;

now + 10::second => time end;
while (now < end) {
      0.8 => s.energy;
      1500-lfo.last()*1500 => s.freq;
      100::ms => now;
}


Steve


More information about the chuck-users mailing list