diff --git a/release-packaging/HelpSource/Classes/FluidAmpGate.schelp b/release-packaging/HelpSource/Classes/FluidAmpGate.schelp index d83c8f8..8635a2a 100644 --- a/release-packaging/HelpSource/Classes/FluidAmpGate.schelp +++ b/release-packaging/HelpSource/Classes/FluidAmpGate.schelp @@ -1,5 +1,5 @@ TITLE:: FluidAmpGate -SUMMARY:: Amplitude-based Slicer +SUMMARY:: Amplitude-based Gating Slicer CATEGORIES:: Libraries>FluidDecomposition RELATED:: Guides/FluCoMa, Guides/FluidDecomposition @@ -126,10 +126,10 @@ code:: //drum slicing, many ways //load a buffer b = Buffer.read(s,File.realpath(FluidAmpGate.class.filenameSymbol).dirname.withTrailingSlash ++ "../AudioFiles/Nicol-LoopE-M.wav"); -//have fun with a gate (explore lookahead and lookback, but correct for latency) +//have fun with a gate (explore lookahead and lookback, but correct for latency, which will be the greatest of the lookahead and lookback) ( {var env, source = PlayBuf.ar(1,b); - env = FluidAmpGate.ar(source, rampUp:1103, rampDown:2205, onThreshold:-27, offThreshold: -31, minSilenceLength:1100, lookBack:441, highPassFreq:40); + env = FluidAmpGate.ar(source, rampUp:441, rampDown:2205, onThreshold:-27, offThreshold: -31, minSilenceLength:1100, lookBack:441, highPassFreq:20); [DelayN.ar(source,delaytime:441/44100), env] }.plot(2, separately:true); ) diff --git a/release-packaging/HelpSource/Classes/FluidAmpSlice.schelp b/release-packaging/HelpSource/Classes/FluidAmpSlice.schelp index f1098d0..ceb7dc5 100644 --- a/release-packaging/HelpSource/Classes/FluidAmpSlice.schelp +++ b/release-packaging/HelpSource/Classes/FluidAmpSlice.schelp @@ -1,5 +1,5 @@ TITLE:: FluidAmpSlice -SUMMARY:: Amplitude-based Slicer +SUMMARY:: Amplitude-based Detrending Slicer CATEGORIES:: Libraries>FluidDecomposition RELATED:: Guides/FluCoMa, Guides/FluidDecomposition @@ -52,23 +52,23 @@ EXAMPLES:: code:: // detrending explained -// the source is a sinewave that does not go to silence and has sharp-ish amplitude bumps as onsets we try to track +// Our source here is a sinewave that does not go to silence and has sharp-ish amplitude bumps as onsets we try to track ( -{var env, source = SinOsc.ar(320,0,LFSaw.ar(20,0, -0.4, 0.6)); +{var env, source = SinOsc.ar(320,0,LFSaw.ar(20, 0, -0.4, 0.6)); env = FluidAmpSlice.ar(source,fastRampUp: 5,fastRampDown: 50,slowRampUp: 220,slowRampDown: 220, onThreshold: 10, offThreshold: 10,floor: -60); [source, env] }.plot(0.08); ) //beware of double trigger at the begining of the 2nd cycle above). A solution: Schmidth triggers ( -{var env, source = SinOsc.ar(320,0,LFSaw.ar(20,0, -0.4, 0.6)); +{var env, source = SinOsc.ar(320,0,LFSaw.ar(20, 0, -0.4, 0.6)); env = FluidAmpSlice.ar(source,fastRampUp: 5,fastRampDown: 50,slowRampUp: 220,slowRampDown: 220, onThreshold: 10, offThreshold: 7,floor: -60); [source, env] }.plot(0.08); ) // another solution: minslicelength ( -{var env, source = SinOsc.ar(320,0,LFSaw.ar(20,0, -0.4, 0.6)); +{var env, source = SinOsc.ar(320,0,LFSaw.ar(20, 0, -0.4, 0.6)); env = FluidAmpSlice.ar(source,fastRampUp: 5,fastRampDown: 50,slowRampUp: 220,slowRampDown: 220, onThreshold: 10, offThreshold: 7,floor: -60, minSliceLength: 220); [source, env] }.plot(0.08); diff --git a/release-packaging/HelpSource/Classes/FluidBufAmpGate.schelp b/release-packaging/HelpSource/Classes/FluidBufAmpGate.schelp index e91b817..4d52581 100644 --- a/release-packaging/HelpSource/Classes/FluidBufAmpGate.schelp +++ b/release-packaging/HelpSource/Classes/FluidBufAmpGate.schelp @@ -1,5 +1,5 @@ TITLE:: FluidBufAmpGate -SUMMARY:: Amplitude-based Slicer for Buffers +SUMMARY:: Amplitude-based Gating Slicer for Buffers CATEGORIES:: Libraries>FluidDecomposition RELATED:: Guides/FluCoMa, Guides/FluidDecomposition, Guides/FluidBufMultiThreading @@ -145,7 +145,7 @@ c = Buffer.new(s); ) // slice the samples -FluidBufAmpGate.process(s, b, indices:c, rampUp:1103, rampDown:2205, onThreshold:-27, offThreshold: -31, minSilenceLength:1100, lookBack:441, highPassFreq:40) +FluidBufAmpGate.process(s, b, indices:c, rampUp:110, rampDown:2205, onThreshold:-27, offThreshold: -31, minSilenceLength:1100, lookBack:441, highPassFreq:40) c.query c.getn(0,c.numFrames*2,{|item|item.postln;}) //reformatting to read the onsets and offsets as pairs @@ -184,7 +184,7 @@ c = Buffer.new(s); // with basic params Routine{ t = Main.elapsedTime; - FluidBufAmpGate.process(s, b, indices: c, rampUp:1, rampDown:20); + FluidBufAmpGate.process(s, b, indices: c, rampUp:1, rampDown:10, onThreshold: -30); (Main.elapsedTime - t).postln; }.play ) diff --git a/release-packaging/HelpSource/Classes/FluidBufAmpSlice.schelp b/release-packaging/HelpSource/Classes/FluidBufAmpSlice.schelp index 7221343..59d3b54 100644 --- a/release-packaging/HelpSource/Classes/FluidBufAmpSlice.schelp +++ b/release-packaging/HelpSource/Classes/FluidBufAmpSlice.schelp @@ -1,5 +1,5 @@ TITLE:: FluidBufAmpSlice -SUMMARY:: Amplitude-based Slicer for Buffers +SUMMARY:: Amplitude-based Detrending Slicer for Buffers CATEGORIES:: Libraries>FluidDecomposition RELATED:: Guides/FluCoMa, Guides/FluidDecomposition, Guides/FluidBufMultiThreading @@ -79,7 +79,7 @@ code:: // detrending explained // define a test signal and a destination buffer ( -b = Buffer.sendCollection(s, Array.fill(44100,{|i| sin(i*pi/ (44100/640)) * ((((35000-i)/30000)%0.8) + 0.2)})); +b = Buffer.sendCollection(s, Array.fill(44100,{|i| sin(i*pi/ (44100/640)) * ((((79000-i) % 22050).abs / 28000.0) + 0.2)})); c = Buffer.new(s); ) // the source is a sinewave that does not go to silence and has sharp-ish amplitude bumps as onsets we try to track