-
Notifications
You must be signed in to change notification settings - Fork 2
/
startup.scd
64 lines (47 loc) · 1.51 KB
/
startup.scd
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
(
"SC_JACK_DEFAULT_INPUTS".setenv("");
"SC_JACK_DEFAULT_OUTPUTS".setenv("");
s.options.numBuffers = 1024 * 32; // increase this if you need to load more samples
s.options.memSize = 8192 * 32; // increase this if you get "alloc failed" messages
s.options.maxNodes = 1024 * 32; // increase this if you are getting drop outs and the message "too many nodes"
s.options.numOutputBusChannels = 2; // set this to your hardware output channel size, if necessary
s.options.numInputBusChannels = 2;
s.options.maxLogins=4;
s.waitForBoot {
~dirt = SuperDirt(2, s); // two output channels, increase if you want to pan across more channels
~dirt.loadSoundFiles; // load samples (path containing a wildcard can be passed in)
s.sync;
// load samples (path containing a wildcard can be passed in)
~dirt.loadSoundFiles("/home/diegodorado/Music/tidal/samples/trap-samples/*");
s.sync; // wait for samples to be read
~dirt.start(57120, [0, 0, 0, 0, 0, 0, 0, 0]);
s.sync;
n = NetAddr("127.0.0.1", 6666);
~dirt.startSendRMS;
OSCFunc({ |msg|
defer {
n.sendMsg("/rms", msg);
}
}, "/rms");
};
s.latency = 0.2;
);
// 1. reenviar los eventos desde superdirt a hydra
(
n = NetAddr("127.0.0.1",3333);
~dirt.receiveAction = { |e|
if ( (e.at(\s)==\bd),
{ n.sendMsg("/bd", e.at(\cycle)); }, {}
);
};
)
// 4. enviar los rms de los orbits desde superdirt a hydra
(
n = NetAddr("127.0.0.1", 6666);
~dirt.startSendRMS;
OSCFunc({ |msg|
defer {
n.sendMsg("/rms", msg);
}
}, "/rms");
)