How to tag "Untitled" tracks


#1

So I have a lot of tracks that are named "Untitled". Lots of electronic releases have songs marked as "Untitled" or "Instrumental" or "Interlude", etc. and there can be many with the same title in the same release. I am looking for a good solution to make these tracks unique so I don't have hundreds of tracks showing up with the same name in my player.

MusicBrainz has a standard for naming such tracks:
http://musicbrainz.org/doc/Style/Unknown_a...ose_track_title
They state that untitled should be encapsulated with [].

According to their standard, the track field would look something like this:

[album, part x] [untitled]

I'm not into having "part x" after the album title, because some album titles are very long, so
I was thinking maybe something like this: [album] [untitled 1].

However, "untitled 1" is not the "true" name of the track, so maybe the number would come after [untitled] such as [untitled] [1], [2], [3], etc.

I'm looking if anyone else has had to deal with this and might have a cleaner method.

Thanks!


#2

Have you got an example album (URL link) that shows this. I have yet to come across albums labelled like this. Maybe one track but not many like you say.

Or is it your tracks have names and you have the TITLE tagged as 'Untitled' and don;t know what it's called?


#3

No - there are no tracks that are unknown or unidentified. Here are a few albums in my collection that are like this:

http://www.discogs.com/Kit-Clayton-Lateral...lt/master/60890

http://www.discogs.com/Donato-Dozzy-K/master/264178

http://www.discogs.com/Guillermo-Scott-Her.../release/643569


#4

:astonished: Gosh! I've never seen that many before.

Anyway here's a solution:

Begin Action Group _Script Test#TEST deckard

Action #1 Actiontype 5: Format value Field ______: TITLE Formatstring: $if($eql($regexp(%title%,'(?i)^untitled$|^instrumental$|^interlude ,'yes'),'yes'),$if($eql($regexp(%album%,'^.{1,21} ,'yes'),'yes'),'['%album%']','['$left(%album%,21)'...'']') '['%title%']' '['$num($regexp(%track%,'^0*(\d*)\/*\d*','$1'),2)']',%title%)


End Action Group _Script Test#TEST deckard(1 Action)

Here's the new TITLE results:
"Untitled" ->
"[Sleeping On Saturday ...] [Untitled] [06]"

"Stranger Than" ->
"Stranger Than"

"Reverse The Verse" ->
"Reverse The Verse"

"Interlude" ->
"[Sleeping On Saturday ...] [Interlude] [04]"

"Instrumental" ->
"[Sleeping On Saturday ...] [Instrumental] [05]"

"Cry Me A Lake" ->
"Cry Me A Lake"

Few things to note:
Your TRACK can have the format:
3
04/10
07
9/10

And the result will always be a padded track with 2 digits like the result
[03]
[04]
[07]
[09]

I've also limited the number of characters the album field takes up in the new TITLE with the use of the $left(%album%,21)'...' Just change the 21 and 21 in ^.{1,21}$ to whatever character number you want, and your done. You can also take out the '...' as well but this is a good indicator that there is more of an album name just by looking at the title. (See results above)

Hope this helps.


#5

Hi again and thanks very much for that! You took it a step further with the script, which I will gladly use, but I was merely looking for other suggestions on how to make these tracks unique.

In other words, does anyone have any other ideas besides:

"[album title] [untitled] [1]" for the track name?

No matter what, I have to have the album title in there and a number.

As I was saying, MusicBrainz recommends "[album title, part x] [untitled]", but I wasn't too happy with that one.

I've seen people use "[album title] [untitled] #x" and similar but I was just looking for more possibilities.

On another note, you made me remember something else I've been curious about: I've noticed whenever I've tried to do anything with strings, it seems if I try to use square brackets "[ ]" as part of a string, they always seem to get removed from the end result. For instance, here is a format string I wanted to use to auto-increment the track names with a number:

[Album] [Track $num(%_counter%,2)]

When using this string, the [ ] characters are removed.

(Album) (Track $num(%_counter%,2)) is the only way it will work.

Do the [ ] characters have to be encapsulated in something in order to make them stick?

Anyway, thank you again for your time!


#6

I have scanned this web page quickly ...
http://musicbrainz.org/doc/Style/Unknown_a...ose_track_title
... and cannot find something what shows into the direction as what you have said ...

