Author Topic: MusicBrainz Picard q & a thread  (Read 95313 times)

Dizza17

  • Jr. Member
  • **
  • Posts: 90
Hi Guys,

This is probably a bit of a Simplistic question but for some reason I haven’t been able to get it to work. I would like to assign the release type to the grouping tag, ie deluxe version, remastered, live etc. what would the Picard script need to look like to achieve this?. Thanks to anyone that can help with this.

Regards
Dizza
When the rich wage war, it’s the poor who suffer.

hiccup

  • Hero Member
  • *****
  • Posts: 8037
This is probably a bit of a Simplistic question but for some reason I haven’t been able to get it to work. I would like to assign the release type to the grouping tag, ie deluxe version, remastered, live etc. what would the Picard script need to look like to achieve this?
It's far from simple.
There are many tags and variables available for such purposes.
See here for an overview:
https://picard-docs.musicbrainz.org/en/variables/variables.html

Here is a testing script that retrieves tags that I know of that can provide such extra information on recordings and releases.
Make sure you have checked 'use track relationships' and 'use release relationships'.
Just load some tracks/albums in Picard, and see what content is available for these releases.
It should help you decide on which ones are useful to you.
(don't press 'Save' if you don't want to modify the files you are testing this on)

Code
$set(001_recordingcomment,%_recordingcomment%)
$set(002_performance_attributes,%_performance_attributes%)

$set(003_releasecomment,%_releasecomment%)
$set(004_comment,%comment%)
$set(005_releasetype,%releasetype%)
$set(006_primaryreleasetype,%_primaryreleasetype%)
$set(007_secondaryreleasetype,%_secondaryreleasetype%)

$set(008_media,%media%)
$set(009_discsubtitle,%discsubtitle%)

$set(010_recording_series,%_recording_series%)
$set(011_recording_seriescomment,%_recording_seriescomment%)
$set(012_releaseannotation,%_releaseannotation%)
$set(013_release_series,%_release_series%)
$set(014_release_seriescomment,%_release_seriescomment%)
$set(015_releasegroupcomment,%_releasegroupcomment%)
$set(016_releasegroup_series,%_releasegroup_series%)
$set(017_work_series,%_work_series%)
$set(018_work_seriescomment,%_work_seriescomment%)

About writing the 'Grouping' tag:
Just do something like this:

Code
$setmulti(grouping,%releasetype%)
Or if you want to go crazy and populate 'Grouping' with all that is available from the first script, use this:

Code
$setmulti(grouping,%_recordingcomment%; %_performance_attributes%; %_releasecomment%; %comment%; %releasetype%; %_primaryreleasetype%; %_secondaryreleasetype%; %media%; %discsubtitle%; %_recording_series%; %_recording_seriescomment%; %_releaseannotation%; %_release_series%; %_release_seriescomment%; %_releasegroupcomment%; %_releasegroup_series%; %_work_series%; %_work_seriescomment%)
$copymerge(grouping,$cleanmulti(grouping))

Dizza17

  • Jr. Member
  • **
  • Posts: 90
Hiccup,

I am forever grateful for your assistance. It continues to frustrate me that as much as I have tried to learn basic scripting/regx i just can’t get my head around it beyond the very very basic of scripts.
Having helpful gentleman like yourself along with others in the forum is something that separates this forum from others. Have yourself a great day sir.

Regards
Dizza
When the rich wage war, it’s the poor who suffer.

hiccup

  • Hero Member
  • *****
  • Posts: 8037
Thanks Dizza, that's much appreciated.
I'm merely returning the favour to the countless people in- and outside this forum that have helped me—directly or indirectly—when I couldn't figure things out over the years.
And that happened, and still happens a lot.

All this stuff does not come easy or natural to my somewhat fuzzy brain too ;-)
(bumps on my forehead and pulled-out hairs to prove it)

on-topic edit:
Let us know how you fare with trying out all these available release/track information tags?
It could be helpful to other MusicBee/Picard users to decide on which ones may be useful for what.
I myself am only using 2 or 3 of them, since when I did some tests I couldn't see a good purpose for most of the others. But I may be missing something.
Last Edit: October 31, 2023, 08:03:13 PM by hiccup

