Still trying to get all the little bits of the interface code right

feature-multitrack
Mike Lynch 2023-04-10 17:13:43 +10:00
parent 90c7df0227
commit d2564c5757
2 changed files with 24 additions and 17 deletions

View File

@ -1,8 +1,4 @@
v = 1.0;
v.asInt
(
~to = TouchOSC("192.168.0.209", 9000);
@ -33,6 +29,7 @@ OSCdef.freeAll;
~granulator = ~granulators[~tracknum];
~to.v_('/track/record', ~granulator.record);
~to.v_('/track/mode', ~granulator.mode);
~to.v_('/track/trigger',~granulator.trigger);
~to.v_('/track/speed', ~speeds[~tracknum]);
~to.v_('/track/blur', ~granulator.blur);
@ -61,16 +58,31 @@ OSCdef.freeAll;
~to.button('/grains/record2', 0, { | v | ~granulators[2].record_(v) });
~to.button('/grains/record3', 0, { | v | ~granulators[3].record_(v) });
~to.button('/grains/mode0', 0, { |v| ~setmode.value(0, v) });
~to.button('/grains/mode1', 0, { |v| ~setmode.value(1, v) });
~to.button('/grains/mode2', 0, { |v| ~setmode.value(2, v) });
~to.button('/grains/mode3', 0, { |v| ~setmode.value(3, v) });
~to.button('/grains/mode0', 0, { |v| ~granulators[0].mode_(v); ~setmode.value(0, v) });
~to.button('/grains/mode1', 0, { |v| ~granulators[1].mode_(v); ~setmode.value(1, v) });
~to.button('/grains/mode2', 0, { |v| ~granulators[2].mode_(v); ~setmode.value(2, v) });
~to.button('/grains/mode3', 0, { |v| ~granulators[3].mode_(v); ~setmode.value(3, v) });
~to.slider('/grains/speed0', 1, TouchOSCScale(0, 2), { |v| ~speeds[0] = v; ~possynths[0].set(\speed, v) });
~to.slider('/grains/speed1', 1, TouchOSCScale(0, 2), { |v| ~speeds[1] = v; ~possynths[1].set(\speed, v)
~to.slider('/grains/speed0', 1, TouchOSCScale(0, 2), { |v|
~speeds[0] = v;
~possynths[0].set(\speed, v / ~buflen);
~speeds.postln;
});
~to.slider('/grains/speed1', 1, TouchOSCScale(0, 2), { |v|
~speeds[1] = v;
~possynths[1].set(\speed, v / ~buflen);
~speeds.postln;
});
~to.slider('/grains/speed2', 1, TouchOSCScale(0, 2), { |v|
~speeds[2] = v;
~possynths[2].set(\speed, v / ~buflen);
~speeds.postln;
});
~to.slider('/grains/speed3', 1, TouchOSCScale(0, 2), { |v|
~speeds[3] = v;
~possynths[3].set(\speed, v / ~buflen);
~speeds.postln;
});
~to.slider('/grains/speed2', 1, TouchOSCScale(0, 2), { |v| ~speeds[2] = v; ~possynths[2].set(\speed, v) });
~to.slider('/grains/speed3', 1, TouchOSCScale(0, 2), { |v| ~speeds[3] = v; ~possynths[3].set(\speed, v) });
~to.slider('/grains/passthrough', 0.75, TouchOSCScale(0, 1), { |v| ~grainmixer.set(\passthrough, v) });

View File

@ -41,9 +41,6 @@ Granulator.init(s);
~granulators.add(Granulator.new(~buflen, ~recordb, ~outb, pb, ~triggerb, ~pitchb));
});
)
(
~setmode = {
arg track, mode;
var synth = ~modes[mode][1];
@ -55,8 +52,6 @@ Granulator.init(s);
}
)
~granulators[0].gain(1);
("./interface.scd").loadRelative;