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: built-in Tag Guesser (Read 7008 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

built-in Tag Guesser

lenghty boring introduction
[span style='font-size:8pt;line-height:100%']Everyone has their own preference how they want songs info displayed. Some like capitalized titles, some like uppercase artist name, etc.
Some songs/formats don't have tags or have them incorrect.
Editing tags is out of question - too much work and when you change your mind you'll have to re-do everything.
Solution is to write your own formatting string with tag guesser and filtering you like.
but... there are formatting strings in several places. You have to copy your code all over foobar.
Tag-guessing strings get long, complicated ...really messy. In some cases they even slow down foobar.[/span]

solution?
global tag-guesser built-in foobar.

there should be one formatting string for tag-guessing. it would have access to unchanged %artist% %album% info. It would analyze them, do processing that user wants and save result. it could be as simple as $puts(artist, some-new-data)

foobar would execute this string once, when tag is read from disk and keep result.

then in all other formatting strings %artist%, %album%... tags would be the ones generated by global formatting string. there could be %artist_unmodified% or $unmodified(artist) function for accessing real data from tag.

pros
-always matching info in playlist, window title, copy command, etc.
-easier configuration of playlist look - again would be as simple as [%artist% - ]%title%[ - %album%]
-faster playlist and dynamic info display - they would not need to guess tags each display anymore.
-logically separated functionality (could result in new section on foobar formattings strings page :)

...and it should be easy to implement

cons
-one more page/tab in prefs
-little bit more memory for new tags

built-in Tag Guesser

Reply #1
i'd vote to instead implement the often mentioned "global/common string". Basically, your idea, but with the possibility to not only put tag-guess-code into it.

Just a single common string, with persistent vars. You can take a look at foo_ui_columns which has this feature implemented.

- Lyx
I am arrogant and I can afford it because I deliver.

built-in Tag Guesser

Reply #2
If you're going to amass your collection from the mish-mash of poorly tagged garbage proliferating the FastTrack network, you might as well use Kazaa's built-in media player.

built-in Tag Guesser

Reply #3
Quote
solution?

..solution: tag your files properly. ffs.
A riddle is a short sword attached to the next 2000 years.

built-in Tag Guesser

Reply #4
Quote
Quote
solution?

..solution: tag your files properly. ffs.

agreed.

I spent almost a week tagging and organizing my music.

Hoever if you do it when you first get the music... ripped from your CDs or otherwise... it doesnt take as much time.

built-in Tag Guesser

Reply #5
i fail to understand your plight.

if your tags are correct, then why not just setup foobar's playlist format?

is this a long winded rant about downloading crappy tagged files and finding a cop out to correctly display them?

built-in Tag Guesser

Reply #6
Quote
is this a long winded rant about downloading crappy tagged files and finding a cop out to correctly display them?

Single crappy tagged files. If he got them from a legal release, he could use foo_freedb to tag them correctly within minutes.
"To understand me, you'll have to swallow a world." Or maybe your words.

built-in Tag Guesser

Reply #7
Quote
Quote
is this a long winded rant about downloading crappy tagged files and finding a cop out to correctly display them?

Single crappy tagged files. If he got them from a legal release, he could use foo_freedb to tag them correctly within minutes.

or seconds more likely...

built-in Tag Guesser

Reply #8
Quote
Editing tags is out of question - too much work and when you change your mind you'll have to re-do everything.

@pornel:  have you had a look at the masstagger's "guess values from filename" option?

It is quite good and works flawlessly as long as you understand its usage (which is incredulously simple).

example

Filename: 04-Some new Rapper-The New Hotness-epfl2k3.mp3

in masstagger you tell it to "guess values from filename" and that the format is: %tracknumber%-%artist%-%title%-epfl2k3

and it will be tagged properly.

You can also remove underscores and replace them with spaces **AUTOMAGICALLY**

Example:

Filename: 04-some_new_rapper-the_new_hotness-epfl2k3.mp3

do the same as above, and you will get things like "some_new_rapper" as the artist.  In this case.... add the action of "format value from other fields" to the masstagger.

set the target field as artist and set the action as $replace(%artist%,_, ) and viola!

no more underscores.

a little look at the TAGZ reference (available from the "title formatting" page in the preferences by click on the "Help" button) shows other things that can be used, like automatic capitalization, etc.

Have fun with this and I hope it helps.

built-in Tag Guesser

Reply #9
Quote
but... there are formatting strings in several places. You have to copy your code all over foobar.


personally I dont understand what you mean.  As a safeguard I keep a "text file" and edit it with "notepad" and keep a lot of my strings "there" so that I can easily put any string wherever I want.

Also, there really arent that many places all over foobar where things need to be put...

Playlist and albumlist are all I can think of.

built-in Tag Guesser

Reply #10
I gave up on editing tags quite a long time ago. My music collection is just too big for me to work on them all. Is there a way to get foobar to display only the name of the file? All of my files are properly named "ARTIST - SONG TITLE.mp3". In fact, I can't seem to find the feature in prefs that enables me to only display what I want foobar to display. Can someone point me in the right direction?

built-in Tag Guesser

Reply #11
Quote
..solution: tag your files properly. ffs.

No, thats not a solution. For example I often listen to mods, which don't have tags and require really big guessing string.

Another thing is that I like all words in titles capitalized ($caps()), they aren't on freedb.

People like different things, my friend likes artist field ALL-CAPS. I think its stupid, but thats why programs are configurable, so everyone can have what they like.

And it is good to have your files tagged properly, especially without that extra fancy formatting!
Besides if I changed my mind tomorrow I'd have to edit all tags instead of changing global formatting string.

built-in Tag Guesser

Reply #12
Quote
Another thing is that I like all words in titles capitalized ($caps()), they aren't on freedb.

So what exactly is preventing you from using $caps() in your title formatting if that is what you want. 

Quote
And it is good to have your files tagged properly, especially without that extra fancy formatting!
Besides if I changed my mind tomorrow I'd have to edit all tags instead of changing global formatting string.


But isn't that exactly what all that "fancy formatting" is intended for in the first place.  To give the user a very flexible way of customizing the way certain things are displayed, guessed, formatted, etc

You seem to be looking for a powerfull tool to customize your file guessing and it is right there.  Called Tagz. 

As you said in the beginning of this thread, everyone has got his own preferences when it comes to naming schemes.  Unfortunately there is no way for FB2K to somehow magically guess these individual preferences.  Hence once more, the title formatting gives the user exactly that tool to adjust fb2k to your own liking

built-in Tag Guesser

Reply #13
All the MODs that I have on my disk are tagged in APEv2. They get played fine in all the players that I use, and foobar2000 displays the tags the way I want them to look.

So IMHO, tagging would help, even if you were to use MODs.

built-in Tag Guesser

Reply #14
Quote
So what exactly is preventing you from using $caps() in your title formatting if that is what you want. 


if it was just $caps() it would be ok as it is in foobar right now. probably formatting strings were supposed to be that short and simple.
but in reality its different. my current formatting string takes 10kb. I have to copy all that typ0-sensitive code to playlist, title, tray, status, copy command, osd...
maintaining that is a horror.

Quote
Unfortunately there is no way for FB2K to somehow magically guess these individual preferences.  Hence once more, the title formatting gives the user exactly that tool to adjust fb2k to your own liking


there are many formatting strings in fb2k in several places, but usually they are very alike. all that common code can be gathered in one place for easier maintaince (and better speed).

tag-guessing code can be long, slow and complicated. its just crazy to copy it all over foobar. it could be executed once and cached. now its re-executed when playlist, status and other infos are updated...

and tag-guessing is very useful in such non-perfect world we're living in
I try to have my files tagged properly, but it seems like endless struggle. and there are things that I cannot fix - music modules, internet radios, etc.

plus someone might want to process some other info. generate nice codec description for example and use it in few strings.

I agree with lyx that it may be implemented by making persistent variables.

built-in Tag Guesser

Reply #15
Quote
All the MODs that I have on my disk are tagged in APEv2.

1. thats non-standard extension. I don't want to corrupt files I was collecting for many years.
2. I have A LOT of them. Tagging them would be a lot of horribly boring work and waste of time. For stupid repetetive tasks we have computers. Let them do the tagging! [in global formatting strings :>]

built-in Tag Guesser

Reply #16
Quote
Is there a way to get foobar to display only the name of the file? All of my files are properly named "ARTIST - SONG TITLE.mp3". In fact, I can't seem to find the feature in prefs that enables me to only display what I want foobar to display. Can someone point me in the right direction?

You have total control over what gets displayed in the playlist. Just change your playlist formatting string (in prefs under Display->Title formatting) to something like:
Code: [Select]
%_filename%

Be sure to check out the other possibilities in the title-formatting help file (available by hitting the 'help' button on the lower-right corner of that page).

built-in Tag Guesser

Reply #17
Pornel,

As spase explained in his third post, this is practically already implemented. If your filenames/existing tags are consistent enough that a tag-guesser (as you are suggesting) could be used, fire up the masstagger's "guess values from filename" (or "guess values from other fields") option, paste whatever l33t tag-guessing script you have in there and let it do it's work.
Quote
foobar would execute this string once, when tag is read from disk and keep result.

Bingo, execute the masstagger once, info is read from disk and stored in the file.  This satisfies nearly all of the pros you listed, while eliminating the cons.

built-in Tag Guesser

Reply #18
I agree with Lyx. There should be something to simplify that mess.


A note to Phi, spase, and other adepts of messy strings: if you don't want to help, don't answer.

You forgot CD-ROM with mp3's for example. How would i change tags on non-writable media?  There's some legal CD-ROMs with mp3 anthologies over which i don't have control...

Or a network share (read-only)?


p.s.
subroutines in BASIC born as an attempt to remove duplicate code.

p.p.s. i'd code that myself if i have time...

built-in Tag Guesser

Reply #19
Quote
A note to Phi, spase, and other adepts of messy strings: if you don't want to help, don't answer.
I personally fail to see how that kind of attitude will ever help foobar2000 improve and people learn. IMHO there is always the possibility that there is a better way to solve a problem than the way a topic starter first thought of. Workarounds might be better than nothing at all.

Apart from what has been mentioned already, I think such a persistent "fake tag" system has a great potential to generate alot of confusion. And if it is so easy to make it guess a fake tag right, what stops it from guessing a real tag right and actually add it? The only valid answer I can think of is the mentioned CD-ROM problem. And that might not be a problem after all because, correct me if I'm wrong, but won't the tags added to a track on a CD-ROM be remembered by the database, as long as the drive letter is added to "Restricted directories"?

Btw: Tag guessing in formatting strings works out very well for my needs,  but I'm always open to new and better way to do things. Not to mention less resource hungry solutions. If such a "fake tag" guesser is created, a feature to turn them into real tags might be handy.

built-in Tag Guesser

Reply #20
I'd like to avoid changing tags in files. Not all can be changed. I'd have to re-run masstagger on each new file. I prefer to have original tags, not touched by my fanaberies.

If I had mistake in my tag guessing code and run it on my files I'd loose tags!

There are some things that should't be written to tags. For example if there is no album I like to have "(directory)" in that place. If directory is same as artist I'd like to have dir level up... I like to have nicely formatted file info including all replaygain, vbr, channels ...and formatting string gets longer, and more code gets doubled and tripled.

If tag-guessing code was separate users could exchange their codes like formatting strings now (and formatting strings itself would be shorter, there would be no dilema 'nice looking' vs 'having good guesser').

Tag-guessing doesn't need to be confusing. You can mark guessed tags somehow (by different color or add some indicator to playlist). This could be done globally or in formatting string you like if there were fields like %artist_unmodified%.

formatting strings have variables - their only purpose is to eliminate duplicate code. they aren't neccesary but make formatting strings shorter and easier to code.
same with global formatting string - not neccessary but very useful, and futher eliminates duplicate code and eases coding.

built-in Tag Guesser

Reply #21
This 'tag guesser'

a) is wanted by only few people

