View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide

sliding loops

//sliding loops
(
	var w, array, plug, trig, timecode, newray;	
	w = GUIWindow.new("panel", Rect.newBy(172, 70, 195, 485));
	SliderView.new( w, Rect.newBy(76, 32, 27, 348), "SliderView", 0, 0, 1, 0, 'linear');
	ButtonView.new( w, Rect.newBy(74, 404, 32, 33), "add", 0, 0, 1, 0, 'linear');
	


	CheckBoxView.new( w, Rect.newBy(25, 449, 82, 23), "CheckBoxView", 0, 0, 1, 0, 'linear');
	RangeView.new( w, Rect.newBy(18, 491, 291, 21), "RangeView", 0, 0, 0, 1, 0, 'linear');



array = Array.fill(1, {0});
newray = Array.fill(1, {0});

w.at(0).action = { newray = newray.add(w.at(0).value)  };
w.at(1).action = { array = array.insert(timecode.wrap(0, array.size), newray ).flat; newray = Array.fill(1, {0});};

timecode = 0;

Synth.play({ arg synth;


trig = Pause.ar( Impulse.ar(10) , w.at(2).kr);

Sequencer.ar({ timecode = timecode +1;  w.at(0).value = array.wrapAt(timecode); 0.0 }, trig);
SinOsc.ar(w.at(0).kr * 300+195 * 4, 90, 0.1)			
})
)
/*
authors so far:
jrh 2000
*/


Links to this Page