final examples for TB2-Alpha01

nix
Pierre Alexandre Tremblay 6 years ago
parent 6c44543c75
commit 71f0bb2eda

@ -78,5 +78,18 @@ cancel processing on the server
EXAMPLES:: EXAMPLES::
code:: code::
(some example code) //Make 2 sources to be interpolated
(
b = Buffer.loadCollection(s, FloatArray.fill(44100, {|a|(a / pi).sin * 0.1}));
c = Buffer.loadCollection(s, FloatArray.fill(44100, {|a|(a / pi / 2).sin * 0.1}));
d = Buffer.new
)
//make an sound interpolating their spectrum
FluidBufAudioTransport.process(s,b,source2:c,destination:d,interpolation:0.5,action:{"Ding".postln})
// listen to the source and the result
b.play
c.play
d.play
:: ::

@ -18,9 +18,8 @@ w = Window.new("Viewer", Rect(100,Window.screenBounds.height - 400, 310, 310)).
v = View.new(w,Rect(0,0, 310, 310)); v = View.new(w,Rect(0,0, 310, 310));
//creates a function that reacts to mousedown //creates a function that reacts to mousedown
// v.mouseMoveAction = {|view, x, y|myx=x;myy=y;w.refresh;};
v.mouseDownAction = {|view, x, y|myx=x;myy=y;w.refresh; v.mouseDownAction = {|view, x, y|myx=x;myy=y;w.refresh;
myx.postln;myy.postln; // myx.postln;myy.postln;
Routine{ Routine{
b.setn(0,[myx,myy]); b.setn(0,[myx,myy]);
s.sync; s.sync;

Loading…
Cancel
Save