Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Why are hyphens placed in front of mp3 tags? (Read 2384 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Why are hyphens placed in front of mp3 tags?

I love foobar2000! But one thing always puzzled me when converting... I use the tagging expression "%tracknumber% - %title%", but the output is "- 01 - tracktitle.mp3". Why is that hyphen placed in front of tracknumber? Hope somebody can set me straight. Thanks! 

Why are hyphens placed in front of mp3 tags?

Reply #1
Drag the target files into a new playlist, select all, then go to Converter Setup.
In Converter Setup->Destination, add this titleformatting expression to "Output style and file name formatting" field:

$if2(%tracknumber% - ,%list_index% - )$if2($meta(title),tracktitle)

What do you see in the "Preview" window ?

Why are hyphens placed in front of mp3 tags?

Reply #2
Why is that hyphen placed in front of tracknumber?

Probably your input files don't have tags. So foobar2000 uses an empty string for %tracknumber% and a file name for %title%.

Why are hyphens placed in front of mp3 tags?

Reply #3
Thanks! derty2, yes that works, I get "1 - tracktitle.mp3"... all I need is a zero in front of the "1"... [01,02,03,04...10,11..etc]

However I have no idea how to interpret that tagging expression you gave me? Where can I find out this stuff? (sorry for stupid noob qu's)

Edit: OK I should point out I guess that I am feeding it (usually) wav files already formatted (eg "01 - tracktitle.wav"). I'm suspecting that I am clueless with this tagging stuff.

Why are hyphens placed in front of mp3 tags?

Reply #4
Quote
OK I should point out I guess that I am feeding it (usually) wav files already formatted (eg "01 - tracktitle.wav").

Use %filename% as a name format.

Why are hyphens placed in front of mp3 tags?

Reply #5
Pads "tracknumber" or "list index" to two digits:

$if2($num(%tracknumber%,2) - ,$num(%list_index%,2) - )$if2($meta(title),tracktitle)

See the line $num(X,Y) in the HTML document here: foobar2000 --> Help --> "Title formatting help"
 
 
 

Why are hyphens placed in front of mp3 tags?

Reply #6
BTW, what is tracktitle?

Why are hyphens placed in front of mp3 tags?

Reply #7
Filesystem view:
--------------------------------------------------------------------------------
...\my music\artist\album (date)\01 - tracktitle.mp3
...\my music\artist\album (date)\02 - tracktitle.mp3
...\my music\artist\album (date)\03 - tracktitle.mp3
...\my music\artist\album (date)\04 - tracktitle.mp3
...\my music\artist\album (date)\05 - tracktitle.mp3
etc

--------------------------------------------------------------------------------

For my own filesystem, my naming standard is to use highly verbose and descriptive folder names and a generic track name: "track"
One reason I do this is because I got sick and tired of worrying about the 255 char limit in Windows.
Of course this only works well if you have a really good metadata tagging system for the files and a highly optimized display system for foobar2000.

Every album group in my music library always looks the same, similar to this example:
--------------------------------------------------------------------------------
etc\01 back.jpg
etc\02 discs-pan.jpg
etc\03 label-a.jpg
etc\04 in-gate.jpg
etc\05 artist.jpg
01.track.flac
02.track.flac
03.track.flac
04.track.flac
folder.jpg
folder.txt

--------------------------------------------------------------------------------

Why are hyphens placed in front of mp3 tags?

Reply #8
You could use $cut() if you are worried about the character limit.

Why are hyphens placed in front of mp3 tags?

Reply #9
What has the choice of foobar2000 titleformatting syntax got to do with the Windows filesystem character limitation?
You are offering $cut() as an option for foobar2000 display purposes.
Personally I hate seeing displayed strings being cut (and appended with ellipsis) in foobar2000.
My Playlist Viewer spans the full width of fb2k and one primary reason I stay with "Columns UI" is that it has a horizontal
scrollbar and infinite horizontal real estate beyond the fb2k borders.

Why are hyphens placed in front of mp3 tags?

Reply #10
I meant you could automatically cut the file naming scheme during converting/moving files to your library with it, not for display purposes.

It's not a big deal and is a matter of taste, but I thought it might be useful for someone. I personally don't always browse my library from foobar, so having individual tracknames is helpful.

Why are hyphens placed in front of mp3 tags?

Reply #11
Ah yes, I see what you mean now.
I rarely perform "Copy to" or "Move to" file operations inside foobar2000; I only use "Rename to" and "Delete file".
I like to be hands-on inside Windows Explorer with Copy/Move operations.
But your idea of using $cut in foobar2000 operations to not exceed the Windows file char limit is a very good one.

Regarding your statement: "I personally don't always browse my library from foobar, so having individual tracknames is helpful",
As I stated before, I use highly verbose folder naming so I have very descriptive input as I navigate into the filesystem.
When I reach the containing folder of the tracks, I already know a lot about what is in there.
I then double-click and have a look at the text file ("folder.txt") which is ALWAYS in the containing folder.

I always format my "folder.txt" the exact same way every single time, like this example here
The track names are in the text file.

I would like to say one last thing before I shut up; I use two display monitors side-by-side and it does help a lot when operating the way I do.

* EDIT *
Actually, this discussion has sparked my curiosity to have a critical look at the foobar2000 "File Operations Setup" GUI.

Taking into consideration what Daeron and I have been talking about, I think it would be a wonderful idea if the "Preview" window
had another column named "Path Length", and in this column, for each line, you would see a string such as for example "131 chars".
This would be immensely helpful before users actually committed to Move or Copy operations with foobar2000.
If a user sees some of the lines in the "Path Length" column saying "284 chars" (for example) then he has immediate feedback about future problems with this operation.
So the user gets a chance to re-edit the "Destination folder" and/or the "File name pattern" fields before pressing the "Run" button.

This little addition to foobar2000's "File Operations Setup" GUI would benefit users such as me and users who always use $cut to overcome this problem.

I think it is a great idea, what do you think?

 

Why are hyphens placed in front of mp3 tags?

Reply #12
I see your point, I have a similar folder structure as well, and when I get inside an album folder I'll most likely know which file is which. The only exceptions are bigger compilation folders, where the sheer number of files makes it hard to distinguish between tracks. But having an info file (which I personally don't have) which you will open anyway (or even just foobar visible, showing the same folder) renders tracknames kinda pointless since you have the information available somewhere else already.

As for the idea, I support it. The validating pop up could also point out things like the (currently) automatic replacement of not allowed characters in filenames. One could argue though that it would be just one more click required to do the same thing, thus for many people a silent checkbox would be necessary, and then we are just going to end up where we started from but with a more cluttered GUI. We'll see what Peter or someone else says about it.