Dizza17

  • Jr. Member
  • **
  • Posts: 90
@hiccup
You weren’t wrong about the “going crazy” part with the amount of info you can get about a release!
After experimenting with a couple of albums I think I’ll stick with 1-2 scripts to get the performance attributes and primary release type. The rest doesn’t really add any value to how I like my files tagged.

Now to start tackling the sort tags. Wondering if it’s better to just use the standard sort values or try the additional artist variables plugin sort tags.
When the rich wage war, it’s the poor who suffer.

hiccup

  • Hero Member
  • *****
  • Posts: 8037
Now to start tackling the sort tags. Wondering if it’s better to just use the standard sort values or try the additional artist variables plugin sort tags.
Personally I don't care about or use any differentiating 'sort' tags or values.
(except for the names of classical composers in my classical setup)
I also don't care about ignoring words such as 'The' etc.

In case it interests you, for preparing and modifying artists/performers and their roles I use the following three Picard plugins:

Additional Artists Variables
Format Performer Tags
Performer Tag Replace

The more I can use Picard to write the tags exactly as I want them, the less I have to worry about additional processing in MusicBee.

edit:
I also have some testing script that retrieves all such additional performer tags in the same manner that my testing script for additional recording and release info does. (001_variable_a  002_variable_b  etc.)
If you are interested I can share that one tonight.
Last Edit: November 01, 2023, 08:00:50 AM by hiccup

Dizza17

  • Jr. Member
  • **
  • Posts: 90
Yeah I haven’t cared much for sort tags either but thought it might add a level of neatness to my files. Perhaps I’ll reassess that rabbit hole.

The Performer & Involved People tags are the ones that I have been working on of late. Testing what Picard scripts work best for musicbee without any further work. In my novice testing, I tried using the Classical extras plugin to create my performer tags but it didn’t seem to work as well as native Picard with the plugins you mentioned above.
Appreciate any tips/script suggestions you have, I also would prefer to do 97% of my tagging in Picard so MB can do what it does best in displaying them.
When the rich wage war, it’s the poor who suffer.

Dizza17

  • Jr. Member
  • **
  • Posts: 90
I’m curious how others use credited tags in musicbee? Picard does a brilliant job in getting these tags, to which I then use scripts to format them to my liking to be displayed in MB.

Do most users lump them all in the involved people list and then use virtual tags to display them? Or is the preferred method to assign them each a custom tag so they are kept separate for display purposes etc.

Cheers👍🏼


When the rich wage war, it’s the poor who suffer.

hiccup

  • Hero Member
  • *****
  • Posts: 8037
Better late than never?:

Some two weeks ago Picard 2.11 was released.

Dizza17

  • Jr. Member
  • **
  • Posts: 90
Now to start tackling the sort tags. Wondering if it’s better to just use the standard sort values or try the additional artist variables plugin sort tags.
Personally I don't care about or use any differentiating 'sort' tags or values.
(except for the names of classical composers in my classical setup)
I also don't care about ignoring words such as 'The' etc.

In case it interests you, for preparing and modifying artists/performers and their roles I use the following three Picard plugins:

Additional Artists Variables
Format Performer Tags
Performer Tag Replace

The more I can use Picard to write the tags exactly as I want them, the less I have to worry about additional processing in MusicBee.

edit:
I also have some testing script that retrieves all such additional performer tags in the same manner that my testing script for additional recording and release info does. (001_variable_a  002_variable_b  etc.)
If you are interested I can share that one tonight.

@Hiccup, I’m interested in how you use the performer replace plug in? I’m also curious how you use it in conjunction with scripts?
Any examples or suggestions would be greatly appreciated.
Regards Dizza
When the rich wage war, it’s the poor who suffer.

hiccup

  • Hero Member
  • *****
  • Posts: 8037
@Hiccup, I’m interested in how you use the performer replace plug in? I’m also curious how you use it in conjunction with scripts?
Any examples or suggestions would be greatly appreciated.
The only thing that I have the Performer Tag Replacement plugin doing is changing how some instruments are named. Especially drums, bass, and it it removes 'family' from instrument descriptions.



