«Verber» by LFSaw

on 26 Jan'24 04:03 in feedbackcompositionreverb

Reverb study

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
(
s.options.memSize_(65536 * 2);
s.reboot;

Spec.add(\damp, [0, 1]);
Spec.add(\earlydiff, [0, 1]);
Spec.add(\highband, [1000, 10000, \exp]);
Spec.add(\highx, [0, 1]);
Spec.add(\lowband, [100, 6000, \exp]);
Spec.add(\lowx, [0, 1]);
Spec.add(\mdepth, [0, 50]);
Spec.add(\mfreq, [0, 10]);
Spec.add(\midx, [0, 1]);
Spec.add(\size, [0.5, 3]);
Spec.add(\t60, [0.1, 60, \exp]);
Spec.add(\wet, [0, 1]);
Spec.add(\shelfslope, [1, 10]);
Spec.add(\shelfFreq, \freq);
)


Ndef(\src).clear
(
Ndef(\src).fadeTime = 4;
Ndef(\src).quant = 2;
Ndef(\src, {
    var src = 10.collect{
        Pan2.ar([HPF, LPF, ComplexRes].choose.performKeyValuePairs(\ar,[
            \in, [Impulse, LFPulse].choose.ar(
                [4, 2, 1, 1/2, 1/3, 1/4, 1/6].choose,
                iphase: [0, 1/4, 1/8, 1/2, 1/3].choose,
                phase: [0, 1/4, 1/8, 1/2, 1/3].choose,
                width:  [0.001, 0.0001, 0.01, 0.1, 0.2].choose,
                mul:    [1, 2, 3, 4].choose.reciprocal * [1, -1].choose
            ),
            \freq, [10000, 2000, 1000, 500, 250, 125, 125/2].choose,
            \decay, [0.1, 0.2, 0.4, 1].choose,
        ]
        ), Rand(-1, 1));
    }.sum;
    HighShelf.ar(src, \shelfFreq.kr(1000), \shelfslope.kr(1));
})
)

Ndef(\src).rebuild;
Ndef(\src).play

Ndef(\src).edit
(
Ndef(\reverb).fadeTime = 1;
Ndef(\reverb, {
    var src = Ndef(\src).ar * \amp.kr(1);
    src = JPverb.ar(
        src[0],src[1],
        \damp.kr(0,          0.05),
        \earlydiff.kr(0.707, 0.05),
        \highband.kr(2000,   0.05),
        \highx.kr(1,         0.05),
        \lowband.kr(500,     0.05),
        \lowx.kr(1,          0.05),
        \mdepth.kr(5,        0.05),
        \mfreq.kr(2,         0.05),
        \midx.kr(1,          0.05),
        \size.kr(1,          0.05),
        \t60.kr(1,           0.05)
    );


    Limiter.ar(src);
    //Compander.ar(src, src, 0.4, 0.7);

});
)
Ndef('reverb').set('lowx', 0.84375, 'amp', 0.66015625, 'damp', 0.671875, 'size', 0.94921875, 'highband', 4450.794062356, 't60', 16.362108855354, 'mdepth', 17.96875, 'mfreq', 0.0, 'highx', 0.0, 'lowband', 2450.0822520097, 'earlydiff', 0.421875, 'midx', 0.5546875);

// Dreamverb song setting.
// play with size and earlydiff
Ndef('reverb').set('wet', 0.9921875, 'lowx', 0.609375, 'amp', 0.38092041015625, 'damp', 0.2890625, 'size', 0.6171875, 'highband', 7233.9416273667, 't60', 4.0375572334984, 'mdepth', 0.0, 'mfreq', 2.03125, 'highx', 0.2265625, 'lowband', 681.56675509913, 'fadeTime', 1, 'earlydiff', 0.765625, 'midx', 0.515625);

Ndef('reverb').set('wet', 0.9921875, 'lowx', 0.84375, 'amp', 0.66015625, 'damp', 0.875, 'size', 0.5, 'highband', 5829.4153471361, 't60', 0.16483258382257, 'mdepth', 17.96875, 'mfreq', 0.0, 'highx', 0.0, 'lowband', 100.0, 'fadeTime', 1, 'earlydiff', 0.703125, 'midx', 0.5546875);

s.latency = nil;

Ndef(\reverb).play

Ndef(\reverb).edit;
//*ar { | in1, in2, damp(0.0), earlydiff(0.707), highband(2000.0), highx(1.0), lowband(500.0), lowx(1.0), mdepth(5.0), mfreq(2.0), midx(1.0), size(1.0), t60(1.0) |


MIDIIn.connectAll
/*
MIDIdef.cc(\test, {arg ... args; args.postln});
MIDIdef.cc(\test).free;
*/

(
MIDIdef.cc(\t60,       {|val, num| Ndef(\reverb).set(\t60,       \t60      .asSpec.map(val/128))},  0);
MIDIdef.cc(\mdepth,    {|val, num| Ndef(\reverb).set(\mdepth,    \mdepth   .asSpec.map(val/128))},  2);
MIDIdef.cc(\lowx,      {|val, num| Ndef(\reverb).set(\lowx,      \lowx     .asSpec.map(val/128))},  3);
MIDIdef.cc(\midx,      {|val, num| Ndef(\reverb).set(\midx,      \midx     .asSpec.map(val/128))},  4);
MIDIdef.cc(\highx,     {|val, num| Ndef(\reverb).set(\highx,     \highx    .asSpec.map(val/128))},  5);
MIDIdef.cc(\vol,       {|val, num| Ndef(\reverb).set(\amp,       \amp      .asSpec.map(val/128))},  7);

MIDIdef.cc(\size,      {|val, num| Ndef(\reverb).set(\size,      \size     .asSpec.map(val/128))}, 16);
MIDIdef.cc(\earlydiff, {|val, num| Ndef(\reverb).set(\earlydiff, \earlydiff.asSpec.map(val/128))}, 17);
MIDIdef.cc(\mfreq,     {|val, num| Ndef(\reverb).set(\mfreq,     \mfreq    .asSpec.map(val/128))}, 18);
MIDIdef.cc(\lowband,   {|val, num| Ndef(\reverb).set(\lowband,   \lowband  .asSpec.map(val/128))}, 20);
MIDIdef.cc(\highband,  {|val, num| Ndef(\reverb).set(\highband,  \highband .asSpec.map(val/128))}, 21);
MIDIdef.cc(\damp,      {|val, num| Ndef(\reverb).set(\damp,      \damp     .asSpec.map(val/128))}, 22);
MIDIdef.cc(\dryAmp,    {|val, num| Ndef(\src   ).vol_(\amp.asSpec.map(val/128))}, 23);
MIDIdef.cc(\rebuild,   {|val, num|
    (val > 0).if{
        Ndef(\src).rebuild;
    }
}, 39)
)
raw 4672 chars (focus & ctrl+a+c to copy)
reception
comments