BpmHistogram

standard mode | Rhythm category

Inputs

  • novelty (vector_real) - the novelty curve

Outputs

  • bpm (real) - mean BPM of the most salient tempo
  • bpmCandidates (vector_real) - list of the most salient BPM values
  • bpmMagnitudes (vector_real) - magnitudes of the most salient BPM values
  • tempogram (matrix_real) - spectrogram-like representation of tempo over time (frames of BPM magnitudes)
  • frameBpms (vector_real) - BPM values at each frame
  • ticks (vector_real) - time positions of ticks [s]
  • ticksMagnitude (vector_real) - ticks' strength (magnitude)
  • sinusoid (vector_real) - sinusoid whose peaks indicate tick positions

Parameters

  • bpm (real ∈ [0, ∞), default = 0) :
    bpm to induce a certain tempo tracking. Zero if unknown
  • constantTempo (bool ∈ {true, false}, default = false) :
    whether to consider constant tempo. Set to true when inducina specific tempo
  • frameRate (real ∈ [1, ∞), default = 86.1328) :
    the sampling rate of the novelty curve [frame/s]
  • frameSize (real ∈ [1, ∞), default = 4) :
    the minimum length to compute the FFT [s]
  • maxBpm (real ∈ (0, ∞), default = 560) :
    the maximum bpm to consider
  • maxPeaks (integer ∈ (0, ∞], default = 50) :
    the number of peaks to be considered at each spectrum
  • minBpm (real ∈ [0, ∞), default = 30) :
    the minimum bpm to consider
  • overlap (integer ∈ (0, ∞), default = 16) :
    the overlap factor
  • tempoChange (real ∈ [0, ∞), default = 5) :
    the minimum length to consider a change in tempo as stable [s]
  • weightByMagnitude (bool ∈ {true, false}, default = true) :
    whether to consider peaks' magnitude when building the histogram
  • windowType (string, default = hann) :
    the window type to be used when computing the FFT
  • zeroPadding (integer ∈ [0, ∞), default = 0) :
    zero padding factor to compute the FFT [s]

Description

This algorithm analyzes predominant periodicities in a signal given its novelty curve [1] (see NoveltyCurve algorithm) or another onset detection function (see OnsetDetection and OnsetDetectionGlobal). It estimates pulse BPM values and time positions together with a half-wave rectified sinusoid whose peaks represent the pulses present in the audio signal and their magnitudes. The analysis is based on the FFT of the input novelty curve from which salient periodicities are detected by thresholding. Temporal evolution of these periodicities is output in the "tempogram". Candidate BPMs are then detected based on a histogram of the observed periodicities weighted by their energy in the tempogram. The sinusoidal model is constructed based on the observed periodicities and their magnitudes with the estimated overall BPM as a reference.

The algorithm outputs:

  • bpm: the mean of the most salient BPM values representing periodicities in the signal (the mean BPM).
  • bpmCandidates and bpmMagnitudes: list of the most salient BPM values and their magnitudes (intensity). These two outputs can be helpful for taking an alternative decision on estimation of the overall BPM.
  • tempogram: spectrogram-like representation of the estimated salient periodicities and their intensities over time (per-frame BPM magnitudes). It is useful for detecting tempo variations and visualization of tempo evolution.
  • frameBpms: list of candidate BPM values at each frame. The candidate values are similar to the mean BPM. If no candidates are found to be similar, the mean value itself is used unless "tempoChange" seconds have triggered a variation in tempo.
  • ticks: time positions of ticks in seconds.
  • ticksMagnitude: magnitude of each tick. Higher values correspond to higher probability of correctly identified ticks.
  • sinusoid: a sinusoidal model of the ticks' positions. The previous outputs are based on detecting peaks of this half-wave rectified sinusoid. This model can be used to obtain ticks using alternative peak detection algorithms if necessary. Beware that the last few ticks may exceed the length of the audio signal due to overlap factors. Therefore, this output should be always checked against the length of audio signal.

Note:

  • This algorithm is outdated. For beat tracking it is recommended to use RhythmExtractor2013 algorithm found to perform better than NoveltyCurve with BpmHistogram in evaluations.
  • The "frameRate" parameter refers to the frame rate at which the novelty curve has been computed. It is equal to the audio sampling rate divided by the hop size at which the signal was processed.
  • Although the algorithm tries to find beats that fit the mean BPM the best, the tempo is not assumed to be constant unless specified in the corresponding parameter. For this reason and if tempo differs too much from frame to frame, there may be phase discontinuities when constructing the sinusoid which can yield to too many ticks. One can recursively run this algorithm on the sinusoid output until the ticks stabilize. At this point it may be useful to infer a specific BPM and set the constant tempo parameter to true.
  • Another useful trick is to run the algorithm one time to get an estimation of the mean BPM and re-run it again with a "frameSize" parameter set to a multiple of the mean BPM.

Quality: outdated (use RhythmExtractor2013 instead, still this algorithm might be useful when working with other onset detection functions apart from NoveltyCurve)

References:
[1] P. Grosche and M. Müller, "A mid-level representation for capturing dominant tempo and pulse information in music recordings," in International Society for Music Information Retrieval Conference (ISMIR’09), 2009, pp. 189–194.

See also

BpmHistogram (streaming) Extractor (standard) FFT (standard) FFT (streaming) Histogram (standard) Histogram (streaming) Magnitude (standard) Magnitude (streaming) NoveltyCurve (standard) NoveltyCurve (streaming) OnsetDetection (standard) OnsetDetection (streaming) OnsetDetectionGlobal (standard) OnsetDetectionGlobal (streaming) RhythmExtractor (standard) RhythmExtractor (streaming) RhythmExtractor2013 (standard) RhythmExtractor2013 (streaming)

