MusicTempo
Class combines the work of all the steps of tempo extraction
Constructor Summary
Public Constructor | ||
public |
constructor(audioData: Float32Array, params: Object) Constructor |
Member Summary
Public Members | ||
public |
Agents array |
|
public |
Inter-beat interval |
|
public |
Beat times array |
|
public |
The agent with the highest score |
|
public |
Onsets times array |
|
public |
Spectral flux peaks indexes |
|
public |
Spectral flux |
|
public |
The tempo value in beats per minute |
|
public |
Tempo hypotheses array |
Public Constructors
public constructor(audioData: Float32Array, params: Object) source
Constructor
Params:
Name | Type | Attribute | Description |
audioData | Float32Array | non-interleaved IEEE 32-bit linear PCM with a nominal range of -1 -> +1 (Web Audio API - Audio Buffer) |
|
params | Object |
|
parameters |
params.bufferSize | Number |
|
FFT windows size |
params.hopSize | Number |
|
spacing of audio frames in samples |
params.decayRate | Number |
|
how quickly previous peaks are forgotten |
params.peakFindingWindow | Number |
|
minimum distance between peaks |
params.meanWndMultiplier | Number |
|
multiplier for peak finding window |
params.peakThreshold | Number |
|
minimum value of peaks |
params.widthTreshold | Number |
|
the maximum difference in IOIs which are in the same cluster |
params.maxIOI | Number |
|
the maximum IOI for inclusion in a cluster |
params.minIOI | Number |
|
the minimum IOI for inclusion in a cluster |
params.maxTempos | Number |
|
initial amount of tempo hypotheses |
params.minBeatInterval | Number |
|
the minimum inter-beat interval (IBI) (0.30 seconds == 200 BPM) |
params.maxBeatInterval | Number |
|
the maximum inter-beat interval (IBI) (1.00 seconds == 60 BPM) |
params.initPeriod | Number |
|
duration of the initial section |
params.thresholdBI | Number |
|
for the purpose of removing duplicate agents, the default JND of IBI |
params.thresholdBT | Number |
|
for the purpose of removing duplicate agents, the default JND of phase |
params.expiryTime | Number |
|
the time after which an Agent that has not accepted any beat will be destroyed |
params.toleranceWndInner | Number |
|
the maximum time that a beat can deviate from the predicted beat time without a fork occurring |
params.toleranceWndPre | Number |
|
the maximum amount by which a beat can be earlier than the predicted beat time, expressed as a fraction of the beat period |
params.toleranceWndPost | Number |
|
the maximum amount by which a beat can be later than the predicted beat time, expressed as a fraction of the beat period |
params.correctionFactor | Number |
|
correction factor for updating beat period |
params.maxChange | Number |
|
the maximum allowed deviation from the initial tempo, expressed as a fraction of the initial beat period |
params.penaltyFactor | Number |
|
factor for correcting score, if onset do not coincide precisely with predicted beat time |