BasicPitchOptions
Options & Configuration · AiDotNet.Audio.MusicAnalysis
Configuration options for the Basic Pitch multi-pitch detection model.
Inheritance: ModelOptions → BasicPitchOptions
For Beginners
Basic Pitch turns audio of music into “sheet music” data. It can detect multiple notes playing at the same time (like a piano chord), when each note starts and stops, and what pitch each note is. The output is similar to MIDI - a list of (start_time, end_time, pitch, velocity) for every detected note.
How It Works
Basic Pitch (Bittner et al., 2022) from Spotify is a lightweight neural network for polyphonic music transcription. It detects note onsets, offsets, and pitch for multiple simultaneous notes, producing MIDI-like output from audio. Unlike monophonic pitch detectors (CREPE), Basic Pitch handles chords and polyphonic music.
Constructors
| Constructor | Summary |
|---|---|
BasicPitchOptions() |
Properties
| Property | Summary |
|---|---|
OnnxModelOptions OnnxOptions { get; set; } |
Gets or sets the ONNX runtime options. |
double DropoutRate { get; set; } |
Gets or sets the dropout rate. |
double LearningRate { get; set; } |
Gets or sets the learning rate for training. |
double MaxFrequencyHz { get; set; } |
Gets or sets the maximum frequency in Hz for note detection. |
double MinFrequencyHz { get; set; } |
Gets or sets the minimum frequency in Hz for note detection. |
double MinNoteDurationSec { get; set; } |
Gets or sets the minimum note duration in seconds. |
double NoteThreshold { get; set; } |
Gets or sets the note (frame) detection threshold. |
double OnsetThreshold { get; set; } |
Gets or sets the onset detection threshold. |
int BinsPerOctave { get; set; } |
Gets or sets the number of frequency bins per octave. |
int EncoderFilters { get; set; } |
Gets or sets the number of convolutional filters in the encoder. |
int HopLength { get; set; } |
Gets or sets the hop length for the CQT in samples. |
int MidiOffset { get; set; } |
Gets or sets the lowest MIDI note (A0 = 21). |
int NumEncoderLayers { get; set; } |
Gets or sets the number of convolutional layers in the encoder. |
int NumHarmonicBins { get; set; } |
Gets or sets the number of harmonically-stacked CQT bins. |
int NumHarmonics { get; set; } |
Gets or sets the number of harmonics to stack. |
int NumMidiNotes { get; set; } |
Gets or sets the number of MIDI notes to predict (88 piano keys by default, A0 to C8). |
int NumOutputHeads { get; set; } |
Gets or sets the number of output heads (note, onset, contour). |
int SampleRate { get; set; } |
Gets or sets the expected audio sample rate in Hz. |
string ModelPath { get; set; } |
Gets or sets the path to the ONNX model file. |