«LfBrownNoise and Gendy Experiments» by bernhard

on 10 Dec'20 06:56 in

LfBrownNoise and Gendy Experiments for a course at HKB Bern

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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
//Some LfBrownNoise and Gendy Experiments, mainly from the Gendy Helpfile but as Ndef and some of my own stuff

Ndef(\m).play(0,2);
Ndef(\m).stop(1);
Ndef(\m).fadeTime = 1;
Ndef(\m).clear(5);


//trigered Random Walk Dust
Ndef(\m,{(SinOsc.ar(TBrownRand.kr(150,900,MouseY.kr(0.01,1),0,Dust.kr(MouseX.kr(1,99))).lag(0.1))/9)!2}).play                     

//trigered Random Walk Impulse
Ndef(\m,{(SinOsc.ar(TBrownRand.kr(150,900,MouseY.kr(0.01,1),0,Impulse.kr(MouseX.kr(1,99))).lag(0.1))/9)!2}).play

//Brownmovement, random walk Audiorate
Ndef(\m,{{LFBrownNoise0.ar(220,dev:0.1,dist:2,mul:1)/3}!2}).play

// defaults
Ndef(\m,{{Gendy1.ar(ampdist:0,durdist:0.1,adparam:0.1,ddparam:0.07,minfreq:260,maxfreq:860,ampscale:0.5,durscale:0.5,initCPs:32,knum:15,mul:0.1)}!2}).play

// wandering bass/ powerline
Ndef(\m,{ {Gendy1.ar(0, 1, 0.2, 1.0, 100, 100, 0.3, 0.05, 5)}!2 }).play

// play me
Ndef(\m,{ {RLPF.ar(Gendy1.ar(2, 3, minfreq:20, maxfreq:MouseX.kr(50,1000), durscale:0.0, initCPs:40), 500, 0.3, 0.2)}!2}).play

// scream! - careful with your ears for this one!

Ndef(\m,{var mx, my; mx = MouseX.kr(90, 440); my = MouseY.kr(0.0, 1.0); {Gendy1.ar(2,3,1,1,minfreq:mx, maxfreq:8*mx, ampscale:my, durscale:my, initCPs:7, mul:0.3)}!2}).play

// 1 CP = random noise effect
Ndef(\m,{ {Gendy1.ar(initCPs:1)}!2 }).play

// 2 CPs = suudenly an oscillator (though a fast modulating one here)
Ndef(\m,{{Gendy1.ar(initCPs:3)}!2 }).play


//used as an LFO

Ndef(\m,{{SinOsc.ar(Gendy1.kr(2, 4, SinOsc.kr(0.1, 0, 0.49, 0.51), SinOsc.kr(0.13, 0, 0.49, 0.51),3.4, 3.5, SinOsc.kr(0.17, 0, 0.49, 0.51), SinOsc.kr(0.19, 0, 0.49, 0.51), 10, 10, 50, 350), 0, 0.3)}!2}).play

// wasp
Ndef(\m,{{Gendy1.ar(0, 0, SinOsc.kr(0.1, 0, 0.1, 0.9), 1.0, 50, 1000, 1, 0.005, 12, 12, 0.2)}!2}).play


// modulate distributions
// change of pitch as distributions change the duration structure and spectrum
Ndef(\m,{ {Gendy1.ar(MouseX.kr(0, 7), MouseY.kr(0, 7), mul:0.2)}!2 }).play


// modulate num of CPs
Ndef(\m,{ {Gendy1.ar(knum:MouseX.kr(1, 13), mul:0.2)}!2 }).play

// Gendy into Gendy ... with cartoon side effects
Ndef(\m,{Pan2.ar(Gendy1.ar(maxfreq:Gendy1.kr(5, 4, 0.3, 0.7, 0.1, MouseY.kr(0.1, 10), 1.0, 1.0, 5, 5, 500, 600),knum:MouseX.kr(1, 13), mul:0.2), 0.0)}).play

// use SINUS to track any oscillator and take CP positions from it, use adparam and ddparam as the inputs to sample
Ndef(\m,{ {Gendy1.ar(1,3, LFPulse.kr(100, 0, 0.4, 1.0), SinOsc.kr(30, 0, 0.5), mul:0.2)}!2}).play


