-
Notifications
You must be signed in to change notification settings - Fork 0
/
MuEffects.pde
80 lines (63 loc) · 2.46 KB
/
MuEffects.pde
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
class MuGroupEqualizerKnob extends MuGroupKnob{
MuGroupEqualizerKnob(TuioObject tobj){ super(tobj); }
void display() {
knob.setPosition(tobj.getScreenX(width) - knobRadius, tobj.getScreenY(height) - knobRadius);
knob.setValue(value);
fill(218, 112, 214, 60);
ellipse(tobj.getScreenX(width), tobj.getScreenY(height), radius, radius);
}
void knobChange(Effected effected){
mainBus.sendControllerChange(2, effected.equalizerCtrl, value);
}
}
class MuGroupVolumeKnob extends MuGroupKnob{
MuGroupVolumeKnob(TuioObject tobj){ super(tobj); }
void knobChange(Effected effected){
mainBus.sendControllerChange(2, effected.volumeCtrl, value);
}
}
class MuGroupDelayKnob extends MuGroupKnob{
void display() {
knob.setPosition(tobj.getScreenX(width) - knobRadius, tobj.getScreenY(height) - knobRadius);
knob.setValue(value);
fill(0, 255, 255, 60);
ellipse(tobj.getScreenX(width), tobj.getScreenY(height), radius, radius);
}
MuGroupDelayKnob(TuioObject tobj){ super(tobj); }
void knobChange(Effected effected){
mainBus.sendControllerChange(2, effected.delayCtrl, value);
}
}
class MuGroupReverbKnob extends MuGroupKnob{
MuGroupReverbKnob(TuioObject tobj){ super(tobj); }
void display() {
knob.setPosition(tobj.getScreenX(width) - knobRadius, tobj.getScreenY(height) - knobRadius);
knob.setValue(value);
fill(230, 255, 230, 100);
ellipse(tobj.getScreenX(width), tobj.getScreenY(height), radius, radius);
}
void knobChange(Effected effected){
mainBus.sendControllerChange(2, effected.reverbCtrl, value);
}
void knobRemove(Effected effected){
mainBus.sendControllerChange(2, effected.reverbCtrl, 0);
}
}
class MuGroupGateKnob extends MuGroupKnob{
MuGroupGateKnob(TuioObject tobj){ super(tobj); }
void display() {
knob.setPosition(tobj.getScreenX(width) - knobRadius, tobj.getScreenY(height) - knobRadius);
knob.setValue(value);
fill(230, 230, 255, 100);
ellipse(tobj.getScreenX(width), tobj.getScreenY(height), radius, radius);
int gateNum = round(knob.getValue() / (127.0/35.0));
if(gateNum >= 0 && gateNum <= 35)
image(gates[gateNum], tobj.getScreenX(width) - radius/4, tobj.getScreenY(height) + radius/4, radius/2, radius/8);
}
void knobChange(Effected effected){
mainBus.sendControllerChange(2, effected.gateCtrl, value);
}
void knobRemove(Effected effected){
// mainBus.sendControllerChange(2, effected.gateCtrl, 0);
}
}