Submit
Browse
Anonymous
Login
RSS
SuperCollider Code
Fork Code: Using MultiSliderView to control the harmonics of a wavetable
name
code content
// Using MultiSliderView to control the harmonics of a wavetable // example by James McCartney extracted from the mailing list // https://listarc.cal.bham.ac.uk/lists/sc-users-2003/msg05160.html ( var s, b, x, bufsize, secperbuf; var w, ms, slid, cspec; var changed, harmonics; bufsize=128; s = Server.local; b=Buffer.alloc(s, bufsize, 1); x = { arg rate=440; Osc.ar(b.bufnum, rate, 0, 0.2) }.play; harmonics=10; w = Window("uiosc", Rect(200, 450, 20*harmonics+50, 150)); ms = MultiSliderView(w, Rect(0, 0, 20*harmonics, 100)); ms.value_(Array.fill(harmonics,0.0)); ms.isFilled_(true); ms.valueThumbSize_(1.0); ms.indexThumbSize_(10.0); ms.gap_(10); slid=Slider(w,Rect(20*harmonics+10, 0, 20, 100)); cspec= ControlSpec(70,1000, 'exponential', 10, 440); slid.action_({x.set(\rate, cspec.map(slid.value)); }); slid.value_(0.3); slid.action.value; w.front; changed=false; ms.action_({b.sine1(ms.value, false, true, true)}); )
code description
example by James McCartney extracted from the mailing list: https://listarc.cal.bham.ac.uk/lists/sc-users-2003/msg05160.html
use markdown for formating
category tags
comma separated, i.g. "wild, siren" (do not enter default SC class names, please)
ancestor(s)
comma separated identificators, i.g. "1-C,1-1,1-4M,1-x"
Private?
the code will be accessible by direct url and not visible in public activity
signup to submit public code without captcha
comment of change