//try out near the corners especially
Ndef(\m,{{Gendy1.ar(6,6,LFPulse.kr(MouseX.kr(0,200), 0, 0.4, 1.0),SinOsc.kr(MouseY.kr(0,200), 0, 0.5),mul:0.2)}!2})

// texture
Ndef(\m,{Mix.fill(10, {var freq = rrand(130,160.3);{SinOsc.ar(Gendy1.ar(6.rand, 6.rand, SinOsc.kr(0.1, 0, 0.49, 0.51), SinOsc.kr(0.13, 0, 0.49, 0.51), freq, freq, SinOsc.kr(0.17, 0, 0.49, 0.51),SinOsc.kr(0.19, 0, 0.49, 0.51), 12, 12, 200, 400), 0, 0.1)}!2})}).play

// wahhhhhhhh- try durscale 10.0 and 0.0 too
Ndef(\m,{{CombN.ar(Resonz.ar(Gendy1.ar(2, 3, minfreq:1, maxfreq: MouseX.kr(10, 700), durscale:0.1, initCPs:10),MouseY.kr(50, 1000), 0.1),0.1, 0.1, 5, 0.6)}!2}).play

// overkill
    (
        {
            var n = 10;
            Mix.fill(n, {
                var freq, numcps;

                freq = rrand(130, 160.3);
                numcps = rrand(2, 20);
                Pan2.ar(
                    Gendy1.ar(
                        6.rand, 6.rand, 1.0.rand, 1.0.rand, freq, freq, 1.0.rand, 1.0.rand, numcps,
                        SinOsc.kr(exprand(0.02, 0.2), 0, numcps/2, numcps/2), 0.5 / (n.sqrt)
                    ),
                    1.0.rand2
                )
            })
        }.play
    )

// another traffic moment
    (
        {
            var n;
            n =10;

            Resonz.ar(
                Mix.fill(n, {
                    var freq, numcps;

                    freq = rrand(50,560.3);
                    numcps = rrand(2,20);
                    Pan2.ar(Gendy1.ar(6.rand, 6.rand, 1.0.rand, 1.0.rand, freq, freq, 1.0.rand, 1.0.rand, numcps,
                        SinOsc.kr(exprand(0.02, 0.2), 0, numcps/2, numcps/2), 0.5/(n.sqrt)), 1.0.rand2)
                }),
                MouseX.kr(100,2000),
                MouseY.kr(0.01,1.0)
            )
        }.play
    )

    (
        {
            var n = 15;


            Resonz.ar(
                Mix.fill(n,{
                    var freq, numcps;

                    freq = rrand(330, 460.3);
                    numcps = rrand(2, 20);
                    Pan2.ar(
                        Gendy1.ar(
                            6.rand, 6.rand, 1.0.rand, 1.0.rand, freq,
                            MouseX.kr(freq, 2*freq), 1.0.rand, 1.0.rand, numcps,
                            SinOsc.kr(exprand(0.02, 0.2), 0, numcps/2, numcps/2), 0.5/(n.sqrt)
                        ),
                        1.0.rand2
                    )
                }),
                MouseX.kr(100, 2000), MouseY.kr(0.01, 1.0)
            )

        }.play;
    )

// Brown Movement quantized to Bohlen Piecre Scale
(
SynthDef(\Brownquant,{
	arg speed=4, dev=0.2, dist=0, root=120, amp=0.5, lg=0, out=0;
    var index, intv, sig, lfo, buffer = [1,9/7,7/5,5/3,9/5,15/7,7/3,25/9,3,27/7,21/5,15/3,27/5,45/7,21/3,75/9,9].as(LocalBuf);

	lfo = LFBrownNoise1.kr(speed,dev,dist,4,5).poll;
    index = IndexInBetween.kr(buffer, lfo).round;
    intv = Index.kr(buffer, index);
	sig=Splay.ar({MoogLadder.ar(Saw.ar(intv.lag(lg)*root*LFNoise2.ar(12,0.02,1),LFNoise2.ar(4,0.4,0.6)**2),LFNoise2.ar(1,1700,2200),0.3)}!8);

	Out.ar(out,sig*amp);
}).add;
)


x=Synth(\Brownquant);

x.set(\amp,1);

x.set(\speed,4);

x.set(\dev,0.3);

x.set(\dist,0);

x.set(\lg,0.1);

x.set(\root,30);

x.set(\lagfreq, 0.1);
raw 5883 chars (focus & ctrl+a+c to copy)
reception
comments