[sc-users] Pfunc and Pbind
赤松 武子
tn800 at iamas.ac.jp
Wed Dec 20 12:05:15 PST 2006
Hi, all
I have a question about Pfunc and Pbind.
I'm trying to rewrite my old SC2 code.
With SC2 I wrote this code, I want to slide the second note, like a
sliding bass.
- - -
( // dosen't work well
m = Pseq([Pseq([43, Pfuncn({ Line.kr(43, 50, 0.1) }), 50 ], 2)], inf);
Pbind(\midinote, m).play
)
- - -
But with SC3 it dosen't work. So I wrote following code, sounds
perfect, but I think this is inefficient.
(Because I have to write the same note and have to use Line always
even thoug I don't need to slide, like the first and third note. )
Would you suggest me more cool idea ?
- - -
(
SynthDef("slide_bass", { arg out, freq = 1000, gate = 1, amp = 1,
env,midinote1,midinote2;
Out.ar(out, Pulse.ar(Line.kr(midinote1.midicps, midinote2.midicps,
0.1)) // use two argument for Line.kr
* EnvGen.kr(Env.perc(0.05, 1, 1, -4), gate, amp, doneAction:2);
)
}).store;
Pbind(
\instrument,\slide_bass,
\midinote1,Pseq( [43,43,50], inf),
\midinote2,Pseq( [43,50,50], inf)
).play;
)
- - -
thank you,
takekko
More information about the sc-users
mailing list