# Separate all album artist in one tag field

**URL:** <https://community.mp3tag.de/t/separate-all-album-artist-in-one-tag-field/18180>\
**Category:** Support\
**Created:** [August 17, 2016, 4:34am UTC](https://community.mp3tag.de/t/separate-all-album-artist-in-one-tag-field/18180 "2016-08-17T04:34:15Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![M111](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/977dab/32.png) [@M111](https://community.mp3tag.de/u/M111)\
**Post date:** [August 17, 2016, 4:34am UTC](https://community.mp3tag.de/t/separate-all-album-artist-in-one-tag-field/18180/1 "2016-08-17T04:34:15Z")

</div>

Hello,

After lot's of research is not possible to find what i'm looking for.

I want from one album with 12 Various Artist to extract all artist under one tag field and separate them with commas

eg: artist-a, artist-b, artist-c

My code are:

```
$loop(%artist%) %artist%$loopend()

```

How can separate the album artist with commas ?

Thank you in advance,  
Mark

---

<div class="post-metadata">

**Author:** ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)\
**Post date:** [August 17, 2016, 6:28am UTC](https://community.mp3tag.de/t/separate-all-album-artist-in-one-tag-field/18180/2 "2016-08-17T06:28:24Z")

</div>

Although it is not quite clear what you want as you talk about albumartist and artist, I'll try:  
$filename(artists.txt,utf-8)$loop(%track%)%artist%; $loopend()  
Make sure that this is the only line in the export script.  
You may replace the "; " with a separator of your liking.

---

<div class="post-metadata">

**Author:** ![M111](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/977dab/32.png) [@M111](https://community.mp3tag.de/u/M111)\
**Post date:** [August 17, 2016, 7:01am UTC](https://community.mp3tag.de/t/separate-all-album-artist-in-one-tag-field/18180/3 "2016-08-17T07:01:14Z")

</div>

Hi,

Thanks for your reply,

It's working well but seems need little more optimization the code. My results are below:

```
Deeon, Deeon, Deeon,Michel,Deeon,Jeroen,Deeon,Modern,Project, Deeon DJ Deeon, 

```

On above results i have two questions:

1. How to prevent the duplicates artist on tag, in my case you can see the artist name "Deeon" many times there. I want to not duplicate artist.

2. How can i remove the last comma from the last artist in line?

Thanks for your help on that.

---

<div class="post-metadata">

**Author:** ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)\
**Post date:** [August 17, 2016, 7:08am UTC](https://community.mp3tag.de/t/separate-all-album-artist-in-one-tag-field/18180/4 "2016-08-17T07:08:40Z")

</div>

> [@M@rK](#):
>
> ...
> 
> 1. How to prevent the duplicates artist on tag, in my case you can see the artist name "Deeon" many times there. I want to not duplicate artist.

$filename(artisten.txt,utf-8)$loop(%artist%,1)%artist%; $loopend()

> [@](#):
>
> 1. How can i remove the last comma from the last artist in line? ...

With a separate action or manually

Replace with regular expression for ARTIST  
Search string: ,$  
(or , $)  
Replace string:  
(leave empty)

---

<div class="post-metadata">

**Author:** ![M111](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/977dab/32.png) [@M111](https://community.mp3tag.de/u/M111)\
**Post date:** [August 17, 2016, 8:23am UTC](https://community.mp3tag.de/t/separate-all-album-artist-in-one-tag-field/18180/5 "2016-08-17T08:23:58Z")

</div>

Hi,

> [@ohrenkino](#):
>
> $filename(artisten.txt,utf-8)$loop(%artist%,1)%artist%; $loopend()

it's strange because not limit the duplicate artist to one, keep generate same artist.

> [@](#):
>
> With a separate action or manually
> 
> Replace with regular expression for ARTIST  
> Search string: ,$  
> (or , $)  
> Replace string:  
> (leave empty)

I'm not understand that point, it's possible to help me on code?

Thank you

---

<div class="post-metadata">

**Author:** ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)\
**Post date:** [August 17, 2016, 8:42am UTC](https://community.mp3tag.de/t/separate-all-album-artist-in-one-tag-field/18180/6 "2016-08-17T08:42:12Z")

</div>

> [@M@rK](#):
>
> ...it's strange because not limit the duplicate artist to one, keep generate same artist. ...

So is it working? (Because I tried it on a set and it produces a list with just one entry for each artist regardless how often it appears in the files)

The code is all there .. if you are not sure about actions, see the faq on actions:  
[/t/967/1](https://community.mp3tag.de/t/967/1)

---

<div class="post-metadata">

**Author:** ![M111](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/977dab/32.png) [@M111](https://community.mp3tag.de/u/M111)\
**Post date:** [August 17, 2016, 9:08am UTC](https://community.mp3tag.de/t/separate-all-album-artist-in-one-tag-field/18180/7 "2016-08-17T09:08:26Z")

</div>

> [@ohrenkino](#):
>
> So is it working? (Because I tried it on a set and it produces a list with just one entry for each artist regardless how often it appears in the files)
> 
> The code is all there .. if you are not sure about actions, see the faq on actions:  
> [/t/967/1](https://community.mp3tag.de/t/967/1)

Hi,

This code $filename(artisten.txt,utf-8)$loop(%artist%,1)%artist%; $loopend()

keep duplicate the artist name from the album. I just update my software to latest version and it's the same story.

Also try to access on the link you provide but seems not working sections.

Test also on clear export file with only that code but it's the same.

Thank you for your time

---

<div class="post-metadata">

**Author:** ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)\
**Post date:** [August 17, 2016, 9:30am UTC](https://community.mp3tag.de/t/separate-all-album-artist-in-one-tag-field/18180/8 "2016-08-17T09:30:13Z")

</div>

> [@M@rK](#):
>
> Hi,
> 
> This code $filename(artisten.txt,utf-8)$loop(%artist%,1)%artist%; $loopend()
> 
> keep duplicate the artist name from the album. I just update my software to latest version and it's the same story.  
> ...

It has to be  
$filename(artisten.txt,utf-8)$loop(%artist% **,1** )%artist%; $loopend()  
Otherwise it repeats the artist.  
I doublechecked, this code is OK.  
I am not sure about any problems with the link but you are free to check the FAQs yourself: see the section on actions. A direct link to the FAQs is supplied in the header on this page.

---

<div class="post-metadata">

**Author:** ![M111](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/977dab/32.png) [@M111](https://community.mp3tag.de/u/M111)\
**Post date:** [August 17, 2016, 9:51am UTC](https://community.mp3tag.de/t/separate-all-album-artist-in-one-tag-field/18180/9 "2016-08-17T09:51:52Z")

</div>

> [@ohrenkino](#):
>
> It has to be  
> $filename(artisten.txt,utf-8)$loop(%artist% **,1** )%artist%; $loopend()  
> Otherwise it repeats the artist.  
> I doublechecked, this code is OK.  
> I am not sure about any problems with the link but you are free to check the FAQs yourself: see the section on actions. A direct link to the FAQs is supplied in the header on this page.

I just copy&paste your code in to the clear (test) export file, duplicate artist come up again. I'm not sure why this happen to me.

> [@](#):
>
> $filename(artisten.txt,utf-8)$loop(%artist%,1)%artist%; $loopend()

It's past 48 Hours without solution, I keep searching and reading on forums.

Thanks for your help so far.

Regards

---

<div class="post-metadata">

**Author:** ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)\
**Post date:** [August 17, 2016, 9:57am UTC](https://community.mp3tag.de/t/separate-all-album-artist-in-one-tag-field/18180/10 "2016-08-17T09:57:13Z")

</div>

> [@M@rK](#):
>
> I just copy&paste your code in to the clear (test) export file, duplicate artist come up again. I'm not sure why this happen to me.
> 
> It's past 48 Hours without solution, I keep searching and reading on forums.
> 
> Thanks for your help so far.
> 
> Regards

I put a filename in the export script:  
$filename(artisten.txt,utf-8)...

So the file you check should be called "artisten.txt" and can be found in the folder of the sampler.  
It is also possible that the artists data shows slightly different spelling or additional blanks so that they are actually not the same.

---

<div class="post-metadata">

**Author:** ![M111](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/977dab/32.png) [@M111](https://community.mp3tag.de/u/M111)\
**Post date:** [August 17, 2016, 10:15am UTC](https://community.mp3tag.de/t/separate-all-album-artist-in-one-tag-field/18180/11 "2016-08-17T10:15:23Z")

</div>

> [@ohrenkino](#):
>
> I put a filename in the export script:  
> $filename(artisten.txt,utf-8)...
> 
> So the file you check should be called "artisten.txt" and can be found in the folder of the sampler.  
> It is also possible that the artists data shows slightly different spelling or additional blanks so that they are actually not the same.

Really strange, i follow all the information you provide, checking also the same export file..  
I have clear tag artist name, please see attached screenshot how artist are tagged and see below my results after optimized export.

> [@](#):
>
> DJ Deeon,DJ Deeon,Jeroen Search,DJ Deeon,Michel De Hey,DJ Deeon,Modern Anominal Techno Project,

Not sure what else to check..

![](https://community.mp3tag.de/uploads/default/original/2X/4/4bc29fdabe9908ff05b9791ce02ee81e2984ea46.png)

---

<div class="post-metadata">

**Author:** ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)\
**Post date:** [August 17, 2016, 10:22am UTC](https://community.mp3tag.de/t/separate-all-album-artist-in-one-tag-field/18180/12 "2016-08-17T10:22:54Z")

</div>

> [@M@rK](#):
>
> Really strange, i follow all the information you provide, checking also the same export file..  
> I have clear tag artist name, please see attached screenshot how artist are tagged and see below my results after optimized export.
> 
> Not sure what else to check..

Ah! That cleared it up:  
You actually have the following names:  
DJ Deeon,  
DJ Deeon,Jeroen Search,  
DJ Deeon,Michel De Hey,  
DJ Deeon,Modern Anominal Techno Project,  
As a string, these are 4 different things, even though they have shared parts in it.  
AFAI can tell, the script works perfect.

Is "DJ Deeon" the ALBUMARTIST? Would you like to separate the data in ARTIST so that the part in front of the comma becomes the ALBUMARTIST and the part behind the comma becomes the ARTIST?

---

<div class="post-metadata">

**Author:** ![M111](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/977dab/32.png) [@M111](https://community.mp3tag.de/u/M111)\
**Post date:** [August 17, 2016, 10:45am UTC](https://community.mp3tag.de/t/separate-all-album-artist-in-one-tag-field/18180/13 "2016-08-17T10:45:14Z")

</div>

[quote name='ohrenkino' post='91684']Ah! That cleared it up:  
You actually have the following names:  
DJ Deeon,  
DJ Deeon,Jeroen Search,  
DJ Deeon,Michel De Hey,  
DJ Deeon,Modern Anominal Techno Project,  
As a string, these are 4 different things, even though they have shared parts in it.  
AFAI can tell, the script works perfect.

Is "DJ Deeon" the ALBUMARTIST? Would you like to separate the data in ARTIST so that the part in front of the comma becomes the ALBUMARTIST and the part behind the comma becomes the ARTIST?[quote]

Got it. You are right!

Since now i try to separate them with comma what should be the code ?

$filename(artisten.txt,utf-8)$loop(%artist%,1)%artist%, $loopend()

Above code works good but keep the comma also in last artist on line, It's possible to keep it clear?

Thank you

---

<div class="post-metadata">

**Author:** ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)\
**Post date:** [August 17, 2016, 11:00am UTC](https://community.mp3tag.de/t/separate-all-album-artist-in-one-tag-field/18180/14 "2016-08-17T11:00:22Z")

</div>

> [@M@rK](#):
>
> ... Since now i try to separate them with comma what should be the code ?
> 
> $filename(artisten.txt,utf-8)$loop(%artist%,1)%artist%, $loopend()
> 
> Above code works good but keep the comma also in last artist on line, It's possible to keep it clear?
> 
> Thank you

As you see, the report takes the data from a single field just as it is, no interpretation, no comparison.

I would perhaps think about the naming scheme.  
I would put  
DJ Deeon as ALBUMARTIST  
and the following names into ARTIST:  
Jeroen Search  
Michel De Hey  
Modern Anominal Techno Project

Like that you get an ALBUM by DJ Deeon and still the other ones as contributing artists.

You can split the ARTIST field with an action of the type "Guess value".  
Select the files  
Click on the toolbar button "Action (Quick)"  
Select an action of the type "Guess value"  
Source: %artist%  
Guessing pattern: %albumartist%,%artist%  
Click OK.  
Check the result.

And then it could be that you need a different export script:  
$filename(artisten.txt,utf-8)%albumartist%:$loop(%artist%,1)%artist%, $loopend()

---

<div class="post-metadata">

**Author:** ![M111](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/977dab/32.png) [@M111](https://community.mp3tag.de/u/M111)\
**Post date:** [August 17, 2016, 11:32am UTC](https://community.mp3tag.de/t/separate-all-album-artist-in-one-tag-field/18180/15 "2016-08-17T11:32:32Z")

</div>

> [@ohrenkino](#):
>
> As you see, the report takes the data from a single field just as it is, no interpretation, no comparison.
> 
> I would perhaps think about the naming scheme.  
> I would put  
> DJ Deeon as ALBUMARTIST  
> and the following names into ARTIST:  
> Jeroen Search  
> Michel De Hey  
> Modern Anominal Techno Project
> 
> Like that you get an ALBUM by DJ Deeon and still the other ones as contributing artists.
> 
> You can split the ARTIST field with an action of the type "Guess value".  
> Select the files  
> Click on the toolbar button "Action (Quick)"  
> Select an action of the type "Guess value"  
> Source: %artist%  
> Guessing pattern: %albumartist%,%artist%  
> Click OK.  
> Check the result.
> 
> And then it could be that you need a different export script:  
> $filename(artisten.txt,utf-8)%albumartist%:$loop(%artist%,1)%artist%, $loopend()

I got your point and it's clear! thank you very much. It's possible also to let me know the comma separator code ?

I done your test and results are blow

> [@](#):
>
> DJ Deeon: DJ Deeon, Jeroen Search, Michel De Hey, Modern Anominal Techno Project,

As you see there is comma on latest artist "Modern Anominal Techno Project," It's possible to filter the code and not produce comma on latest artist ?

Thank you for your help.

---

<div class="post-metadata">

**Author:** ![M111](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/977dab/32.png) [@M111](https://community.mp3tag.de/u/M111)\
**Post date:** [August 17, 2016, 11:35am UTC](https://community.mp3tag.de/t/separate-all-album-artist-in-one-tag-field/18180/16 "2016-08-17T11:35:11Z")

</div>

Also I like to donate the software as it's help me a lots with my staff!! What is the right link for it?

Thank you

---

<div class="post-metadata">

**Author:** ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)\
**Post date:** [August 17, 2016, 4:22pm UTC](https://community.mp3tag.de/t/separate-all-album-artist-in-one-tag-field/18180/17 "2016-08-17T16:22:22Z")

</div>

> [@M@rK](#):
>
> ...As you see there is comma on latest artist "Modern Anominal Techno Project," It's possible to filter the code and not produce comma on latest artist ?
> 
> Thank you for your help.

Here is a little bit more complicated code. i don't know if it is the most elegant, but it works:

```
$filename(artists.txt,utf-8)$loop(1,1)%albumartist%: $puts(mp,1)$loop(%artist%,1)$puts(mp,%_counter%)$loopend()$loop(%artist%,1)%artist%$if($eql($get(mp),%_counter%),,', ')$loopend()$loopend()

```

And here is the link for donations:

[http://www.mp3tag.de/en/donations.html](http://www.mp3tag.de/en/donations.html)

---

<div class="post-metadata">

**Author:** ![system](https://community.mp3tag.de/uploads/default/original/2X/c/ce7035d426cb755a7916793326d23b465222a407.png) [@system](https://community.mp3tag.de/u/system)\
**Post date:** [February 9, 2026, 12:26pm UTC](https://community.mp3tag.de/t/separate-all-album-artist-in-one-tag-field/18180/18 "2026-02-09T12:26:22Z")

</div>


