diff --git a/release-packaging/Classes/FluidBufHPSS.sc b/release-packaging/Classes/FluidBufHPSS.sc index 6d4882f..77b5b8b 100644 --- a/release-packaging/Classes/FluidBufHPSS.sc +++ b/release-packaging/Classes/FluidBufHPSS.sc @@ -1,7 +1,7 @@ FluidBufHPSS{ - *process { arg server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, harmonic, percussive, residual, harmFilterSize = 17, percFilterSize = 31, maskingMode, harmThreshFreq1 = 0.1, harmThreshAmp1 = 0, harmThreshFreq2 = 0.5, harmThreshAmp2 = 0, percThreshFreq1 = 0.1, percThreshAmp1 = 0, percThreshFreq2 = 0.5, percThreshAmp2 = 0, winSize = 1024, hopSize = -1, fftSize = -1, action; + *process { arg server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, harmonic, percussive, residual, harmFilterSize = 17, percFilterSize = 31, maskingMode, harmThreshFreq1 = 0.1, harmThreshAmp1 = 0, harmThreshFreq2 = 0.5, harmThreshAmp2 = 0, percThreshFreq1 = 0.1, percThreshAmp1 = 0, percThreshFreq2 = 0.5, percThreshAmp2 = 0, windowSize = 1024, hopSize = -1, fftSize = -1, action; - var maxFFTSize = if (fftSize == -1) {winSize.nextPowerOfTwo} {fftSize}; + var maxFFTSize = if (fftSize == -1) {windowSize.nextPowerOfTwo} {fftSize}; source = source.asUGenInput; harmonic = harmonic.asUGenInput; @@ -19,7 +19,7 @@ FluidBufHPSS{ //whatever has been passed in language-side (e.g maxFFTSize still exists as a parameter for the server plugin, but makes less sense here: it just needs to be set to a legal value) forkIfNeeded{ - server.sendMsg(\cmd, \BufHPSS, source, startFrame, numFrames, startChan, numChans, harmonic, percussive, residual, harmFilterSize, percFilterSize, maskingMode, harmThreshFreq1, harmThreshAmp1, harmThreshFreq2, harmThreshAmp2, percThreshFreq1, percThreshAmp1, percThreshFreq2, percThreshAmp2, winSize, hopSize, fftSize, maxFFTSize, harmFilterSize, percFilterSize); + server.sendMsg(\cmd, \BufHPSS, source, startFrame, numFrames, startChan, numChans, harmonic, percussive, residual, harmFilterSize, percFilterSize, maskingMode, harmThreshFreq1, harmThreshAmp1, harmThreshFreq2, harmThreshAmp2, percThreshFreq1, percThreshAmp1, percThreshFreq2, percThreshAmp2, windowSize, hopSize, fftSize, maxFFTSize, harmFilterSize, percFilterSize); server.sync; if (harmonic != -1) {harmonic = server.cachedBufferAt(harmonic); harmonic.updateInfo; server.sync;} {harmonic = nil}; if (percussive != -1) {percussive = server.cachedBufferAt(percussive); percussive.updateInfo; server.sync;} {percussive = nil}; diff --git a/release-packaging/Classes/FluidBufLoudness.sc b/release-packaging/Classes/FluidBufLoudness.sc index 402139e..58f3f8e 100644 --- a/release-packaging/Classes/FluidBufLoudness.sc +++ b/release-packaging/Classes/FluidBufLoudness.sc @@ -1,7 +1,7 @@ FluidBufLoudness{ - *process { arg server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, kWeighting = 1, truePeak = 1, winSize = 1024, hopSize = 512, action; + *process { arg server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, kWeighting = 1, truePeak = 1, windowSize = 1024, hopSize = 512, action; - var maxWinSize = winSize.nextPowerOfTwo; + var maxwindowSize = windowSize.nextPowerOfTwo; source = source.asUGenInput; features = features.asUGenInput; @@ -12,7 +12,7 @@ FluidBufLoudness{ server = server ? Server.default; forkIfNeeded{ - server.sendMsg(\cmd, \BufLoudness, source, startFrame, numFrames, startChan, numChans, features, kWeighting, truePeak, winSize, hopSize, maxWinSize); + server.sendMsg(\cmd, \BufLoudness, source, startFrame, numFrames, startChan, numChans, features, kWeighting, truePeak, windowSize, hopSize, maxwindowSize); server.sync; features = server.cachedBufferAt(features); features.updateInfo; server.sync; action.value(features); diff --git a/release-packaging/Classes/FluidBufMFCC.sc b/release-packaging/Classes/FluidBufMFCC.sc index 6a6c820..5614dc2 100644 --- a/release-packaging/Classes/FluidBufMFCC.sc +++ b/release-packaging/Classes/FluidBufMFCC.sc @@ -1,7 +1,7 @@ FluidBufMFCC{ - *process { arg server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, numCoefs = 13, numBands = 40, minFreq = 20, maxFreq = 20000, winSize = 1024, hopSize = -1, fftSize = -1, action; + *process { arg server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, numCoefs = 13, numBands = 40, minFreq = 20, maxFreq = 20000, windowSize = 1024, hopSize = -1, fftSize = -1, action; - var maxFFTSize = if (fftSize == -1) {winSize.nextPowerOfTwo} {fftSize}; + var maxFFTSize = if (fftSize == -1) {windowSize.nextPowerOfTwo} {fftSize}; source = source.asUGenInput; features = features.asUGenInput; @@ -16,7 +16,7 @@ FluidBufMFCC{ // same goes to maxNumCoefs, which is passed numCoefs in this case forkIfNeeded{ - server.sendMsg(\cmd, \BufMFCC, source, startFrame, numFrames, startChan, numChans, features, numCoefs, numBands, minFreq, maxFreq, numCoefs, winSize, hopSize, fftSize, maxFFTSize); + server.sendMsg(\cmd, \BufMFCC, source, startFrame, numFrames, startChan, numChans, features, numCoefs, numBands, minFreq, maxFreq, numCoefs, windowSize, hopSize, fftSize, maxFFTSize); server.sync; features = server.cachedBufferAt(features); features.updateInfo; server.sync; action.value(features); diff --git a/release-packaging/Classes/FluidBufMelBands.sc b/release-packaging/Classes/FluidBufMelBands.sc index 2b7c770..5583ab1 100644 --- a/release-packaging/Classes/FluidBufMelBands.sc +++ b/release-packaging/Classes/FluidBufMelBands.sc @@ -1,7 +1,7 @@ FluidBufMelBands{ - *process { arg server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, numBands = 40, minFreq = 20, maxFreq = 20000, winSize = 1024, hopSize = -1, fftSize = -1, action; + *process { arg server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, numBands = 40, minFreq = 20, maxFreq = 20000, windowSize = 1024, hopSize = -1, fftSize = -1, action; - var maxFFTSize = if (fftSize == -1) {winSize.nextPowerOfTwo} {fftSize}; + var maxFFTSize = if (fftSize == -1) {windowSize.nextPowerOfTwo} {fftSize}; source = source.asUGenInput; features = features.asUGenInput; @@ -16,7 +16,7 @@ FluidBufMelBands{ // same for maxNumBands which is passed numBands forkIfNeeded{ - server.sendMsg(\cmd, \BufMelBands, source, startFrame, numFrames, startChan, numChans, features, numBands, minFreq, maxFreq, numBands, winSize, hopSize, fftSize, maxFFTSize); + server.sendMsg(\cmd, \BufMelBands, source, startFrame, numFrames, startChan, numChans, features, numBands, minFreq, maxFreq, numBands, windowSize, hopSize, fftSize, maxFFTSize); server.sync; features = server.cachedBufferAt(features); features.updateInfo; server.sync; action.value(features); diff --git a/release-packaging/Classes/FluidBufNMF.sc b/release-packaging/Classes/FluidBufNMF.sc index 8b166bd..a46879b 100644 --- a/release-packaging/Classes/FluidBufNMF.sc +++ b/release-packaging/Classes/FluidBufNMF.sc @@ -1,5 +1,5 @@ FluidBufNMF { - *process { arg server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, destination, bases, basesMode = 0, activations, actMode = 0, rank = 1, numIter = 100, winSize = 1024, hopSize = -1, fftSize = -1, winType = 0, randSeed = -1, action; + *process { arg server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, destination, bases, basesMode = 0, activations, actMode = 0, components = 1, iterations = 100, windowSize = 1024, hopSize = -1, fftSize = -1, windowType = 0, randomSeed = -1, action; source = source.asUGenInput; @@ -16,7 +16,7 @@ FluidBufNMF { activations = activations ? -1; forkIfNeeded{ - server.sendMsg(\cmd, \BufNMF, source, startFrame, numFrames, startChan, numChans, destination, bases, basesMode, activations, actMode, rank, numIter, winSize, hopSize, fftSize); + server.sendMsg(\cmd, \BufNMF, source, startFrame, numFrames, startChan, numChans, destination, bases, basesMode, activations, actMode, components, iterations, windowSize, hopSize, fftSize); server.sync; if (destination != -1) {destination = server.cachedBufferAt(destination); destination.updateInfo; server.sync;} {destination = nil}; if (bases != -1) {bases = server.cachedBufferAt(bases); bases.updateInfo; server.sync;} {bases = nil}; diff --git a/release-packaging/Classes/FluidBufNoveltySlice.sc b/release-packaging/Classes/FluidBufNoveltySlice.sc index c3832e2..e55af95 100644 --- a/release-packaging/Classes/FluidBufNoveltySlice.sc +++ b/release-packaging/Classes/FluidBufNoveltySlice.sc @@ -1,7 +1,7 @@ FluidBufNoveltySlice{ - *process { arg server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, indices, kernelSize = 3, threshold = 0.8, filterSize = 1, winSize = 1024, hopSize = -1, fftSize = -1, action; + *process { arg server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, indices, kernelSize = 3, threshold = 0.8, filterSize = 1, windowSize = 1024, hopSize = -1, fftSize = -1, action; - //var maxFFTSize = if (fftSize == -1) {winSize.nextPowerOfTwo} {fftSize}; //ready for when we need it from the RT wrapper + //var maxFFTSize = if (fftSize == -1) {windowSize.nextPowerOfTwo} {fftSize}; //ready for when we need it from the RT wrapper source = source.asUGenInput; indices = indices.asUGenInput; @@ -12,7 +12,7 @@ FluidBufNoveltySlice{ server = server ? Server.default; forkIfNeeded{ - server.sendMsg(\cmd, \BufNoveltySlice, source, startFrame, numFrames, startChan, numChans, indices, kernelSize, threshold, filterSize, winSize, hopSize, fftSize); + server.sendMsg(\cmd, \BufNoveltySlice, source, startFrame, numFrames, startChan, numChans, indices, kernelSize, threshold, filterSize, windowSize, hopSize, fftSize); server.sync; indices = server.cachedBufferAt(indices); indices.updateInfo; server.sync; action.value(indices); diff --git a/release-packaging/Classes/FluidBufOnsetSlice.sc b/release-packaging/Classes/FluidBufOnsetSlice.sc index 2c4dcb0..d7bbcac 100644 --- a/release-packaging/Classes/FluidBufOnsetSlice.sc +++ b/release-packaging/Classes/FluidBufOnsetSlice.sc @@ -1,7 +1,7 @@ FluidBufOnsetSlice{ - *process { arg server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, indices, function = 0, threshold = 0.1, debounce = 2, filterSize = 5, frameDelta = 0, winSize = 1024, hopSize = -1, fftSize = -1, action; + *process { arg server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, indices, function = 0, threshold = 0.1, minSliceLength = 2, filterSize = 5, frameDelta = 0, windowSize = 1024, hopSize = -1, fftSize = -1, action; - var maxFFTSize = if (fftSize == -1) {winSize.nextPowerOfTwo} {fftSize}; + var maxFFTSize = if (fftSize == -1) {windowSize.nextPowerOfTwo} {fftSize}; source = source.asUGenInput; indices = indices.asUGenInput; @@ -15,7 +15,7 @@ FluidBufOnsetSlice{ //whatever has been passed in language-side (e.g maxFFTSize still exists as a parameter for the server plugin, but makes less sense here: it just needs to be set to a legal value) forkIfNeeded{ - server.sendMsg(\cmd, \BufOnsetSlice, source, startFrame, numFrames, startChan, numChans, indices, function, threshold, debounce, filterSize, frameDelta, winSize, hopSize, fftSize, maxFFTSize); + server.sendMsg(\cmd, \BufOnsetSlice, source, startFrame, numFrames, startChan, numChans, indices, function, threshold, minSliceLength, filterSize, frameDelta, windowSize, hopSize, fftSize, maxFFTSize); server.sync; indices = server.cachedBufferAt(indices); indices.updateInfo; server.sync; action.value(indices); diff --git a/release-packaging/Classes/FluidBufPitch.sc b/release-packaging/Classes/FluidBufPitch.sc index 566be36..d0ad4ce 100644 --- a/release-packaging/Classes/FluidBufPitch.sc +++ b/release-packaging/Classes/FluidBufPitch.sc @@ -1,7 +1,7 @@ FluidBufPitch{ - *process { arg server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, algorithm = 2, winSize = 1024, hopSize = -1, fftSize = -1, action; + *process { arg server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, algorithm = 2, windowSize = 1024, hopSize = -1, fftSize = -1, action; - var maxFFTSize = if (fftSize == -1) {winSize.nextPowerOfTwo} {fftSize}; + var maxFFTSize = if (fftSize == -1) {windowSize.nextPowerOfTwo} {fftSize}; source = source.asUGenInput; features = features.asUGenInput; @@ -15,7 +15,7 @@ FluidBufPitch{ //whatever has been passed in language-side (e.g maxFFTSize still exists as a parameter for the server plugin, but makes less sense here: it just needs to be set to a legal value) forkIfNeeded{ - server.sendMsg(\cmd, \BufPitch, source, startFrame, numFrames, startChan, numChans, features, algorithm, winSize, hopSize, fftSize, maxFFTSize); + server.sendMsg(\cmd, \BufPitch, source, startFrame, numFrames, startChan, numChans, features, algorithm, windowSize, hopSize, fftSize, maxFFTSize); server.sync; features = server.cachedBufferAt(features); features.updateInfo; server.sync; action.value(features); diff --git a/release-packaging/Classes/FluidBufSines.sc b/release-packaging/Classes/FluidBufSines.sc index d54520a..0da582b 100644 --- a/release-packaging/Classes/FluidBufSines.sc +++ b/release-packaging/Classes/FluidBufSines.sc @@ -1,7 +1,7 @@ FluidBufSines{ - *process { arg server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, sines, residual, bandwidth = 76, threshold = 0.7, minTrackLen = 15, magWeight = 0.1, freqWeight = 1, winSize = 1024, hopSize = -1, fftSize = -1, action; + *process { arg server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, sines, residual, bandwidth = 76, threshold = 0.7, minTrackLen = 15, magWeight = 0.1, freqWeight = 1, windowSize = 1024, hopSize = -1, fftSize = -1, action; - var maxFFTSize = if (fftSize == -1) {winSize.nextPowerOfTwo} {fftSize}; + var maxFFTSize = if (fftSize == -1) {windowSize.nextPowerOfTwo} {fftSize}; source = source.asUGenInput; sines = sines.asUGenInput; @@ -17,7 +17,7 @@ FluidBufSines{ //whatever has been passed in language-side (e.g maxFFTSize still exists as a parameter for the server plugin, but makes less sense here: it just needs to be set to a legal value) forkIfNeeded{ - server.sendMsg(\cmd, \BufSines, source, startFrame, numFrames, startChan, numChans, sines, residual, bandwidth, threshold, minTrackLen, magWeight, freqWeight, winSize, hopSize, fftSize, maxFFTSize); + server.sendMsg(\cmd, \BufSines, source, startFrame, numFrames, startChan, numChans, sines, residual, bandwidth, threshold, minTrackLen, magWeight, freqWeight, windowSize, hopSize, fftSize, maxFFTSize); server.sync; if (sines != -1) {sines = server.cachedBufferAt(sines); sines.updateInfo; server.sync;} {sines = nil}; if (residual != -1) {residual = server.cachedBufferAt(residual); residual.updateInfo; server.sync;} {residual = nil}; diff --git a/release-packaging/Classes/FluidBufSpectralShape.sc b/release-packaging/Classes/FluidBufSpectralShape.sc index 2105a8e..72b8b61 100644 --- a/release-packaging/Classes/FluidBufSpectralShape.sc +++ b/release-packaging/Classes/FluidBufSpectralShape.sc @@ -1,7 +1,7 @@ FluidBufSpectralShape{ - *process { arg server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, winSize = 1024, hopSize = -1, fftSize = -1, action; + *process { arg server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, windowSize = 1024, hopSize = -1, fftSize = -1, action; - var maxFFTSize = if (fftSize == -1) {winSize.nextPowerOfTwo} {fftSize}; + var maxFFTSize = if (fftSize == -1) {windowSize.nextPowerOfTwo} {fftSize}; source = source.asUGenInput; features = features.asUGenInput; @@ -15,7 +15,7 @@ FluidBufSpectralShape{ //whatever has been passed in language-side (e.g maxFFTSize still exists as a parameter for the server plugin, but makes less sense here: it just needs to be set to a legal value) forkIfNeeded{ - server.sendMsg(\cmd, \BufSpectralShape, source, startFrame, numFrames, startChan, numChans, features, winSize, hopSize, fftSize, maxFFTSize); + server.sendMsg(\cmd, \BufSpectralShape, source, startFrame, numFrames, startChan, numChans, features, windowSize, hopSize, fftSize, maxFFTSize); server.sync; features = server.cachedBufferAt(features); features.updateInfo; server.sync; action.value(features); diff --git a/release-packaging/Classes/FluidBufTransientSlice.sc b/release-packaging/Classes/FluidBufTransientSlice.sc index f4b6d7f..25fb83a 100644 --- a/release-packaging/Classes/FluidBufTransientSlice.sc +++ b/release-packaging/Classes/FluidBufTransientSlice.sc @@ -1,5 +1,5 @@ FluidBufTransientSlice{ - *process { arg server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, indices, order = 20, blockSize = 256, padSize = 128, skew = 0, threshFwd = 2, threshBack = 1.1, winSize = 14, debounce = 25, minSlice = 1000, action; + *process { arg server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, indices, order = 20, blockSize = 256, padSize = 128, skew = 0, threshFwd = 2, threshBack = 1.1, windowSize = 14, clumpLength = 25, minSliceLength = 1000, action; source = source.asUGenInput; indices = indices.asUGenInput; @@ -10,7 +10,7 @@ FluidBufTransientSlice{ server = server ? Server.default; forkIfNeeded{ - server.sendMsg(\cmd, \BufTransientSlice, source, startFrame, numFrames, startChan, numChans, indices, order, blockSize, padSize, skew, threshFwd, threshBack, winSize, debounce, minSlice); + server.sendMsg(\cmd, \BufTransientSlice, source, startFrame, numFrames, startChan, numChans, indices, order, blockSize, padSize, skew, threshFwd, threshBack, windowSize, clumpLength, minSliceLength); server.sync; indices = server.cachedBufferAt(indices); indices.updateInfo; server.sync; action.value(indices); diff --git a/release-packaging/Classes/FluidBufTransients.sc b/release-packaging/Classes/FluidBufTransients.sc index 7a2cad9..521ef50 100644 --- a/release-packaging/Classes/FluidBufTransients.sc +++ b/release-packaging/Classes/FluidBufTransients.sc @@ -1,5 +1,5 @@ FluidBufTransients { - *process { arg server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, transients, residual, order = 20, blockSize = 256, padSize = 128, skew = 0, threshFwd = 2, threshBack = 1.1, winSize = 14, debounce = 25, action; + *process { arg server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, transients, residual, order = 20, blockSize = 256, padSize = 128, skew = 0, threshFwd = 2, threshBack = 1.1, windowSize = 14, clumpLength = 25, action; source = source.asUGenInput; transients = transients.asUGenInput; @@ -12,7 +12,7 @@ FluidBufTransients { residual = residual ? -1; forkIfNeeded{ - server.sendMsg(\cmd, \BufTransients, source, startFrame, numFrames, startChan, numChans, transients, residual, order, blockSize, padSize, skew, threshFwd, threshBack, winSize, debounce); + server.sendMsg(\cmd, \BufTransients, source, startFrame, numFrames, startChan, numChans, transients, residual, order, blockSize, padSize, skew, threshFwd, threshBack, windowSize, clumpLength); server.sync; if (transients != -1) {transients = server.cachedBufferAt(transients); transients.updateInfo; server.sync;} {transients = nil}; if (residual != -1) {residual = server.cachedBufferAt(residual); residual.updateInfo; server.sync;} {residual = nil}; diff --git a/release-packaging/Classes/FluidHPSS.sc b/release-packaging/Classes/FluidHPSS.sc index 85c7c8d..44e92bf 100644 --- a/release-packaging/Classes/FluidHPSS.sc +++ b/release-packaging/Classes/FluidHPSS.sc @@ -1,6 +1,6 @@ FluidHPSS : MultiOutUGen { - *ar { arg in = 0, harmFilterSize=17, percFilterSize = 31, maskingMode=0, harmThreshFreq1 = 0.1, harmThreshAmp1 = 0, harmThreshFreq2 = 0.5, harmThreshAmp2 = 0, percThreshFreq1 = 0.1, percThreshAmp1 = 0, percThreshFreq2 = 0.5, percThreshAmp2 = 0, winSize= 1024, hopSize= -1, fftSize= -1, maxFFTSize = 16384, maxHarmFilterSize = 101, maxPercFilterSize = 101; - ^this.multiNew('audio', in.asAudioRateInput(this), harmFilterSize, percFilterSize, maskingMode, harmThreshFreq1, harmThreshAmp1, harmThreshFreq2, harmThreshAmp2, percThreshFreq1, percThreshAmp1, percThreshFreq2, percThreshAmp2, winSize, hopSize, fftSize, maxFFTSize, maxHarmFilterSize, maxPercFilterSize) + *ar { arg in = 0, harmFilterSize=17, percFilterSize = 31, maskingMode=0, harmThreshFreq1 = 0.1, harmThreshAmp1 = 0, harmThreshFreq2 = 0.5, harmThreshAmp2 = 0, percThreshFreq1 = 0.1, percThreshAmp1 = 0, percThreshFreq2 = 0.5, percThreshAmp2 = 0, windowSize= 1024, hopSize= -1, fftSize= -1, maxFFTSize = 16384, maxHarmFilterSize = 101, maxPercFilterSize = 101; + ^this.multiNew('audio', in.asAudioRateInput(this), harmFilterSize, percFilterSize, maskingMode, harmThreshFreq1, harmThreshAmp1, harmThreshFreq2, harmThreshAmp2, percThreshFreq1, percThreshAmp1, percThreshFreq2, percThreshAmp2, windowSize, hopSize, fftSize, maxFFTSize, maxHarmFilterSize, maxPercFilterSize) } init { arg ... theInputs; inputs = theInputs; diff --git a/release-packaging/Classes/FluidLoudness.sc b/release-packaging/Classes/FluidLoudness.sc index ef75218..36bece6 100644 --- a/release-packaging/Classes/FluidLoudness.sc +++ b/release-packaging/Classes/FluidLoudness.sc @@ -1,6 +1,6 @@ FluidLoudness : MultiOutUGen { - *kr { arg in = 0, kWeighting = 1, truePeak = 1, winSize = 1024, hopSize = 512, maxWinSize = 16384; - ^this.multiNew('control', in.asAudioRateInput(this), kWeighting, truePeak, winSize, hopSize, maxWinSize); + *kr { arg in = 0, kWeighting = 1, truePeak = 1, windowSize = 1024, hopSize = 512, maxwindowSize = 16384; + ^this.multiNew('control', in.asAudioRateInput(this), kWeighting, truePeak, windowSize, hopSize, maxwindowSize); } init {arg ...theInputs; @@ -10,7 +10,7 @@ FluidLoudness : MultiOutUGen { checkInputs { if(inputs.at(5).rate != 'scalar') { - ^(": maxWinSize cannot be modulated."); + ^(": maxwindowSize cannot be modulated."); }; ^this.checkValidInputs; } diff --git a/release-packaging/Classes/FluidMFCC.sc b/release-packaging/Classes/FluidMFCC.sc index 222d72f..3c06371 100644 --- a/release-packaging/Classes/FluidMFCC.sc +++ b/release-packaging/Classes/FluidMFCC.sc @@ -1,7 +1,7 @@ FluidMFCC : MultiOutUGen { - *kr { arg in = 0, numCoefs = 13, numBands = 40, minFreq = 20, maxFreq = 20000, maxNumCoefs = 40, winSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = 16384; - ^this.multiNew('control', in.asAudioRateInput(this), numCoefs, numBands, minFreq, maxFreq, maxNumCoefs, winSize, hopSize, fftSize, maxFFTSize); + *kr { arg in = 0, numCoefs = 13, numBands = 40, minFreq = 20, maxFreq = 20000, maxNumCoefs = 40, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = 16384; + ^this.multiNew('control', in.asAudioRateInput(this), numCoefs, numBands, minFreq, maxFreq, maxNumCoefs, windowSize, hopSize, fftSize, maxFFTSize); } init {arg ...theInputs; diff --git a/release-packaging/Classes/FluidMelBands.sc b/release-packaging/Classes/FluidMelBands.sc index 5055791..3021006 100644 --- a/release-packaging/Classes/FluidMelBands.sc +++ b/release-packaging/Classes/FluidMelBands.sc @@ -1,7 +1,7 @@ FluidMelBands : MultiOutUGen { - *kr { arg in = 0, numBands = 40, minFreq = 20, maxFreq = 20000, maxNumBands = 120, winSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = 16384; - ^this.multiNew('control', in.asAudioRateInput(this), numBands, minFreq, maxFreq, maxNumBands, winSize, hopSize, fftSize, maxFFTSize); + *kr { arg in = 0, numBands = 40, minFreq = 20, maxFreq = 20000, maxNumBands = 120, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = 16384; + ^this.multiNew('control', in.asAudioRateInput(this), numBands, minFreq, maxFreq, maxNumBands, windowSize, hopSize, fftSize, maxFFTSize); } init {arg ...theInputs; diff --git a/release-packaging/Classes/FluidNMFFilter.sc b/release-packaging/Classes/FluidNMFFilter.sc index 757e8b2..a4ab279 100644 --- a/release-packaging/Classes/FluidNMFFilter.sc +++ b/release-packaging/Classes/FluidNMFFilter.sc @@ -1,7 +1,7 @@ FluidNMFFilter : MultiOutUGen { - *ar { arg in = 0, bases, maxRank = 1, numIter = 10, winSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = 16384; - ^this.multiNew('audio', in.asAudioRateInput(this), bases, maxRank, numIter, winSize, hopSize, fftSize, maxFFTSize); + *ar { arg in = 0, bases, maxComponents = 1, iterations = 10, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = 16384; + ^this.multiNew('audio', in.asAudioRateInput(this), bases, maxComponents, iterations, windowSize, hopSize, fftSize, maxFFTSize); } init {arg ...theInputs; @@ -11,7 +11,7 @@ FluidNMFFilter : MultiOutUGen { checkInputs { if(inputs.at(2).rate != 'scalar') { - ^(": maxRank cannot be modulated."); + ^(": maxComponents cannot be modulated."); }; if(inputs.at(7).rate != 'scalar') { ^(": maxFFTSize cannot be modulated."); diff --git a/release-packaging/Classes/FluidNMFMatch.sc b/release-packaging/Classes/FluidNMFMatch.sc index 68ef57f..0c438d5 100644 --- a/release-packaging/Classes/FluidNMFMatch.sc +++ b/release-packaging/Classes/FluidNMFMatch.sc @@ -1,7 +1,7 @@ FluidNMFMatch : MultiOutUGen { - *kr { arg in = 0, bases, maxRank = 1, numIter = 10, winSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = 16384; - ^this.multiNew('control', in.asAudioRateInput(this), bases, maxRank, numIter, winSize, hopSize, fftSize, maxFFTSize); + *kr { arg in = 0, bases, maxComponents = 1, iterations = 10, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = 16384; + ^this.multiNew('control', in.asAudioRateInput(this), bases, maxComponents, iterations, windowSize, hopSize, fftSize, maxFFTSize); } init {arg ...theInputs; @@ -11,7 +11,7 @@ FluidNMFMatch : MultiOutUGen { checkInputs { if(inputs.at(2).rate != 'scalar') { - ^(": maxRank cannot be modulated."); + ^(": maxComponents cannot be modulated."); }; if(inputs.at(7).rate != 'scalar') { ^(": maxFFTSize cannot be modulated."); diff --git a/release-packaging/Classes/FluidOnsetSlice.sc b/release-packaging/Classes/FluidOnsetSlice.sc index b50980a..2bedb64 100644 --- a/release-packaging/Classes/FluidOnsetSlice.sc +++ b/release-packaging/Classes/FluidOnsetSlice.sc @@ -1,6 +1,6 @@ FluidOnsetSlice : UGen { - *ar { arg in = 0, function = 0, threshold = 0.5, debounce = 2, filterSize = 5, frameDelta = 0, winSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = 16384; - ^this.multiNew('audio', in.asAudioRateInput(this), function, threshold, debounce, filterSize, frameDelta, winSize, hopSize, fftSize, maxFFTSize) + *ar { arg in = 0, function = 0, threshold = 0.5, minSliceLength = 2, filterSize = 5, frameDelta = 0, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = 16384; + ^this.multiNew('audio', in.asAudioRateInput(this), function, threshold, minSliceLength, filterSize, frameDelta, windowSize, hopSize, fftSize, maxFFTSize) } checkInputs { if(inputs.at(9).rate != 'scalar') { diff --git a/release-packaging/Classes/FluidPitch.sc b/release-packaging/Classes/FluidPitch.sc index d574407..66bdfb9 100644 --- a/release-packaging/Classes/FluidPitch.sc +++ b/release-packaging/Classes/FluidPitch.sc @@ -1,7 +1,7 @@ FluidPitch : MultiOutUGen { - *kr { arg in = 0, algorithm = 2, winSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = 16384; - ^this.multiNew('control', in.asAudioRateInput(this), algorithm, winSize, hopSize, fftSize, maxFFTSize); + *kr { arg in = 0, algorithm = 2, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = 16384; + ^this.multiNew('control', in.asAudioRateInput(this), algorithm, windowSize, hopSize, fftSize, maxFFTSize); } init {arg ...theInputs; diff --git a/release-packaging/Classes/FluidSTFTPass.sc b/release-packaging/Classes/FluidSTFTPass.sc index caa0005..d3456fd 100644 --- a/release-packaging/Classes/FluidSTFTPass.sc +++ b/release-packaging/Classes/FluidSTFTPass.sc @@ -1,6 +1,6 @@ FluidSTFTPass : UGen { - *ar { arg in = 0, winSize= 1024, hopSize= -1, fftSize= -1, maxFFTSize = 16384; - ^this.multiNew('audio', in.asAudioRateInput(this), winSize, hopSize, fftSize, maxFFTSize) + *ar { arg in = 0, windowSize= 1024, hopSize= -1, fftSize= -1, maxFFTSize = 16384; + ^this.multiNew('audio', in.asAudioRateInput(this), windowSize, hopSize, fftSize, maxFFTSize) } checkInputs { if(inputs.at(4).rate != 'scalar') { diff --git a/release-packaging/Classes/FluidSines.sc b/release-packaging/Classes/FluidSines.sc index 3d2f16a..5edf880 100644 --- a/release-packaging/Classes/FluidSines.sc +++ b/release-packaging/Classes/FluidSines.sc @@ -1,6 +1,6 @@ FluidSines : MultiOutUGen { - *ar { arg in = 0, bandwidth = 76, threshold = 0.7, minTrackLen = 15, magWeight = 0.1, freqWeight = 1.0, winSize= 1024, hopSize= -1, fftSize= -1, maxFFTSize=16384; - ^this.multiNew('audio', in.asAudioRateInput(this), bandwidth, threshold, minTrackLen, magWeight, freqWeight ,winSize, hopSize, fftSize, maxFFTSize) + *ar { arg in = 0, bandwidth = 76, threshold = 0.7, minTrackLen = 15, magWeight = 0.1, freqWeight = 1.0, windowSize= 1024, hopSize= -1, fftSize= -1, maxFFTSize=16384; + ^this.multiNew('audio', in.asAudioRateInput(this), bandwidth, threshold, minTrackLen, magWeight, freqWeight ,windowSize, hopSize, fftSize, maxFFTSize) } init { arg ... theInputs; inputs = theInputs; diff --git a/release-packaging/Classes/FluidSpectralShape.sc b/release-packaging/Classes/FluidSpectralShape.sc index 216ea7c..ada4f20 100644 --- a/release-packaging/Classes/FluidSpectralShape.sc +++ b/release-packaging/Classes/FluidSpectralShape.sc @@ -1,7 +1,7 @@ FluidSpectralShape : MultiOutUGen { - *kr { arg in = 0, winSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = 16384; - ^this.multiNew('control', in.asAudioRateInput(this), winSize, hopSize, fftSize, maxFFTSize); + *kr { arg in = 0, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = 16384; + ^this.multiNew('control', in.asAudioRateInput(this), windowSize, hopSize, fftSize, maxFFTSize); } init {arg ...theInputs; diff --git a/release-packaging/Classes/FluidTransientSlice.sc b/release-packaging/Classes/FluidTransientSlice.sc index 1b9517a..b4f4ecc 100644 --- a/release-packaging/Classes/FluidTransientSlice.sc +++ b/release-packaging/Classes/FluidTransientSlice.sc @@ -1,5 +1,5 @@ FluidTransientSlice : UGen { - *ar { arg in = 0, order = 20, blockSize = 256, padSize = 128, skew = 0.0, threshFwd = 2.0, threshBack = 1.1, winSize=14, debounce=25, minSlice = 1000; - ^this.multiNew('audio', in.asAudioRateInput(this), order, blockSize, padSize, skew, threshFwd ,threshBack, winSize, debounce, minSlice) + *ar { arg in = 0, order = 20, blockSize = 256, padSize = 128, skew = 0.0, threshFwd = 2.0, threshBack = 1.1, windowSize=14, clumpLength=25, minSliceLength = 1000; + ^this.multiNew('audio', in.asAudioRateInput(this), order, blockSize, padSize, skew, threshFwd ,threshBack, windowSize, clumpLength, minSliceLength) } } diff --git a/release-packaging/Classes/FluidTransients.sc b/release-packaging/Classes/FluidTransients.sc index fa8d735..ef0c968 100644 --- a/release-packaging/Classes/FluidTransients.sc +++ b/release-packaging/Classes/FluidTransients.sc @@ -1,6 +1,6 @@ FluidTransients : MultiOutUGen { - *ar { arg in = 0, order = 20, blockSize = 256, padSize = 128, skew = 0.0, threshFwd = 2.0, threshBack = 1.1, winSize=14, debounce=25; - ^this.multiNew('audio', in.asAudioRateInput(this), order, blockSize, padSize, skew, threshFwd, threshBack, winSize, debounce) + *ar { arg in = 0, order = 20, blockSize = 256, padSize = 128, skew = 0.0, threshFwd = 2.0, threshBack = 1.1, windowSize=14, clumpLength=25; + ^this.multiNew('audio', in.asAudioRateInput(this), order, blockSize, padSize, skew, threshFwd, threshBack, windowSize, clumpLength) } init { arg ... theInputs; inputs = theInputs; diff --git a/release-packaging/HelpSource/Classes/FluidBufHPSS.schelp b/release-packaging/HelpSource/Classes/FluidBufHPSS.schelp index c17540c..5532826 100644 --- a/release-packaging/HelpSource/Classes/FluidBufHPSS.schelp +++ b/release-packaging/HelpSource/Classes/FluidBufHPSS.schelp @@ -94,7 +94,7 @@ ARGUMENT:: percThreshFreq2 ARGUMENT:: percThreshAmp2 In mode 2, the threshold of the high part for the percussive filter. That threshold applies to all frequencies above percThreshFreq2. The threshold between percThreshFreq1 and percThreshFreq2 is interpolated between percThreshAmp1 and percThreshAmp2. How much more powerful (in dB) the percussive median filter needs to be than the harmonic median filter for this bin to be counted as percussive. -ARGUMENT:: winSize +ARGUMENT:: windowSize The window size in samples. As HPSS relies on spectral frames, we need to decide what precision we give it spectrally and temporally, in line with Gabor Uncertainty principles. http://www.subsurfwiki.org/wiki/Gabor_uncertainty ARGUMENT:: hopSize @@ -146,7 +146,7 @@ d.play; ( Routine{ t = Main.elapsedTime; - FluidBufHPSS.process(s, b, harmonic: c, percussive: d, residual:e, harmFilterSize:31, maskingMode:2, harmThreshFreq1: 0.005, harmThreshAmp1: 7.5, harmThreshFreq2: 0.168, harmThreshAmp2: 7.5, percThreshFreq1: 0.004, percThreshAmp1: 26.5, percThreshFreq2: 0.152, percThreshAmp2: 26.5,winSize:4096,hopSize:512); + FluidBufHPSS.process(s, b, harmonic: c, percussive: d, residual:e, harmFilterSize:31, maskingMode:2, harmThreshFreq1: 0.005, harmThreshAmp1: 7.5, harmThreshFreq2: 0.168, harmThreshAmp2: 7.5, percThreshFreq1: 0.004, percThreshAmp1: 26.5, percThreshFreq2: 0.152, percThreshAmp2: 26.5,windowSize:4096,hopSize:512); (Main.elapsedTime - t).postln; }.play ) diff --git a/release-packaging/HelpSource/Classes/FluidBufLoudness.schelp b/release-packaging/HelpSource/Classes/FluidBufLoudness.schelp index 3b41cd7..7cd256e 100644 --- a/release-packaging/HelpSource/Classes/FluidBufLoudness.schelp +++ b/release-packaging/HelpSource/Classes/FluidBufLoudness.schelp @@ -41,7 +41,7 @@ ARGUMENT:: kWeighting ARGUMENT:: truePeak A flag to switch the computation of TruePeak. On by default, removing it makes the algorithm more CPU efficient by reverting to a simple absolute peak of the frame. -ARGUMENT:: winSize +ARGUMENT:: windowSize The size of the window on which the computation is done. By default 1024 to be similar with all other FluCoMa objects, the EBU specifies other values as per the examples below. ARGUMENT:: hopSize @@ -105,7 +105,7 @@ c = Buffer.new(s); ( Routine{ t = Main.elapsedTime; - FluidBufLoudness.process(s, b, features: c, winSize: 17640, hopSize:4410); + FluidBufLoudness.process(s, b, features: c, windowSize: 17640, hopSize:4410); (Main.elapsedTime - t).postln; }.play ) diff --git a/release-packaging/HelpSource/Classes/FluidBufMFCC.schelp b/release-packaging/HelpSource/Classes/FluidBufMFCC.schelp index a965235..e2aabf4 100644 --- a/release-packaging/HelpSource/Classes/FluidBufMFCC.schelp +++ b/release-packaging/HelpSource/Classes/FluidBufMFCC.schelp @@ -46,7 +46,7 @@ ARGUMENT:: minFreq ARGUMENT:: maxFreq The highest boundary of the highest band of the model, in Hz. -ARGUMENT:: winSize +ARGUMENT:: windowSize The window size. As MFCC computation relies on spectral frames, we need to decide what precision we give it spectrally and temporally, in line with Gabor Uncertainty principles. http://www.subsurfwiki.org/wiki/Gabor_uncertainty ARGUMENT:: hopSize @@ -109,6 +109,6 @@ Routine{ }.play ) -// look at the buffer: 5 coefs for left, then 5 coefs for right +// look at the buffer: 5 coefs for left, then 5 coefs for right (the first of each is linked to the loudness) c.plot(separately:true) :: \ No newline at end of file diff --git a/release-packaging/HelpSource/Classes/FluidBufMelBands.schelp b/release-packaging/HelpSource/Classes/FluidBufMelBands.schelp index 4d95dc4..5643f92 100644 --- a/release-packaging/HelpSource/Classes/FluidBufMelBands.schelp +++ b/release-packaging/HelpSource/Classes/FluidBufMelBands.schelp @@ -44,7 +44,7 @@ ARGUMENT:: minFreq ARGUMENT:: maxFreq The highest boundary of the highest band of the model, in Hz. -ARGUMENT:: winSize +ARGUMENT:: windowSize The window size. As spectral description relies on spectral frames, we need to decide what precision we give it spectrally and temporally, in line with Gabor Uncertainty principles. http://www.subsurfwiki.org/wiki/Gabor_uncertainty ARGUMENT:: hopSize @@ -108,5 +108,5 @@ Routine{ ) // look at the buffer: 10 bands for left, then 10 bands for right -c.plot(minval:0, maxval:100) +c.plot(separately:true) :: \ No newline at end of file diff --git a/release-packaging/HelpSource/Classes/FluidBufNMF.schelp b/release-packaging/HelpSource/Classes/FluidBufNMF.schelp index ae37561..092d5c6 100644 --- a/release-packaging/HelpSource/Classes/FluidBufNMF.schelp +++ b/release-packaging/HelpSource/Classes/FluidBufNMF.schelp @@ -8,7 +8,7 @@ DESCRIPTION:: The FluidBufNMF object decomposes the spectrum of a sound into a number of components using Non-Negative Matrix Factorisation (NMF) footnote:: Lee, Daniel D., and H. Sebastian Seung. 1999. ‘Learning the Parts of Objects by Non-Negative Matrix Factorization’. Nature 401 (6755): 788–91. https://doi.org/10.1038/44565. ::. NMF has been a popular technique in signal processing research for things like source separation and transcription footnote:: Smaragdis and Brown, Non-Negative Matrix Factorization for Polyphonic Music Transcription.::, although its creative potential is so far relatively unexplored. -The algorithm takes a buffer in and divides it into a number of components, determined by the rank argument. It works iteratively, by trying to find a combination of spectral templates ('bases') and envelopes ('activations') that yield the original magnitude spectrogram when added together. By and large, there is no unique answer to this question (i.e. there are different ways of accounting for an evolving spectrum in terms of some set of templates and envelopes). In its basic form, NMF is a form of unsupervised learning: it starts with some random data and then converges towards something that minimizes the distance between its generated data and the original:it tends to converge very quickly at first and then level out. Fewer iterations mean less processing, but also less predictable results. +The algorithm takes a buffer in and divides it into a number of components, determined by the STRONG::Components:: argument. It works iteratively, by trying to find a combination of spectral templates ('bases') and envelopes ('activations') that yield the original magnitude spectrogram when added together. By and large, there is no unique answer to this question (i.e. there are different ways of accounting for an evolving spectrum in terms of some set of templates and envelopes). In its basic form, NMF is a form of unsupervised learning: it starts with some random data and then converges towards something that minimizes the distance between its generated data and the original:it tends to converge very quickly at first and then level out. Fewer iterations mean less processing, but also less predictable results. The object can return either or all of the following: LIST:: ## a spectral contour of each component in the form of a magnitude spectrogram (called a basis in NMF lingo); @@ -20,8 +20,8 @@ The bases and activations can be used to make a kind of vocoder based on what NM Some additional options and flexibility can be found through combinations of the basesMode and actMode arguments. If these flags are set to 1, the object expects to be supplied with pre-formed spectra (or envelopes) that will be used as seeds for the decomposition, providing more guided results. When set to 2, the supplied buffers won't be updated, so become templates to match against instead. Note that having both bases and activations set to 2 doesn't make sense, so the object will complain. If supplying pre-formed data, it's up to the user to make sure that the supplied buffers are the right size: LIST:: -## bases must be STRONG::(fft size / 2) + 1:: frames and STRONG::(rank * input channels):: channels -## activations must be STRONG::(input frames / hopSize) + 1:: frames and STRONG::(rank * input channels):: channels +## bases must be STRONG::(fft size / 2) + 1:: frames and STRONG::(components * input channels):: channels +## activations must be STRONG::(input frames / hopSize) + 1:: frames and STRONG::(components * input channels):: channels :: In this implementation, the components are reconstructed by masking the original spectrum, such that they will sum to yield the original sound. @@ -57,7 +57,7 @@ ARGUMENT:: numChans For multichannel srcBuf, how many channel should be processed. ARGUMENT:: destination - The index of the buffer where the different reconstructed ranks will be reconstructed. The buffer will be resized to STRONG::rank * numChannelsProcessed:: channels and STRONG::sourceDuration:: lenght. If STRONG::nil:: is provided, the reconstruction will not happen. + The index of the buffer where the different reconstructed components will be reconstructed. The buffer will be resized to STRONG::components * numChannelsProcessed:: channels and STRONG::sourceDuration:: lenght. If STRONG::nil:: is provided, the reconstruction will not happen. ARGUMENT:: bases The index of the buffer where the different bases will be written to and/or read from: the behaviour is set in the following argument. If STRONG::nil:: is provided, no bases will be returned. @@ -65,7 +65,7 @@ ARGUMENT:: bases ARGUMENT:: basesMode This flag decides of how the basis buffer passed as the previous argument is treated. table:: - ## 0 || The bases are seeded randomly, and the resulting ones will be written after the process in the passed buffer. The buffer is resized to STRONG::rank * numChannelsProcessed:: channels and STRONG::(fftSize / 2 + 1):: lenght. + ## 0 || The bases are seeded randomly, and the resulting ones will be written after the process in the passed buffer. The buffer is resized to STRONG::components * numChannelsProcessed:: channels and STRONG::(fftSize / 2 + 1):: lenght. ## 1 || The passed buffer is considered as seed for the bases. Its dimensions should match the values above. The resulting bases will replace the seed ones. ## 2 || The passed buffer is considered as a template for the bases, and will therefore not change. Its bases should match the values above. :: @@ -76,18 +76,18 @@ ARGUMENT:: activations ARGUMENT:: actMode This flag decides of how the activation buffer passed as the previous argument is treated. table:: - ## 0 || The activations are seeded randomly, and the resulting ones will be written after the process in the passed buffer. The buffer is resized to STRONG::rank * numChannelsProcessed:: channels and STRONG::(sourceDuration / hopsize + 1):: lenght. + ## 0 || The activations are seeded randomly, and the resulting ones will be written after the process in the passed buffer. The buffer is resized to STRONG::components * numChannelsProcessed:: channels and STRONG::(sourceDuration / hopsize + 1):: lenght. ## 1 || The passed buffer is considered as seed for the activations. Its dimensions should match the values above. The resulting activations will replace the seed ones. ## 2 || The passed buffer is considered as a template for the activations, and will therefore not change. Its dimensions should match the values above. :: -ARGUMENT:: rank +ARGUMENT:: components The number of elements the NMF algorithm will try to divide the spectrogram of the source in. -ARGUMENT:: numIter +ARGUMENT:: iterations The NMF process is iterative, trying to converge to the smallest error in its factorisation. The number of iterations will decide how many times it tries to adjust its estimates. Higher numbers here will be more CPU expensive, lower numbers will be more unpredictable in quality. -ARGUMENT:: winSize +ARGUMENT:: windowSize The window size. As NMF relies on spectral frames, we need to decide what precision we give it spectrally and temporally, in line with Gabor Uncertainty principles. http://www.subsurfwiki.org/wiki/Gabor_uncertainty ARGUMENT:: hopSize @@ -96,10 +96,10 @@ ARGUMENT:: hopSize ARGUMENT:: fftSize The inner FFT/IFFT size. It should be at least 4 samples long, at least the size of the window, and a power of 2. Making it larger allows an oversampling of the spectral precision. -ARGUMENT:: winType +ARGUMENT:: windowType The inner FFT/IFFT windowing type (not implemented yet) -ARGUMENT:: randSeed +ARGUMENT:: randomSeed The NMF process needs to seed its starting point. If specified, the same values will be used. The default of -1 will randomly assign them. (not implemented yet) ARGUMENT:: action @@ -140,16 +140,16 @@ d.plot d.play //////(beware !!!! loud!!!) ( -// separate them in 2 ranks +// separate them in 2 components Routine { - FluidBufNMF.process(s, d, destination:e, bases: f, activations:g, rank:2); + FluidBufNMF.process(s, d, destination:e, bases: f, activations:g, components:2); e.query; f.query; g.query; }.play ) -// look at the resynthesised separated signal +// look at the resynthesised separated components as audio e.plot; // look at the bases signal for 2 spikes @@ -173,7 +173,7 @@ y = Buffer.new(s); ~fft_size = 1024; ~frame_size = 512; ~hop_size = 256; -~which_rank = 3; +~which_component = 3; ) // matrix factorisation, requesting everything - wait for the computation time to appear. @@ -185,16 +185,16 @@ Routine{ }.play ) -//look at the resynthesised ranks, the bases and the activations +//look at the resynthesised components, the bases and the activations c.plot; x.plot; y.plot; //null test of the sum of sources {(PlayBuf.ar(5,c,doneAction:2).sum)+(-1*PlayBuf.ar(1,b,doneAction:2))}.play -// play the ranks spread in the stereo field +// play the components spread in the stereo field {Splay.ar(PlayBuf.ar(5,c,doneAction:2))}.play //play a single source -{PlayBuf.ar(5,c,doneAction:2)[~which_rank].dup}.play +{PlayBuf.ar(5,c,doneAction:2)[~which_component].dup}.play //play noise using one of the bases as filter. ( @@ -203,7 +203,7 @@ c.plot; x.plot; y.plot; chain = FFT(LocalBuf(~fft_size), WhiteNoise.ar()); chain = chain.pvcollect(~fft_size, {|mag, phase, index| - [mag * BufRd.kr(5,x,DC.kr(index),0,1)[~which_rank]]; + [mag * BufRd.kr(5,x,DC.kr(index),0,1)[~which_component]]; }); IFFT(chain); @@ -211,16 +211,16 @@ c.plot; x.plot; y.plot; ) //play noise using one of the activations as envelope. -{WhiteNoise.ar(BufRd.kr(5,y,Phasor.ar(1,1/~hop_size,0,(b.numFrames / ~hop_size + 1)),0,1)[~which_rank])*0.5}.play +{WhiteNoise.ar(BufRd.kr(5,y,Phasor.ar(1,1/~hop_size,0,(b.numFrames / ~hop_size + 1)),0,1)[~which_component])*0.5}.play //play noise through both matching activation and filter ( { var chain; - chain = FFT(LocalBuf(~fft_size), WhiteNoise.ar(BufRd.kr(5,y,Phasor.ar(1,1/~hop_size,0,(b.numFrames / ~hop_size + 1)),0,1)[~which_rank]*12),0.5,1); + chain = FFT(LocalBuf(~fft_size), WhiteNoise.ar(BufRd.kr(5,y,Phasor.ar(1,1/~hop_size,0,(b.numFrames / ~hop_size + 1)),0,1)[~which_component]*12),0.5,1); chain = chain.pvcollect(~fft_size, {|mag, phase, index| - [mag * BufRd.kr(5,x,DC.kr(index),0,1)[~which_rank]]; + [mag * BufRd.kr(5,x,DC.kr(index),0,1)[~which_component]]; }); [0,IFFT(chain)]; @@ -244,18 +244,18 @@ y = Buffer.new(s); // train only 2 seconds ( Routine { - FluidBufNMF.process(s,b,0,88200,0,1, c, x, rank:10); + FluidBufNMF.process(s,b,0,88200,0,1, c, x, components:10); c.query; }.play; ) -// find the rank that has the picking sound by changing which channel to listen to +// find the component that has the picking sound by changing which channel to listen to ( ~element = 4; {PlayBuf.ar(10,c)[~element]}.play ) -// copy all the other ranks on itself and the picking basis as the sole component of the 1st channel +// copy all the other components on itself and the picking basis as the sole component of the 1st channel ( Routine{ z = (0..9); @@ -268,7 +268,7 @@ Routine{ //process the whole file, splitting it with the 2 trained bases ( Routine{ - FluidBufNMF.process(s, b, destination: c, bases: e, basesMode: 2, activations: y, rank:2); + FluidBufNMF.process(s, b, destination: c, bases: e, basesMode: 2, activations: y, components:2); c.query; }.play; ) @@ -311,7 +311,7 @@ d.plot d.play //////(beware !!!! loud!!!) ( -//make a seeding basis of 3 ranks: +//make a seeding basis of 3 components: var highpass, lowpass, direct; highpass = Array.fill(513,{|i| (i < 50).asInteger}); lowpass = 1 - highpass; @@ -326,7 +326,7 @@ e.query ( // use the seeding basis, without updating Routine { - FluidBufNMF.process(s, d, destination:f, bases: e, basesMode: 2, activations:g, rank:3); + FluidBufNMF.process(s, d, destination:f, bases: e, basesMode: 2, activations:g, components:3); e.query; f.query; g.query; @@ -345,7 +345,7 @@ g.plot; ( // use the seeding bases, with updating this time Routine { - FluidBufNMF.process(s, d, destination:f, bases: e, basesMode: 1, activations:g, rank:3); + FluidBufNMF.process(s, d, destination:f, bases: e, basesMode: 1, activations:g, components:3); e.query; f.query; g.query; @@ -358,6 +358,6 @@ f.plot; // look at the bases that have now updated in place (with the 3rd channel being more focused e.plot; -// look at the activations (sharper 3rd rank at transitions) +// look at the activations (sharper 3rd component at transitions) g.plot; :: diff --git a/release-packaging/HelpSource/Classes/FluidBufNoveltySlice.schelp b/release-packaging/HelpSource/Classes/FluidBufNoveltySlice.schelp index 3c2220e..92d3842 100644 --- a/release-packaging/HelpSource/Classes/FluidBufNoveltySlice.schelp +++ b/release-packaging/HelpSource/Classes/FluidBufNoveltySlice.schelp @@ -45,7 +45,7 @@ ARGUMENT:: threshold ARGUMENT:: filterSize The size of a smoothing filter that is applied on the novelty curve. A larger filter filter size allows for cleaner cuts on very sharp changes. -ARGUMENT:: winSize +ARGUMENT:: windowSize The window size. As novelty estimation relies on spectral frames, we need to decide what precision we give it spectrally and temporally, in line with Gabor Uncertainty principles. http://www.subsurfwiki.org/wiki/Gabor_uncertainty ARGUMENT:: hopSize @@ -107,7 +107,7 @@ c = Buffer.new(s); ) // process with a given filterSize -FluidBufNoveltySlice.process(s,b, indices: c, kernSize:31, threshold:0.3, filterSize:0) +FluidBufNoveltySlice.process(s,b, indices: c, kernelSize:31, threshold:0.3, filterSize:0) //check the number of slices: it is the number of frames in the transBuf minus the boundary index. c.query; diff --git a/release-packaging/HelpSource/Classes/FluidBufOnsetSlice.schelp b/release-packaging/HelpSource/Classes/FluidBufOnsetSlice.schelp index 83e5041..ecd692f 100644 --- a/release-packaging/HelpSource/Classes/FluidBufOnsetSlice.schelp +++ b/release-packaging/HelpSource/Classes/FluidBufOnsetSlice.schelp @@ -52,7 +52,7 @@ ARGUMENT:: function ARGUMENT:: threshold The thresholding of a new slice. Value ranges are different for each function, from 0 upwards. -ARGUMENT:: debounce +ARGUMENT:: minSliceLength The minimum duration of a slice in number of hopSize. ARGUMENT:: filterSize @@ -61,11 +61,11 @@ ARGUMENT:: filterSize ARGUMENT:: frameDelta For certain functions (HFC, SpectralFlux, MKL, Cosine), the distance does not have to be computed between consecutive frames. By default (0) it is, otherwise this sets the distane between the comparison window in samples. -ARGUMENT:: winSize +ARGUMENT:: windowSize The window size. As spectral differencing relies on spectral frames, we need to decide what precision we give it spectrally and temporally, in line with Gabor Uncertainty principles. http://www.subsurfwiki.org/wiki/Gabor_uncertainty ARGUMENT:: hopSize - The window hop size. As spectral differencing relies on spectral frames, we need to move the window forward. It can be any size but low overlap will create audible artefacts. The -1 default value will default to half of winSize (overlap of 2). + The window hop size. As spectral differencing relies on spectral frames, we need to move the window forward. It can be any size but low overlap will create audible artefacts. The -1 default value will default to half of windowSize (overlap of 2). ARGUMENT:: fftSize The inner FFT/IFFT size. It should be at least 4 samples long, at least the size of the window, and a power of 2. Making it larger allows an oversampling of the spectral precision. The -1 default value will default to windowSize. diff --git a/release-packaging/HelpSource/Classes/FluidBufPitch.schelp b/release-packaging/HelpSource/Classes/FluidBufPitch.schelp index 17d1d6b..accd403 100644 --- a/release-packaging/HelpSource/Classes/FluidBufPitch.schelp +++ b/release-packaging/HelpSource/Classes/FluidBufPitch.schelp @@ -43,7 +43,7 @@ ARGUMENT:: algorithm ## 2 || YinFFT: Implements the frequency domain version of the YIN algorithm, as described in FOOTNOTE::P. M. Brossier, "Automatic Annotation of Musical Audio for Interactive Applications.” QMUL, London, UK, 2007. :: See also https://essentia.upf.edu/documentation/reference/streaming_PitchYinFFT.html :: -ARGUMENT:: winSize +ARGUMENT:: windowSize The window size. As sinusoidal estimation relies on spectral frames, we need to decide what precision we give it spectrally and temporally, in line with Gabor Uncertainty principles. http://www.subsurfwiki.org/wiki/Gabor_uncertainty ARGUMENT:: hopSize @@ -80,9 +80,7 @@ Routine{ ) // look at the analysis -c.plot(minval:0, maxval:400) -// plot with a different range to appreciate the confidence: -c.plot(minval:0, maxval:1) +c.plot(separately:true) // The values are interleaved [pitch,confidence] in the buffer as they are on 2 channels: to get to the right frame, divide the SR of the input by the hopSize, then multiply by 2 because of the channel interleaving // here we are querying from one frame before (the signal starts at 8192, which is frame 16 (8192/512), therefore starting the query at frame 15, which is index 30. @@ -117,7 +115,7 @@ Routine{ ) // look at the buffer: [pitch,confidence] for left then [pitch,confidence] for right -c.plot(minval:0, maxval:1500) +c.plot(separately:true) :: STRONG::A musical example.:: @@ -151,7 +149,7 @@ d.do({ e.postln; //granulate only the frames that are in our buffer -// We need to convert our indices to frame start. Their position was (index * hopSize) - (winSize) in FluidBufPitch +// We need to convert our indices to frame start. Their position was (index * hopSize) - (windowSize) in FluidBufPitch f = e.collect({arg i; (i * 512) - 1024}); // define a basic grain synth diff --git a/release-packaging/HelpSource/Classes/FluidBufSines.schelp b/release-packaging/HelpSource/Classes/FluidBufSines.schelp index 1ef0f9e..c283211 100644 --- a/release-packaging/HelpSource/Classes/FluidBufSines.schelp +++ b/release-packaging/HelpSource/Classes/FluidBufSines.schelp @@ -57,7 +57,7 @@ ARGUMENT:: magWeight ARGUMENT:: freqWeight The weight of the frequency proximity of a peak when trying to associate it to an existing track (relative to magWeight - suggested between 0 to 1) -ARGUMENT:: winSize +ARGUMENT:: windowSize The window size. As sinusoidal estimation relies on spectral frames, we need to decide what precision we give it spectrally and temporally, in line with Gabor Uncertainty principles. http://www.subsurfwiki.org/wiki/Gabor_uncertainty ARGUMENT:: hopSize diff --git a/release-packaging/HelpSource/Classes/FluidBufSpectralShape.schelp b/release-packaging/HelpSource/Classes/FluidBufSpectralShape.schelp index e269173..756561b 100644 --- a/release-packaging/HelpSource/Classes/FluidBufSpectralShape.schelp +++ b/release-packaging/HelpSource/Classes/FluidBufSpectralShape.schelp @@ -51,7 +51,7 @@ ARGUMENT:: numChans ARGUMENT:: features The destination buffer for the 7 spectral features describing the spectral shape. -ARGUMENT:: winSize +ARGUMENT:: windowSize The window size. As spectral shape estimation relies on spectral frames, we need to decide what precision we give it spectrally and temporally, in line with Gabor Uncertainty principles. http://www.subsurfwiki.org/wiki/Gabor_uncertainty ARGUMENT:: hopSize diff --git a/release-packaging/HelpSource/Classes/FluidBufTransientSlice.schelp b/release-packaging/HelpSource/Classes/FluidBufTransientSlice.schelp index 936ec28..e2f3bd6 100644 --- a/release-packaging/HelpSource/Classes/FluidBufTransientSlice.schelp +++ b/release-packaging/HelpSource/Classes/FluidBufTransientSlice.schelp @@ -54,13 +54,13 @@ ARGUMENT:: threshFwd ARGUMENT:: threshBack The threshold of the offset of the smoothed error function. As it proceeds backwards in time, it allows tight ending of the identification of the anomaly. -ARGUMENT:: winSize +ARGUMENT:: windowSize The averaging window of the error detection function. It needs smoothing as it is very jittery. The longer the window, the less precise, but the less false positives. -ARGUMENT:: debounce +ARGUMENT:: clumpLength The window size in sample within which positive detections will be clumped together to avoid overdetecting in time. -ARGUMENT:: minSlice +ARGUMENT:: minSliceLength The minimum duration of a slice in samples. ARGUMENT:: action diff --git a/release-packaging/HelpSource/Classes/FluidBufTransients.schelp b/release-packaging/HelpSource/Classes/FluidBufTransients.schelp index 1fa220e..7773e4c 100644 --- a/release-packaging/HelpSource/Classes/FluidBufTransients.schelp +++ b/release-packaging/HelpSource/Classes/FluidBufTransients.schelp @@ -62,10 +62,10 @@ ARGUMENT:: threshFwd ARGUMENT:: threshBack The threshold of the offset of the smoothed error function. As it proceeds backwards in time, it allows tight ending of the identification of the anomaly. -ARGUMENT:: winSize +ARGUMENT:: windowSize The averaging window of the error detection function. It needs smoothing as it is very jittery. The longer the window, the less precise, but the less false positive. -ARGUMENT:: debounce +ARGUMENT:: clumpLength The window size in sample within which positive detections will be clumped together to avoid overdetecting in time. ARGUMENT:: action @@ -135,7 +135,7 @@ d = Buffer.new(s); e = Buffer.new(s); ( Routine{ t = Main.elapsedTime; - FluidBufTransients.process(s, b, transients: d, residual:e, threshFwd:1.2, debounce:40); + FluidBufTransients.process(s, b, transients: d, residual:e, threshFwd:1.2, clumpLength:40); (Main.elapsedTime - t).postln; }.play ) diff --git a/release-packaging/HelpSource/Classes/FluidHPSS.schelp b/release-packaging/HelpSource/Classes/FluidHPSS.schelp index 9fc8aa3..084519f 100644 --- a/release-packaging/HelpSource/Classes/FluidHPSS.schelp +++ b/release-packaging/HelpSource/Classes/FluidHPSS.schelp @@ -66,11 +66,11 @@ ARGUMENT:: percThreshFreq2 ARGUMENT:: percThreshAmp2 In mode 2, the threshold of the high part for the percussive filter. That threshold applies to all frequencies above percThreshFreq2. The threshold between percThreshFreq1 and percThreshFreq2 is interpolated between percThreshAmp1 and percThreshAmp2. How much more powerful (in dB) the percussive median filter needs to be than the harmonic median filter for this bin to be counted as percussive. -ARGUMENT:: winSize +ARGUMENT:: windowSize The window size. As sinusoidal estimation relies on spectral frames, we need to decide what precision we give it spectrally and temporally, in line with Gabor Uncertainty principles. http://www.subsurfwiki.org/wiki/Gabor_uncertainty ARGUMENT:: hopSize - The window hop size. As sinusoidal estimation relies on spectral frames, we need to move the window forward. It can be any size but low overlap will create audible artefacts. The -1 default value will default to half of winSize (overlap of 2). + The window hop size. As sinusoidal estimation relies on spectral frames, we need to move the window forward. It can be any size but low overlap will create audible artefacts. The -1 default value will default to half of windowSize (overlap of 2). ARGUMENT:: fftSize The inner FFT/IFFT size. It should be at least 4 samples long, at least the size of the window, and a power of 2. Making it larger allows an oversampling of the spectral precision. The -1 default value will default to windowSize. @@ -85,7 +85,7 @@ ARGUMENT:: maxPercFilterSize How large can the percussive filter be modulated to (percFilterSize), by allocating memory at instantiation time. This cannot be modulated. RETURNS:: - An array of three audio streams: [0] is the harmonic part extracted, [1] is the percussive part extracted, [2] is the rest. The latency between the input and the output is ((harmFilterSize - 1) * hopSize) + winSize) samples. + An array of three audio streams: [0] is the harmonic part extracted, [1] is the percussive part extracted, [2] is the rest. The latency between the input and the output is ((harmFilterSize - 1) * hopSize) + windowSize) samples. Discussion:: HPSS works by using median filters on the spectral magnitudes of a sound. It hinges on a simple modelling assumption that tonal components will tend to yield concentrations of energy across time, spread out in frequency, and percussive components will manifest as concentrations of energy across frequency, spread out in time. By using median filters across time and frequency respectively, we get initial esitmates of the tonal-ness / transient-ness of a point in time and frequency. These are then combined into 'masks' that are applied to the orginal spectral data in order to produce a separation. @@ -112,6 +112,6 @@ b = Buffer.read(s,File.realpath(FluidHPSS.class.filenameSymbol).dirname.withTrai // the residual stream {FluidHPSS.ar(PlayBuf.ar(1,b,loop:1),15,31,2,0.05,40,0.1,-40, 0.1, -10, 0.2, 10)[2].dup}.play -// null test (the process add a latency of ((harmFilterSize - 1) * hopSize) + winSize) samples +// null test (the process add a latency of ((harmFilterSize - 1) * hopSize) + windowSize) samples {var sig = PlayBuf.ar(1,b,loop:1); [FluidHPSS.ar(sig, 17, 31).sum - DelayN.ar(sig, 1, ((((17 - 1) * 512) + 1024) / s.sampleRate))]}.play :: diff --git a/release-packaging/HelpSource/Classes/FluidLoudness.schelp b/release-packaging/HelpSource/Classes/FluidLoudness.schelp index 75d574e..449beb2 100644 --- a/release-packaging/HelpSource/Classes/FluidLoudness.schelp +++ b/release-packaging/HelpSource/Classes/FluidLoudness.schelp @@ -22,17 +22,17 @@ ARGUMENT:: kWeighting ARGUMENT:: truePeak A flag to switch the computation of TruePeak. On by default, removing it makes the algorithm more CPU efficient by reverting to a simple absolute peak of the frame. -ARGUMENT:: winSize +ARGUMENT:: windowSize The size of the window on which the computation is done. By default 1024 to be similar with all other FluCoMa objects, the EBU specifies other values as per the examples below. ARGUMENT:: hopSize How much the buffered window moves forward, in samples. By default 512 to be similar with all other FluCoMa objects, the EBU specifies other values as per the examples below. -ARGUMENT:: maxWinSize - How large can the winSize be, by allocating memory at instantiation time. This cannot be modulated. +ARGUMENT:: maxwindowSize + How large can the windowSize be, by allocating memory at instantiation time. This cannot be modulated. RETURNS:: - A 2-channel KR signal with the [pitch, confidence] descriptors. The latency is winSize. + A 2-channel KR signal with the [pitch, confidence] descriptors. The latency is windowSize. EXAMPLES:: @@ -88,7 +88,7 @@ x.free x = { arg freq=220, type = 1, noise = 0; var source = PinkNoise.ar(noise) + Select.ar(type,[DC.ar(),SinOsc.ar(freq,mul:0.1), VarSaw.ar(freq,mul:0.1), Saw.ar(freq,0.1), Pulse.ar(freq,mul:0.1)]); - Out.kr(b, FluidLoudness.kr(source,winSize:17640,hopSize:4410,maxWinSize:17640)); + Out.kr(b, FluidLoudness.kr(source,windowSize:17640,hopSize:4410,maxwindowSize:17640)); source.dup; }.play; ) diff --git a/release-packaging/HelpSource/Classes/FluidMFCC.schelp b/release-packaging/HelpSource/Classes/FluidMFCC.schelp index 61e4ed5..54bcb6f 100644 --- a/release-packaging/HelpSource/Classes/FluidMFCC.schelp +++ b/release-packaging/HelpSource/Classes/FluidMFCC.schelp @@ -31,11 +31,11 @@ ARGUMENT:: maxFreq ARGUMENT:: maxNumCoefs The maximum number of cepstral coefficients that can be computed. This sets the number of channels of the output, and therefore cannot be modulated. -ARGUMENT:: winSize +ARGUMENT:: windowSize The window size. As MFCC computation relies on spectral frames, we need to decide what precision we give it spectrally and temporally, in line with Gabor Uncertainty principles. http://www.subsurfwiki.org/wiki/Gabor_uncertainty ARGUMENT:: hopSize - The window hop size. As MFCC computation relies on spectral frames, we need to move the window forward. It can be any size but low overlap will create audible artefacts. The -1 default value will default to half of winSize (overlap of 2). + The window hop size. As MFCC computation relies on spectral frames, we need to move the window forward. It can be any size but low overlap will create audible artefacts. The -1 default value will default to half of windowSize (overlap of 2). ARGUMENT:: fftSize The inner FFT/IFFT size. It should be at least 4 samples long, at least the size of the window, and a power of 2. Making it larger allows an oversampling of the spectral precision. The -1 default value will default to windowSize. @@ -44,7 +44,7 @@ ARGUMENT:: maxFFTSize How large can the FFT be, by allocating memory at instantiation time. This cannot be modulated. RETURNS:: - A KR signal of STRONG::maxNumCoefs:: channels. The latency is winSize. + A KR signal of STRONG::maxNumCoefs:: channels. The latency is windowSize. EXAMPLES:: diff --git a/release-packaging/HelpSource/Classes/FluidMelBands.schelp b/release-packaging/HelpSource/Classes/FluidMelBands.schelp index 4e3ffbc..e5784ba 100644 --- a/release-packaging/HelpSource/Classes/FluidMelBands.schelp +++ b/release-packaging/HelpSource/Classes/FluidMelBands.schelp @@ -28,11 +28,11 @@ ARGUMENT:: maxFreq ARGUMENT:: maxNumBands The maximum number of Mel bands that can be modelled. This sets the number of channels of the output, and therefore cannot be modulated. -ARGUMENT:: winSize +ARGUMENT:: windowSize The window size. As sinusoidal estimation relies on spectral frames, we need to decide what precision we give it spectrally and temporally, in line with Gabor Uncertainty principles. http://www.subsurfwiki.org/wiki/Gabor_uncertainty ARGUMENT:: hopSize - The window hop size. As sinusoidal estimation relies on spectral frames, we need to move the window forward. It can be any size but low overlap will create audible artefacts. The -1 default value will default to half of winSize (overlap of 2). + The window hop size. As sinusoidal estimation relies on spectral frames, we need to move the window forward. It can be any size but low overlap will create audible artefacts. The -1 default value will default to half of windowSize (overlap of 2). ARGUMENT:: fftSize The inner FFT/IFFT size. It should be at least 4 samples long, at least the size of the window, and a power of 2. Making it larger allows an oversampling of the spectral precision. The -1 default value will default to windowSize. @@ -41,7 +41,7 @@ ARGUMENT:: maxFFTSize How large can the FFT be, by allocating memory at instantiation time. This cannot be modulated. RETURNS:: - A KR signal of STRONG::maxNumBands:: channels, giving the measure amplitudes for each band. The latency is winSize. + A KR signal of STRONG::maxNumBands:: channels, giving the measure amplitudes for each band. The latency is windowSize. EXAMPLES:: diff --git a/release-packaging/HelpSource/Classes/FluidNMFFilter.schelp b/release-packaging/HelpSource/Classes/FluidNMFFilter.schelp index 5a34698..0493d38 100644 --- a/release-packaging/HelpSource/Classes/FluidNMFFilter.schelp +++ b/release-packaging/HelpSource/Classes/FluidNMFFilter.schelp @@ -6,7 +6,7 @@ RELATED:: Guides/FluCoMa, Guides/FluidDecomposition, Classes/FluidBufNMF, Classe DESCRIPTION:: The FluidNMFFilter object decomposes and resynthesises an incoming audio signal against a set of spectral templates using an slimmed-down version of Nonnegative Matrix Factorisation (NMF) footnote:: Lee, Daniel D., and H. Sebastian Seung. 1999. ‘Learning the Parts of Objects by Non-Negative Matrix Factorization’. Nature 401 (6755): 788–91. https://doi.org/10.1038/44565. :: -It outputs at AR the resynthesis of the best factorisation. The spectral templates are presumed to have been produced by the offline NMF process (link::Classes/FluidBufNMF::), and must be the correct size with respect to the FFT settings being used (FFT size / 2 + 1 frames long). The rank of the decomposition is determined by the number of channels in the supplied buffer of templates, up to a maximum set by the STRONG::maxRank:: parameter. +It outputs at AR the resynthesis of the best factorisation. The spectral templates are presumed to have been produced by the offline NMF process (link::Classes/FluidBufNMF::), and must be the correct size with respect to the FFT settings being used (FFT size / 2 + 1 frames long). The rank of the decomposition (number of components) is determined by the number of channels in the supplied buffer of templates, up to a maximum set by the STRONG::maxComponents:: parameter. NMF has been a popular technique in signal processing research for things like source separation and transcription footnote:: Smaragdis and Brown, Non-Negative Matrix Factorization for Polyphonic Music Transcription.::, although its creative potential is so far relatively unexplored. It works iteratively, by trying to find a combination of amplitudes ('activations') that yield the original magnitude spectrogram of the audio input when added together. By and large, there is no unique answer to this question (i.e. there are different ways of accounting for an evolving spectrum in terms of some set of templates and envelopes). In its basic form, NMF is a form of unsupervised learning: it starts with some random data and then converges towards something that minimizes the distance between its generated data and the original:it tends to converge very quickly at first and then level out. Fewer iterations mean less processing, but also less predictable results. @@ -20,25 +20,25 @@ FluidBufNMF is part of the Fluid Decomposition Toolkit of the FluCoMa project. f CLASSMETHODS:: METHOD:: ar -The real-time processing method. It takes an audio input, and will yield a audio stream in the form of a multichannel array of size STRONG::maxRank:: . If the bases buffer has fewer than maxRank channels, the remaining outputs will be zeroed. +The real-time processing method. It takes an audio input, and will yield a audio stream in the form of a multichannel array of size STRONG::maxComponents:: . If the bases buffer has fewer than maxComponents channels, the remaining outputs will be zeroed. ARGUMENT:: in The signal input to the factorisation process. ARGUMENT:: bases - The server index of the buffer containing the different bases that the input signal will be matched against. Bases must be STRONG::(fft size / 2) + 1:: frames. If the buffer has more than STRONG::maxRank:: channels, the excess will be ignored. + The server index of the buffer containing the different bases that the input signal will be matched against. Bases must be STRONG::(fft size / 2) + 1:: frames. If the buffer has more than STRONG::maxComponents:: channels, the excess will be ignored. -ARGUMENT::maxRank +ARGUMENT::maxComponents The maximum number of elements the NMF algorithm will try to divide the spectrogram of the source in. This dictates the number of output channels for the ugen. This cannot be modulated. -ARGUMENT:: numIter +ARGUMENT:: iterations The NMF process is iterative, trying to converge to the smallest error in its factorisation. The number of iterations will decide how many times it tries to adjust its estimates. Higher numbers here will be more CPU intensive, lower numbers will be more unpredictable in quality. -ARGUMENT:: winSize +ARGUMENT:: windowSize The number of samples that are analysed at a time. A lower number yields greater temporal resolution, at the expense of spectral resoultion, and vice-versa. ARGUMENT:: hopSize - The window hop size. As NMF relies on spectral frames, we need to move the window forward. It can be any size but low overlap will create audible artefacts. The -1 default value will default to half of winSize (overlap of 2). + The window hop size. As NMF relies on spectral frames, we need to move the window forward. It can be any size but low overlap will create audible artefacts. The -1 default value will default to half of windowSize (overlap of 2). ARGUMENT:: fftSize The FFT/IFFT size. It should be at least 4 samples long, at least the size of the window, and a power of 2. Making it larger allows an oversampling of the spectral precision. The -1 default value will default to windowSize. @@ -79,9 +79,9 @@ d.plot d.play //////(beware !!!! loud!!!) ( -// separate them in 2 ranks +// separate them in 2 components Routine { - FluidBufNMF.process(s, d, bases: e, rank:2); + FluidBufNMF.process(s, d, bases: e, components:2); s.sync; e.query; }.play @@ -111,19 +111,19 @@ e = Buffer.new(s); // train only 2 seconds ( Routine { - FluidBufNMF.process(s,b,0,88200,0,1, c, x, rank:10,fftSize:2048); + FluidBufNMF.process(s,b,0,88200,0,1, c, x, components:10,fftSize:2048); c.query; }.play; ) // wait for the query to print -// then find the rank that has more sustain pitch than pick (TODO: use descriptors with stats) +// then find the component that has more sustain pitch than pick (TODO: use descriptors with stats) ( ~element = 4; {PlayBuf.ar(10,c)[~element]}.play; ) -// copy all the other ranks on itself and the picking basis as the sole component of the 1st channel +// copy all the other components on itself and the picking basis as the sole component of the 1st channel ( Routine{ z = (0..9); @@ -186,7 +186,7 @@ e = { var source = PlayBuf.ar(1,b,loop:1); // after at least 1 second, trigger a first factorisation ( Routine { - FluidBufNMF.process(s, d, bases:c, winSize:2048, rank:3); + FluidBufNMF.process(s, d, bases:c, windowSize:2048, components:3); c.query; }.play; ) @@ -196,19 +196,19 @@ c.plot // then start the splitting effect ( f = {var source = In.ar(0,2); - ReplaceOut.ar(0, Splay.ar(FluidNMFFilter.ar(source.sum, c, 3, winSize:2048))); + ReplaceOut.ar(0, Splay.ar(FluidNMFFilter.ar(source.sum, c, 3, windowSize:2048))); }.play(addAction:\addToTail); ) // kill this boring splitter f.free; -// more fun: processing the 3 rank independently +// more fun: processing the 3 component independently ( f = {arg bases = c.bufnum; var source, x,y,z, rev, dist; source = In.ar(0,2); - #x,y,z = FluidNMFFilter.ar(source.sum, bases, 3, winSize:2048); + #x,y,z = FluidNMFFilter.ar(source.sum, bases, 3, windowSize:2048); rev = FreeVerb.ar(x); dist = (z * 10).atan * 0.1; ReplaceOut.ar(0, Splay.ar([rev,y,dist])); @@ -220,7 +220,7 @@ f.set(\bases, c.bufnum) // here you can retrigger the factorisation g = Buffer.alloc(s,1025,3); -FluidBufNMF.process(s, d, bases:g, winSize:2048, rank:3); +FluidBufNMF.process(s, d, bases:g, windowSize:2048, components:3); f.set(\bases, g.bufnum) //free diff --git a/release-packaging/HelpSource/Classes/FluidNMFMatch.schelp b/release-packaging/HelpSource/Classes/FluidNMFMatch.schelp index 7953d7b..d2c05c3 100644 --- a/release-packaging/HelpSource/Classes/FluidNMFMatch.schelp +++ b/release-packaging/HelpSource/Classes/FluidNMFMatch.schelp @@ -6,7 +6,7 @@ RELATED:: Guides/FluCoMa, Guides/FluidDecomposition, Classes/FluidBufNMF, Classe DESCRIPTION:: The FluidNMFMatch object matches an incoming audio signal against a set of spectral templates using an slimmed-down version of Nonnegative Matrix Factorisation (NMF) footnote:: Lee, Daniel D., and H. Sebastian Seung. 1999. ‘Learning the Parts of Objects by Non-Negative Matrix Factorization’. Nature 401 (6755): 788–91. https://doi.org/10.1038/44565. :: -It outputs at kr the degree of detected match for each template (the activation amount, in NMF-terms). The spectral templates are presumed to have been produced by the offline NMF process (link::Classes/FluidBufNMF::), and must be the correct size with respect to the FFT settings being used (FFT size / 2 + 1 frames long). The rank of the decomposition is determined by the number of channels in the supplied buffer of templates, up to a maximum set by the STRONG::maxRank:: parameter. +It outputs at kr the degree of detected match for each template (the activation amount, in NMF-terms). The spectral templates are presumed to have been produced by the offline NMF process (link::Classes/FluidBufNMF::), and must be the correct size with respect to the FFT settings being used (FFT size / 2 + 1 frames long). The rank of the decomposition (number of components) is determined by the number of channels in the supplied buffer of templates, up to a maximum set by the STRONG::maxComponents:: parameter. NMF has been a popular technique in signal processing research for things like source separation and transcription footnote:: Smaragdis and Brown, Non-Negative Matrix Factorization for Polyphonic Music Transcription.::, although its creative potential is so far relatively unexplored. It works iteratively, by trying to find a combination of amplitudes ('activations') that yield the original magnitude spectrogram of the audio input when added together. By and large, there is no unique answer to this question (i.e. there are different ways of accounting for an evolving spectrum in terms of some set of templates and envelopes). In its basic form, NMF is a form of unsupervised learning: it starts with some random data and then converges towards something that minimizes the distance between its generated data and the original:it tends to converge very quickly at first and then level out. Fewer iterations mean less processing, but also less predictable results. @@ -20,25 +20,25 @@ FluidBufNMF is part of the Fluid Decomposition Toolkit of the FluCoMa project. f CLASSMETHODS:: METHOD:: kr -The real-time processing method. It takes an audio or control input, and will yield a control stream in the form of a multichannel array of size STRONG::maxRank:: . If the bases buffer has fewer than maxRank channels, the remaining outputs will be zeroed. +The real-time processing method. It takes an audio or control input, and will yield a control stream in the form of a multichannel array of size STRONG::maxComponents:: . If the bases buffer has fewer than maxComponents channels, the remaining outputs will be zeroed. ARGUMENT:: in The signal input to the factorisation process. ARGUMENT:: bases - The server index of the buffer containing the different bases that the input signal will be matched against. Bases must be STRONG::(fft size / 2) + 1:: frames. If the buffer has more than STRONG::maxRank:: channels, the excess will be ignored. + The server index of the buffer containing the different bases that the input signal will be matched against. Bases must be STRONG::(fft size / 2) + 1:: frames. If the buffer has more than STRONG::maxComponents:: channels, the excess will be ignored. -ARGUMENT::maxRank +ARGUMENT::maxComponents The maximum number of elements the NMF algorithm will try to divide the spectrogram of the source in. This dictates the number of output channelsfor the ugen. This cannot be modulated. -ARGUMENT:: numIter +ARGUMENT:: iterations The NMF process is iterative, trying to converge to the smallest error in its factorisation. The number of iterations will decide how many times it tries to adjust its estimates. Higher numbers here will be more CPU intensive, lower numbers will be more unpredictable in quality. -ARGUMENT:: winSize +ARGUMENT:: windowSize The number of samples that are analysed at a time. A lower number yields greater temporal resolution, at the expense of spectral resoultion, and vice-versa. ARGUMENT:: hopSize - The window hop size. As NMF relies on spectral frames, we need to move the window forward. It can be any size but low overlap will create audible artefacts. The -1 default value will default to half of winSize (overlap of 2). + The window hop size. As NMF relies on spectral frames, we need to move the window forward. It can be any size but low overlap will create audible artefacts. The -1 default value will default to half of windowSize (overlap of 2). ARGUMENT:: fftSize The FFT/IFFT size. It should be at least 4 samples long, at least the size of the window, and a power of 2. Making it larger allows an oversampling of the spectral precision. The -1 default value will default to windowSize. @@ -79,9 +79,9 @@ d.plot d.play //////(beware !!!! loud!!!) ( -// separate them in 2 ranks +// separate them in 2 components Routine { - FluidBufNMF.process(s, d, bases: e, rank:2); + FluidBufNMF.process(s, d, bases: e, components:2); s.sync; e.query; }.play @@ -111,19 +111,19 @@ e = Buffer.new(s); // train only 2 seconds ( Routine { - FluidBufNMF.process(s,b,0,88200,0,1, c, x, rank:10,fftSize:2048); + FluidBufNMF.process(s,b,0,88200,0,1, c, x, components:10,fftSize:2048); c.query; }.play; ) // wait for the query to print -// then find the rank that has the picking sound by changing which channel to listen to +// then find the component that has the picking sound by changing which channel to listen to ( ~element = 6; {PlayBuf.ar(10,c)[~element]}.play; ) -// copy all the other ranks on itself and the picking basis as the sole component of the 1st channel +// copy all the other components on itself and the picking basis as the sole component of the 1st channel ( Routine{ z = (0..9); @@ -135,7 +135,7 @@ Routine{ e.plot; -//using this trained basis we can see the envelop (activations) of each rank +//using this trained basis we can see the envelop (activations) of each component {FluidNMFMatch.kr(PlayBuf.ar(1,b),e,2,fftSize:2048)}.plot(1); // the left/top activations are before, the pick before the sustain. @@ -187,13 +187,13 @@ e = Buffer.new(s); // train where all objects are present ( Routine { - FluidBufNMF.process(s,b,130000,150000,0,1, c, x, rank:10); + FluidBufNMF.process(s,b,130000,150000,0,1, c, x, components:10); c.query; }.play; ) // wait for the query to print -// then find a rank for each item you want to find. You could also sum them. Try to find a rank with a good object-to-rest ratio +// then find a component for each item you want to find. You could also sum them. Try to find a component with a good object-to-rest ratio ( ~dog =2; {PlayBuf.ar(10,c)[~dog]}.play @@ -205,7 +205,7 @@ Routine { ) -// copy at least one other rank to a third rank, a sort of left-over channel +// copy at least one other component to a third filter, a sort of left-over channel ( Routine{ FluidBufCompose.process(s, x, startChan:~dog, numChans: 1, destination: e); @@ -306,4 +306,3 @@ c.query CODE:: //to be completed :: - \ No newline at end of file diff --git a/release-packaging/HelpSource/Classes/FluidOnsetSlice.schelp b/release-packaging/HelpSource/Classes/FluidOnsetSlice.schelp index 29ae2ee..449c05f 100644 --- a/release-packaging/HelpSource/Classes/FluidOnsetSlice.schelp +++ b/release-packaging/HelpSource/Classes/FluidOnsetSlice.schelp @@ -35,7 +35,7 @@ ARGUMENT:: function ARGUMENT:: threshold The thresholding of a new slice. Value ranges are different for each function, from 0 upwards. -ARGUMENT:: debounce +ARGUMENT:: minSliceLength The minimum duration of a slice in number of hopSize. ARGUMENT:: filterSize @@ -44,11 +44,11 @@ ARGUMENT:: filterSize ARGUMENT:: frameDelta For certain functions (HFC, SpectralFlux, MKL, Cosine), the distance does not have to be computed between consecutive frames. By default (0) it is, otherwise this sets the distane between the comparison window in samples. -ARGUMENT:: winSize +ARGUMENT:: windowSize The window size. As sinusoidal estimation relies on spectral frames, we need to decide what precision we give it spectrally and temporally, in line with Gabor Uncertainty principles. http://www.subsurfwiki.org/wiki/Gabor_uncertainty ARGUMENT:: hopSize - The window hop size. As sinusoidal estimation relies on spectral frames, we need to move the window forward. It can be any size but low overlap will create audible artefacts. The -1 default value will default to half of winSize (overlap of 2). + The window hop size. As sinusoidal estimation relies on spectral frames, we need to move the window forward. It can be any size but low overlap will create audible artefacts. The -1 default value will default to half of windowSize (overlap of 2). ARGUMENT:: fftSize The inner FFT/IFFT size. It should be at least 4 samples long, at least the size of the window, and a power of 2. Making it larger allows an oversampling of the spectral precision. The -1 default value will default to windowSize. @@ -57,7 +57,7 @@ ARGUMENT:: maxFFTSize How large can the FFT be, by allocating memory at instantiation time. This cannot be modulated. RETURNS:: - An audio stream with impulses at detected transients. The latency between the input and the output is winSize at maximum. + An audio stream with impulses at detected transients. The latency between the input and the output is windowSize at maximum. EXAMPLES:: @@ -65,7 +65,7 @@ code:: //load some sounds b = Buffer.read(s,File.realpath(FluidOnsetSlice.class.filenameSymbol).dirname.withTrailingSlash ++ "../AudioFiles/Nicol-LoopE-M.wav"); -// basic param (the process add a latency of winSize samples +// basic param (the process add a latency of windowSize samples {var sig = PlayBuf.ar(1,b,loop:1); [FluidOnsetSlice.ar(sig) * 0.5, DelayN.ar(sig, 1, 1024/ s.sampleRate)]}.play // other parameters @@ -82,4 +82,4 @@ b = Buffer.read(s,File.realpath(FluidOnsetSlice.class.filenameSymbol).dirname.wi Pan2.ar(syncd,pan); }.play ) -:: \ No newline at end of file +:: diff --git a/release-packaging/HelpSource/Classes/FluidPitch.schelp b/release-packaging/HelpSource/Classes/FluidPitch.schelp index 9cb1f90..af6a0f1 100644 --- a/release-packaging/HelpSource/Classes/FluidPitch.schelp +++ b/release-packaging/HelpSource/Classes/FluidPitch.schelp @@ -24,11 +24,11 @@ ARGUMENT:: algorithm ## 2 || YinFFT: Implements the frequency domain version of the YIN algorithm, as described in FOOTNOTE::P. M. Brossier, "Automatic Annotation of Musical Audio for Interactive Applications.” QMUL, London, UK, 2007. :: See also https://essentia.upf.edu/documentation/reference/streaming_PitchYinFFT.html :: -ARGUMENT:: winSize +ARGUMENT:: windowSize The window size. As sinusoidal estimation relies on spectral frames, we need to decide what precision we give it spectrally and temporally, in line with Gabor Uncertainty principles. http://www.subsurfwiki.org/wiki/Gabor_uncertainty ARGUMENT:: hopSize - The window hop size. As sinusoidal estimation relies on spectral frames, we need to move the window forward. It can be any size but low overlap will create audible artefacts. The -1 default value will default to half of winSize (overlap of 2). + The window hop size. As sinusoidal estimation relies on spectral frames, we need to move the window forward. It can be any size but low overlap will create audible artefacts. The -1 default value will default to half of windowSize (overlap of 2). ARGUMENT:: fftSize The inner FFT/IFFT size. It should be at least 4 samples long, at least the size of the window, and a power of 2. Making it larger allows an oversampling of the spectral precision. The -1 default value will default to windowSize. @@ -37,7 +37,7 @@ ARGUMENT:: maxFFTSize How large can the FFT be, by allocating memory at instantiation time. This cannot be modulated. RETURNS:: - A 2-channel KR signal with the [pitch, confidence] descriptors. The latency is winSize. + A 2-channel KR signal with the [pitch, confidence] descriptors. The latency is windowSize. EXAMPLES:: @@ -103,7 +103,7 @@ x.set(\type, 3) // adding noise shows the comparative sturdiness of the spectral pitch tracker x.set(\noise, 0.05) -//if latency is no issue, getting a higher winSize will stabilise the algorithm even more +//if latency is no issue, getting a higher windowSize will stabilise the algorithm even more :: STRONG::a more musical example:: diff --git a/release-packaging/HelpSource/Classes/FluidSTFTPass.schelp b/release-packaging/HelpSource/Classes/FluidSTFTPass.schelp index 2a29a35..2f73b18 100644 --- a/release-packaging/HelpSource/Classes/FluidSTFTPass.schelp +++ b/release-packaging/HelpSource/Classes/FluidSTFTPass.schelp @@ -16,11 +16,11 @@ METHOD:: ar ARGUMENT:: in The input to be passed-through -ARGUMENT:: winSize +ARGUMENT:: windowSize The size of the buffered window to be analysed, in samples. It will add that much latency to the signal. ARGUMENT:: hopSize - How much the buffered window moves forward, in samples. The -1 default value will default to half of winSize (overlap of 2). + How much the buffered window moves forward, in samples. The -1 default value will default to half of windowSize (overlap of 2). ARGUMENT:: fftSize How large will the FFT be, zero-padding the buffer to the right size, which should be bigger than the windowSize argument, bigger than 4 samples, and should be a power of 2. This is a way to oversample the FFT for extra precision. The -1 default value will default to windowSize. @@ -30,7 +30,7 @@ ARGUMENT:: maxFFTSize RETURNS:: - Same as input, delayed by the winSize. + Same as input, delayed by the windowSize. EXAMPLES:: diff --git a/release-packaging/HelpSource/Classes/FluidSines.schelp b/release-packaging/HelpSource/Classes/FluidSines.schelp index 83010a7..fd6152f 100644 --- a/release-packaging/HelpSource/Classes/FluidSines.schelp +++ b/release-packaging/HelpSource/Classes/FluidSines.schelp @@ -36,11 +36,11 @@ ARGUMENT:: magWeight ARGUMENT:: freqWeight The weight of the frequency proximity of a peak when trying to associate it to an existing track (relative to magWeight - suggested between 0 to 1) -ARGUMENT:: winSize +ARGUMENT:: windowSize The window size. As sinusoidal estimation relies on spectral frames, we need to decide what precision we give it spectrally and temporally, in line with Gabor Uncertainty principles. http://www.subsurfwiki.org/wiki/Gabor_uncertainty ARGUMENT:: hopSize - The window hop size. As sinusoidal estimation relies on spectral frames, we need to move the window forward. It can be any size but low overlap will create audible artefacts. The -1 default value will default to half of winSize (overlap of 2). + The window hop size. As sinusoidal estimation relies on spectral frames, we need to move the window forward. It can be any size but low overlap will create audible artefacts. The -1 default value will default to half of windowSize (overlap of 2). ARGUMENT:: fftSize The inner FFT/IFFT size. It should be at least 4 samples long, at least the size of the window, and a power of 2. Making it larger allows an oversampling of the spectral precision. The -1 default value will default to windowSize. @@ -49,7 +49,7 @@ ARGUMENT:: maxFFTSize How large can the FFT be, by allocating memory at instantiation time. This cannot be modulated. RETURNS:: - An array of two audio streams: [0] is the harmonic part extracted, [1] is the rest. The latency between the input and the output is (( hopSize * minTrackLen) + winSize) samples. + An array of two audio streams: [0] is the harmonic part extracted, [1] is the rest. The latency between the input and the output is (( hopSize * minTrackLen) + windowSize) samples. EXAMPLES:: @@ -59,11 +59,11 @@ CODE:: b = Buffer.read(s,File.realpath(FluidSines.class.filenameSymbol).dirname.withTrailingSlash ++ "../AudioFiles/Tremblay-AaS-SynthTwoVoices-M.wav"); // run with large parameters - left is sinusoidal model, right is residual -{FluidSines.ar(PlayBuf.ar(1,b,loop:1),threshold: 0.2, minTrackLen: 2, winSize: 2048, fftSize: 8192)}.play +{FluidSines.ar(PlayBuf.ar(1,b,loop:1),threshold: 0.2, minTrackLen: 2, windowSize: 2048, fftSize: 8192)}.play // interactive parameters with a narrower bandwidth -{FluidSines.ar(PlayBuf.ar(1,b,loop:1),30,MouseX.kr(), 5, winSize: 1000, hopSize: 200, fftSize: 4096)}.play +{FluidSines.ar(PlayBuf.ar(1,b,loop:1),30,MouseX.kr(), 5, windowSize: 1000, hopSize: 200, fftSize: 4096)}.play -// null test (the process add a latency of (( hopSize * minTrackLen) + winSize) samples +// null test (the process add a latency of (( hopSize * minTrackLen) + windowSize) samples {var sig = PlayBuf.ar(1,b,loop:1); [FluidSines.ar(sig).sum - DelayN.ar(sig, 1, ((( 512 * 15) + 1024)/ s.sampleRate))]}.play :: diff --git a/release-packaging/HelpSource/Classes/FluidSpectralShape.schelp b/release-packaging/HelpSource/Classes/FluidSpectralShape.schelp index 6985267..6376579 100644 --- a/release-packaging/HelpSource/Classes/FluidSpectralShape.schelp +++ b/release-packaging/HelpSource/Classes/FluidSpectralShape.schelp @@ -32,11 +32,11 @@ METHOD:: kr ARGUMENT:: in The audio to be processed. -ARGUMENT:: winSize +ARGUMENT:: windowSize The window size. As spectral shape estimation relies on spectral frames, we need to decide what precision we give it spectrally and temporally, in line with Gabor Uncertainty principles. http://www.subsurfwiki.org/wiki/Gabor_uncertainty ARGUMENT:: hopSize - The window hop size. As spectral shape estimation relies on spectral frames, we need to move the window forward. It can be any size but low overlap will create audible artefacts. The -1 default value will default to half of winSize (overlap of 2). + The window hop size. As spectral shape estimation relies on spectral frames, we need to move the window forward. It can be any size but low overlap will create audible artefacts. The -1 default value will default to half of windowSize (overlap of 2). ARGUMENT:: fftSize The inner FFT/IFFT size. It should be at least 4 samples long, at least the size of the window, and a power of 2. Making it larger allows an oversampling of the spectral precision. The -1 default value will default to windowSize. @@ -45,7 +45,7 @@ ARGUMENT:: maxFFTSize How large can the FFT be, by allocating memory at instantiation time. This cannot be modulated. RETURNS:: - A 7-channel KR signal with the seven spectral shape descriptors. The latency is winSize. + A 7-channel KR signal with the seven spectral shape descriptors. The latency is windowSize. EXAMPLES:: diff --git a/release-packaging/HelpSource/Classes/FluidTransientSlice.schelp b/release-packaging/HelpSource/Classes/FluidTransientSlice.schelp index 8f58206..1df863d 100644 --- a/release-packaging/HelpSource/Classes/FluidTransientSlice.schelp +++ b/release-packaging/HelpSource/Classes/FluidTransientSlice.schelp @@ -34,13 +34,13 @@ ARGUMENT:: threshFwd ARGUMENT:: threshBack The threshold of the offset of the smoothed error function. As it proceeds backwards in time, it allows tight ending of the identification of the anomaly. -ARGUMENT:: winSize +ARGUMENT:: windowSize The averaging window of the error detection function. It needs smoothing as it is very jittery. The longer the window, the less precise, but the less false positives. -ARGUMENT:: debounce +ARGUMENT:: clumpLength The window size in sample within with positive detections will be clumped together to avoid overdetecting in time. -ARGUMENT:: minSlice +ARGUMENT:: minSliceLength The minimum duration of a slice in samples. RETURNS:: @@ -57,14 +57,14 @@ b = Buffer.read(s,File.realpath(FluidTransientSlice.class.filenameSymbol).dirnam {var sig = PlayBuf.ar(1,b,loop:1); [FluidTransientSlice.ar(sig) * 0.5, DelayN.ar(sig, 1, ((256 + 128 - 20)/ s.sampleRate))]}.play // other parameters -{var sig = PlayBuf.ar(1,b,loop:1); [FluidTransientSlice.ar(sig,order:80,minSlice:2205) * 0.5, DelayN.ar(sig, 1, ((256 + 128 - 80)/ s.sampleRate))]}.play +{var sig = PlayBuf.ar(1,b,loop:1); [FluidTransientSlice.ar(sig,order:80,minSliceLength:2205) * 0.5, DelayN.ar(sig, 1, ((256 + 128 - 80)/ s.sampleRate))]}.play // more musical trans-trigged autopan ( { var sig, trig, syncd, pan; sig = PlayBuf.ar(1,b,loop:1); - trig = FluidTransientSlice.ar(sig,order:10,minSlice:4410); + trig = FluidTransientSlice.ar(sig,order:10,minSliceLength:4410); syncd = DelayN.ar(sig, 1, ((256 + 128 - 20)/ s.sampleRate)); pan = TRand.ar(-1,1,trig); Pan2.ar(syncd,pan); diff --git a/release-packaging/HelpSource/Classes/FluidTransients.schelp b/release-packaging/HelpSource/Classes/FluidTransients.schelp index 7173d3e..8724858 100644 --- a/release-packaging/HelpSource/Classes/FluidTransients.schelp +++ b/release-packaging/HelpSource/Classes/FluidTransients.schelp @@ -39,10 +39,10 @@ ARGUMENT:: threshFwd ARGUMENT:: threshBack The threshold of the offset of the smoothed error function. As it proceeds backwards in time, it allows tight ending of the identification of the anomaly. -ARGUMENT:: winSize +ARGUMENT:: windowSize The averaging window of the error detection function. It needs smoothing as it is very jittery. The longer the window, the less precise, but the less false positive. -ARGUMENT:: debounce +ARGUMENT:: clumpLength The window size in sample within which positive detections will be clumped together to avoid overdetecting in time. RETURNS:: diff --git a/release-packaging/ignore/Examples/buffer_compositing/fileiterator-2passes.sc b/release-packaging/ignore/Examples/buffer_compositing/fileiterator-2passes.sc index dfb6b1f..79c2ecb 100644 --- a/release-packaging/ignore/Examples/buffer_compositing/fileiterator-2passes.sc +++ b/release-packaging/ignore/Examples/buffer_compositing/fileiterator-2passes.sc @@ -1,7 +1,7 @@ //this patch requests a folder and will iterate through all accepted audiofiles and concatenate them in the destination buffer. It will also yield an array with the numFrame where files start in the new buffer. ( -var tempbuf,dest=0, fileNames; +var fileNames; c = [0]; FileDialog.new({|selection| @@ -21,13 +21,16 @@ FileDialog.new({|selection| maxchans = maxchans.max(file.numChannels); }); }); + c.postln; + totaldur.postln; + maxchans.postln; Routine{ b = Buffer.alloc(s,totaldur,maxchans); s.sync; fileNames.do{|f, i| f.postln; ("Loading"+(i+1)+"of"+total).postln; - tempbuf = Buffer.read(s, f.asAbsolutePath,action:{FluidBufCompose.process(s,tempbuf,destStartFrame:c[i],destination:b);}); + Buffer.read(s, f.asAbsolutePath,action:{arg tempbuf; FluidBufCompose.process(s,tempbuf,destination:b,destStartFrame:c[i],action:{tempbuf.free});}); s.sync; }; ("loading buffers done in" + (Main.elapsedTime - t).round(0.1) + "seconds.").postln; diff --git a/release-packaging/ignore/Examples/nmf/JiT-NMF.scd b/release-packaging/ignore/Examples/nmf/JiT-NMF.scd index bc81aa4..7ec4394 100644 --- a/release-packaging/ignore/Examples/nmf/JiT-NMF.scd +++ b/release-packaging/ignore/Examples/nmf/JiT-NMF.scd @@ -47,9 +47,9 @@ y = Synth(\becauseIcan,[\bufnum, b.bufnum, \nmfa, c.bufnum, \nmfb, d.bufnum, \in ( w = OSCFunc({ arg msg; if(msg[3]== 1, { - FluidBufNMF.process(s, b, numFrames: 22500, destination: c.bufnum, rank: 3, fftSize: 1024, winSize: 512, hopSize: 256); + FluidBufNMF.process(s, b, numFrames: 22500, destination: c.bufnum, iterations: 3, fftSize: 1024, windowSize: 512, hopSize: 256); }, { - FluidBufNMF.process(s, b, 22050, 22500, destination: d.bufnum, rank: 3, fftSize: 1024, winSize: 512, hopSize: 256); + FluidBufNMF.process(s, b, 22050, 22500, destination: d.bufnum, iterations: 3, fftSize: 1024, windowSize: 512, hopSize: 256); });}, '/processplease', s.addr); )