|
@@ -8,7 +8,7 @@ OSCdef.freeAll;
|
|
|
// Variables to track current pen type and color
|
|
// Variables to track current pen type and color
|
|
|
~currentPenType = "\pen";
|
|
~currentPenType = "\pen";
|
|
|
~currentColor = (r: 0.0, g: 0.0, b: 1.0); // Default blue
|
|
~currentColor = (r: 0.0, g: 0.0, b: 1.0); // Default blue
|
|
|
-~currentPadValues = (x: 0.0, y: 0.0, pressure: 1.0, a: 1); //Default pad values
|
|
|
|
|
|
|
+~currentPadValues = (x: 0.0, y: 0.0, pressure: 1.0, a: 1.0); //Default pad values
|
|
|
|
|
|
|
|
|
|
|
|
|
// Define OSC responder for iDraw touch data
|
|
// Define OSC responder for iDraw touch data
|
|
@@ -75,7 +75,8 @@ OSCdef.freeAll;
|
|
|
\waveform, 2
|
|
\waveform, 2
|
|
|
);
|
|
);
|
|
|
|
|
|
|
|
- ~ctl.set(9, y.linlin(-0.5, 0.5, 0, 1));
|
|
|
|
|
|
|
+ ~ctl.set(8, y.linlin(-0.5, 0.5, 0, 1));
|
|
|
|
|
+ ~ctl.set(9, 0.5);
|
|
|
|
|
|
|
|
//["Pencil preset:", "Cutoff", x.linexp(-0.5, 0.5, 20, 18000), "LFO", x.linlin(-0.5, 0.5, 0, 15)].postln;
|
|
//["Pencil preset:", "Cutoff", x.linexp(-0.5, 0.5, 20, 18000), "LFO", x.linlin(-0.5, 0.5, 0, 15)].postln;
|
|
|
},
|
|
},
|
|
@@ -95,9 +96,9 @@ OSCdef.freeAll;
|
|
|
);
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
- ~ctl.set(10, y.linlin(-0.5, 0.5, 0, 1)); // Reverb dry/wet
|
|
|
|
|
-
|
|
|
|
|
- ~ctl.set(8, x.linlin(-0.5, 0.5, 0.001, 1.0)); // Delay amount
|
|
|
|
|
|
|
+ ~ctl.set(9, y.linlin(-0.5, 0.5, 0, 0.5)); // Reverb dry/wet
|
|
|
|
|
+ ~ctl.set(7, x.linlin(-0.5, 0.5, 0.001, 1.0)); // Delay amount
|
|
|
|
|
+ ~ctl.set(9, 0.8);
|
|
|
|
|
|
|
|
|
|
|
|
|
//["Crayon preset:", "LFO", x.linlin(-0.5, 0.5, 15, 1), "Filter", y.linexp(-0.5, 0.5, 20, 18000)].postln;
|
|
//["Crayon preset:", "LFO", x.linlin(-0.5, 0.5, 15, 1), "Filter", y.linexp(-0.5, 0.5, 20, 18000)].postln;
|
|
@@ -124,7 +125,29 @@ OSCdef.freeAll;
|
|
|
// Water color - Effect preset 4 (placeholder)
|
|
// Water color - Effect preset 4 (placeholder)
|
|
|
"/waterColor", {
|
|
"/waterColor", {
|
|
|
// Apply Preset 4 effects (TBD in documentation)
|
|
// Apply Preset 4 effects (TBD in documentation)
|
|
|
- ["Water color preset (TBD)"].postln;
|
|
|
|
|
|
|
+ if(a >= 0 && a < 0.20){
|
|
|
|
|
+ ~ctl.set(0, x.linlin(-0.5, 0.5, -60, 20));
|
|
|
|
|
+ ~ctl.set(1, y.linlin(-0.5, 0.5, -60, 20));
|
|
|
|
|
+ ["Set:", y.linlin(-0.5, 0.5, -60, 20)].postln;
|
|
|
|
|
+ };
|
|
|
|
|
+ if( a >= 0.20 && a < 0.40) {
|
|
|
|
|
+ ~ctl.set(2, x.linlin(-0.5, 0.5, 1, 15));
|
|
|
|
|
+ ~ctl.set(3, y.linlin(-0.5, 0.5, 0, 1));
|
|
|
|
|
+ };
|
|
|
|
|
+ if(a >= 0.40 && a < 0.60) {
|
|
|
|
|
+ ~ctl.set(4, x.linlin(-0.5, 0.5, 0, 1));
|
|
|
|
|
+ ~ctl.set(5, y.linlin(-0.5, 0.5, 0, 1));
|
|
|
|
|
+ };
|
|
|
|
|
+ if(a >= 0.60 && a < 0.80) {
|
|
|
|
|
+ ~ctl.set(6, x.linlin(-0.5, 0.5, 0, 1));
|
|
|
|
|
+ ~ctl.set(7, y.linlin(-0.5, 0.5, 0, 1));
|
|
|
|
|
+ };
|
|
|
|
|
+ if(a >= 0.80 && a < 1){
|
|
|
|
|
+ ~ctl.set(8, x.linlin(-0.5, 0.5, 0, 1));
|
|
|
|
|
+ ~ctl.set(9, y.linlin(-0.5, 0.5, 0, 1));
|
|
|
|
|
+ };
|
|
|
|
|
+ ["waterColor preset:", a].postln;
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
);
|
|
);
|
|
|
};
|
|
};
|
|
@@ -204,7 +227,6 @@ OSCdef(\pencilOSC, { |msg, time, addr, port|
|
|
|
|
|
|
|
|
if (penType == 1.0) {
|
|
if (penType == 1.0) {
|
|
|
~currentPenType = msg[0].asString;
|
|
~currentPenType = msg[0].asString;
|
|
|
- ~initializePreset1.value;
|
|
|
|
|
["Current pen type:", ~currentPenType].postln;
|
|
["Current pen type:", ~currentPenType].postln;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -216,7 +238,6 @@ OSCdef(\crayonOSC, { |msg, time, addr, port|
|
|
|
|
|
|
|
|
if (penType == 1.0) {
|
|
if (penType == 1.0) {
|
|
|
~currentPenType = msg[0].asString;
|
|
~currentPenType = msg[0].asString;
|
|
|
- ~initializePreset2.value;
|
|
|
|
|
["Current pen type:", ~currentPenType].postln;
|
|
["Current pen type:", ~currentPenType].postln;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -228,7 +249,6 @@ OSCdef(\fountainPenOSC, { |msg, time, addr, port|
|
|
|
|
|
|
|
|
if (penType == 1.0) {
|
|
if (penType == 1.0) {
|
|
|
~currentPenType = msg[0].asString;
|
|
~currentPenType = msg[0].asString;
|
|
|
- ~initializePreset3.value;
|
|
|
|
|
["Current pen type:", ~currentPenType].postln;
|
|
["Current pen type:", ~currentPenType].postln;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -240,7 +260,6 @@ OSCdef(\waterColorOSC, { |msg, time, addr, port|
|
|
|
|
|
|
|
|
if (penType == 1.0) {
|
|
if (penType == 1.0) {
|
|
|
~currentPenType = msg[0].asString;
|
|
~currentPenType = msg[0].asString;
|
|
|
- ~initializePreset4.value;
|
|
|
|
|
["Current pen type:", ~currentPenType].postln;
|
|
["Current pen type:", ~currentPenType].postln;
|
|
|
}
|
|
}
|
|
|
|
|
|