«Ambience Maker» by LFSaw

on 14 Mar'17 21:58 in rainnoiseambiencebackgroundwindsnowroom tonehiss

Create (atm. constant) wind and rain. Infinite possibilities! Easily expandable! A breeze!

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
s.boot;


(
Ndef(\ambienceMaker).addSpec(\rWet, [-1, 1, \lin]);
Ndef(\ambienceMaker).addSpec(\rateRedux, [0, 1]);
Ndef(\ambienceMaker).addSpec(\bits, [1, 32, \lin]);

Ndef(\ambienceMaker).addSpec(\bpWet, [0, 1, \lin]);
Ndef(\ambienceMaker).addSpec(\bpFreq, \freq);
Ndef(\ambienceMaker).addSpec(\bpRq, [0, 2, \lin]);

Ndef(\ambienceMaker).addSpec(\hpnoise, [-48, 0, \db]);
Ndef(\ambienceMaker).addSpec(\white, [-48, 0, \db]);
Ndef(\ambienceMaker).addSpec(\pink, [-48, 0, \db]);
Ndef(\ambienceMaker).addSpec(\brown, [-48, 0, \db]);
Ndef(\ambienceMaker).addSpec(\gray, [-48, 0, \db]);
Ndef(\ambienceMaker).addSpec(\dust, [-48, 0, \db]);
Ndef(\ambienceMaker).addSpec(\dustDensity, [1, s.sampleRate/2, \exp]);

Ndef(\ambienceMaker).addSpec(\drops, [-48, 0, \db]);
Ndef(\ambienceMaker).addSpec(\dropDensity, [1, s.sampleRate/2, \exp]);
Ndef(\ambienceMaker).addSpec(\dropDecay, [0.001, 1, \exp]);
Ndef(\ambienceMaker).addSpec(\dropFFreq, \freq);
Ndef(\ambienceMaker).addSpec(\dropFRq, [0, 2, \lin]);



Ndef(\ambienceMaker, {
	var noise, src;
	var zeroAmp = 0.0039811;
	var hpnoise = \hpnoise.kr(1).dbamp - zeroAmp;
	var hpNFreq = \hpNFreq.kr(1000, 0.1);
	var white = \white.kr(1).dbamp - zeroAmp;
	var pink = \pink.kr(1).dbamp - zeroAmp;
	var brown = \brown.kr(1).dbamp - zeroAmp;
	var gray = \gray.kr(1).dbamp - zeroAmp;
	var dust = \dust.kr(1).dbamp - zeroAmp;
	var dustDensity = \dustDensity.kr(1);

	var drops = \drops.kr(1).dbamp - zeroAmp;
	var dropDensity = \dropDensity.kr(1);
	var dropDecay = \dropDecay.kr(1);
	var dropFFreq = \dropFFreq.kr(1);
	var dropFRq = \dropFRq.kr(1);


	var bpF;
	var bpWet = \bpWet.kr(0);
	var bpFreq = \bpFreq.kr(20000, 0.01);
	var bpRq = \bpRq.kr(1, 0.01);


	var redux;
	var rWet = \rWet.kr(0);
	var rateRedux = \rateRedux.kr(1, 0.01);
	var bits = \bits.kr(32);


	hpnoise = {HPF.ar(PinkNoise.ar(hpnoise), hpNFreq)}!2;
	white   = {WhiteNoise.ar(white)}!2;
	pink    = {PinkNoise.ar(pink)}!2;
	brown   = {BrownNoise.ar(brown)}!2;
	gray    = {GrayNoise.ar(gray)}!2;
	dust    = {Dust2.ar(dustDensity, dust)}!2;



	src = Mix([white, pink, brown, gray, dust, hpnoise]);

	drops = {Decay.ar(Dust.ar(dropDensity, drops), dropDecay) * PinkNoise.ar}!2;

	src = Mix([src, drops]);

	bpF = BPF.ar(src, bpFreq, bpRq);
	src = SelectX.ar(bpWet, [src, bpF]);

	redux = Latch.ar(src, Impulse.ar(SampleRate.ir * (rateRedux/2)));
	redux = redux.round(0.5 ** bits);
	SelectX.ar(1 + rWet, [src - redux, src, redux]);

})
)

Ndef(\ambienceMaker).gui
13280 * 2

(
Ndef('noiseBurst').set('white', -48.0, 'pink', -40.494860819681, 'bpWet', 0.76190476190476, 'bpRq', 1.2910052910053, 'dust', -17.0397263296, 'dropDecay', 0.0066895487869141, 'dustDensity', 4.89136346687, 'bits', 3.952380952381, 'noiseType', 1.1746031746032, 'dropFFreq', 119.89685006379, 'bpFreq', 928.31776672256, 'brown', -36.400703367795, 'dropDensity', 6.7191745397468, 'dropFRq', 0.074074074074074, 'gray', -48.0, 'rateRedux', 0.47619047619048, 'drops', -9.8101205277825, 'rWet', 0.37037037037037);

)
descendants
«ViboBudge» by anonymous (private)
«Re: Ambience Maker» by mutedial (private)
full graph
raw 3071 chars (focus & ctrl+a+c to copy)
reception
comments
56228375 user 30 Mar'17 20:16

my favorite settings: hpnoise:-28.84, hpNFreq:62.42, white:-48, pink:-48, brown:-48, gray:-10.12, dust:0, dustDensity:15.15, drops:0, dropDensity:676.19, dropDecay:0.02, dropFFreq:1551.1, dropFrq:1, bpWet:0.78, bpFreq:20000, bpRq:1.14, rWet:0.76, rateRedux: 1, bits:32

julian.rohrhuber user 18 May'17 17:27

Btw we can write:

``` Ndef(\ambienceMaker).addSpec( \rWet, [-1, 1, \lin], \rateRedux, [0, 1], \bits, [1, 32, \lin], \bpWet, [0, 1, \lin], \bpFreq, \freq, \bpRq, [0, 2, \lin], \hpnoise, [-48, 0, \db], \white, [-48, 0, \db], \pink, [-48, 0, \db], \brown, [-48, 0, \db], \gray, [-48, 0, \db], \dust, [-48, 0, \db], \dustDensity, [1, s.sampleRate/2, \exp],

\drops, [-48, 0, \db],
\dropDensity, [1, s.sampleRate/2, \exp],
\dropDecay, [0.001, 1, \exp],
\dropFFreq, \freq,
\dropFRq, [0, 2, \lin]

); ```

julian.rohrhuber user 18 May'17 17:28

(sorry, bad layout, I don't know how to fix an existing comment)

eriknatanaelgustafsson user 02 Mar'18 10:24

I can't find addSpec anywhere, is it part of a Quark?

rhumetone user 02 Mar'18 23:46

I think it might be an issue worth posting on the forum, I tried to run the code on Windows 3.9.1 and also had an addSpec error (unknown)

grirgz user 03 Mar'18 16:53

addSpec is from the JITLibExtensions quark

rhumetone user 07 Mar'18 19:14

thanks grirgz, had a faulty JITLibExtensions quark install