SuperCollider:更多合成案例

丰满合唱 (Fat Chorus)

我们制作一个彼此间轻微去谐(detune)的振荡器数组,并将它们混入单声道。

{Mix(Saw.ar([440,443,437],0.1))}.scope // 合唱

结合了AM、FM、合唱以及包络的更复杂的声音

(
{
Mix(
	Resonz.ar(  //Resonz(共鸣)滤波器的引数:输入, 频率, 频宽率=频宽/中心频率
		// 用锯齿波和合唱调制频率
                Saw.ar([440,443,437] + SinOsc.ar(100,0,5*200)),
                // 始终改变滤波频宽
		XLine.kr(10000,10, 10, doneAction:2),
                //始终改变滤波频宽率
		Line.kr(1,0.05, 10),
                // AM
		mul: LFSaw.kr(Line.kr(13,17,3),0.5,0.5)*Line.kr(1,0,10)
	)
)
}.scope
)

采样回放率调制 (Sample playback rate modulation)

由一个振荡器进行的采样回放调制。

声音档将在之后的学习中详述。但是你想超前一点也没问题,去看 PlayBufBuffer 的帮助文档。

// 先运行我以载入声音档
(
b=Buffer.read(s,"sounds/a11wlk01.wav");
)
// 现在轮到我了!
(

{
var modf, ind, modulator;
var b1;

b1= b.bufnum;

modf= MouseX.kr(1,4400, 'exponential');
ind=MouseY.kr(0.0,1.0, 'linear');

modulator= SinOsc.kr(modf,0,10*modf*ind, 440); 

PlayBuf.ar(1,b1, BufRateScale.kr(b1)* (modulator/440), 1, 0, 1)

}.play;
)

回到钟声

现在回到我们之前合成的钟声并为之增添一些调制效果,以得到一个更丰富、更活跃的声音。

// 更丰富钟声的patch
(
var numpartials, spectrum, amplitudes, modfreqs1, modfreqs2, decaytimes;

spectrum = [0.5,1,1.19,1.56,2,2.51,2.66,3.01,4.1];

amplitudes= [0.25,1,0.8,0.5,0.9,0.4,0.3,0.6,0.1];

numpartials = spectrum.size;

// 从1 到 5 Hz 的震音
modfreqs1 = Array.rand(numpartials, 1, 5.0); 

// 颤音率从0.1 到 3 Hz
modfreqs2 = Array.rand(numpartials, 0.1, 3.0);  

//从2.5 到 7.5 秒开始衰减
decaytimes = Array.rand(numpartials, 2.5,7.5); 

{
Mix.fill(spectrum.size, {arg i;
var amp, freq;

freq= (spectrum[i]+(SinOsc.kr(modfreqs1[i],0,0.005)))*500;
amp= 0.1* Line.kr(1,0,decaytimes[i])*(SinOsc.ar(modfreqs2[i],0,0.1,0.9)* amplitudes[i]);

Pan2.ar(SinOsc.ar(freq, 0, amp),1.0.rand2)});
}.scope

)

发表评论

电子邮件地址不会被公开。 必填项已用*标注

This site uses Akismet to reduce spam. Learn how your comment data is processed.