flux
flux(
@halfrectify 0
@norm 'L2'
@mode 0
) -> llll
Generates an audio descriptor to compute the spectral flux of a buffer.
The resulting buffer will be updated with the following keys:
flux
info
flux
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
@halfrectify
[int]: Half-rectify the differences in each spectrum bin. (default:0
).0
: Off1
: On
@norm
[symbol]: Norm to use for difference computation. (default:'L2'
).'L1'
: L1 norm'L2'
: L2 norm
@mode
[int]: Analysis mode. (default:0
).0
: Global1
: Time series2
: Time-tagged time series3
: Buffer
Output
Flux descriptor [llll]
Usage
flux
is meant to be used with the analyze
function:
$buffer = importaudio('singing.wav'); ## input buffer
$descr = flux(); ## generate flux audio descriptor
$buffer.view('before analysis');
$buffer = $buffer.analyze($descr); ## apply analysis
$buffer.view('after analysis')