# sort according to partial comment?

**URL:** https://community.mp3tag.de/t/sort-according-to-partial-comment/4818
**Category:** Export
**Created:** [May 3, 2007, 9:07pm UTC](https://community.mp3tag.de/t/sort-according-to-partial-comment/4818 "2007-05-03T21:07:39Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![JWCompany](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/j/cdc98d/32.png) [@JWCompany](https://community.mp3tag.de/u/JWCompany)
#### Post date: [May 3, 2007, 9:07pm UTC](https://community.mp3tag.de/t/sort-according-to-partial-comment/4818/1 "2007-05-03T21:07:39Z")

</div>

Hi,

for quite a while now I have been looking for a software that would do the following trick for me: In the comment tag of my mp3s I saved the names of the musicians, for instance three different comment tags might be:

1.mp3: Chick Corea (p), Bobby McFerrin (voc)  
2.mp3: Chick Corea (p)  
3.mp3: Chick Corea (p), Bobby McFerrin (voc), Peter Merry (b)

Now I would like to create huge lists of musicians, as in:

Bobby McFerrin (voc): 1.mp3, 2.mp3  
Chick Corea (p): 1.mp3, 2.mp3, 3.mp3  
Peter Merry (b): 3.mp3

Is there any way I can get mp3tag to do this for me? It seems fairly complicated, as it involves sorting according to only parts of the comment...

Thanks a lot,  
Johannes.

---

<div class="post-metadata">

### Author: ![zencd](https://community.mp3tag.de/user_avatar/community.mp3tag.de/zencd/32/88_2.png) [@zencd](https://community.mp3tag.de/u/zencd)
#### Post date: [May 3, 2007, 9:54pm UTC](https://community.mp3tag.de/t/sort-according-to-partial-comment/4818/2 "2007-05-03T21:54:31Z")

</div>

I think it's possible to do with some different software, not mp3tag:

1. add your files into a program that is able to produce a report file (txt,csv,etc)
2. make the report
3. the following is tricker because I suppose there is no existing software doing exactly what you want: you should parse the report (the COMMENT filed) and produce the desired list --\>

If (you know programming) {  
you could do it rather easily  
} else {  
ask your friends to process the report 🙂  
}

Probably even me could write some script for you. In such case send me a .col file produced by the [http://mac.sf.net/](http://mac.sf.net/) software and I will play with it.

If there is an existing way I would be glad to know about it instead to code 🙂

---

<div class="post-metadata">

### Author: ![JWCompany](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/j/cdc98d/32.png) [@JWCompany](https://community.mp3tag.de/u/JWCompany)
#### Post date: [May 7, 2007, 9:42am UTC](https://community.mp3tag.de/t/sort-according-to-partial-comment/4818/3 "2007-05-07T09:42:56Z")

</div>

I'm afraid I have to give up my own attempts to code something. I thought I had figured out something, but then it doesn't return the value I expect even at such an early stage, so if you're still happy to code, zencd, I'd be very glad... I've sent you a PM with a trifle more detail.

Just if anyone can spot my mistake at first glance:

$filename(txt)$loop(performer)$put(comm\_per,%comment%)$put(performer,$mid(comm\_per,$strstr(performer,', ')-1,1))$loopend()

or, a bit more step-by step:

$put(comm\_per,%comment%) _// assigns comment value to comm\_per_   
$strstr(comm\_per,', ') _// search for ", " in comm\_per -\>position is lenght+1 of first artist_  
$put(performer,$mid(comm\_per,$strstr(performer,', ')-1,1)) _//as many characters of performer as found with $strstr are copied via $mid to performer_

Thanks for your time and effort, zencd and everyone looking at this,  
Johannes.

---

<div class="post-metadata">

### Author: ![zencd](https://community.mp3tag.de/user_avatar/community.mp3tag.de/zencd/32/88_2.png) [@zencd](https://community.mp3tag.de/u/zencd)
#### Post date: [May 7, 2007, 10:50am UTC](https://community.mp3tag.de/t/sort-according-to-partial-comment/4818/4 "2007-05-07T10:50:38Z")

</div>

I am playing with Python language - cannot even imagine how to do it with mp3tag's facilities
