denote
Denote — Portal and facade for audio-to-symbol tools.
Simple usage:
import denote
result = denote.transcribe("song.wav") # audio -> MIDI
chords = denote.get_chords("song.wav") # audio -> chord labels
pitch = denote.get_pitch("vocal.wav") # audio -> F0
beats = denote.get_beats("song.wav") # audio -> beat times
denote.list_backends() # see what's available
denote.list_backends('pitch') # backends for a task
Service-level access:
denote.services.basic_pitch.transcribe("song.wav", onset_threshold=0.3)
denote.services.torchcrepe.get_pitch("vocal.wav", model='tiny')
Native adapter access:
denote.services.basic_pitch.adapter # raw adapter instance
- denote.get_beats(audio, *, sr=None, backend=None, **kwargs)[source]
Track beats in audio.
- Parameters:
audio – File path (str/Path) or numpy array.
sr – Sample rate (required when audio is an array).
backend – Backend name. Defaults to ‘librosa_beats’.
**kwargs – Backend-specific parameters (hop_length, start_bpm).
- Returns:
BeatResult with .beats, .downbeats, .tempo fields.
- denote.get_chords(audio, *, sr=None, backend=None, **kwargs)[source]
Recognize chords from audio.
- Parameters:
audio – File path (str/Path) or numpy array.
sr – Sample rate (required when audio is an array).
backend – Backend name.
**kwargs – Backend-specific parameters.
- Returns:
ChordResult with .intervals, .labels fields.
- denote.get_pitch(audio, *, sr=None, backend=None, **kwargs)[source]
Estimate pitch/F0 from audio.
- Parameters:
audio – File path (str/Path) or numpy array.
sr – Sample rate (required when audio is an array).
backend – Backend name. Defaults to ‘torchcrepe’ if installed, falls back to ‘librosa_pyin’.
**kwargs – Backend-specific parameters (min_frequency, max_frequency, model, device, hop_length).
- Returns:
PitchResult with .times, .frequencies, .confidence fields.
- denote.transcribe(audio, *, sr=None, backend=None, **kwargs)[source]
Transcribe audio to MIDI.
- Parameters:
audio – File path (str/Path) or numpy array.
sr – Sample rate (required when audio is an array).
backend – Backend name. Defaults to ‘basic_pitch’ if installed.
**kwargs – Backend-specific parameters (onset_threshold, min_note_length, etc.)
- Returns:
TranscriptionResult with .midi, .notes, and .raw fields.