Standard algorithms

AfterMaxToBeforeMaxEnergyRatio | AllPass | AudioLoader | AudioOnsetsMarker | AudioWriter | AutoCorrelation | BFCC | BPF | BandPass | BandReject | BarkBands | BeatTrackerDegara | BeatTrackerMultiFeature | Beatogram | BeatsLoudness | BinaryOperator | BinaryOperatorStream | BpmHistogram | BpmHistogramDescriptors | BpmRubato | CartesianToPolar | CentralMoments | Centroid | ChordsDescriptors | ChordsDetection | ChordsDetectionBeats | ChromaCrossSimilarity | Chromagram | Chromaprinter | ClickDetector | Clipper | ConstantQ | CoverSongSimilarity | Crest | CrossCorrelation | CrossSimilarityMatrix | CubicSpline | DCRemoval | DCT | Danceability | Decrease | Derivative | DerivativeSFX | DiscontinuityDetector | Dissonance | DistributionShape | Duration | DynamicComplexity | ERBBands | EasyLoader | EffectiveDuration | Energy | EnergyBand | EnergyBandRatio | Entropy | Envelope | EqloudLoader | EqualLoudness | Extractor | FFT | FFTC | FadeDetection | FalseStereoDetector | Flatness | FlatnessDB | FlatnessSFX | Flux | FrameCutter | FrameGenerator | FrameToReal | FreesoundExtractor | FrequencyBands | GFCC | GaiaTransform | GapsDetector | GeometricMean | HFC | HPCP | HarmonicBpm | HarmonicMask | HarmonicModelAnal | HarmonicPeaks | HighPass | HighResolutionFeatures | Histogram | HprModelAnal | HpsModelAnal | HumDetector | IDCT | IFFT | IFFTC | IIR | Inharmonicity | InstantPower | Intensity | Key | KeyExtractor | LPC | Larm | Leq | LevelExtractor | LogAttackTime | LogSpectrum | LoopBpmConfidence | LoopBpmEstimator | Loudness | LoudnessEBUR128 | LoudnessVickers | LowLevelSpectralEqloudExtractor | LowLevelSpectralExtractor | LowPass | MFCC | Magnitude | MaxFilter | MaxMagFreq | MaxToTotal | Mean | Median | MedianFilter | MelBands | MetadataReader | Meter | MinMax | MinToTotal | MonoLoader | MonoMixer | MonoWriter | MovingAverage | MultiPitchKlapuri | MultiPitchMelodia | Multiplexer | MusicExtractor | MusicExtractorSVM | NNLSChroma | NSGConstantQ | NSGIConstantQ | NoiseAdder | NoiseBurstDetector | NoveltyCurve | NoveltyCurveFixedBpmEstimator | OddToEvenHarmonicEnergyRatio | OnsetDetection | OnsetDetectionGlobal | OnsetRate | Onsets | OverlapAdd | PCA | Panning | PeakDetection | PercivalBpmEstimator | PercivalEnhanceHarmonics | PercivalEvaluatePulseTrains | PitchCREPE | PitchContourSegmentation | PitchContours | PitchContoursMelody | PitchContoursMonoMelody | PitchContoursMultiMelody | PitchFilter | PitchMelodia | PitchSalience | PitchSalienceFunction | PitchSalienceFunctionPeaks | PitchYin | PitchYinFFT | PitchYinProbabilistic | PitchYinProbabilities | PitchYinProbabilitiesHMM | PolarToCartesian | PoolAggregator | PowerMean | PowerSpectrum | PredominantPitchMelodia | RMS | RawMoments | ReplayGain | Resample | ResampleFFT | RhythmDescriptors | RhythmExtractor | RhythmExtractor2013 | RhythmTransform | RollOff | SBic | SNR | SaturationDetector | Scale | SilenceRate | SineModelAnal | SineModelSynth | SineSubtraction | SingleBeatLoudness | SingleGaussian | Slicer | SpectralCentroidTime | SpectralComplexity | SpectralContrast | SpectralPeaks | SpectralWhitening | Spectrum | SpectrumCQ | SpectrumToCent | Spline | SprModelAnal | SprModelSynth | SpsModelAnal | SpsModelSynth | StartStopCut | StartStopSilence | StereoDemuxer | StereoMuxer | StereoTrimmer | StochasticModelAnal | StochasticModelSynth | StrongDecay | StrongPeak | SuperFluxExtractor | SuperFluxNovelty | SuperFluxPeaks | TCToTotal | TempoCNN | TempoScaleBands | TempoTap | TempoTapDegara | TempoTapMaxAgreement | TempoTapTicks | TensorNormalize | TensorTranspose | TensorflowInputFSDSINet | TensorflowInputMusiCNN | TensorflowInputTempoCNN | TensorflowInputVGGish | TensorflowPredict | TensorflowPredict2D | TensorflowPredictCREPE | TensorflowPredictEffnetDiscogs | TensorflowPredictFSDSINet | TensorflowPredictMAEST | TensorflowPredictMusiCNN | TensorflowPredictTempoCNN | TensorflowPredictVGGish | TonalExtractor | TonicIndianArtMusic | TriangularBands | TriangularBarkBands | Trimmer | Tristimulus | TruePeakDetector | TuningFrequency | TuningFrequencyExtractor | UnaryOperator | UnaryOperatorStream | Variance | Vibrato | Viterbi | WarpedAutoCorrelation | Welch | Windowing | YamlInput | YamlOutput | ZeroCrossingRate