A classic timbral spectral descriptor, the Mel-Frequency Cepstral Coefficients (MFCCs).
MFCC stands for Mel-Frequency Cepstral Coefficients ("cepstral" is pronounced like "kepstral"). This analysis is often used for timbral description and timbral comparison. It compresses the overall spectrum into a smaller number of coefficients that, when taken together, describe the general contour of the spectrum.
The MFCC values are derived by first computing a mel-frequency spectrum, just as in FluidMelBands. numCoeffs
coefficients are then calculated by using that mel-frequency spectrum as input to the discrete cosine transform. This means that the shape of the mel-frequency spectrum is compared to a number of cosine wave shapes (different cosine shapes created from different frequencies). Each MFCC value (i.e., "coefficient") represents how similar the mel-frequency spectrum is to one of these cosine shapes.
Other than the 0th coefficient, MFCCs are unchanged by differences in the overall energy of the spectrum (which relates to how we perceive loudness). This means that timbres with similar spectral contours, but different volumes, will still have similar MFCC values, other than MFCC 0. To remove any indication of loudness but keep the information about timbre, we can ignore MFCC 0 by setting the parameter startCoeff
to 1.
For an interactive explanation of this relationship, visit https://learn.flucoma.org/reference/mfcc/explain.
Read more about FluidBufMFCC on the learn platform.
Processs the source Buffer on the Server. processBlocking
will execute directly in the server command FIFO, whereas process
will delegate to a separate worker thread. The latter is generally only worthwhile for longer-running jobs where you don't wish to tie up the server.
server |
The Server on which the buffers to be processed are allocated. | ||||||
source |
The buffer to use as the source material to be analysed. The different channels of multichannel buffers will be processed sequentially. | ||||||
startFrame |
Where in the Constraints
| ||||||
numFrames |
How many frames should be analysed. The default of -1 indicates to analyse to the end of the buffer. | ||||||
startChan |
For a multichannel Constraints
| ||||||
numChans |
For a multichannel | ||||||
features |
The destination buffer to write the MFCC analysis into. | ||||||
numCoeffs |
The number of cepstral coefficients to return. The default is 13. Constraints
| ||||||
numBands |
The number of bands that will be perceptually equally distributed between Constraints
| ||||||
startCoeff |
The lowest index of the output cepstral coefficients to return, zero-counting. This can be useful to skip over the 0th coefficient (by indicating Constraints
| ||||||
minFreq |
The lower bound of the frequency band to use in analysis, in Hz. The default is 20. Constraints
| ||||||
maxFreq |
The upper bound of the frequency band to use in analysis, in Hz. The default is 20000. Constraints
| ||||||
windowSize |
The window size. As MFCC computation relies on spectral frames, we need to decide what precision we give it spectrally and temporally. For more information visit https://learn.flucoma.org/learn/fourier-transform/. The default is 1024. | ||||||
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 windowSize (overlap of 2). | ||||||
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 use the next power of 2 equal or above the windowSize. | ||||||
padding |
Controls the zero-padding added to either end of the source buffer or segment. Padding ensures all values are analysed. Possible values are:
| ||||||
freeWhenDone |
Free the server instance when processing complete. Default | ||||||
action |
A function to be evaluated once the offline process has finished and all Buffer's instance variables have been updated on the client side. The function will be passed |
An instance of the processor
Trigger the equivalent behaviour to processBlocking / process
from a Synth. Can be useful for expressing a sequence of buffer and data processing jobs to execute. Note that the work still executes on the server command FIFO (not the audio thread), and it is the caller's responsibility to manage the sequencing, using the done
status of the various UGens.
source |
The buffer to use as the source material to be analysed. The different channels of multichannel buffers will be processed sequentially. | ||||||
startFrame |
Where in the Constraints
| ||||||
numFrames |
How many frames should be analysed. The default of -1 indicates to analyse to the end of the buffer. | ||||||
startChan |
For a multichannel Constraints
| ||||||
numChans |
For a multichannel | ||||||
features |
The destination buffer to write the MFCC analysis into. | ||||||
numCoeffs |
The number of cepstral coefficients to return. The default is 13. Constraints
| ||||||
numBands |
The number of bands that will be perceptually equally distributed between Constraints
| ||||||
startCoeff |
The lowest index of the output cepstral coefficients to return, zero-counting. This can be useful to skip over the 0th coefficient (by indicating Constraints
| ||||||
minFreq |
The lower bound of the frequency band to use in analysis, in Hz. The default is 20. Constraints
| ||||||
maxFreq |
The upper bound of the frequency band to use in analysis, in Hz. The default is 20000. Constraints
| ||||||
windowSize |
The window size. As MFCC computation relies on spectral frames, we need to decide what precision we give it spectrally and temporally. For more information visit https://learn.flucoma.org/learn/fourier-transform/. The default is 1024. | ||||||
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 windowSize (overlap of 2). | ||||||
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 use the next power of 2 equal or above the windowSize. | ||||||
padding |
Controls the zero-padding added to either end of the source buffer or segment. Padding ensures all values are analysed. Possible values are:
| ||||||
trig |
A | ||||||
blocking |
Whether to execute this process directly on the server command FIFO or delegate to a worker thread. See |
Cancels non-blocking processing
When called in the context of a Routine (it won't work otherwise), will block execution until the processor has finished. This can be convinient for writing sequences of processes more linearly than using lots of nested actions.
Load a lot of MFCC analyses to a data set for later data processing