[chuck-users] shell script to change old patches to new chuck UGens
eduard
eduard.aylon at gmail.com
Sat Jan 13 22:06:45 EST 2007
Hi all,
For a while I''ve been thinking about writing a shell script or small
c++ program in order to change all my old Chuck patches (using old
version names i.e. sinosc, std, etc.) to the new version names (i.e.
SinOsc, Std, etc.). I see that even Perry is stuck to the old
'style'.. I still am also... I'm a bit lazy these days, so my
question is... has anyone written a script to do such thing?
If so.. I will update the ck.vim soon..
million thanks,
eduard
On 8 Jan 2007, at 21:56, Perry R Cook wrote:
>
> Hi all, here's a little New Year's gift. After
> reading a posting by an STK user to the stk list
> about reading Andy Moorer's account of how he
> created the THX sound, I decided to whip one up
> in ChucK. As easy as one might expect. Enjoy!!
>
> PRC
>
> http://musicthing.blogspot.com/2005/05/tiny-music-makers-pt-3-thx-
> sound.html
>
> // THX emulator, Perry R. Cook, Jan. 8, 2007
> //
> // F-1, B1b, F1, B2b, F2, B3b, F3, A5, F4, A6
> [ 29.0, 87.5,116.0,175.0,233.0,350.0,524.0,880.0,1048,1760,
> 29.0, 87.5,116.0,175.0,233.0,350.0,524.0,880.0,1048,1760,
> 29.0, 87.5,116.0,175.0,233.0,350.0,524.0,880.0,1048,1760 ] @=>
> float targets[];
> float initials[30];
> float deltas[30];
> sawosc s[30];
> gain gl[30];
> gain gr[30];
> JCRev rl => dac.left;
> JCRev rr => dac.right;
>
> 0 => int i => int j;
>
> for (0 => i; i<30; i+1 => i) {
> std.rand2f(200.0,800.0) => initials[i] => s[i].freq; // random
> freqs.
> (targets[i] - initials[i]) / 10000.0 => deltas[i]; // 10 sample
> updates
> 0.1 => s[i].gain;
> std.rand2f(0.0,1.0) => gl[i].gain; // random
> 1.0 - gl[i].gain() => gr[i].gain; // panning
> s[i] => gl[i] => rl; // hook up
> s[i] => gr[i] => rr; // all the
> oscs
> }
>
> 10000 :: samp => now; // steady
> cluster
>
> while(j < 10000) {
> for (0 => i; i<30; i+1 => i) {
> initials[i] + (deltas[i]*j) => s[i].freq; // sweep
> freqs.
> }
> j + 1 => j;
> 10 :: samp => now;}
> while (j < 30000) { // hold chord
> 10 :: samp => now;
> j + 1 => j;
> }
> while (j < 35000) {
> for (0 => i; i<30; i+1 => i) {
> 0.1 * (35000 - j) / 10000.0 => s[i].gain; // decay
> gains
> }
> 10 :: samp => now;
> j + 1 => j;
> }
> 60000 :: samp => now; // reverb tail
>
> _______________________________________________
> 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