View this PageEdit this Page (locked)Uploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide

testing PlayBuf in ImageSynth


//_______floating
(
var x, z, bank;
bank = Library.at(\bank, 0);
bank.read(0, ":sounds:floating_1");
bank.setLoop(0);

z = ImageSynth(Pic.new(Rect.newBy(0,0,256,256), 32), 
	Synth.new({ 
		var in;
		//in = AudioIn.ar([1, 2]);
		in = PlayBuf.ar(bank, 0, MouseX.kr([0.01, 20]),  [1.0, 1.0.rand, 1.0.rand]);
		
	})
);

z.start;

z.next;

//z.end;

x = GUIScreen.new("audio", Rect.newBy(80,80,256,256), View(nil, 
	[
		z.pic,
		v = View.new(
			Pen.new.foreColor_(Color.black).offset_(-100@160).textFont_(\Monaco).textSize_(24).bold_(true), 
			[ "floating" ])
	]));
x.sched(0, inf, { 
	z.next;
	v.pen.offset = v.pen.offset + Point.new(3, 0);
	x.refresh; 0.05 });

)




Links to this Page