CC3 Week 8 - Streams (I)
I used my synthdef from week 6 in this week's exercise. I have generated a very basic sequence using Pseq. This week I really just tried to get my sequence to work. In later weeks I want to experiment further and create more exciting sounds. Click here for my audio example [12KB].
(
SynthDef("SinTone", {
arg cFreq = 500, cAmp = 0.5, mFreq = 3, mAmp = 0.75;
var carrier, modulator, envStruct, envGen, out;
modulator = SinOsc.ar(freq: mFreq, mul: mAmp);
carrier = SinOsc.ar(freq: cFreq, mul: modulator * cAmp);
// Envelope Structure
envStruct = Env(
levels: [1.0, 0.35, 0.6],
times: [0.1, 0.2],
curve: 'welch'
);
// Envelope Instance
envGen = EnvGen.kr(
envelope: envStruct,
gate: 1.0,
doneAction: 2.0
);
out = Out.ar(bus: 0, channelsArray: carrier);
}).store;
)
(
var a, b;
a = Pseq(#[60, 61, 63, 65, 67, 63], inf ).asStream.midicps;
b = Pseq(#[0.3, 0.4, 0.5, 0.6, 0.7, 0.8], 5).asStream;
Task({
12.do({
Synth("SinTone", [ \cFreq, a.next, \dur, b.next ]);
b.next.wait;
});
}).play
)
[1] Christian Haines. "Creative Computing: Semester 1 - Week 8 - Streams I". Lecture presented at the Electronic Music Unit, University of Adelaide, South Australia, 24th April 2008
No comments:
Post a Comment