The MusicBrainz style proposal offers some insight how to handle a track, which is in the state of 'untitled or unknown or having data only', and recommends the usage of three common placeholders, one for each status.
[untitled] ... for track with intentionally no title.
[unknown] ... for track with currently unknown title;
[data track] ... for track with no audio content.
The square brackets are only used to make the special meaning of the words visible to the reader.

Note:
The Mp3tag Scripting Language uses the square brackets as a special operator resp. as an inline function.
If you need a square bracket as a literal, then you must enclose it in single quotation marks.
Example:
If the tag-field TRACK does not exist, then you will get following results ...

[%TRACK%] ==> '['%TRACK%']' ==> []

If the tag-field TRACK contains the number 13, then you will get following results ...

[%TRACK%] ==> 13 '['%TRACK%']' ==> [13]

The file system is a special storage that only works with unique file names.
So you have the need to give each file an unique name.

There is a proposal how to create a filename automagically ...
Share your custom Actions

Because a filename is nothing but hollow words, the problem is not the filename per se.
In the tagging process the creation of the filename is the last task to do.
So you have first to fill some tag-fields with data, from which an unique file name can be created
(ARTIST, ALBUM, YEAR, TITLE, TRACK).

If you know or suspect that the current song got a title by its author, but you cannot get this title into your experience, then you may follow the MusicBrainz proposal and fill the tag-field TITLE with the value '[unknown]'.

Beside to the foregoing, there is another possibility to make a filename unique by using a 'globally unique identifier (GUID)'.

DD.20121020.2040.CEST


#7

Maybe a good addition to the TITLE would be the duration of the TRACK.

[album title] [untitled] [1:34] [01]

The help file for Scripting functions (Scripting Help) says:

[]$% You have to put the single quote around these reserved characters if you want to use them unparsed.

#8

Hey guys - thanks for the responses. I totally missed the single quotes for reserved characters in the help - I assumed it was double quotes (which obviously didn't work).

As for not seeing what I mentioned about [album, part x] on the MusicBrainz site, it's halfway down the page under the "Untitled" heading, second bullet:

"In some genres, like techno music, it is relatively common for releases to have a title, but no title for the individual tracks, as Christian Wünsch's Proved Negligence. These tracks should be considered untitled tracks, and can be entered as [untitled] or, following the unofficial name guideline, as [Release Name, Part X] (always in square brackets)."

As for the statement about file names being unique, I typically use "artist - album - track# - title.ext" as the file format, so having unique file names is not a problem, as at least the track number would always be different.

Again, I just wanted to find some alternatives for the TITLE tag. Adding the track length is an interesting concept, but I don't want to make the name any longer than it has to be. For the time being I think I'm going to stick with "[album] [untitled] [x]", but I am definitely going to use the "..." following the album title when it's over a certain number of characters.

Thanks again! Your help is most appreciated. :smiley:


#9

You said: ' I don't make the name any longer than it has to be'.
What does this mean?
Do you speak of the filename or of the title name?

I understand the MusicBrainz proposal as following:
For an album release having one or more tracks with intentionally no individual track titles ...
... the TITLE tag-field for each track may be named as [Release Name, Part X].

With Mp3tag this format for the tag-field TITLE can be realized using a format string like this ...

'['%ALBUM%', Part '%TRACK%']'

... or ...

'['%ALBUM%', Part '%_counter%']'

DD.20121021.0540.CEST


#10

I've changed it to the format to match more or less the example given at http://musicbrainz.org/doc/Style/Unknown_a...ose_track_title

But at the end of the day it's all down to personal preference. Thinking of mine it would be this example:

Begin Action Group _Script Test#TEST deckard

Action #1 Actiontype 5: Format value Field ______: TITLE Formatstring: $if($eql($regexp(%title%,(?i)(?i)^untitled$|^instrumental$|^interlude$,yes),yes),$iflonger(%album%,17,'['$left(%album%,17)...,'['%album%)',' #$num($fmtNum(%track%),2)']' '['%title%']' '['%_length%']',%title%)

End Action Group _Script Test#TEST deckard (1 Action)

Results being:
"Untitled" ->
"[Album Title Goes ..., #06] [Untitled] [05:34]"

"Stranger Than" ->
"Stranger Than"

"Reverse The Verse" ->
"Reverse The Verse"

"Interlude" ->
"[Album Title Goes ..., #04] [Interlude] [03:49]"

"Instrumental" ->
"[Album Title Goes ..., #05] [Instrumental] [05:42]"

"Cry Me A Lake" ->
"Cry Me A Lake"

So part is the track number? I see! In which case replacing 'Part' with '#' leaves room for the duration of the track if your worried about making the TITLE too long. I have also changed the max length of the ALBUM in the TITLE from 21 to 17. see $iflonger(%album%,17,'['$left(%album%,17)...,'['%album%).


#11

stevehero -

I started messing with the first version of your script yesterday. Very handy! Was working except that it was printing "..." at the end of the album title no matter how long it was. Possibly because there was no $iflonger like in the latest one?
I also had to remove a few chars from the script as I was getting a couple extra brackets in the end result. I wound up with this:

$if($eql($regexp(%title%,'(?i)^untitled$|^instrumental$|^interlude$,'yes'),'yes'),$if($eql($regexp(%album%,'^.{1,21}$,'yes'),'yes'),'['%album%']','['$left(%album%,21)'...'']') '['%title%']' '['$num($regexp(%track%,'^0*(\d*)/\d','$1'),2)']'

Question: Is it necessary to have the search terms for the special track titles in the script? Going through my library, I've found other instances where it could be handy, so I don't think they are needed(?). I used it on other titles such as "Silence" (where there are numerous blank tracks purposely inserted before a final hidden track) and it worked fine too:

[album title] [silence] [36]
[album title] [silence] [37]

etc...

However, I've been selecting ONLY tracks that I want to modify, not an entire release with other regular titles mixed together. When I tried that I got some unexpected results.

Now you've got me thinking....

  • It would be cool to have it so if there was only 1 track in a release with one of these titles when you run the "special track script" (as I have saved it), there is no need for a track number or length at the end.

  • To be even more slick, for adding the "...", would there be a way to make it so if the last character at the length specified was a space, it would remove the space? Maybe there is even a way to make it so it would stop at the last complete word? i.e., instead of getting an incomplete word followed by ...], it would just stop and give you the complete previous word followed by...] (again, look for a space maybe)?

