Skip to main content

dissonance

dissonance(
@mode 0
) -> llll

Generates an audio descriptor to compute the sensory dissonance of a buffer.

The resulting buffer will be updated with the following keys:

  • dissonance
info

dissonance 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

  • @mode [int]: Analysis mode. (default: 0).
    • 0: Global
    • 1: Time series
    • 2: Time-tagged time series
    • 3: Buffer

Output

Dissonance descriptor [llll]


Usage

dissonance is meant to be used with the analyze function:

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