Author Topic: Tagging: Copy tag field into another and then replace entries automatically  (Read 312 times)

Markus2310

  • Jr. Member
  • **
  • Posts: 42
Hey, :)

I'm a little desperate right now because I have a problem that can't be solved when tagging using mp3tag.
Is there a way in Musicbee to copy certain word sequences from e.g. Genre into another tag field and then replace them with other words?

Plan: copy from Tag Field "Genre" to tag field "wwwradiopage" (which i use as "Main Genre" tag field)

Examples:
I tagged the tag field Genre like this: Acoustic Ballad; Acoustic Metal; Trance; Dixieland
Main Genres for that would be: Acoustic Ballad -> "Acoustic" and "Ballad". Acoustic Metal -> "Acoustic" and "Metal". Trance -> "EDM". Dixieland -> "Jazz".
Is there a way in Musicbee to execute a command or smth that copies from the above example of the "Genre" tag field into another tag field, in this example like this: "Acoustic; Ballad; Metal; EDM; Jazz" ? The problem here is that each time there are different tags in the tag field genre.

Examples:
Genre "Melodic Metal; Heavy Metal; Metal Ballad" should be Main Genre: "Metal; Ballad" (all genres are in the main genre "Metal", Metal Ballad -> "Metal" and "Ballad")
Genre "Symphonic Metal; Heavy Metal; Orchestral Metal; Orchestral Choir" should be Main Genre: "Metal; Orchestral; Contemporary Choir" (Symponic Metal, Heavy Metal and Orchestral Metal -> "Metal", Orchestral Metal -> "Orchestral" and "Metal", Orchestral Choir -> "Orchestral" and "Contemporary Choir")
Genre "Post Hardcore; Metalcore; Alternative Metal" should be Main Genre: "Metal; Alternative" (Post Hardcore and Metalcore -> "Metal", Alternative Metal -> "Alternative" and "Metal")
Genre "Synth Pop; Dark Ambient; Dark Wave" should be Main Genre: "Pop; Gothic; Rock; Ambient" (Synth Pop -> "Pop", Dark Ambient -> "Gothic" and "Ambient", Dark Wave -> "Gothic" and "Rock")

It would be great if there was a way to do this automatically

Thank you in advance for help! :)

Mayibongwe

  • Sr. Member
  • ****
  • Posts: 1070
  • Heal The World
That would require a dozen of nested if statements, and I don't think you wanna go that route.

Have uu perhaps come across hiccup's Genre Hierarchy?
It was designed for this exact purpose, I believe.
I already spend hours on end on social media. Might as well spare a few of those to a greater purpose here.

hiccup

  • Sr. Member
  • ****
  • Posts: 7907
That would require a dozen of nested if statements, and I don't think you wanna go that route.
Have uu perhaps come across hiccup's Genre Hierarchy?
It was designed for this exact purpose, I believe.
Yes, I agree with Mayibongwe that using the Tag Hierarchy Explorer would be the best solution to do something like this.

But using my Enhanced Genre Hierarchy table would probably not be very useful to Markus2310 because many of the genre names that he seems to be using are not acknowledged genres by either RYM, MusicBrainz or Discogs.
Hence they won't be in my Enhanced Genre Hierarchy table as genres either.
(I think I have terms such as 'acoustic', 'ballad' etc. present under Style/Form though)

So, this would require creating a custom genre hierarchy table.
Which will also be a lot work.

P.S.
Creating main genres based on what words the original genre contains can be flawed also. Because e.g.:
Acid jazz is not Jazz
Swamp pop is not Pop
Lovers rock is not Rock
etc.
Last Edit: February 02, 2024, 04:59:53 PM by hiccup

Markus2310

  • Jr. Member
  • **
  • Posts: 42
Thank you very much! I didnt know that there i such a thing in Musicbee! Its perfect!
Yesterday I spend the day to create my own table and its works perfectly!
But there is one Problem for Example with "Christmas"
I would like to create the "Christmas" category and have subcategories underneath that only show certain styles of music within Christmas. Example: one song has the genres "Christmas; Chill Out" and another "Christmas; Pop" I would like to have the following in the Hierarchy Explorer tag:

Christmas
►Christmas Chill Out
►Christmas Pop

Would be great if there appear only songs, that have "Christmas" AND "Chill Out"... or "Christmas" AND "Pop"... as genre.

