«Polyswing_asym» by bernhard

on 01 May'20 22:59 in drumssambaswinggroovedrummachine

Rhythm-Experiment for sambalike patterns. The goal are cyclic patterns that accelerate in asymetrical way inside one cycle.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
// Rhythm-Experiment for sambalike patterns. The goal are cyclic patterns that accelerate in asymetrical way inside one cycle.

// Masterclock is a LFSaw that's bent via lincurve with the "swing"-argument.
// Speed is in Hz.

// Behaves asymetrial.
// swing = 0 is linear. Negative values shift things towards start, positive values towards end of cycle.

// The masterclock is chopped with the "div"-argument in shorter parts for each instrument.
// Negative values and zero for "div" should be avoided.

// The raw clock-signals control the instruments. More organic than classic triggers and envelopes, but strange sometimes.

// Default volumes of intruments are high for saturation and distortion.

y=Synth(\polyswingasym)
y.free

y.set(\swing,0.5);


y.set(\speed,1);

y.set(\kickv,86);
y.set(\snrv,72);
y.set(\hhv,111);
y.set(\tmv,64);
y.set(\clvv,30);
y.set(\wdv,20);

y.set(\deckick,6);
y.set(\decsnr,4);


y.set(\div1,2);
y.set(\div2,3);
y.set(\div3,5);
y.set(\div4,6);
y.set(\div5,7);
y.set(\div6,4);

y.set(\frqkick,65);
y.set(\frqtm,195);


(
SynthDef(\polyswingasym,{

	arg frqkick=45, frqtm=135, reskick=0.05, deckick=4, decsnr=4, speed=1, swing=0.5, div1=2, div2=3, div3=4, div4=6, div5=8, div6=3, out=0, kickv=86, snrv=74, hhv=110, tmv=70, clvv=30, wdv=100;

	var sig, master, master2, trig1, trig2, trig21, trig3, trig4, trig5, trig6,
	kick,envkick,snr,envsnr,hh,tm,clv,wd;

	master = LFSaw.ar(speed,pi,0.5,0.5).lincurve(0,1,0,1,swing);

	trig1 = (master%(1/div1))*div1;
	trig2 = (master%(1/div2))*div2;
	trig3 = (master%(1/div3))*div3;
	trig4 = (master%(1/div4))*div4;
	trig5 = (master%(1/div5))*div5;
	trig6 = (master%(1/div6))*div6;

	envkick = (((trig1.neg+1).lincurve(0,1,0,1,deckick).cubed*2)+1).lag(0.001);

	envsnr = ((trig2.neg+1).lincurve(0,1,0,1,decsnr).cubed).lag(0.001);

	kick= Resonz.ar(trig1,frqkick*envkick,0.005,kickv);
	snr=  (Resonz.ar(trig2,222,0.02,4)+WhiteNoise.ar(0.01)+Dust2.ar(123,0.01))*envsnr.tanh*snrv;
	hh= RHPF.ar(Mix.new(Resonz.ar(trig3,Array.linrand(11,4000,6500),0.0005)),2400,0.4,hhv);
	tm= Resonz.ar(trig4,frqtm,0.03,tmv);
	clv= HPF.ar(Mix.new(Resonz.ar(trig5,Array.linrand(9,500,3500),0.01,clvv)),700);
	wd= Resonz.ar(trig6,850,0.04,wdv);

	sig = kick+snr+hh+tm+clv+wd;

	Out.ar(out,LeakDC.ar(sig!2).tanh);
}).add;
)
raw 2348 chars (focus & ctrl+a+c to copy)
reception
comments