STK shakers wrench rattling?
Hi, list! I'm having a bit of a problem with the wrench and guiro presets of Shakers; they won't rattle nicely. That is; they do for the first .noteOn() after the preset was set but after that the following noteOn's merely make them click. I tried all parameters in lots of permutations, I also tried to understand the source (which has lots of exceptions for these two) but it's beyond me and some of the comments look scary ;¬). I'm suspecting this isn't proper behaviour; sometimes messing with the .energy() parameter will get them to make some sort of noise but no nice rattles. Could somebody please comment on this? Yours, Kas.
On Sun, Sep 21, 2008 at 12:28 AM, Kassen
Hi, list!
I'm having a bit of a problem with the wrench and guiro presets of Shakers; they won't rattle nicely. That is; they do for the first .noteOn() after the preset was set but after that the following noteOn's merely make them click. I tried all parameters in lots of permutations, I also tried to understand the source (which has lots of exceptions for these two) but it's beyond me and some of the comments look scary ;¬).
I'm suspecting this isn't proper behaviour; sometimes messing with the .energy() parameter will get them to make some sort of noise but no nice rattles.
Could somebody please comment on this?
hm, I think with the STK demo you had to keep moving the energy slider in the GUI to get the "rattle" to continue. have you tried sending a sort of ramp to the energe parameter? Basically I think as long as the energy value keeps changing the rattle will continue. Shakers s => dac; Phasor lfo => blackhole; 100 => lfo.freq; 10 => s.preset; s.noteOn(1); now + 3::second => time end; while (now < end) { lfo.last()/10+0.5 => s.energy; 1::ms => now; } As I've just discovered you can get some cool effects by using different frequencies and waveforms for the LFO. Steve
Stephen; hm, I think with the STK demo you had to keep moving the energy slider
in the GUI to get the "rattle" to continue. have you tried sending a sort of ramp to the energe parameter?
No, I didn't try a ramp yet. I was focussing on trying to figure out what changed between the first noteOn and the next ones, polling it for energy levels and so on and not having much luck. I was assuming the "energy" could be put onto the system by using the function of the same name, then would decay on it's own according to the "decay" time/rate.
As I've just discovered you can get some cool effects by using different frequencies and waveforms for the LFO.
:¬D I just tried too, this is loads of fun! Thanks a lot! Kas.
On Sun, Sep 21, 2008 at 2:22 PM, Kassen
Stephen;
hm, I think with the STK demo you had to keep moving the energy slider in the GUI to get the "rattle" to continue. have you tried sending a sort of ramp to the energe parameter?
No, I didn't try a ramp yet. I was focussing on trying to figure out what changed between the first noteOn and the next ones, polling it for energy levels and so on and not having much luck. I was assuming the "energy" could be put onto the system by using the function of the same name, then would decay on it's own according to the "decay" time/rate.
I agree that it's not really clear at all.
As I've just discovered you can get some cool effects by using different frequencies and waveforms for the LFO.
:¬D
I just tried too, this is loads of fun! Thanks a lot!
Cheers. :) Steve
2008/9/22 Stephen Sinclair
I agree that it's not really clear at all.
Well... no... but it works. I'm not sure I get how exactly this applies to things like the coins yet but at least they make nice sounds and now I was able to get something that sounded like a large coin sliding over the floor which was what I needed. :¬)
I just tried too, this is loads of fun! Thanks a lot!
Cheers. :)
Oh, and one more thing; Is it just me or does Shakers not react at all to .freq( )? I realise many of these are only vaguely pitched but I would imagine switching from 50 to 2000 Hz to make a noticeable difference. .freq() does -when polled- claim it's set to the last value I set but I don't hear the difference. Could you or anyone else verify this? Yours, Kas.
On Mon, Sep 22, 2008 at 8:24 AM, Kassen
Oh, and one more thing; Is it just me or does Shakers not react at all to .freq( )? I realise many of these are only vaguely pitched but I would imagine switching from 50 to 2000 Hz to make a noticeable difference. .freq() does -when polled- claim it's set to the last value I set but I don't hear the difference. Could you or anyone else verify this?
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. 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. Steve
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 :¬). Yours, Kas.
On Mon, Sep 22, 2008 at 2:11 PM, Kassen
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
Stephen;
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.
Yes, this works perfectly! I'm now wondering what went wrong with my experiments of this morning (sadly those were lost in a little crash). I did think it used to work and that it was odd. Perhaps I made a typo or tried too small a range with a preset with too much noisy characteristics but I do think I tried a rather large range of numbers... Very strange and quite likely all my fault. Sorry if this caused confusion. Thanks again! Kas.
On Mon, Sep 22, 2008 at 4:26 PM, Kassen
Stephen;
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.
Yes, this works perfectly! I'm now wondering what went wrong with my experiments of this morning (sadly those were lost in a little crash). I did think it used to work and that it was odd. Perhaps I made a typo or tried too small a range with a preset with too much noisy characteristics but I do think I tried a rather large range of numbers...
Very strange and quite likely all my fault. Sorry if this caused confusion.
Thanks again!
No problem. I'm too caught up in developing software and often need an excuse to stop and play with actual sound now and then. :) Steve
participants (2)
-
Kassen
-
Stephen Sinclair