From cce4f53238a7119ec7c6f7b9b85d9627e8b0c969 Mon Sep 17 00:00:00 2001 From: Pierre Alexandre Tremblay Date: Tue, 21 Sep 2021 10:44:56 +0100 Subject: [PATCH] FluidMFCC - corrects the input checking --- release-packaging/Classes/FluidMFCC.sc | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/release-packaging/Classes/FluidMFCC.sc b/release-packaging/Classes/FluidMFCC.sc index 6b73369..6cd3d8a 100644 --- a/release-packaging/Classes/FluidMFCC.sc +++ b/release-packaging/Classes/FluidMFCC.sc @@ -1,24 +1,23 @@ FluidMFCC : FluidRTMultiOutUGen { *kr { arg in = 0, numCoeffs = 13, numBands = 40, startCoeff = 0, minFreq = 20, maxFreq = 20000, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = 16384, maxNumCoeffs = 40; - ^this.multiNew('control', in.asAudioRateInput(this), numCoeffs, numBands, startCoeff, minFreq, maxFreq, maxNumCoeffs, windowSize, hopSize, fftSize, maxFFTSize); + ^this.multiNew('control', in.asAudioRateInput(this), numCoeffs, numBands, startCoeff, minFreq, maxFreq, maxNumCoeffs, windowSize, hopSize, fftSize, maxFFTSize); } init {arg ...theInputs; inputs = theInputs; - // inputs.at(5).rate.postln; - ^this.initOutputs(inputs.at(5),rate);//this instantiate the number of output from the maxNumCoeffs in the multiNew order + ^this.initOutputs(inputs.at(6),rate);//this instantiate the number of output from the maxNumCoeffs in the multiNew order } checkInputs { - // inputs.at(9).rate.postln; // the checks of rates here are in the order of the kr method definition - if(inputs.at(9).rate != 'scalar') { + if(inputs.at(6).rate != 'scalar') { ^(": maxNumCoeffs cannot be modulated."); }; - if(inputs.at(8).rate != 'scalar') { + if(inputs.at(10).rate != 'scalar') { ^(": maxFFTSize cannot be modulated."); - };^this.checkValidInputs; + }; + ^this.checkValidInputs; } }