Initialkey conversion

In another closed posting the camelot conversion was discussed:
convert-initialkey

I learned that according to the ID3 standard http://id3.org/id3v2.4.0-frames only the musical notation is allowed in the "Initial Key" frame TKEY. Some software tools can store different notation. VirtualDJ for example can display key different but does save tags back only in musical notation (they follow standards!). I learned this in the good VirtualDJ forum.

Due to this I created two new tags "OPENKEY" and "LANCELOT". With the following two actions in Mp3tag the "INITIALKEY" is used to create the other keys.

Action: 	key_initial2lancelot
Action type:	Format value
Field:		LANCELOT
Format string:	$replace(%initialkey%,Abm,1A,Ebm,2A,Bbm,3A,Fm,4A,Cm,5A,Gm,6A,Dm,7A,Am,8A,Em,9A,Bm,10A,F#m,11A,Dbm,12A,B,1B,F#,2B,D#,3B,Ab,4B,Eb,5B,Bb,6B,F,7B,C,8B,G,9B,D,10B,A,11B,E,12B)
Action: 	key_initial2open
Action type:	Format value
Field:		OPENKEY
Format string: $replace(%initialkey%,Abm,6m,Ebm,7m,Bbm,8m,Fm,9m,Cm,10m,Gm,11m,Dm,12m,Am,1m,Em,2m,Bm,3m,F#m,4m,Dbm,5m,B,6d,F#,7d,D#,8d,Ab,9d,Eb,10d,Bb,11d,F,12d,C,1d,G,2d,D,3d,A,4d,E,5d)

In principle this method works, however the replacement gives partially wrong results. For example "F#m" is replaced with "1111B" for Harmonic=Lancelot=Camelot. How can this please be corrected? A limitation to exact strings and not parts of a string is required.

The replace command in actions would be an option with (exact words) however then you need 2 x 24 replace commands for both actions. And first two "format string" commands to copy data from INITIALKEY to the two fields. Editing the action MTA-file is a good alternative. Action file are located her:
"C:\Users\USER\AppData\Roaming\Mp3tag\data\actions*.mta"

If there is no other proposal, I will do this and share the MTA-file if requested.

You have to ensure that you don't replace the existing key twice.

In your example with
F#m
you replace it first with
11A
then - with the second last replacement pair
A -> 11B
you replace the part A in 11B again, resulting in
1111B

Perhaps a compromise between the straightforward and the problematic cases would help.
So use the scripting command for the unique cases and the single actions for the ones that cause problems.

Thank you, but I got it with editing the MTA file.
See attached file for LANCELOT conversion:
key_initial2lancelot_v20250221.mta (1.1 KB)
Hope, that there is no typing error :slight_smile:

I will create a second one for OPENKEY.

BTW: I learned that the word Lancelot is sometimes used, because the word Camelot (wheel) may fall under licence conditions from Mixed In Key LLC.
Funny topic anyhow because it is just a numbering and coloring of
https://en.wikipedia.org/wiki/Circle_of_fifths.

Here is the other file for OPENKEY field:
key_initial2open.mta (1.2 KB)
Thank you for review/check and feedback.

Here is a screenshot how it does look like in Mp3tag:


In MusicBee these columns can be made also visible:

BTW: Editing the MTA files is no problem even when Mp3tag is running.
Only comment lines are not supported in these text files.

Just copy the MTA file in this directory and it will show up in Mp3tag:
"C:\Users\USER\AppData\Roaming\Mp3tag\data\actions"
Of course the "initialkey" field does need the keys in musical notation for the action scripts to work. I did create these keys with RekordBox, TuneXplorer, MixMeister but meanwhile with VirtualDJ. MixedInKey might be an option, but I did not test if storing musical notation is possible with it.

VDJ, MusicBee, EveryThing, ExifTool and Mp3tag
are the best sofware tools in the universe not only for DJs.

The target folder depends on the installation type.
It is safer to open the configuration folder with the function in menu File>Open configuration folder.

And for others who may be tempted

it is not at all encouraged to edit action files with an external editor but only with the means of the MP3tag built-in editing methods for actions.
There are too many pitfalls with reserved characters and character conversions which may cause havoc.

Thank you EarCinema!
If you are ok with it, I consider and mark this topic as solved.