I'm going to have a go at it today. Thanks for getting this started!


#12

Sorry for the late reply. Only got round to looking at it now. I've done a bit more to the script.

Begin Action Group _Script Test#TEST

Action #1 Actiontype 5: Format value Field ______: TITLE Formatstring: $if($eql($regexp(%title%,(?i)^untitled$|^instrumental$|^interlude$|^Silence$|^$,yes),yes),$iflonger(%album%,17,'['$regexp($left(%album%,17),'\s+[^\s]*$',)...,'['%album%)']' '['$regexp(%title%,'^$','Blank')']' '['%_length%']' '['$num($fmtNum(%track%),2)']',%title%)

End Action Group _Script Test#TEST (1 Action)

Don't use the first one I posted. I think something went wrong along the way when it copied into the forum window.

But here's the new and improve version.

TITLE CHANGES:
"" ->
"[Album Title Goes...] [Blank] [03:49] [03]"

"Instrumental" ->
"[Album Title Goes...] [Instrumental] [05:42] [05]"

"Interlude" ->
"[Album Title Goes...] [Interlude] [03:49] [04]"

"Reverse The Verse" ->
"Reverse The Verse"

"Silence" ->
"[Album Title Goes...] [Silence] [06:34] [01]"

"Untitled" ->
"[Album Title Goes...] [Untitled] [05:34] [06]"

Please note the first TITLE is empty. This is represented by the ^$ symbols in the script which means it looks for an empty TITLE and replaces it with [Blank]. There's also ^silence$ added to in the regexp. If you find any more files you want to change to this format then just add a | and then the regular exp you want to match after the ^$.

Try out the ... issue you had with the spaces also. The regexp \s+[^\s]*$ looks for any amount of spaces at the end OR anything but a space between 0 and infinity and then a space. So it should look how you want it to.

