(
SynthDef(\juce, { | freq = 440, amp = 0.025, cutoff = 1000, q = 0.05, modfreq = 1.0, out = 0, gate = 1|
var sig, env;
env = EnvGen.ar(Env.adsr(0.01, 0.2, 0.5, 0.3), gate, doneAction: 2);
sig = Saw.ar(freq);
sig = RLPF.ar(sig, cutoff, q);
sig = sig * env;
sig = Pan2.ar(sig);
Out.ar(out, sig);
}).add;
)
x = Synth(\juce);
x.set(\gate, 0);
a = Pbind(\instrument, \juce,
\note, Pseq([0, 3, 5, 6, 7, 10, 12, 15], inf),
\dur, Prand([0.1, 0.8],inf),
\q, ~cBus.asMap
);
~cBus = Bus.control(s);
b = a.play(quant: 0.25);
b.stop;
//
(
var window, size = 32; // try different sizes - from 15 to 200 or more!
window = Window.new("Knob", Rect(640,630,270,70)).front;
k = Knob.new(window, Rect(20, 10, size, size));
k.action_({|v,x,y,m| ~cBus.set(v.value); });
//k.color[1] = Color.gray(alpha:0);
)
k.value
k.value = 0.25
k.valueAction = 0.125
// modes
k.mode = \vert;
k.mode = \horiz;
k.mode = \round; // default
k.visible
k.visible = false
k.visible = true
k.enabled = false
k.enabled_(true)
k.canFocus = false
k.canFocus = true