Tags from the "AccusticBrainz Tags" plugin are not always set?

Hi everyone,

I use Picard:

Version 2.13.3
Python 3.13.12, PyQt 5.15.11, Qt 5.15.17, Mutagen 1.47.0, Discid discid 1.1.0 (compat layer from python‑libdiscid 2.0.3), libdiscid 0.6.5, astrcmp C, SSL OpenSSL 3.5.5 27 Jan 2026tagger scriptApachebashcppcssdiffxmlhttpinijsonjavajavascriptMakefilemarkdownnginxrubyperlphpPythonsql

on Debian Linux. I have installed and set up the “AccusticBrainz Tags” plug-in and now want to apply it to my collection. I am still testing it at the moment. I have noticed that everything is correct for some albums that I load into Picard. The corresponding tags for key and BPM are displayed as “…will be added.” For other albums, however, the tags do not appear. I don’t understand why.

Can anyone give me a tip?

with best

The AcousticBrainz database is no longer getting updates since the project go cancelled 4 years ago.

1 Like

Okay, I thought the plug-in analyzed the tracks and determined the values.

I am not sure where the AcousticBrainz database got its data from i.e. whether it was crowd sourced using a Musicbrainz tool (such as a Picard plugin) to enable users to undertake the analysis and submit data or whether there was a background activity undertaken by the MTG.

But the analysis was done by a C++ tool written by MTG called Essentia - docs here, and this tool is still available with Python bindings so it might not be that hard to integrate this into a new plugin for Picard which would scan local music files and create the same BPM and genre tags that can be downloaded from the AcousticBrainz database by the two existing AcousticBrainz Picard plugins.

Of course, that doesn’t address the analysis issues highlighted in the AcousticBrainz closure blog article, but it does mean that you can still make a half decent guess and BPM, key, genre etc. using Essentia.

Okay, I have disabled the plug-in. Since I use Mixxx anyway, I enter the values for BPM and tonality into the files there. That works. I’ve locked the two tags in Picard so that they don’t get removed again. That’s fine so far. My problem is: for better compatibility with different players/DJ software, I would like to add the three new fields to the Picard script:

  • TBPM
  • TKEY
  • CAMELOT

Create them and fill them with the existing values from BPM and INITIALKEY. Or the CAMELOT field from the mapping specification.

I can’t do that. I’m not a scripting expert :frowning:

Here is the script:

# Vollständiges Camelot-Mapping für Picard
# INITIALKEY = Tonart (C, C#, D, …)
# _mode = Dur/Moll (maj/min)
# CAMELOT wird korrekt gesetzt

$if($and($ne(%INITIALKEY%,),$ne(%_mode%,)),
    # C
    $if($and($eq(%INITIALKEY%,C),$eq(%_mode%,maj)),$set(CAMELOT,8B))
    $if($and($eq(%INITIALKEY%,C),$eq(%_mode%,min)),$set(CAMELOT,5A))
    # C#
    $if($and($eq(%INITIALKEY%,C#),$eq(%_mode%,maj)),$set(CAMELOT,3B))
    $if($and($eq(%INITIALKEY%,C#),$eq(%_mode%,min)),$set(CAMELOT,12A))
    # D
    $if($and($eq(%INITIALKEY%,D),$eq(%_mode%,maj)),$set(CAMELOT,10B))
    $if($and($eq(%INITIALKEY%,D),$eq(%_mode%,min)),$set(CAMELOT,7A))
    # D#
    $if($and($eq(%INITIALKEY%,D#),$eq(%_mode%,maj)),$set(CAMELOT,5B))
    $if($and($eq(%INITIALKEY%,D#),$eq(%_mode%,min)),$set(CAMELOT,2A))
    # E
    $if($and($eq(%INITIALKEY%,E),$eq(%_mode%,maj)),$set(CAMELOT,12B))
    $if($and($eq(%INITIALKEY%,E),$eq(%_mode%,min)),$set(CAMELOT,9A))
    # F
    $if($and($eq(%INITIALKEY%,F),$eq(%_mode%,maj)),$set(CAMELOT,7B))
    $if($and($eq(%INITIALKEY%,F),$eq(%_mode%,min)),$set(CAMELOT,4A))
    # F#
    $if($and($eq(%INITIALKEY%,F#),$eq(%_mode%,maj)),$set(CAMELOT,2B))
    $if($and($eq(%INITIALKEY%,F#),$eq(%_mode%,min)),$set(CAMELOT,11A))
    # G
    $if($and($eq(%INITIALKEY%,G),$eq(%_mode%,maj)),$set(CAMELOT,9B))
    $if($and($eq(%INITIALKEY%,G),$eq(%_mode%,min)),$set(CAMELOT,6A))
    # G#
    $if($and($eq(%INITIALKEY%,G#),$eq(%_mode%,maj)),$set(CAMELOT,4B))
    $if($and($eq(%INITIALKEY%,G#),$eq(%_mode%,min)),$set(CAMELOT,1A))
    # A
    $if($and($eq(%INITIALKEY%,A),$eq(%_mode%,maj)),$set(CAMELOT,11B))
    $if($and($eq(%INITIALKEY%,A),$eq(%_mode%,min)),$set(CAMELOT,8A))
    # A#
    $if($and($eq(%INITIALKEY%,A#),$eq(%_mode%,maj)),$set(CAMELOT,6B))
    $if($and($eq(%INITIALKEY%,A#),$eq(%_mode%,min)),$set(CAMELOT,3A))
    # B
    $if($and($eq(%INITIALKEY%,B),$eq(%_mode%,maj)),$set(CAMELOT,1B))
    $if($and($eq(%INITIALKEY%,B),$eq(%_mode%,min)),$set(CAMELOT,10A))
)

That script looks OK. For mp3 files it will save the CAMELOT value as TXXX:CAMELOT=value. For other tagging formats, it may or may not save it.

If you don’t want INITIALKEY saved as TXXX:INITIALKEY, call it _INITIALKEY instead.

You might also want to have a look at the “Key Wheel Converter” plugin, which would do all the changes from the intial key to Camelot for you.

I only use Ogg Vorbis, but it should also work with other formats. As mentioned, Mixxx write the tags “bpm” (in dot notation) and “initialkey” (standard tonality). To increase compatibility with other software, I also do the following (Key Wheel Converter is installed):

$set(tbpm,%bpm%)
$set(key,%initialkey%)
$set(tkey,%initialkey%)
$set(camelot,$key2camelot(%initialkey%))

As a result, I can see the additional tags. So it works. As I said, I’m not a professional. If anyone has any comments, I’d be happy to hear them.