b) would be messy to implement

c) would effectively break the way things are done at the moment

d) would be generally useless

If you have a liking for weird formatting and at the same time want to keep the original tags for whatever obscure reasons, just make your files read-only, then make a masstagger script that mangles the metadata the way you want it. This metadata will only be written to the database. And yes, in the process you can (ab)use the existing tag guesser as much as you want. And yes, those scripts can be saved.

The same goes for modules/whatever else that doesn't have a clean enough tagging format as well as files stored on read-only media.

built-in Tag Guesser

Reply #22
Quote
A note to Phi, spase, and other adepts of messy strings: if you don't want to help, don't answer.

I don't know what thread you have been reading, but I'd hope spase's earlier post (where he took the time to politely explain a possible solution to pornel in detail) would be considered "help." Yet his post was completely ignored, and my annoyance at this was reflected in my own reply.

built-in Tag Guesser

Reply #23
>> a) is wanted by only few people
Lets do the poll

>> b) would be messy to implement
Not at all. If its done as lyx suggests it should be simple and clean. Just saving and restoring variables in two places.

>> c) would effectively break the way things are done at the moment
no. if it was done with persistent variables there would be absolutely no difference. if by changing %artist%, etc. info your current scripts (even those including tag-guessing) would still work (just like they work now when you have proper tags )

>> d) would be generally useless
for you - maybe. for me it would be very useful feature.

built-in Tag Guesser

Reply #24
Quote
for you - maybe. for me it would be very useful feature.


I'm confused what exactly you want this to do thats not already in the title strings and masstagger?