Skip to main content

bfcc

bfcc(
@dcttype 2
@highfrequencybound 11000
@inputsize 1025
@liftering 0
@logtype 'dbamp'
@lowfrequencybound 0
@normalize 'unit_sum'
@numberbands 40
@numbercoefficients 13
@samplerate 44100
@type 'power'
@weighting 'warping'
@mode 0
) -> llll

Generates an audio descriptor to compute the bark-frequency cepstrum coefficients of a spectrum. Bark bands and their subsequent usage in cepstral analysis have shown to be useful in percussive content.

The resulting buffer will be updated with the following keys:

  • bfcc_bands
  • bfcc
info

bfcc is a mirror implementation of the same algorithm in the Essentia library. For more details on the algorithm, please check the Essentia Algorithms reference.


Arguments

  • @dcttype [int]: DCT type. (default: 2).
  • @highfrequencybound [int/float]: Upper bound of the frequency range. (default: 11000).
  • @inputsize [int]: Size of input spectrum. (default: 1025).
  • @liftering [int]: Liftering coefficient. Use 0 to bypass it. (default: 0).
  • @logtype [int]: Logarithmic compression type. (default: 'dbamp').
    • 'dbpow': Use if working with power.
    • 'dbamp': Use if working with magnitudes.
  • @lowfrequencybound [int]: Lower bound of the frequency range. (default: 0).
  • @normalize [int]: Normalization mode (default: 'unit_sum').
    • 'unit_max': Makes the vertex of all the triangles equal to 1.
    • 'unit_sum': Makes the area of all the triangles equal to 1.
  • @numberbands [int]: Number of bark bands in the filter. (default: 40).
  • @numbercoefficients [int]: Number of output cepstrum coefficients. (default: 13).
  • @samplerate [int]: Sampling rate of the audio signal. (default: 44100).
  • @type [int]: Magnitude or power spectrum. (default: 'power').
    • 'power'
    • 'magnitude'
  • @weighting [int]: Type of weighting function for determining triangle area. (default: 'warping').
    • 'warping'
    • 'linear'
  • @mode [int]: Analysis mode. (default: 0).
    • 0: Global
    • 1: Time series
    • 2: Time-tagged time series
    • 3: Buffer

Output

Bfcc descriptor [llll]


Usage

bfcc is meant to be used with the analyze function:

$buffer = importaudio('singing.wav'); ## input buffer
$descr = bfcc(); ## generate bfcc audio descriptor
$buffer.view('before analysis');
$buffer = $buffer.analyze($descr); ## apply analysis
$buffer.view('after analysis')