It is not the type of plugin that makes new (hidden) variables available for scripting, so I have no scripts relying on it.

I am wondering if you are perhaps thinking of the Format Performer Tags plugin?

That one makes the difference for how the performers show up in MusicBee's track details panel.
These are my settings for it:



Note that at the bottom of the screenshot you can also see that the plugin shows a preview of how your settings will turn out.
(yeah, that rdswift is a pretty clever guy ;-)


A third plugin I use for this kind of thing is the Additional Artists Variables plugin.
And this is the one that does make new (hidden) variables available which can then be used for scripting.
See here for what it can do.

It wouldn't be useful to share my scripts that make use of it, since they also contain dependencies on other scripts.
So they won't work for somebody else and would be very difficult to explain.

I do have a testing script for the Additional Artists Variables plugin that may be useful though.
It will write all tags that are made available if you have the plugin installed.
That will give you an idea of what it can retrieve for a release, which can be helpful for deciding which variables to use for your scripts.

Code
$noop(
Album Variables
)

$set(001_artists_album_primary_id,%_artists_album_primary_id%)
$set(002_artists_album_primary_std,%_artists_album_primary_std%)
$set(003_artists_album_primary_sort,%_artists_album_primary_sort%)
$set(004_artists_album_primary_cred,%_artists_album_primary_cred%)
$set(005_artists_album_primary_cred_sort,%_artists_album_primary_cred_sort%)
$set(006_artists_album_primary_legal,%_artists_album_primary_legal%)
$set(007_artists_album_primary_sort_legal,%_artists_album_primary_sort_legal%)
$set(008_artists_album_primary_tags,%_artists_album_primary_tags%)
$set(009_artists_album_additional_id,%_artists_album_additional_id%)
$set(010_artists_album_additional_std,%_artists_album_additional_std%)
$set(011_artists_album_additional_cred,%_artists_album_additional_cred%)
$set(012_artists_album_additional_sort,%_artists_album_additional_sort%)
$set(013_artists_album_additional_cred_sort,%_artists_album_additional_cred_sort%)
$set(014_artists_album_additional_legal,%_artists_album_additional_legal%)
$set(015_artists_album_additional_std_multi,%_artists_album_additional_std_multi%)
$set(016_artists_album_additional_cred_multi,%_artists_album_additional_cred_multi%)
$set(017_artists_album_additional_sort_multi,%_artists_album_additional_sort_multi%)
$set(018_artists_album_additional_cred_sort_multi,%_artists_album_additional_cred_sort_multi%)
$set(019_artists_album_additional_legal_multi,%_artists_album_additional_legal_multi%)
$set(020_artists_album_all_std,%_artists_album_all_std%)
$set(021_artists_album_all_sort,%_artists_album_all_sort%)
$set(022_artists_album_all_cred,%_artists_album_all_cred%)
$set(023_artists_album_all_cred_sort,%_artists_album_all_cred_sort%)
$set(024_artists_album_all_legal,%_artists_album_all_legal%)
$set(025_artists_album_all_std_multi,%_artists_album_all_std_multi%)
$set(026_artists_album_all_sort_multi,%_artists_album_all_sort_multi%)
$set(027_artists_album_all_cred_multi,%_artists_album_all_cred_multi%)
$set(028_artists_album_all_cred_sort_multi,%_artists_album_all_cred_sort_multi%)
$set(029_artists_album_all_legal_multi,%_artists_album_all_legal_multi%)
$set(030_artists_album_all_sort_primary,%_artists_album_all_sort_primary%)
$set(031_artists_album_all_types,%_artists_album_all_types%)
$set(032_artists_album_all_join_phrases,%_artists_album_all_join_phrases%)
$set(033_artists_album_all_count,%_artists_album_all_count%)

$noop(
Track Variables
)