As far as creating a script which can not put in the TRACK at the end with only one file selected. It cannot be done (As far as I'm aware :slight_smile: )

You can try work around with the script. Best way to do it is to copy the code into the :mt_ttt: window like attached and you see if any problems arise. Best way to learn is to get stuck in :wink: Also you can hit the preview button and you see what all the files look like. So you can create two difference types. One for multiple selections and then single tracks.




#13

This is great! I've since changed things up a little. Instead of using the track# and/or length at the end, I have just been putting [No. X] at the end of the title, as some releases actually have a number after "Untitled", so this keeps it more inline with how the track is listed on discogs or on the album itself.

i.e., if track 02 is listed as "Untitled 1" and track 7 is listed as "Untitled 2", I wind up with this:

02 - [album title...] [Untitled] [No. 1]
07 - [album title...] [Untitled] [No. 2]

I changed the script to add "No. " and put a counter after it.
Using "No. X" may be a bit redundant, but this looks better to me than just having a number by itself or # in front of it. When it's just a number, after converting from Tag>Filename, the filename reminds me too much of how Windows adds a number in front of a duplicate file, etc..

Here is the script I am using now, which has your fix for the "..." in the album title, removes the track length parameter and substitutes "No. X" with a counter instead of the track number. It also now works fine when selecting all tracks in an album where only some have "special" names. The rest are not affected.

Special Track Script:
$if($eql($regexp(%title%,(?i)^untitled$|^instrumental$|^interlude$|^Silence$|^$,yes),yes),$iflonger(%album%,17,'['$regexp($left(%album%,17),'\s+[^\s]*$',)...,'['%album%)']' '['$regexp(%title%,'^$','Blank')']' '['No. $num(%_counter%,1)']',%title%)

I really appreciate you taking the time to explain things. I've learned a lot the past week and other stuff is starting to make more sense now! :slight_smile:


#14

Glad I've help. Can you edit your post and include the script you used just in case others want to learn also.

Your right the counter is useful in your case. I was unaware that you were doing this script album by album.


#15

Done - Works great for me - maybe you can just give it a once-over and make sure all the syntax is correct?

Also, regarding not adding the "No. X" after a special track when there is only one in a release, is there no way to do something like an if-then, where if only 1 track in an album has a special title, then don't add the "No. X"?

Thanks again!


#16

Not sure if this can be done. But I know you can do:

$ifgreater(%_counter%,1,'['No. $num(%_counter%,1)']',)

Help states:

$ifgreater(a,b,x,y) if number a is greater than number b, x is returned, otherwise y.

results are:
"" ->
"[Album Title Goes...] [Blank]"

"test" ->
"test"

"" ->
"[Album Title Goes...] [Blank] [No. 2]"

"silence" ->
"[Album Title Goes...] [silence] [No. 3]"

Complete regexp:

$regexp($if($eql($regexp(%title%,(?i)^untitled$|^instrumental$|^interlude$|^Silence$|^$,yes),yes),$iflonger(%album%,17,'['$regexp($left(%album%,17),'\s+[^\s]* ,)...,'['%album%)']' '['$regexp(%title%,'^ ,'Blank')']' $ifgreater(%_counter%,1,'['No. $num(%_counter%,1)']',),%title%),\s$|^\s+,)

Notice $regexp(,\s$|^\s+,) are added to remove any unwanted spaces created by the new $iflonger function. You could also add another one like so if you had multiple spaces. Just so you can see how it can be done.

$regexp($regexp($if($eql($regexp(%title%,(?i)^untitled$|^instrumental$|^interlude$|^Silence$|^$,yes),yes),$iflonger(%album%,17,'['$regexp($left(%album%,17),'\s+[^\s]* ,)...,'['%album%)']' '['$regexp(%title%,'^ ,'Blank')']' $ifgreater(%_counter%,1,'['No. $num(%_counter%,1)']',),%title%),\s$|^\s+,),\s+, )

If no other users come up with a solution create 2 scripts named:
Format #TITLE Silence on Multiple tracks
Format #TITLE Silence on Single track

and just create a different script for each purpose.

See a screen shot of how it can look so that you don't have loads of clutter.



#17

Sorry for the late reply - I had about a week with no power on account of Hurricane Sandy and only started getting back into things now. I haven't had a chance to mess with this script yet. I'll post here again if I modify anything. - Thanks!