From 71f0bb2edaa48e372c95cf52058712061f5b7d61 Mon Sep 17 00:00:00 2001 From: Pierre Alexandre Tremblay Date: Thu, 5 Dec 2019 14:41:38 +0000 Subject: [PATCH] final examples for TB2-Alpha01 --- .../Classes/FluidBufAudioTransport.schelp | 15 ++++++++++++++- .../dataset/super-simple-classifier-example.scd | 3 +-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/release-packaging/HelpSource/Classes/FluidBufAudioTransport.schelp b/release-packaging/HelpSource/Classes/FluidBufAudioTransport.schelp index f5040ac..eea567a 100644 --- a/release-packaging/HelpSource/Classes/FluidBufAudioTransport.schelp +++ b/release-packaging/HelpSource/Classes/FluidBufAudioTransport.schelp @@ -78,5 +78,18 @@ cancel processing on the server EXAMPLES:: 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 :: diff --git a/release-packaging/ignore/Examples/dataset/super-simple-classifier-example.scd b/release-packaging/ignore/Examples/dataset/super-simple-classifier-example.scd index 977c6ff..c365365 100644 --- a/release-packaging/ignore/Examples/dataset/super-simple-classifier-example.scd +++ b/release-packaging/ignore/Examples/dataset/super-simple-classifier-example.scd @@ -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)); //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; - myx.postln;myy.postln; + // myx.postln;myy.postln; Routine{ b.setn(0,[myx,myy]); s.sync;