$set(034_artists_track_primary_id,%_artists_track_primary_id%)
$set(035_artists_track_primary_std,%_artists_track_primary_std%)
$set(036_artists_track_primary_sort,%_artists_track_primary_sort%)
$set(037_artists_track_primary_cred,%_artists_track_primary_cred%)
$set(038_artists_track_primary_cred_sort,%_artists_track_primary_cred_sort%)
$set(039_artists_track_primary_legal,%_artists_track_primary_legal%)
$set(040_artists_track_primary_sort_legal,%_artists_track_primary_sort_legal%)
$set(041_artists_track_additional_id,%_artists_track_additional_id%)
$set(042_artists_track_additional_std,%_artists_track_additional_std%)
$set(043_artists_track_additional_cred,%_artists_track_additional_cred%)
$set(044_artists_track_additional_sort,%_artists_track_additional_sort%)
$set(045_artists_track_additional_cred_sort,%_artists_track_additional_cred_sort%)
$set(046_artists_track_additional_legal,%_artists_track_additional_legal%)
$set(047_artists_track_additional_std_multi,%_artists_track_additional_std_multi%)
$set(048_artists_track_additional_sort_multi,%_artists_track_additional_sort_multi%)
$set(049_artists_track_additional_cred_multi,%_artists_track_additional_cred_multi%)
$set(050_artists_track_additional_cred_sort_multi,%_artists_track_additional_cred_sort_multi%)
$set(051_artists_track_additional_legal_multi,%_artists_track_additional_legal_multi%)
$set(052_artists_track_all_std,%_artists_track_all_std%)
$set(053_artists_track_all_sort,%_artists_track_all_sort%)
$set(054_artists_track_all_cred,%_artists_track_all_cred%)
$set(055_artists_track_all_cred_sort,%_artists_track_all_cred_sort%)
$set(056_artists_track_all_legal,%_artists_track_all_legal%)
$set(057_artists_track_all_std_multi,%_artists_track_all_std_multi%)
$set(058_artists_track_all_sort_multi,%_artists_track_all_sort_multi%)
$set(059_artists_track_all_cred_multi,%_artists_track_all_cred_multi%)
$set(060_artists_track_all_cred_sort_multi,%_artists_track_all_cred_sort_multi%)
$set(061_artists_track_all_legal_multi,%_artists_track_all_legal_multi%)
$set(062_artists_track_all_sort_primary,%_artists_track_all_sort_primary%)
$set(063_artists_track_all_types,%_artists_track_all_types%)
$set(064_artists_track_all_join_phrases,%_artists_track_all_join_phrases%)
$set(065_artists_track_all_count,%_artists_track_all_count%)
Last Edit: February 12, 2024, 04:55:31 PM by hiccup

ewan

  • Newbie
  • *
  • Posts: 5
I think that here we need to publish a virtual tag formula to convert the releasecountry tag from ISO 3166-1 code to the full country name. Of course, this tag can be converted to Picard using $countryname(country_code,translate=""), but this method may be suitable if both values are needed, using only one custom tag.

