buf noveltyslice: corrected the helpfiles for new latency formula, and updated the minSliceLenght to be the same as other CCEs

nix
Pierre Alexandre Tremblay 6 years ago
parent 2b365308e8
commit 32d3f463af

@ -1,5 +1,5 @@
FluidBufNoveltySlice : UGen { FluidBufNoveltySlice : UGen {
*new1 { |rate, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, indices, feature = 0, kernelSize = 3, threshold = 0.5, filterSize = 1, minSliceLength = 1, windowSize = 1024, hopSize = -1, fftSize = -1, doneAction = 0, blocking = 0 | *new1 { |rate, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, indices, feature = 0, kernelSize = 3, threshold = 0.5, filterSize = 1, minSliceLength = 2, windowSize = 1024, hopSize = -1, fftSize = -1, doneAction = 0, blocking = 0 |
var maxFFTSize = if (fftSize == -1) {windowSize.nextPowerOfTwo} {fftSize}; var maxFFTSize = if (fftSize == -1) {windowSize.nextPowerOfTwo} {fftSize};
@ -13,13 +13,13 @@ FluidBufNoveltySlice : UGen {
} }
*kr { |source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, indices, feature = 0, kernelSize = 3, threshold = 0.5, filterSize = 1, minSliceLength = 1, windowSize = 1024, hopSize = -1, fftSize = -1, doneAction = 0 | *kr { |source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, indices, feature = 0, kernelSize = 3, threshold = 0.5, filterSize = 1, minSliceLength = 2, windowSize = 1024, hopSize = -1, fftSize = -1, doneAction = 0 |
^this.multiNew(\control, source, startFrame, numFrames, startChan, numChans, indices, feature, kernelSize, threshold, filterSize, minSliceLength, windowSize, hopSize, fftSize, doneAction); ^this.multiNew(\control, source, startFrame, numFrames, startChan, numChans, indices, feature, kernelSize, threshold, filterSize, minSliceLength, windowSize, hopSize, fftSize, doneAction);
} }
*process { |server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, indices, feature = 0, kernelSize = 3, threshold = 0.5, filterSize = 1, minSliceLength = 1, windowSize = 1024, hopSize = -1, fftSize = -1, action | *process { |server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, indices, feature = 0, kernelSize = 3, threshold = 0.5, filterSize = 1, minSliceLength = 2, windowSize = 1024, hopSize = -1, fftSize = -1, action |
^FluidNRTProcess.new( ^FluidNRTProcess.new(
server, this, action, [indices] server, this, action, [indices]
).process( ).process(
@ -27,7 +27,7 @@ FluidBufNoveltySlice : UGen {
); );
} }
*processBlocking { |server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, indices, feature = 0, kernelSize = 3, threshold = 0.5, filterSize = 1, minSliceLength = 1, windowSize = 1024, hopSize = -1, fftSize = -1, action | *processBlocking { |server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, indices, feature = 0, kernelSize = 3, threshold = 0.5, filterSize = 1, minSliceLength = 2, windowSize = 1024, hopSize = -1, fftSize = -1, action |
^FluidNRTProcess.new( ^FluidNRTProcess.new(
server, this, action, [indices], blocking:1 server, this, action, [indices], blocking:1
).process( ).process(

@ -1,5 +1,5 @@
FluidNoveltySlice : UGen { FluidNoveltySlice : UGen {
*ar { arg in = 0, feature = 0, kernelSize = 3, threshold = 0.8, filterSize = 1, minSliceLength = 1, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = 16384, maxKernelSize = 101, maxFilterSize = 100; *ar { arg in = 0, feature = 0, kernelSize = 3, threshold = 0.8, filterSize = 1, minSliceLength = 2, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = 16384, maxKernelSize = 101, maxFilterSize = 100;
^this.multiNew('audio', in.asAudioRateInput(this), feature, kernelSize, threshold, filterSize, minSliceLength, windowSize, hopSize, fftSize, maxFFTSize, maxKernelSize, maxFilterSize) ^this.multiNew('audio', in.asAudioRateInput(this), feature, kernelSize, threshold, filterSize, minSliceLength, windowSize, hopSize, fftSize, maxFFTSize, maxKernelSize, maxFilterSize)
} }
checkInputs { checkInputs {

@ -56,7 +56,7 @@ ARGUMENT:: maxFilterSize
This cannot be modulated. This cannot be modulated.
RETURNS:: RETURNS::
An audio stream with impulses at detected transients. The latency between the input and the output is STRONG::hopSize * (((kernelSize+1)/2) + filterSize):: at minimum. An audio stream with impulses at detected transients. The latency between the input and the output is STRONG::windowSize + (hopSize * (((kernelSize+1)/2) + (filterSize / 2))):: samples at minimum.
EXAMPLES:: EXAMPLES::
@ -65,10 +65,10 @@ code::
b = Buffer.read(s,File.realpath(FluidNoveltySlice.class.filenameSymbol).dirname.withTrailingSlash ++ "../AudioFiles/Nicol-LoopE-M.wav"); b = Buffer.read(s,File.realpath(FluidNoveltySlice.class.filenameSymbol).dirname.withTrailingSlash ++ "../AudioFiles/Nicol-LoopE-M.wav");
// basic param (the process add a latency of windowSize samples // basic param (the process add a latency of windowSize samples
{var sig = PlayBuf.ar(1,b,loop:1); [FluidNoveltySlice.ar(sig,0,11,0.33) * 0.5, DelayN.ar(sig, 1, 512 * (((11+1)/2) + 1)/ s.sampleRate, 0.2)]}.play {var sig = PlayBuf.ar(1,b,loop:1); [FluidNoveltySlice.ar(sig,0,11,0.33) * 0.5, DelayN.ar(sig, 1, (1024 + (512 * (((11+1)/2) + (1 / 2))))/ s.sampleRate, 0.2)]}.play
// other parameters // other parameters
{var sig = PlayBuf.ar(1,b,loop:1); [FluidNoveltySlice.ar(sig, 1, 31, 0.0035, 4, 100, 128, 32) * 0.5, DelayN.ar(sig, 1, 32 * (((31+1)/2) + 4)/ s.sampleRate,0.2)]}.play {var sig = PlayBuf.ar(1,b,loop:1); [FluidNoveltySlice.ar(sig, 1, 31, 0.0035, 4, 100, 128, 32) * 0.5, DelayN.ar(sig, 1, (128 + (32 * (((31+1)/2) + (4 / 2))))/ s.sampleRate,0.2)]}.play
// more musical trans-trigged autopan // more musical trans-trigged autopan
( (
@ -76,7 +76,7 @@ b = Buffer.read(s,File.realpath(FluidNoveltySlice.class.filenameSymbol).dirname.
var sig, trig, syncd, pan; var sig, trig, syncd, pan;
sig = PlayBuf.ar(1,b,loop:1); sig = PlayBuf.ar(1,b,loop:1);
trig = FluidNoveltySlice.ar(sig, 0, 11, 0.25, 5, 1, 128, 32); trig = FluidNoveltySlice.ar(sig, 0, 11, 0.25, 5, 1, 128, 32);
syncd = DelayN.ar(sig, 1, 64 * (((11+1)/2) + 5) / s.sampleRate); syncd = DelayN.ar(sig, 1, (128 + (32 * (((11+1)/2) + (5 / 2))))/ s.sampleRate);
pan = TRand.ar(-1,1,trig); pan = TRand.ar(-1,1,trig);
Pan2.ar(syncd,pan); Pan2.ar(syncd,pan);
}.play }.play

Loading…
Cancel
Save