Tempogram<T>

Models & Types · AiDotNet.Audio.MusicAnalysis

Neural Tempogram model for tempo estimation over time.

Inheritance: NeuralNetworkBase<T> → AudioNeuralNetworkBase<T> → Tempogram<T>

Implements: IBeatTracker<T>

For Beginners

A tempogram shows how the tempo (speed) of music changes over time. This model creates a detailed map of tempo, which is useful for analyzing songs with tempo changes, rubato (expressive timing), or live performances where the tempo varies.

Usage:

How It Works

The Tempogram model computes a tempo representation over time using a neural approach to onset detection and autocorrelation-based tempo estimation. It provides both global tempo and tempo curves for music with changing tempos.

Constructors

Constructor Summary
Tempogram(NeuralNetworkArchitecture<T> architecture, TempogramOptions options, IGradientBasedOptimizer<T, Tensor<T>, Tensor<T>> optimizer) Creates a Tempogram model in native training mode.
Tempogram(NeuralNetworkArchitecture<T> architecture, string modelPath, TempogramOptions options) Creates a Tempogram model in native training mode.

Properties

Property Summary
double MaxBPM { get; }
double MinBPM { get; }

Methods

Method Summary
BeatTrackingResult<T> Track(Tensor<T> audio)
DownbeatResult<T> DetectDownbeats(Tensor<T> audio, BeatTrackingResult<T> beatTrackingResult)
IReadOnlyList<TempoHypothesis<T>> GetTempoHypotheses(Tensor<T> audio, int numHypotheses)
ModelMetadata<T> GetModelMetadata()
T EstimateTempo(Tensor<T> audio)
Task<BeatTrackingResult<T>> TrackAsync(Tensor<T> audio, CancellationToken cancellationToken)
Tensor<T> ComputeOnsetStrength(Tensor<T> audio)