country names are adapted to discogs.com
*<Release Country>  - tag containing ISO 3166-1 country code
Code
$If(<Release Country>=US,"US",
$If(<Release Country>=GB,"UK",
$If(<Release Country>=XW,"Worldwide",
$If(<Release Country>=DE,"Germany",
$If(<Release Country>=FR,"France",
$If(<Release Country>=JP,"Japan",
$If(<Release Country>=IT,"Italy",
$If(<Release Country>=XE,"Europe",
$If(<Release Country>=CA,"Canada",
$If(<Release Country>=NL,"Netherlands",
$If(<Release Country>=ES,"Spain",
$If(<Release Country>=AU,"Australia",
$If(<Release Country>=RU,"Russia",
$If(<Release Country>=SE,"Sweden",
$If(<Release Country>=BR,"Brazil",
$If(<Release Country>=BE,"Belgium",
$If(<Release Country>=GR,"Greece",
$If(<Release Country>=PL,"Poland",
$If(<Release Country>=MX,"Mexico",
$If(<Release Country>=FI,"Finland",
$If(<Release Country>=JM,"Jamaica",
$If(<Release Country>=CH,"Switzerland",
$If(<Release Country>=SU,"USSR",
$If(<Release Country>=AR,"Argentina",
$If(<Release Country>=DK,"Denmark",
$If(<Release Country>=PT,"Portugal",
$If(<Release Country>=NO,"Norway",
$If(<Release Country>=AT,"Austria",
$If(<Release Country>=NZ,"New Zealand",
$If(<Release Country>=AD,"Andorra",
$If(<Release Country>=AE,"United Arab Emirates",
$If(<Release Country>=AF,"Afghanistan",
$If(<Release Country>=AG,"Antigua & Barbuda",
$If(<Release Country>=AI,"Anguilla",
$If(<Release Country>=AL,"Albania",
$If(<Release Country>=AM,"Armenia",
$If(<Release Country>=AN,"Netherlands Antilles",
$If(<Release Country>=AO,"Angola",
$If(<Release Country>=AQ,"Antarctica",
$If(<Release Country>=AS,"American Samoa",
$If(<Release Country>=AW,"Aruba",
$If(<Release Country>=AX,"Åland Island",
$If(<Release Country>=AZ,"Azerbaijan",
$If(<Release Country>=BA,"Bosnia & Herzegovina",
$If(<Release Country>=BB,"Barbados",
$If(<Release Country>=BD,"Bangladesh",
$If(<Release Country>=BF,"Burkina Faso",
$If(<Release Country>=BG,"Bulgaria",
$If(<Release Country>=BH,"Bahrain",
$If(<Release Country>=BI,"Burundi",
$If(<Release Country>=BJ,"Benin",
$If(<Release Country>=BL,"Saint Barthélemy",
$If(<Release Country>=BM,"Bermuda",
$If(<Release Country>=BN,"Brunei",
$If(<Release Country>=BO,"Bolivia",
$If(<Release Country>=BQ,"Caribbean Netherlands",
$If(<Release Country>=BS,"Bahamas, The",
$If(<Release Country>=BT,"Bhutan",
$If(<Release Country>=BV,"Bouvet Island",
$If(<Release Country>=BW,"Botswana",
$If(<Release Country>=BY,"Belarus",
$If(<Release Country>=BZ,"Belize",
$If(<Release Country>=CC,"Cocos (Keeling) Islands",
$If(<Release Country>=CD,"Congo, Democratic Republic of the",
$If(<Release Country>=CF,"Central African Republic",
$If(<Release Country>=CG,"Congo, Republic of the",
$If(<Release Country>=CI,"Ivory Coast",
$If(<Release Country>=CK,"Cook Islands",
$If(<Release Country>=CL,"Chile",
$If(<Release Country>=CM,"Cameroon",
$If(<Release Country>=CN,"China",
$If(<Release Country>=CO,"Colombia",
$If(<Release Country>=CR,"Costa Rica",
$If(<Release Country>=CS,"Serbia and Montenegro",
$If(<Release Country>=CU,"Cuba",
$If(<Release Country>=CV,"Cape Verde",
$If(<Release Country>=CW,"Curaçao",
$If(<Release Country>=CX,"Christmas Island",
$If(<Release Country>=CY,"Cyprus",
$If(<Release Country>=CZ,"Czech Republic",
$If(<Release Country>=DJ,"Djibouti",
$If(<Release Country>=DM,"Dominica",
$If(<Release Country>=DO,"Dominican Republic",
$If(<Release Country>=DZ,"Algeria",
$If(<Release Country>=EC,"Ecuador",
$If(<Release Country>=EE,"Estonia",
$If(<Release Country>=EG,"Egypt",
$If(<Release Country>=EH,"Western Sahara",
$If(<Release Country>=ER,"Eritrea",
$If(<Release Country>=ET,"Ethiopia",
$If(<Release Country>=FJ,"Fiji",
$If(<Release Country>=FK,"Falkland Islands",
$If(<Release Country>=FM,"Federated States of Micronesia",
$If(<Release Country>=FO,"Faroe Islands",
$If(<Release Country>=GA,"Gabon",
$If(<Release Country>=GD,"Grenada",
$If(<Release Country>=GE,"Georgia",
$If(<Release Country>=GF,"French Guiana",
$If(<Release Country>=GG,"Guernsey",
$If(<Release Country>=GH,"Ghana",
$If(<Release Country>=GI,"Gibraltar",
$If(<Release Country>=GL,"Greenland",
$If(<Release Country>=GM,"Gambia, The",
$If(<Release Country>=GN,"Guinea",
$If(<Release Country>=GP,"Guadeloupe",
$If(<Release Country>=GQ,"Equatorial Guinea",
$If(<Release Country>=GS,"South Georgia and the South Sandwich Islands",
$If(<Release Country>=GT,"Guatemala",
$If(<Release Country>=GU,"Guam",
$If(<Release Country>=GW,"Guinea-Bissau",
$If(<Release Country>=GY,"Guyana",
$If(<Release Country>=HK,"Hong Kong",
$If(<Release Country>=HM,"Heard Island and McDonald Islands",
$If(<Release Country>=HN,"Honduras",
$If(<Release Country>=HR,"Croatia",
$If(<Release Country>=HT,"Haiti",
$If(<Release Country>=HU,"Hungary",
$If(<Release Country>=ID,"Indonesia",
$If(<Release Country>=IE,"Ireland",
$If(<Release Country>=IL,"Israel",
$If(<Release Country>=IM,"Man, Isle of",
$If(<Release Country>=IN,"India",
$If(<Release Country>=IO,"British Indian Ocean Territory",
$If(<Release Country>=IQ,"Iraq",
$If(<Release Country>=IR,"Iran",
$If(<Release Country>=IS,"Iceland",
$If(<Release Country>=JE,"Jersey",
$If(<Release Country>=JO,"Jordan",
$If(<Release Country>=KE,"Kenya",
$If(<Release Country>=KG,"Kyrgyzstan",
$If(<Release Country>=KH,"Cambodia",
$If(<Release Country>=KI,"Kiribati",
$If(<Release Country>=KM,"Comoros",
$If(<Release Country>=KN,"Saint Kitts and Nevis",
$If(<Release Country>=KP,"North Korea",
$If(<Release Country>=KR,"South Korea",
$If(<Release Country>=KW,"Kuwait",
$If(<Release Country>=KY,"Cayman Islands",
$If(<Release Country>=KZ,"Kazakhstan",
$If(<Release Country>=LA,"Laos",
$If(<Release Country>=LB,"Lebanon",
$If(<Release Country>=LC,"Saint Lucia",
$If(<Release Country>=LI,"Liechtenstein",
$If(<Release Country>=LK,"Sri Lanka",
$If(<Release Country>=LR,"Liberia",
$If(<Release Country>=LS,"Lesotho",
$If(<Release Country>=LT,"Lithuania",
$If(<Release Country>=LU,"Luxembourg",
$If(<Release Country>=LV,"Latvia",
$If(<Release Country>=LY,"Libya",
$If(<Release Country>=MA,"Morocco",
$If(<Release Country>=MC,"Monaco",
$If(<Release Country>=MD,"Moldova, Republic of",
$If(<Release Country>=ME,"Montenegro",
$If(<Release Country>=MF,"Saint Martin (French part)",
$If(<Release Country>=MG,"Madagascar",
$If(<Release Country>=MH,"Marshall Islands",
$If(<Release Country>=MK,"Macedonia",
$If(<Release Country>=ML,"Mali",
$If(<Release Country>=MM,"Burma",
$If(<Release Country>=MN,"Mongolia",
$If(<Release Country>=MO,"Macau",
$If(<Release Country>=MP,"Northern Mariana Islands",
$If(<Release Country>=MQ,"Martinique",
$If(<Release Country>=MR,"Mauritania",
$If(<Release Country>=MS,"Montserrat",
$If(<Release Country>=MT,"Malta",
$If(<Release Country>=MU,"Mauritius",
$If(<Release Country>=MV,"Maldives",
$If(<Release Country>=MW,"Malawi",
$If(<Release Country>=MY,"Malaysia",
$If(<Release Country>=MZ,"Mozambique",
$If(<Release Country>=NA,"Namibia",
$If(<Release Country>=NC,"New Caledonia",
$If(<Release Country>=NE,"Niger",
$If(<Release Country>=NF,"Norfolk Island",
$If(<Release Country>=NG,"Nigeria",
$If(<Release Country>=NI,"Nicaragua",
$If(<Release Country>=NP,"Nepal",
$If(<Release Country>=NR,"Nauru",
$If(<Release Country>=NU,"Niue",
$If(<Release Country>=OM,"Oman",
$If(<Release Country>=PA,"Panama",
$If(<Release Country>=PE,"Peru",
$If(<Release Country>=PF,"French Polynesia",
$If(<Release Country>=PG,"Papua New Guinea",
$If(<Release Country>=PH,"Philippines",
$If(<Release Country>=PK,"Pakistan",
$If(<Release Country>=PM,"Saint Pierre and Miquelon",
$If(<Release Country>=PN,"Pitcairn Islands",
$If(<Release Country>=PR,"Puerto Rico",
$If(<Release Country>=PS,"Palestine",
$If(<Release Country>=PW,"Palau",
$If(<Release Country>=PY,"Paraguay",
$If(<Release Country>=QA,"Qatar",
$If(<Release Country>=RE,"Réunion",
$If(<Release Country>=RO,"Romania",
$If(<Release Country>=RS,"Serbia",
$If(<Release Country>=RW,"Rwanda",
$If(<Release Country>=SA,"Saudi Arabia",
$If(<Release Country>=SB,"Solomon Islands",
$If(<Release Country>=SC,"Seychelles",
$If(<Release Country>=SD,"Sudan",
$If(<Release Country>=SG,"Singapore",
$If(<Release Country>=SH,"Saint Helena, Ascension and Tristan da Cunha",
$If(<Release Country>=SI,"Slovenia",
$If(<Release Country>=SJ,"Svalbard and Jan Mayen",
$If(<Release Country>=SK,"Slovakia",
$If(<Release Country>=SL,"Sierra Leone",
$If(<Release Country>=SM,"San Marino",
$If(<Release Country>=SN,"Senegal",
$If(<Release Country>=SO,"Somalia",
$If(<Release Country>=SR,"Suriname",
$If(<Release Country>=SS,"Southern Sudan",
$If(<Release Country>=ST,"Sao Tome and Principe",
$If(<Release Country>=SV,"El Salvador",
$If(<Release Country>=SX,"Sint Maarten",
$If(<Release Country>=SY,"Syria",
$If(<Release Country>=SZ,"Swaziland",
$If(<Release Country>=TC,"Turks and Caicos Islands",
$If(<Release Country>=TD,"Chad",
$If(<Release Country>=TF,"French Southern Territories",
$If(<Release Country>=TG,"Togo",
$If(<Release Country>=TH,"Thailand",
$If(<Release Country>=TJ,"Tajikistan",
$If(<Release Country>=TK,"Tokelau",
$If(<Release Country>=TL,"East Timor",
$If(<Release Country>=TM,"Turkmenistan",
$If(<Release Country>=TN,"Tunisia",
$If(<Release Country>=TO,"Tonga",
$If(<Release Country>=TR,"Turkey",
$If(<Release Country>=TT,"Trinidad & Tobago",
$If(<Release Country>=TV,"Tuvalu",
$If(<Release Country>=TW,"Taiwan",
$If(<Release Country>=TZ,"Tanzania",
$If(<Release Country>=UA,"Ukraine",
$If(<Release Country>=UG,"Uganda",
$If(<Release Country>=UM,"United States Minor Outlying Islands",
$If(<Release Country>=UY,"Uruguay",
$If(<Release Country>=UZ,"Uzbekistan",
$If(<Release Country>=VA,"Vatican City",
$If(<Release Country>=VC,"Saint Vincent and The Grenadines",
$If(<Release Country>=VE,"Venezuela",
$If(<Release Country>=VG,"British Virgin Islands",
$If(<Release Country>=VI,"Virgin Islands",
$If(<Release Country>=VN,"Vietnam",
$If(<Release Country>=VU,"Vanuatu",
$If(<Release Country>=WF,"Wallis and Futuna",
$If(<Release Country>=WS,"Samoa",
$If(<Release Country>=XC,"Czechoslovakia",
$If(<Release Country>=XG,"German Democratic Republic (GDR)",
$If(<Release Country>=XK,"Kosovo",
$If(<Release Country>=YE,"Yemen",
$If(<Release Country>=YT,"Mayotte",
$If(<Release Country>=YU,"Yugoslavia",
$If(<Release Country>=ZA,"South Africa",
$If(<Release Country>=ZM,"Zambia",
$If(<Release Country>=ZW,"Zimbabwe",
))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))

example of use for searching for a release on discogs
Code
https://www.discogs.com/search/?type=all&title=<Album>&artist=<Album Artist>&format=<Release Media>&country=<Virtual Tag Release Counrty>

ewan

  • Newbie
  • *
  • Posts: 5
Example script for writing multi-valued tags to m4a file without changing the way vorbis or id3 metadata is written. The script itself already contains possible multi-valued tags or tags with ";", so you can simply copy it into the Picard settings.
Code
$if($eq(MPEG-4 Audio \(AAC LC\),%_format%),
$set(title,%title%)
$set(artist,%artists%)
$set(album,%album%)
$set(albumartist,%_albumartists%)
$set(releasetype,%releasetype%)
$set(publisher,%publisher%)
$set(catalognumber,%catalognumber%)
$set(genre,%genre%)
$set(arranger,%arranger%)
$set(composer,%composer%)
$set(engineer,%engineer%)
$set(lyricist,%lyricist%)
$set(mixer,%mixer%)
$set(producer,%producer%)
$set(writer,%writer%)
$set(work,%work%)
$set(comment,%comment%)
$set(isrc,%isrc%)
$set(subtitle,%subtitle%)
$set(contentgroup,%contentgroup%)
)

Darkloke

  • Newbie
  • *
  • Posts: 3
Example script for writing multi-valued tags to m4a file without changing the way vorbis or id3 metadata is written. The script itself already contains possible multi-valued tags or tags with ";", so you can simply copy it into the Picard settings.
Thank you very much, i looked for something like this to display multi-valued composer tags in musicbee for m4a files.

But trying your script i found that it doesn't work - the problem was in different format - your script is trying to detect (AAC LC) while in my case it was (ALAC) - this simple change made script to work. But also in musicbrainz community discord i was recommended (special thanks to outsidecontext) to use this more general approach to detect any MPEG4 format:
Code
$if($eq(MPEG-4 Audio,$substr(%_format%,0,12)),

psychoadept

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10723
I've been having a similar challenge with m4a files recently because Picard likes to write some tags slightly differently than the way MusicBee handles them. In particular, MusicBrainz' Release Type tag fails to get picked up by MusicBee when it has multiple values, so I've worked around it mostly by reducing it to a single value (using a lazy method of stripping out the value "album", which catches 90% of cases. there are few enough left that I don't find handling them manually to be onerous).

It's embedded in a longer script, but the relevant portion is this:
$setmulti(releasetype,$replacemulti(%releasetype%,album,))

I haven't noticed any other multi-value tag issues, but then I only use m4a for my backup library, keeping the original downloads from iTunes rather than converting them to mp3.

I also had to do some adjustment for original year (Picard writes originaldate and Musicbee reads originalyear) and original album (Picard writes originalalbum and Musicbee reads origalbum):

$if($eq(%_extension%,m4a),
   $set(originalyear,$left(%_recording_firstreleasedate%,4))$unset(originaldate)
   $set(origalbum,%originalalbum%)$unset(originalalbum),
   $set(originaldate,$left(%_recording_firstreleasedate%,4))$unset(originalyear))

Again, all of the above only applies to the Mpeg-4 format. You could probably replace my search for m4a with the code Darkloke suggested.
MusicBee Wiki
Use & improve MusicBee's documentation!

Latest patches (3.5/3.6)
(Unzip and overwrite existing program files)