From a5ff6c46d2be5cc38278f94e0ba9d1fc3f3e96f4 Mon Sep 17 00:00:00 2001 From: Eugene Petkevich Date: Mon, 16 May 2022 20:56:36 +0300 Subject: [PATCH] Cleanup sampler from debug messages --- .../sampler.scd" | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git "a/\320\245\321\215\320\267\320\270\321\204\321\203/sampler.scd" "b/\320\245\321\215\320\267\320\270\321\204\321\203/sampler.scd" index ccd5c77..f185575 100644 --- "a/\320\245\321\215\320\267\320\270\321\204\321\203/sampler.scd" +++ "b/\320\245\321\215\320\267\320\270\321\204\321\203/sampler.scd" @@ -1,11 +1,8 @@ ( -// TODO: for whatever reason when called from mac os, -// every method here is executed 4 times - ~samplerFactory = { var maxDur = 10.0; var sampler = Environment[ - \version -> "33.7.2.3", + \version -> "33.7.4.1", \maxDur -> maxDur, \synthName -> \samplerPlay, \buf -> Buffer.alloc(s, s.sampleRate * maxDur, 1), @@ -26,7 +23,6 @@ Out.ar(out, sig!2); }).add, \startRec -> { |zi, pleiPich=false| - "startRec called".postln; zi.startPos = 0.0; zi.recSynth = Synth(\samplerRecord, [\input, s.inputBus, \buf, zi.buf], addAction: \addToTail); zi.endPos = s.sampleRate * 10; @@ -39,7 +35,6 @@ \startPos -> 0, \duration -> 0, \stopRec -> { |zi| - "stopRec called".postln; zi.duration = min(thisThread.seconds - zi.startTime, 10); zi.recSynth.free; if (zi.pleiPich, { @@ -50,7 +45,6 @@ }); }, \playSample -> { |zi| - "playSample called".postln; zi.playSynth = Synth(\samplerPlay, [\out, 0, \buf, zi.buf, \startPos, zi.startPos, \duration, zi.duration], addAction: \addToHead); @@ -60,7 +54,6 @@ zi.playSynth.set(\gate, 0); }, \makeSynthBind -> { |zi| - "makeSynthBind called".postln; Pbind( \instrument, \samplerPlay, \buf, zi.buf, @@ -69,7 +62,6 @@ ); }, \makeSynthArgs -> { |zi| - "makeSynthArgs called".postln; [ \buf, zi.buf, \startPos, zi.startPos, @@ -78,7 +70,6 @@ }, \shiftPos -> { |zi, delta| var endPos = zi.startPos + zi.duration; - ("shiftPos called"++[delta, endPos, zi.startPos, zi.duration]).postln; zi.startPos = (zi.startPos + delta).clip(0, endPos); zi.duration = endPos - zi.startPos; zi.buf.loadToFloatArray(zi.startPos*zi.buf.sampleRate, zi.duration*zi.buf.sampleRate, action: { |array| -- 2.17.1