-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSE_setup-2chan.scd
176 lines (141 loc) · 3.68 KB
/
SE_setup-2chan.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
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
168
169
170
171
172
173
174
175
// systems ∿ encounter example setup file
// 2019, Till Bovermann
// http://tai-studio.org (interaction)
// http://lfsaw.de (music)
// this file should help to get you started.
// copy this file to a separate directory.
// state saving from within the gui will write
// def-files parallel to this file (same directory)
Server.killAll
(
// 1 of 3
// s.options.device_("Z1 + cameras");
s.options.device_("BlackHole");
// s.options.blockSize = 32;
// s.options.hardwareBufferSize = 256;
s.options.numOutputBusChannels = 2;
s.options.numInputBusChannels = 2;
s.reboot;
s.doWhenBooted{
s.scope.style_(2);
// load buffers
q = q ? ();
//////////////////////
// load many buffers
// q.fileNames = "/monoFiles/*.aiff".pathMatch;
// q.fileNames = [
// "path1/1.aiff",
// "path2/2.aiff"
// ];
q.fileNames.notNil.if{
q.buffers = q.fileNames.collect{|name, i|
Buffer.readChannel(s, name,
channels: 0,
bufnum: i + 10,
action: {"loading %/% done.\n".postf(i+1, q.fileNames.size)}
)
};
}
}
)
(
// 2 of 3
Routine{
var numChans = 2;
// buses for external sensors
var ctlBuses = (
\lights: Bus.control(s, 64),
// temp: Bus.control(s, 2),
// rgb: Bus.control(s, 8)
\ain: Bus.new(\audio, s.options.numOutputBusChannels, s.options.numInputBusChannels, s)
);
t = SystemsEncounter(
numChannels: numChans,
expand: true,
server: s,
defaultDefPath: thisProcess.nowExecutingPath.dirname,
ctlBuses: ctlBuses,
// which letters to be associated with the quellen
myQuellen: "aeiou",
// which letters to be associated with filters
myFilters: "fldngx"
);
s.sync;
t.verbosity_(0);
x = t.synthParts;
// set fadetime here
t.setGlobal(\fadeTime, 10, \attack, 10);
t.set('[', \fadeTime, 0, \attack, 0);
t.set(']', \fadeTime, 0, \attack, 0);
t.set('(', \fadeTime, 0, \attack, 0);
t.set(')', \fadeTime, 0, \attack, 0);
// set offset (e.g. for ADAT) here
// first ADAT pair, (FF-UC)
// t.bus = Bus.new(\audio, 10, numChans, s);
q.micIdx = 0;
s.sync;
0.5.wait;
(
t.myQuellen.do{|c, i|
"t.quelle('%', {|in, c|
SinOsc.ar(20 + (50 * %+1) * (c.index+1))
});".format(c.asSymbol, i).interpret
};
t.myFilters.do{|c|
t.filter(c.asSymbol, {|in, c|
in
});
}
);
s.sync;
0.5.wait;
// add variables for feedback
t.declareFBVars([\0, \1, \2, \3]);
s.sync;
0.5.wait;
s.sync;
0.5.wait;
t.myQuellen.do{|c|
t.set(c.asSymbol, \assignment, 2, \mix, 0.5);
0.1.wait;
};
t.myFilters.do{|c|
t.set(c.asSymbol, \assignment, 2, \mix, 0.5);
0.1.wait;
};
[\0, \1, \2, \3].do{|c|
t.set(c, \assignment, 2, \feedback, 0, \mix, 1);
t.set(c, \fadeTime, 0, \attack, 0);
0.1.wait;
};
s.sync;
t.push;
}.play;
)
// available params for c; see Steno helpfile for details
// ( \synthIndex, \nestingDepth, \numChannels, \env, \gate, \feedback, \index )
(
// 3 of 3
// open GUI
t.window;
// // add controller, requires MKtl quark
//SystemsEncounterControl.launchControl(t, MKtl(\lc, "novation-launchcontrol"));
//SystemsEncounterControl.nanoKontrol2(t, MKtl(\nc, "korg-nanokontrol2"));
// // folder with custom MKtl Description for liine lemur,
// // this also contains the .jzml lemur layout file
//MKtlDesc.addFolder(SystemsEncounterControl.mktlDescDir);
//SystemsEncounterControl.lemur(t, MKtl(\lemur, "liine-SystemsEncounter"));
)
/////////////// helpers ///////////////////////////////////////
s.queryAllNodes
t.window.skipJack
t.dump
t.set(\a, \mix, 0.7)
// all mix params
"aeioufldngx".as(Array).collect(_.asSymbol).collect{|c|
var mix = t.settings.synthSettings[c].mix;
"t.set(\\mix, %);".format(mix)
};
t.rawCmdLine
// write definitions to file
t.writeDefs(thisProcess.nowExecutingPath.dirname +/+ "defs%.scd".format((Date.getDate.rawSeconds * 4).asInteger));