Right now i have it like this:
   Christmas
      Christmas Pop
         Christmas::genre
         Pop::genre
         Pop Rock::genre
         Synth Pop::genre

      Christmas Chill
         Christmas::genre
         Ambient::genre
         Chill Out::genre
         Lounge::genre

Now of course all songs are displayed that have “Christmas” OR “Pop” OR "Synth Pop"... in the genre. Is there a way to display songs that have "Christmas" AND "Pop", "Christmas" AND "Synth Pop"... in the genre? That would be great!

hiccup

  • Sr. Member
  • ****
  • Posts: 7907
Thank you very much! I didnt know that there i such a thing in Musicbee! Its perfect!
Yesterday I spend the day to create my own table and its works perfectly!
Great, you picked that up pretty fast!

Quote
I would like to create the "Christmas" category and have subcategories underneath that only show certain styles of music within Christmas. Example: one song has the genres "Christmas; Chill Out" and another "Christmas; Pop" I would like to have the following in the Hierarchy Explorer tag
You may be able to achieve that by using a virtual tag that gets formatted to your preference, the 'genre' tag being the source.
Then you can incorporate that virtual tag into your hierarchy table.

Markus2310

  • Jr. Member
  • **
  • Posts: 42
Thank you very much. I'm not using very much genres. For example for "Brutal death metal", "industrial death metal" I use just "Death Metal". I use that for all subgenres.

I tried now to figure out what exactly i should do to build a virtual tag which give me a genre which contains several genres in combination. Maybe I'm too dumb but i dont get it.
The biggest problem is that I want to combine different genres, but each only with "Christmas".
Virtual Tag “Christmas Chill” for example, should then display the following combinations: "'Christmas' and 'Chill Out'", "'Christmas' and 'Lounge'", "'Christmas' and 'New Age'"
In the end, the virtual tag "Christmas Chill" should contain all songs that contain the tag "Chill Out", but only if "Christmas" is also included. The same with "Lounge", "New Age" etc.

how can this best be implemented?

hiccup

  • Sr. Member
  • ****
  • Posts: 7907
Virtual Tag “Christmas Chill” for example, should then display the following combinations: "'Christmas' and 'Chill Out'", "'Christmas' and 'Lounge'", "'Christmas' and 'New Age'"
First off, please don't assume that I fully understand what you are doing and trying to accomplish, or that I have perfect solutions for it in my mind.
My replies are merely guesses and pointers that I have a hunch about that they may help you getting closer to what you are trying to do.
(your approach to 'genres' is quite different from mine, so it's difficult for me to switch my brain to how you are doing things)

When I suggested to use a virtual tag, I didn't mean to create a virtual tag such as 'Christmas chill'.
I meant creating a virtual tag such as 'Genre group'. (or any possibly better choice of words)
Then that virtual tag could check on if the genre tag contains 'Christmas', and if it does, populate it with the other genre tags also.
If it doesn't, check for other (what you consider to be) 'main genres', and do the same.
That should populate that virtual tag with values that you could then use for your tag hierarchy table.

e.g.
Christmas Chill
    Christmas · Ambient::Genre group

Again, I'm not completely sure if this would work for what you are asking for.
Or even if it is what you are asking for.
Consider it some fuzzy-logic process going on in my brain that I am sharing ;-)
Last Edit: February 03, 2024, 05:54:03 PM by hiccup

Markus2310

  • Jr. Member
  • **
  • Posts: 42
That sounds exactly like something i could work with!

But I don't get how to do it. I just create a virtual tag, name it, for example "Genre Group" and add just "<Genre>Christmas" to the template editor? and in the tag hierarchy table I add the other genres?

hiccup

  • Sr. Member
  • ****
  • Posts: 7907
But I don't get how to do it. I just create a virtual tag, name it, for example "Genre Group" and add just "<Genre>Christmas" to the template editor? and in the tag hierarchy table I add the other genres?
No, the virtual tag should give output depending on conditions that checks existing values (genres) in the genre tag:

Then that virtual tag could check on if the genre tag contains 'Christmas', and if it does, populate it with the other genre tags also.
If it doesn't, check for other (what you consider to be) 'main genres', and do the same.
That should populate that virtual tag with values that you could then use for your tag hierarchy table.

See here for available functions for virtual tags.

Depending on how many genres you want to apply this to, the virtual tag can soon get unwieldy long and complicated though.