typos found in the interface change.

nix
Pierre Alexandre Tremblay 7 years ago
parent 4d372c3dc0
commit cfc6c868bd

@ -1,5 +1,5 @@
FluidBufMFCC{ FluidBufMFCC{
*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; *process { arg server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, numCoeffs = 13, numBands = 40, minFreq = 20, maxFreq = 20000, windowSize = 1024, hopSize = -1, fftSize = -1, action;
var maxFFTSize = if (fftSize == -1) {windowSize.nextPowerOfTwo} {fftSize}; var maxFFTSize = if (fftSize == -1) {windowSize.nextPowerOfTwo} {fftSize};
@ -13,10 +13,10 @@ FluidBufMFCC{
//NB For wrapped versions of NRT classes, we set the params for maxima to //NB For wrapped versions of NRT classes, we set the params for maxima to
//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) //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)
// same goes to maxNumCoefs, which is passed numCoefs in this case // same goes to maxNumCoeffs, which is passed numCoeffs in this case
forkIfNeeded{ forkIfNeeded{
server.sendMsg(\cmd, \BufMFCC, source, startFrame, numFrames, startChan, numChans, features, numCoefs, numBands, minFreq, maxFreq, numCoefs, windowSize, hopSize, fftSize, maxFFTSize); server.sendMsg(\cmd, \BufMFCC, source, startFrame, numFrames, startChan, numChans, features, numCoeffs, numBands, minFreq, maxFreq, numCoeffs, windowSize, hopSize, fftSize, maxFFTSize);
server.sync; server.sync;
features = server.cachedBufferAt(features); features.updateInfo; server.sync; features = server.cachedBufferAt(features); features.updateInfo; server.sync;
action.value(features); action.value(features);

@ -1,7 +1,7 @@
FluidMFCC : MultiOutUGen { FluidMFCC : MultiOutUGen {
*kr { arg in = 0, numCoefs = 13, numBands = 40, minFreq = 20, maxFreq = 20000, maxNumCoefs = 40, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = 16384; *kr { arg in = 0, numCoeffs = 13, numBands = 40, minFreq = 20, maxFreq = 20000, maxNumCoeffs = 40, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = 16384;
^this.multiNew('control', in.asAudioRateInput(this), numCoefs, numBands, minFreq, maxFreq, maxNumCoefs, windowSize, hopSize, fftSize, maxFFTSize); ^this.multiNew('control', in.asAudioRateInput(this), numCoeffs, numBands, minFreq, maxFreq, maxNumCoeffs, windowSize, hopSize, fftSize, maxFFTSize);
} }
init {arg ...theInputs; init {arg ...theInputs;
@ -11,7 +11,7 @@ FluidMFCC : MultiOutUGen {
checkInputs { checkInputs {
if(inputs.at(5).rate != 'scalar') { if(inputs.at(5).rate != 'scalar') {
^(": maxNumCoefs cannot be modulated."); ^(": maxNumCoeffs cannot be modulated.");
}; };
if(inputs.at(9).rate != 'scalar') { if(inputs.at(9).rate != 'scalar') {
^(": maxFFTSize cannot be modulated."); ^(": maxFFTSize cannot be modulated.");

@ -4,9 +4,9 @@ CATEGORIES:: Libraries>FluidDecomposition
RELATED:: Guides/FluCoMa, Guides/FluidDecomposition, Classes/FluidBufMelBands RELATED:: Guides/FluCoMa, Guides/FluidDecomposition, Classes/FluidBufMelBands
DESCRIPTION:: DESCRIPTION::
This class implements a classic spectral descriptor, the Mel-Frequency Cepstral Coefficients (https://en.wikipedia.org/wiki/Mel-frequency_cepstrum). The input is first filtered in to STRONG::numBands:: perceptually-spaced bands, as in LINK::Classes/FluidMelBands::. It is then analysed into STRONG::numCoefs:: number of cepstral coefficients. It has the avantage of being amplitude invarient, except for the first coefficient. It is part of the Fluid Decomposition Toolkit of the FluCoMa project.FOOTNOTE:: This was made possible thanks to the FluCoMa project ( http://www.flucoma.org/ ) funded by the European Research Council ( https://erc.europa.eu/ ) under the European Unions Horizon 2020 research and innovation programme (grant agreement No 725899).:: This class implements a classic spectral descriptor, the Mel-Frequency Cepstral Coefficients (https://en.wikipedia.org/wiki/Mel-frequency_cepstrum). The input is first filtered in to STRONG::numBands:: perceptually-spaced bands, as in LINK::Classes/FluidMelBands::. It is then analysed into STRONG::numCoeffs:: number of cepstral coefficients. It has the avantage of being amplitude invarient, except for the first coefficient. It is part of the Fluid Decomposition Toolkit of the FluCoMa project.FOOTNOTE:: This was made possible thanks to the FluCoMa project ( http://www.flucoma.org/ ) funded by the European Research Council ( https://erc.europa.eu/ ) under the European Unions Horizon 2020 research and innovation programme (grant agreement No 725899).::
The process will return a single multichannel buffer of STRONG::numCoefs:: per input channel. Each frame represents a value, which is every hopSize. The process will return a single multichannel buffer of STRONG::numCoeffs:: per input channel. Each frame represents a value, which is every hopSize.
CLASSMETHODS:: CLASSMETHODS::
@ -32,9 +32,9 @@ ARGUMENT:: numChans
For multichannel srcBuf, how many channel should be processed. For multichannel srcBuf, how many channel should be processed.
ARGUMENT:: features ARGUMENT:: features
The destination buffer for the numCoefs coefficients describing the spectral shape. The destination buffer for the numCoeffs coefficients describing the spectral shape.
ARGUMENT:: numCoefs ARGUMENT:: numCoeffs
The number of cepstral coefficients to be outputed. It will decide how many channels are produce per channel of the source. The number of cepstral coefficients to be outputed. It will decide how many channels are produce per channel of the source.
ARGUMENT:: numBands ARGUMENT:: numBands
@ -104,7 +104,7 @@ c = Buffer.new(s);
( (
Routine{ Routine{
t = Main.elapsedTime; t = Main.elapsedTime;
FluidBufMFCC.process(s, b, numCoefs:5, features: c); FluidBufMFCC.process(s, b, numCoeffs:5, features: c);
(Main.elapsedTime - t).postln; (Main.elapsedTime - t).postln;
}.play }.play
) )

@ -4,9 +4,9 @@ CATEGORIES:: Libraries>FluidDecomposition
RELATED:: Guides/FluCoMa, Guides/FluidDecomposition, Classes/FluidMelBands RELATED:: Guides/FluCoMa, Guides/FluidDecomposition, Classes/FluidMelBands
DESCRIPTION:: DESCRIPTION::
This class implements a classic spectral descriptor, the Mel-Frequency Cepstral Coefficients (https://en.wikipedia.org/wiki/Mel-frequency_cepstrum). The input is first filtered in to STRONG::numBands:: perceptually-spaced bands, as in LINK::Classes/FluidMelBands::. It is then analysed into STRONG::numCoefs:: number of cepstral coefficients. It has the avantage of being amplitude invarient, except for the first coefficient. It is part of the Fluid Decomposition Toolkit of the FluCoMa project.FOOTNOTE:: This was made possible thanks to the FluCoMa project ( http://www.flucoma.org/ ) funded by the European Research Council ( https://erc.europa.eu/ ) under the European Unions Horizon 2020 research and innovation programme (grant agreement No 725899).:: This class implements a classic spectral descriptor, the Mel-Frequency Cepstral Coefficients (https://en.wikipedia.org/wiki/Mel-frequency_cepstrum). The input is first filtered in to STRONG::numBands:: perceptually-spaced bands, as in LINK::Classes/FluidMelBands::. It is then analysed into STRONG::numCoeffs:: number of cepstral coefficients. It has the avantage of being amplitude invarient, except for the first coefficient. It is part of the Fluid Decomposition Toolkit of the FluCoMa project.FOOTNOTE:: This was made possible thanks to the FluCoMa project ( http://www.flucoma.org/ ) funded by the European Research Council ( https://erc.europa.eu/ ) under the European Unions Horizon 2020 research and innovation programme (grant agreement No 725899).::
The process will return a multichannel control steam of STRONG::maxNumCoefs::, which will be repeated if no change happens within the algorythm, i.e. when the hopSize is larger than the server's kr period. The process will return a multichannel control steam of STRONG::maxNumCoeffs::, which will be repeated if no change happens within the algorythm, i.e. when the hopSize is larger than the server's kr period.
CLASSMETHODS:: CLASSMETHODS::
@ -16,8 +16,8 @@ METHOD:: kr
ARGUMENT:: in ARGUMENT:: in
The audio to be processed. The audio to be processed.
ARGUMENT:: numCoefs ARGUMENT:: numCoeffs
The number of cepstral coefficients to be outputed. It is limited by the maxNumCoefs parameter. When the number is smaller than the maximum, the output is zero-padded. The number of cepstral coefficients to be outputed. It is limited by the maxNumCoeffs parameter. When the number is smaller than the maximum, the output is zero-padded.
ARGUMENT:: numBands ARGUMENT:: numBands
The number of bands that will be perceptually equally distributed between minFreq and maxFreq to describe the spectral shape before it is converted to cepstral coefficients. The number of bands that will be perceptually equally distributed between minFreq and maxFreq to describe the spectral shape before it is converted to cepstral coefficients.
@ -28,7 +28,7 @@ ARGUMENT:: minFreq
ARGUMENT:: maxFreq ARGUMENT:: maxFreq
The highest boundary of the highest band of the model, in Hz. The highest boundary of the highest band of the model, in Hz.
ARGUMENT:: maxNumCoefs ARGUMENT:: maxNumCoeffs
The maximum number of cepstral coefficients that can be computed. This sets the number of channels of the output, and therefore cannot be modulated. 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:: windowSize ARGUMENT:: windowSize
@ -44,7 +44,7 @@ ARGUMENT:: maxFFTSize
How large can the FFT be, by allocating memory at instantiation time. This cannot be modulated. How large can the FFT be, by allocating memory at instantiation time. This cannot be modulated.
RETURNS:: RETURNS::
A KR signal of STRONG::maxNumCoefs:: channels. The latency is windowSize. A KR signal of STRONG::maxNumCoeffs:: channels. The latency is windowSize.
EXAMPLES:: EXAMPLES::
@ -80,7 +80,7 @@ r = Routine {
( (
x = {arg type = 0; x = {arg type = 0;
var source = Select.ar(type,[SinOsc.ar(220),Saw.ar(220),Pulse.ar(220)]) * LFTri.kr(0.1).exprange(0.01,0.1); var source = Select.ar(type,[SinOsc.ar(220),Saw.ar(220),Pulse.ar(220)]) * LFTri.kr(0.1).exprange(0.01,0.1);
Out.kr(b,FluidMFCC.kr(source,maxNumCoefs:13)); Out.kr(b,FluidMFCC.kr(source,maxNumCoeffs:13));
source.dup; source.dup;
}.play; }.play;
) )

Loading…
Cancel
Save