Genre For Artist

Hi

Here is what i want to do

I want to use If statement to class by genre all my artists

Per exemple

Pink Floyd Marillion Genesis should be (Progressive rock) in genre

Metallica Black Sabbath Judas Priest should be Heavy Metal

But when i tag a new album , i have to put the same as older ones ones i did

EX.. if (artist is pink floyd) write Progressive in Genre

     if (artist is metallica) write Heavy metal in Genre 

thank you

Martin

There may be various ways to go within Mp3tag, but at first in a simple way you can setup a group of actions, ... having one action for each case.

Set up a group of actions, name the group as you want. Fill the group with actions. 1. Action "Format value" Field ......: GENRE Formatstring: $if($eql($lower(%ARTIST%),'pink floyd'),'Progressive',%GENRE%) 2. Action "Format value" Field ......: GENRE Formatstring: $if($eql($lower(%ARTIST%),'metallica'),'Heavy Metal',%GENRE%) 3. and so on ...

Apply the group of actions against one or more selected files.

If you do not want to check for artist names, written entirely in lowercase, ...
but want to check for artist names in mixed case, ...
then you can remove the function $lower() from the formatstring.

This will not work ... $if($eql($lower(%ARTIST%),'The Pretenders'),'Rock',%GENRE%) ... or ... $if($eql($upper(%ARTIST%),'The Pretenders'),'Rock',%GENRE%) This will work ... $if($eql(%ARTIST%,'The Pretenders'),'Rock',%GENRE%) ... or ... $if($eql($lower(%ARTIST%),'the pretenders'),'Rock',%GENRE%) ... or ... $if($eql($upper(%ARTIST%),'THE PRETENDERS'),'Rock',%GENRE%) ... or ... $if($eql($lower(%ARTIST%),$lower('The Pretenders')),'Rock',%GENRE%) ... or ... $if($eql($upper(%ARTIST%),$upper('The Pretenders')),'Rock',%GENRE%) ... or ... $if($eql($upper(%ARTIST%),$upper('ThE preTenderS')),'Rock',%GENRE%) ... or ... $if($eql($lower(%ARTIST%),$lower('ThE preTenderS')),'Rock',%GENRE%) To be more error free, then remove special characters from the artist names ... $if($eql($replace($lower(%ARTIST%),'',,'&',,'#',,'-',,'`',),$replace($lower('Frank Zappa & The Mothers'),'',,'&',,'#',,'-',,'`',)),'Rock',%GENRE%)

DD.20160305.2038.CET, DD.20160307.1130.CET

Thank you SIR

it is working

I tried something else

I exported As csv file Both Fields Artist and Genre

Is there a way to import only the genre for

I tried it and it imports both fileds

Thank you

Use %dummy%
to discard any data you do not want.

When i import from txt or csv i have both fileds

Artist and Genre


Why some are working and somes do not work

here is my settings if you can take a look at

thank you

Mp3tagSettings.zip (38 KB)

I Exported on a file artist and genre

when i try to import form the genre field do not fit with the artist

look at the capture

thank you


You have to keep the structure of the data.
So to ignore that data that represents the artist try:
%dummy%;%genre%

Yes i understand that but when i importoff the txt file with %dummy%;%genre%

i have differents genre for the same artist
(look at the capture)

Maybe the export settings are not correctly set
$filename(csv,utf-16)$loop(%_parent_directory%,1)%artist%$char(9)%genre%$char(9)
$loopend()

thank you



The export format and the import format have to match.
If you use the tab character (char 9) as separator, you have to input that somehow for the import mask - very tricky to do as TAB usually navigates to the next element in the dialogue.
You would have to use a printable character, not a control character for the export, e.g. ";" or "_"

I am near i know that

look again at capture It only works for line 1

line 2 and 3 goes for the 2nd and 3rd album because i exported only 3 folders

i had modify the export to
$filename(csv,utf-16)$loop(%artist%,1)%artist%;%genre%
$loopend()


Please explain in your words what you want to achieve with the report output.

Note: When importing data, Mp3tag's base target element is the single track.
Therefore you have to address each file when importing data.

If you want to output data from tracks into report text file, ...
and afterwards you want to import data, then you have to address each track solely.
While exporting this can be done by using the %_path% variable in a $loop() command.
When importing, the exported %_path% data is the binding relation between data and target file.

DD.20160306.1841.CET

i am not very good in English

i have a thousands of audio files (i have around 150 different genres for all my artists)
when i add a new album with an artist i already had tag, i do not want to open old audio files to look at the (genre) i already tagged

It is why i followed the steps your posted yesterday and it do not work corrctly (syntax error)
i tried another way (export some fields of all my artists by genre) but my export fields do not work corrctly

I only want to save time and have a bank of Artist by genre

thank you

Martin

How do you then know which artist you already have? I mean, without looking it up?
I most certainly do not know how I tagged certain artists.
And in general I doubt that the rule "one artist = one genre" applies. I think that more or less any artist is good for several genres. The artist Sting, e.g. has released pop albums as well as (almost) classical music/musical ... Same applies to Herbie Hancock (jazz, electronic) and many more.

Back to the technical side: I think that you have to create one export for each artist-genre combination (perhaps filename = %artist%) with just one line in it, the genre.
You then select the files of the artist and import that file with the single line (record) in it.

You could just as easy create an action for that...

1: $filename($getEnv('USERPROFILE')'\Desktop\Mp3tag.Report.GENRE.ARTIST.txt',UTF-8)

2: $loop($left($left(%GENRE%$repeat($char(32),20),20)%ARTIST%,80),1)$if(%GENRE%,'"'%GENRE%'";"'%ARTIST%'"'$char(13)$char(10),)$loopend()

... or ...

1: $filename($getEnv('USERPROFILE')'\Desktop\Mp3tag.Report.GENRE.ARTIST.txt',UTF-8)

2: $loop(%GENRE%,1)$loop(%ARTIST%,1)$if(%GENRE%,'"'%GENRE%'";"'%ARTIST%'"'$char(13)$char(10),)$loopend()$loopend()

DD.20160306.2000.CET

For Export it is perfect

but when i want to tag a new album and import the text to tag to put the right value on genre it doens't work


Ok Now i Found the Issue with

If an Artist name have an ' on it , it cause a Syntax Error like (Sylvan's)

I removed some of them and it works correctly now

thank you