[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[sc-users] Two Ctk related questions



Hi all,

I'm trying to use Ctk classes and I have two questions about these ...

The first: how do you integrate an ambisonic decoder in Ctk ? I mean
in Ctk we use CtkProtoNotes to describe the SynthDef used and then use
them one at a time. Where can you say: at the end of all put the
Ambisonic decoder ?

The second: could you please explain me the kind of syntax shortcuts
used in this code fragment ?
I mean the while condition and the  .addTo and .freq ...

grainfun = {arg starttime, duration, ampenv, lowfreq, hifreq;
	var now, note, thisgroup;
	now = 0;
	ampenv.times = ampenv.times.normalizeSum * duration; // scale the
Env's time to the gestures
	thisgroup = CtkGroup.new(starttime, duration + 2).addTo(score);
	while({
		// create a note... add it to the CtkScore
		note = orch[\test].new(starttime + now, 0.1, target: thisgroup)
			.freq_(lowfreq.rrand(hifreq))
			.amp_(ampenv[now])
			.dur_(0.1).addTo(score);
		now = now + 0.02;
		now < duration;
		});
	};

Many thanks

All the best

-- 
Alessandro Fogar

http://www.fogar.it