Local Enrich
The local-enrich plugin analyzes each track using digital signal processing and machine-learning models. It detects BPM and musical key, predicts genre and subgenre, calculates an energy level, and extracts sound characteristics used by the AI Playlist Builder.
Analysis runs locally and does not require an account with an external metadata service.
Stage: Enrich | Requires browser: No
What It Does
For each track, the plugin:
- Resolves an audio source from a local file or an available preview stream.
- Uses DSP analysis to detect BPM and musical key.
- Generates audio embeddings with Essentia-compatible machine-learning models.
- Predicts genre, subgenre, energy, moods, danceability, timbre, vocal characteristics, and other musical qualities.
- Writes the results directly to the track record.
The extracted sound characteristics allow the AI Playlist Builder to find tracks with compatible moods, energy levels, and sonic profiles instead of relying only on artist or genre metadata.
Audio Source Resolution
The plugin chooses the audio source automatically:
- If the track has a valid local file path, the file is analyzed directly.
- If no local file is available, the plugin resolves and downloads an available preview stream.
- A downloaded preview is reused throughout the analysis so it is fetched only once.
- Temporary audio files are deleted after analysis. Local files are never deleted or modified.
Analyzing a complete local file can provide more representative results than analyzing a short preview, especially when a track changes significantly between its intro, breakdown, and main section.
Configuration
Install the plugin from Settings → Plugins, then open the plugin settings.
| Setting | Type | Default | Description |
|---|---|---|---|
enable_bpm_key | boolean | true | Enables DSP-based BPM and musical-key detection |
enable_genre | boolean | true | Enables ML-based genre and subgenre prediction |
Disabling BPM and key analysis can reduce processing time if those fields have already been populated by another plugin or imported from file tags.
Sound-characteristic and energy analysis always runs because these values are required by the AI Playlist Builder.
Fields Enriched
Core Musical Metadata
| Field | Description | Example value |
|---|---|---|
| BPM | Tempo detected through audio analysis | 128 |
| Key | Musical key detected through audio analysis | A minor |
| Genre | Top-level genre predicted by the genre model | Electronic |
| Subgenre | More specific style predicted by the genre model | Techno |
| Energy | Combined energy score from 1 to 5 | 4 |
BPM and key are written only when analysis returns a valid result. Genre and subgenre are written only when genre analysis is enabled and the model produces a prediction.
Energy is calculated by combining several arousal models with danceability and mood predictions. It is normalized to an integer scale:
| Energy | General interpretation |
|---|---|
1 | Very low-energy, subdued, or ambient |
2 | Relaxed or restrained |
3 | Moderate or balanced |
4 | Energetic |
5 | Very high-energy or intense |
Sound Characteristics
The plugin stores the following ML-derived characteristics on every analyzed track:
| Field | Description |
|---|---|
| Danceability | How suitable the track is for dancing |
| Mood aggressive | Strength of aggressive or intense musical qualities |
| Mood happy | Strength of positive or happy musical qualities |
| Mood party | Strength of celebratory or party-oriented qualities |
| Mood relaxed | Strength of calm or relaxed qualities |
| Mood sad | Strength of melancholic or sad qualities |
| MIREX mood | Highest-scoring mood cluster from the MIREX mood model |
| Mood theme | Top mood or theme tag predicted from the audio |
| Approachability | How immediate and accessible the track sounds |
| Engagement | Predicted ability of the track to sustain listener interest |
| Timbre | Predicted tonal and textural character |
| Voice | Predicted vocal characteristics or vocal presence |
These fields are model predictions rather than values read from embedded file tags. They may therefore differ from manually assigned metadata.
AI Playlist Builder
The AI Playlist Builder uses Local Enrich results to compare tracks by their musical and sonic characteristics.
This makes it possible to build playlists around qualities such as:
- Similar energy levels
- Compatible moods
- Danceability
- Aggressiveness or relaxation
- Vocal and instrumental characteristics
- Timbre and overall sound profile
- Genre and subgenre compatibility
- Approachability and engagement
For best results, run Local Enrich on all candidate tracks before using the AI Playlist Builder. Tracks without local-enrichment data have fewer characteristics available for matching and ranking.
How Analysis Works
BPM and Key
BPM and key are detected through digital signal processing. This analysis examines the audio itself and does not depend on existing tags or external metadata.
Because tempo detection can interpret the same pulse at different metrical levels, some tracks may occasionally be detected at half or double their expected BPM.
Audio Embeddings
The plugin decodes and resamples the audio, then computes a mel spectrogram once per track. This representation is passed through ML model backbones to create embeddings used by the sound-characteristic classifiers.
When the configured ML backend allows it, embeddings are reused between classifiers to avoid repeating identical inference work.
Genre and Subgenre
Genre analysis uses the highest-scoring model label. Labels containing a genre and subgenre are split into separate track fields.
For example, a model label such as:
Electronic---Techno
is stored as:
- Genre:
Electronic - Subgenre:
Techno
If the predicted label does not contain a separate subgenre, only the genre field is updated.
Energy
Energy is not taken from a single classifier. The plugin combines arousal predictions with:
- Danceability
- Aggressive mood
- Party mood
- Relaxed mood
- Sad mood
The combined result is converted into an energy score from 1 to 5.
Enrichment Status
A successful analysis creates an enrichment record with the status done and records which fields were updated.
If audio resolution, decoding, or model inference fails, the track cannot be enriched. Check the plugin logs for the underlying error.
Performance
Local Enrich performs considerably more computation than metadata lookup plugins. Processing time depends on:
- Track duration
- Whether a local file or remote preview is used
- Audio format and decoding speed
- CPU performance
- Available memory
- Whether BPM/key and genre analysis are enabled
The plugin computes the mel spectrogram only once and shares it between compatible model backbones. It also reuses embeddings across multiple classifiers to reduce duplicate work.
Downloading a preview adds network overhead, while analyzing a local file avoids that step.
Tips
- Use local files when possible. Full-track analysis is usually more representative than analysis of a short preview.
- Run Local Enrich before building AI playlists. The playlist builder depends on the generated energy, mood, and sound-characteristic fields.
- Disable analysis you do not need. If BPM, key, genre, and subgenre are already accurate, disable the corresponding settings to reduce processing time.
- Treat predictions as descriptive, not authoritative. Genre and mood boundaries are subjective, and model results may not match your personal classification.
- Check unusual BPM values for half-time or double-time detection. For example, a track expected at
140BPM may be detected at70BPM. - Re-run after replacing a preview with a local file. Full-length audio may produce different and more representative characteristics.
Troubleshooting
The plugin cannot analyze a track
The track must have either an accessible local file or an available preview source. Verify that the local path still exists or that the imported track contains a usable preview link.
BPM is half or double the expected value
This can happen when the rhythmic pulse is ambiguous. The detector may interpret a 140 BPM track as 70 BPM, or a 75 BPM track as 150 BPM.
The detected key differs from my DJ software
Different key-detection systems can disagree, particularly on tracks with key changes, modal harmony, sparse tonal content, or short previews. Results can also differ in notation while representing related harmonic information.
Genre or subgenre looks incorrect
Genre values are ML predictions based on the audio. Hybrid tracks and styles with overlapping characteristics may be assigned to a neighboring genre. You can disable genre analysis if you prefer metadata from Beatport, file tags, or another enrichment source.
Analysis is slow
Local Enrich runs multiple DSP and ML operations for each track. Using local files avoids preview-download time. You can also disable BPM/key or genre analysis when those fields are already populated.
Sound characteristics are missing from AI Playlist Builder
Run Local Enrich on the affected tracks and verify that their enrichment status is done. The playlist builder can only use characteristics that have already been calculated and stored.
A preview produces unexpected results
A preview may contain only one section of a track, such as a breakdown or chorus. Import the complete audio file and run Local Enrich again for a more representative analysis.