[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [sc-users] Filling buffers with envelopes
times = Array.fill(arrSize, {|m|0.1}).integrate;
> 8 jan. 2019 kl. 23:00 skrev lance.bantham@xxxxxxxxx:
>
> Thank you for the clarification - but is there a way to convert to absolute times? It seems that EnvelopeView doesn't deal in delta..
>
> (
> var arrSize = 10, times, values;
> times = Array.fill(arrSize, {|m|0.1});
> values = Array.fill(arrSize+1, {|m| m/(arrSize+1)});
> w = Window("envelope", Rect(150 , Window.screenBounds.height - 250, 250, 100)).front;
> w.view.decorator = FlowLayout(w.view.bounds);
>
> b = EnvelopeView(w, Rect(0, 0, 230, 80))
> .drawLines_(true)
> .selectionColor_(Color.red)
> .drawRects_(true)
> .resize_(5)
> .step_(0.0001)
> .action_({arg b, env; [b.index, b.value].postln;
> env = Env(b.value[1], b.value[0], \lin)
> })
> .thumbSize_(9)
> .value_([times,values]);
> w.front;
> )
#|
fredrikolofsson.com musicalfieldsforever.com
|#
_______________________________________________
sc-users mailing list
info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/