-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcontrols.scd
More file actions
160 lines (134 loc) · 3.54 KB
/
Copy pathcontrols.scd
File metadata and controls
160 lines (134 loc) · 3.54 KB
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
// Configs for the message queue
// To Performers:
// You need to change this configs value and then evaluate the entire
// block
// Tips for changing the configs for different chains:
// *** Weight choose
// waitTime: {[rrand(0.04, 0.05), rrand(0.4, 4)].wchoose([0.8, 0.2])},
// nextTarget: {~userList.reject(_==~id).wchoose([0.1, 0.9])}
// *** Fixed target, alwasy send to this
// nextTarget: {0}
// *** You can use pattern class in SC as well, you don't need {}
// remember to always put "inf" in the repeats
// waitTime: Pseq([0.1, 0.2, 0.3], inf)
(
// This is the switch to control whether we are playing in a physical venue
~offlinePerformance = false;
~configs = [(
// sine sound
name: \sine,
waitTime: {rrand(2, 5)},
nextTarget: {[1].choose},
attack: {0.5},
sustain: {0.2}
), (
// noise sound
name: \noise,
waitTime: {2},
nextTarget: {[0, 1].choose},
attack: {0.00001},
sustain: {0.2}
), (
// Build up queue
name: \buildUp,
waitTime: {10.rand},
nextTarget: {[nil].choose}
), (
name: \sample,
feature: Pseq([\telephone, \signal], inf),
waitTime: Pseq([4, 4], inf),
nextTarget: {[1].choose},
attack: {0.2},
sustain: {0.9}
), (
name: \sampleFull,
feature: Pseq([\london], inf),
waitTime: Pseq([4], inf),
nextTarget: {[1].choose},
attack: {0.2},
sustain: {0.9}
)
];
// We need to sync chain configs for visual display
~syncChainConfigs.value();
// Needs to update oscdefs
~updateOSCDefs.value(~configs);
)
// *** Braids Section
(
// Send braid change
// positive number means add freq to the oscillator
// negative means minus
n.sendMsg('/braid', ~id, 1);
)
// Kill braid!
n.sendMsg('/braid_kill');
// Update braid max diff! (in frequency)
n.sendMsg('/braid_update_maxdiff', 200);
// ***** Build up
// Kill build up chain(but remember, if there's build up message still trasnfer, it will kick of itself again.)
n.sendMsg('/\build_up_kill');
// Setting partial coount threshold (eg, how many partials)
n.sendMsg('/build_up_partial_threshold', 10);
// Setting the step multiplier(how big each partial grow)
n.sendMsg('/\build_up_partial_step_multiplier', 1);
// Setting the amp multiplier(how big each partial's amp)
n.sendMsg('/\build_up_partial_amp_multiplier', 0.6);
//////////////////////////////////////////chat
n.sendMsg('/chat', ~id, "chin burger");
// **** Kick off the chain
(
// Start the sine chain
var to = ~userList.reject(_==~id).choose;
to.postln;
n.sendMsg('/sine', to, ~id, 1);
)
(
// start the noise chain
var to = ~userList.reject(_==~id).choose;
to.postln;
n.sendMsg('/noise', to, ~id, 0.1);
)
(
// Start the buildUp queue
var to = ~userList.reject(_==~id).choose;
to.postln;
n.sendMsg('/buildUp', to, ~id, 0.1);
)
(
// Start sample chain
var to = ~userList.reject(_==~id).choose;
to.postln;
n.sendMsg('/sample', to, ~id, 0.1);
)
(
// Start sample full chain(always play the full duration)
var to = ~userList.reject(_==~id).choose;
to.postln;
n.sendMsg('/sampleFull', to, ~id, 0.1);
)
(
// Set sample durtion scale
// 1 means same duration as waitTime
~state.update(\sample, \dur, 1.1);
)
// Control display of current Target (0, 1, 2 number )
// chain, \currentTarget, boolean
(
~updateSectionDisplayState.value(\sine, \currentTarget, true);
)
// Control display of pattern(waitTime, nextTarget)
// chain, \algo, boolean
(
~updateSectionDisplayState.value(\sine, \algo, true);
)
// Control the entire sections open/close
// true -> open
// false -> close
(
var action = true;
~configs.collect(_[\name]).collect({|name|
~updateSectionDisplayState.value(name, \currentTarget, action);
~updateSectionDisplayState.value(name, \algo, action);
});
)