[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Sc-devel] SCScope changed?




Hi all

Has something changed recently in SCScope?

This is an example I made for SCScope that used to have white background
and black waves. 

The xZoom_ does not work either. 

Any ideas?

thor


(
s = Server.internal;
s.waitForBoot({
var sc;
b = Buffer.alloc(s,2048,2);
a = SynthDef(\scopeExample, { arg freq=400, rate=2, amp=0.4, pan=0;
var signal;
signal = [LFSaw.ar(freq, 0, amp/2)*SinOsc.ar(rate), 
Pulse.ar( freq, 0.51, amp)*SinOsc.ar(rate)];
signal = Balance2.ar(signal[0], signal[1], pan);
ScopeOut.ar( signal, b);
Out.ar(0, signal);
}).play(s);


w = SCWindow.new("scope in a gui", Rect(100, 400, 400, 300))
.onClose_({a.free;}) // free synth on closing window
.front;

SCMultiSliderView(w, Rect(10, 10, 90, 120))
.value_([0.4, 0.5, 0.6, 0.5])
.indexIsHorizontal_(false)
.isFilled_(true)
.strokeColor_(Color.new255(10, 55, 10))
.fillColor_(Color.new255(110, 155, 110).alpha_(0.6))
.indexThumbSize_(26)
.gap_(4)
.valueThumbSize_(1)
.action_({|sl|
sl.index.switch
{0} { a.set(\freq, 400+(sl.value[sl.index]*400)) }
{1} { a.set(\rate, (sl.value[sl.index]*10)) }
{2} { a.set(\amp, sl.value[sl.index]) }
{3} { a.set(\pan, (sl.value[sl.index]*2)-1) };
});


SCStaticText(w, Rect(10, 0, 90, 140))
.string_(" Freq \n\n Rate \n\n Amp \n\n Pan");

SCStaticText(w, Rect(10, 140, 90, 16))
.string_("xZoom:");

SCSlider(w, Rect(10, 160, 90, 16))
.action_({|sl| sc.xZoom_(sl.value*4)});

sc = SCScope(w, Rect(120,10,260,260))
.bufnum_(b)
.background_(Color.white)
.waveColors_([Color.black, Color.black]);
});
)