«Basic ScopeView example» by defaultxr
on 12 Jul'16 05:30 inThis is a basic example of how to use ScopeView in your GUIs without having to include all the extra bells and whistles that Stethoscope includes.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
SynthDef(\scopeSynth, { | in=0 bufnum=0 | var output; output = In.ar(in, 2); ScopeOut2.ar(output, bufnum, 1024, 64 ); }).add; ( var win, view, synth, bufnum, scopeView, server=Server.default; win = Window("scope"); bufnum = Buffer.alloc(s, 1024, 2); synth = Synth(\scopeSynth, [\in, 0, \bufnum, bufnum]); scopeView = ScopeView(win, win.view.bounds).resize_(5).style_(0).waveColors = [Color.green, Color.green]; scopeView.server = server; scopeView.canFocus = true; scopeView.bufnum = bufnum; scopeView.start; win.front; ) Synth(\default); // tada! this (and anything else you play after this point) is now being scoped by ScopeView.
reception
comments