IPB

Welcome Guest ( Log In | Register )

> foobar2000 General Forum Rules

This is NOT a tech support forum.
Tech support questions go to foobar2000 Tech Support forum instead.

See also: Hydrogenaudio Terms of Service.

3 Pages V   1 2 3 >  
Reply to this topicStart new topic
HOW TO: Rating Songs In Foobar
sitalchauhan
post Apr 16 2009, 00:24
Post #1





Group: Members
Posts: 11
Joined: 15-April 09
Member No.: 68989



I have been searching around for a good way to rate songs in foobar and ended up combining a lot of my research and making my own method, so thought I would share it if anybody else likes it.

Here is a pic showing how I have set my ratings to show in a playlist:


Basically the rating is saved in the "Rating" ID3 tag of the file as a number 1-5 (but you could change the id3 field name from "Rating" to whatever you want, for example if 2 people use the same pc and want their ratings seperate).

First you need to install the foo_masstag component to your foobar.

Then right click on any of your current playlist column headers, Select "Columns > More..."
Add a new column called "Rating" with the Pattern:
CODE
$if(%rating%,$repeat(●,%rating%)$repeat(o,$sub(5,%rating%)),ooooo)


Right click on a playlist column header again and put a tick next to "rating" in "Columns". This should show the column with all of the current playlists showing 'ooooo' as they have no rating yet.

Next right click on any song in your playlist, and select "Tagging > Manage Scripts"
Here you need to add 5 seperate scripts. Add a script called "Rate 1" with the action to "Set Value" with field name "Rating" and field value "1".
Repeat this up to the script "Rate 5" where the field name is still "Rating" but the Field Value would be "5". You will end up with this:


Now you can either set ratings by right clicking a song, "Tagging > Scripts > Rate ?"

Or as I prefer, I set up Global Hotkey keyboard shortcuts for each script so I can rate the song currently playing by pressing "Alt+Ctrl+1" -> "Alt+Ctrl+5", executing scripts "Rate 1" -> "Rate 5"


Once your songs are rated, you can make your own autoplaylists of only the songs you like, for example by doing:
Playback > Search
Enter "Rating GREATER 2" to show all songs with a rating of greater than 2.

You can also do "Rating MISSING" to make a playlist of all the songs you havnt rated yet so that you can go through them rating them all.
This page has all of the different filters you could use to make your own autoplaylists using you ratings.


Please mention any improvements I could make , or if you have got any questions,
Sital

smile.gif

This post has been edited by sitalchauhan: Apr 16 2009, 01:52
Go to the top of the page
+Quote Post
tpijag
post Apr 16 2009, 00:34
Post #2





Group: Members
Posts: 2268
Joined: 19-May 08
Member No.: 53637



Applaud the work, but could you not use the official playlist statistics component. Right click>playlist statistics and rate or bind to shortcuts.

terry

This post has been edited by tpijag: Apr 16 2009, 00:34
Go to the top of the page
+Quote Post
sitalchauhan
post Apr 16 2009, 00:37
Post #3





Group: Members
Posts: 11
Joined: 15-April 09
Member No.: 68989



Basically I wanted a way that kept the rating in the ID3 tag instead of a seperate database so that when I transferred music between my computers the ratings were maintained. Also, renaming an mp3 file and moving it to a different folder on my computer sometimes caused the foobar statistics rating to get reset because the database thought it was a new file.
I noticed that you could sync the statistics database with the tags, but I preferred my above method so that there is no extra database involved, its all in the id3 tags only (and I wanted to give myself a little challenge tongue.gif)

Also, thought some people would find useful the code I made for a graphical representation of the rating in the playlist view with the solid and empty dots smile.gif

Here are some other patterns to show the rating in different ways:

Shows just solid dots for the rating (no empty dots), and a single empty dot for files with no rating:
CODE
$if(%rating%,$repeat(●,%rating%),o)


Same as above but with no dots at all when there is no rating set:
CODE
$repeat(●,%rating%)


The dots can also be replaced with stars (* or ★ ☆), squares (■ □) smaller dots (• °) than the larger ones (● o), whichever graphics representation you prefer (Jus google "Alt Codes" for a whole load of symbols) smile.gif
Here's the code for using the star symbols and what it looks like:
CODE
$if(%rating%,$repeat(★,%rating%)$repeat(☆,$sub(5,%rating%)),☆☆☆☆☆)



This post has been edited by sitalchauhan: Apr 16 2009, 16:05
Go to the top of the page
+Quote Post
tpijag
post Apr 16 2009, 00:45
Post #4





Group: Members
Posts: 2268
Joined: 19-May 08
Member No.: 53637



Value of method is clear.
Was not a criticism.

terry
Go to the top of the page
+Quote Post
sitalchauhan
post Apr 16 2009, 00:49
Post #5





Group: Members
Posts: 11
Joined: 15-April 09
Member No.: 68989



Worth also mentioning that the playback statistics plugin doesnt accomodate if 2 people using the same computer want their own seperate ratings and share the same music files, but with my method you could make 2 seperate ID3 tag fields ("PersonA Rating" + "PersonB Rating") and then you could show both of the seperate ratings in the playlist view in 2 seperate columns.


Also I would like to mention that instead of the foo_masstag component, the foo_quicktag component can also be used to set the "Rating" ID3 tag in a similar method but the difference is that you get a prompt to confirm you want to change the tag, which some people may prefer but I presonally found annoying:


This post has been edited by sitalchauhan: Apr 16 2009, 01:22
Go to the top of the page
+Quote Post
callisto
post Apr 16 2009, 01:02
Post #6





Group: Members
Posts: 361
Joined: 2-September 06
From: Berlin, Germany
Member No.: 34723



You can set a value for the promt, that it does not pop up until you try to update (for example) 5 tracks at once... (in quicktagger prefs)
I use the quicktag way, but nice that someone made a howto to that id3-way of rating songs... since this is asked a lot.


--------------------
fb2k on OSX: flac q8 > rockboxed Sansa e280v1: Vorbis q5.0
Go to the top of the page
+Quote Post
sitalchauhan
post Apr 16 2009, 01:14
Post #7





Group: Members
Posts: 11
Joined: 15-April 09
Member No.: 68989



QUOTE (callisto @ Apr 16 2009, 00:02) *
You can set a value for the promt, that it does not pop up until you try to update (for example) 5 tracks at once... (in quicktagger prefs)
I use the quicktag way, but nice that someone made a howto to that id3-way of rating songs... since this is asked a lot.


Very true, I only just noticed this was an option in the Quick Tagger prefs.
So I guess it doesnt matter if you use Mass Tagger or Quick Tagger, they both effectively work exactly the same, just use whichever you prefer. But if you want confirmation before chaging the rating incase of accidental keypresses when you have the hotkeys set up, use foo_quicktag. Here is a screenshot of how you would set foo_quicktag up, and of course you would then set the keyboard hotkeys for quicktag:


If you wanted to use foo_quicktag but didnt want the confirmation dialog, then of course you just change the "Require confirmation" number at the bottom from 0 to 1

smile.gif

This post has been edited by sitalchauhan: Apr 16 2009, 01:23
Go to the top of the page
+Quote Post
foo_peter
post Apr 16 2009, 01:40
Post #8





Group: Members
Posts: 51
Joined: 25-September 06
Member No.: 35595



not to forget my personal favorite, and with unsurpassed settings





edit: false image

This post has been edited by foo_peter: Apr 16 2009, 02:51
Go to the top of the page
+Quote Post
sitalchauhan
post Apr 16 2009, 02:11
Post #9





Group: Members
Posts: 11
Joined: 15-April 09
Member No.: 68989



QUOTE (foo_peter @ Apr 16 2009, 00:40) *
not to forget my personal favorite, and with unsurpassed settings
[PIC]


Sorry, I dont quite understand huh.gif That is a screenshot of foo_playback_custom showing settings to update the playback statistics in the tags, not anything to do with rating a track...
Unless I've missed something unsure.gif

EDIT: Ahh hes edited the picture now to show the correct image. So foo_auto_rating uses the Playback Statistics to automatically create a rating for the file based on the number of times you have played it, very nice if you want ratings calculated automatically for you smile.gif

This post has been edited by sitalchauhan: Apr 16 2009, 08:47
Go to the top of the page
+Quote Post
Bollerkopp
post Apr 16 2009, 03:39
Post #10





Group: Members
Posts: 202
Joined: 8-September 07
From: Hamburg, GER
Member No.: 46899



the screenshot shows the plugin foo_auto_rating (Auto Rating).

greets
Go to the top of the page
+Quote Post
Frontsidebuster
post May 26 2009, 19:09
Post #11





Group: Members
Posts: 1
Joined: 26-May 09
Member No.: 70138



Hi Sital, just wanted to give my sincere thanks for these instructions. I think it is an excellent system, I did get a little lost in the instructions about managing scripts. and also there is a slight error in the code for if you don't want any hollows circles in the ratings: but it's something that a quick experiment solved.

I have to say that as a relatively new user foobar 2000 is probably the greatest media player with the worst documentation and help files. The on board rating system was greyed out, but I had all the plug-ins installed. Could I find out why after a zillion Google searches, no I could not. And it was only searching this forum and finding your method which allowed me to set up any rating system.

I particularly like your system because I often browse my directories and import files or songs into the playlist, so having a playlist that writes to the file is really great. Thanks again.

Moderation: Removed useless full quote.

This post has been edited by Yirkha: May 26 2009, 19:44
Go to the top of the page
+Quote Post
dedogs
post Nov 8 2009, 08:59
Post #12





Group: Members
Posts: 1
Joined: 3-September 08
Member No.: 57871



Thank you very much for sharing this information wink.gif
I've made my own modifications to add the rating if anybody is interested...

I used foo_playback_custom.dll to get play count added to the mp3.

Regular Size

CODE
'('$num(%play_counter%,2) $if(%rating%,$ifequal(%rating%,0,▄▄ ▄ ▄ ▄ ,$ifequal(%rating%,6,▄ ▄ ▄ ██ ,$ifequal(%rating%,5,▄ ▄ ▄ ▄█ ,$repeat(▄ ,$sub(%rating%,1))█$repeat(▄ ,$sub(5,%rating%))))),▄ nostat)')'


Smaller Size

CODE
'('$num(%play_counter%,2) $if(%rating%,$ifequal(%rating%,0,▄▄▄▄,$ifequal(%rating%,1,█▄▄▄,$ifequal(%rating%,2,▄█▄▄,$ifequal(%rating%,3,▄▄█▄,$ifequal(%rating%,4,▄▄▄█,$ifequal(%rating%,5,▄██▄,$ifequal(%rating%,6,████,))))))),nostat)')'


Again thanks.
J
Go to the top of the page
+Quote Post
drmrbrewer
post Nov 9 2009, 23:34
Post #13





Group: Members
Posts: 109
Joined: 22-October 06
Member No.: 36669



I wanted to add my thanks for this helpful information. I love the idea of being able to define custom ratings, different for each user.

And a quick question on the Global Hotkey keyboard shortcuts for each script. It seems that when I create these shortcuts, it automatically restricts the context to "currently playing" (and your post also suggests this is the case). Is it not possible to have the hotkey operate when the track is NOT playing? There doesn't seem to be any good reason I can think of to restrict the context to tracks actually being played. I'd like to be able to quickly rate a track without having to play it first.

Finally, I am mainly playing M4A files. Presumably foobar2000 can write the custom rating information to such files, so that the rating travels with the file, rather than requiring a separate database?

Thanks!

Mike
Go to the top of the page
+Quote Post
sitalchauhan
post Nov 9 2009, 23:56
Post #14





Group: Members
Posts: 11
Joined: 15-April 09
Member No.: 68989



QUOTE (drmrbrewer @ Nov 9 2009, 22:34) *
I wanted to add my thanks for this helpful information. I love the idea of being able to define custom ratings, different for each user.

And a quick question on the Global Hotkey keyboard shortcuts for each script. It seems that when I create these shortcuts, it automatically restricts the context to "currently playing" (and your post also suggests this is the case). Is it not possible to have the hotkey operate when the track is NOT playing? There doesn't seem to be any good reason I can think of to restrict the context to tracks actually being played. I'd like to be able to quickly rate a track without having to play it first.

Finally, I am mainly playing M4A files. Presumably foobar2000 can write the custom rating information to such files, so that the rating travels with the file, rather than requiring a separate database?

Thanks!

Mike


Nice to see people are finding my guide useful smile.gif

Regarding the Global Hotkeys, when you are setting the hotkey in the Preferences, if you set the hotkey for the script under the '[context]' menu, then it will rate whichever song you have currently got highlighted even if it isnt playing. If you set the hotkey for the script under the '[context / now playing]' menu, then it will rate the song playing even if you have a different song highlighted.
Im not sure my explanation is fully clear so a picture should help:



And yes I just tested the rating system with an m4a file and it works perfectly saving the rating in the tags of each file, so that the rating always stays with the file whereever you take it smile.gif

This post has been edited by sitalchauhan: Nov 10 2009, 00:01
Go to the top of the page
+Quote Post
drmrbrewer
post Nov 10 2009, 00:19
Post #15





Group: Members
Posts: 109
Joined: 22-October 06
Member No.: 36669



QUOTE (sitalchauhan @ Nov 9 2009, 22:56) *
Im not sure my explanation is fully clear so a picture should help


Ah! I hadn't spotted those various contexts nest away there. Very helpful. Got it now.

QUOTE (sitalchauhan @ Nov 9 2009, 22:56) *
And yes I just tested the rating system with an m4a file and it works perfectly saving the rating in the tags of each file, so that the rating always stays with the file whereever you take it smile.gif


Excellent! I've had foobar2000 installed on my system for many years, and used it on and off for particular reasons (e.g. to play some old mpc files I used to keep), but for some bizarre reason chose to spend some time doing all my ratings in WMP, and jumping through hoops to get m4a files even to play. Now I got my fingers badly burned, I think, when I did something simple like move my Music folder to another drive, and I think I lost all my ratings as a result. Why I didn't just stick with foobar2000 as my main music organiser/player I don't know. Have learned my lesson. I'm a paranoid geek at heart, and I like doing geeky stuff like writing custom rating tags direct to my music files so that I can port them wherever my music files go.

What I am curious to know, however, is what the "standard" tag is for rating a music file. In other words, a tag that might even be recognised by an OS like Vista as a rating (e.g. in the Explorer window). Any idea?

Thanks,

Mike
Go to the top of the page
+Quote Post
sitalchauhan
post Nov 10 2009, 01:18
Post #16





Group: Members
Posts: 11
Joined: 15-April 09
Member No.: 68989



QUOTE (drmrbrewer @ Nov 9 2009, 23:19) *
What I am curious to know, however, is what the "standard" tag is for rating a music file. In other words, a tag that might even be recognised by an OS like Vista as a rating (e.g. in the Explorer window). Any idea?


I dont think there is an 'official' id3 tag for rating, but pretty much everybody who stores it in id3 tags uses a system of a number 1-5 in the RATING id3 tag, and there are a couple of media players that recognise this tag and display the rating in the program, but most media players store any rating you set using the program in their own seperate database

This post has been edited by sitalchauhan: Nov 10 2009, 01:19
Go to the top of the page
+Quote Post
drmrbrewer
post Nov 10 2009, 11:42
Post #17





Group: Members
Posts: 109
Joined: 22-October 06
Member No.: 36669



QUOTE (sitalchauhan @ Nov 10 2009, 00:18) *
I dont think there is an 'official' id3 tag for rating, but pretty much everybody who stores it in id3 tags uses a system of a number 1-5 in the RATING id3 tag


OK, thanks. Since I like the idea of per-user ratings, I'll run with something like "mike rating" and "alice rating" (I don't like using apostrophes in field names). I reckon that if, one day, I want to "standardise" the ratings -- i.e. to put them somewhere they can be seen by other apps -- there will be an easy way to do it. Quite possibly foobar2000 (perhaps the masstagger component) already allows a mass update to change "mike rating" to "rating" (or whatever).

Thanks again for these tips for applying (and, importantly, viewing) ratings in foobar2000... truly very very helpful !

Mike
Go to the top of the page
+Quote Post
odyssey
post Nov 10 2009, 13:24
Post #18





Group: Members
Posts: 2296
Joined: 18-May 03
From: Denmark
Member No.: 6695



Well, I use foo_customdb to store all my subjective tags smile.gif I also made a post to help migrating to it smile.gif

drmrbrewer: If you have some scripting abilities, the customdb uses a SQLite file-database, which is quite simple and could probably be uses to extract data for other applications. I haven't tried anything like that yet, but i've heard that it locks the db while foobar2000 is running, but not sure if it's still readable... Try it smile.gif


--------------------
Can't wait for a HD-AAC encoder :P
Go to the top of the page
+Quote Post
drmrbrewer
post Nov 11 2009, 10:47
Post #19





Group: Members
Posts: 109
Joined: 22-October 06
Member No.: 36669



Thanks, Odyssey. I had considered the option of a separate tag database, and indeed I'm used to this concept since I catalog / tag / rate my collection of photos with an application that uses a separate database (though you can write the metadata to the files if you choose, too, assuming the files support this). I just need to trust the application will treat my database with respect, and that I can get the data out of it if required. I can trust the photo cataloging application I use, but I know I now cannot trust WMP. I'm sure foobar2000 / foo_customdb is trustworthy !

Writing custom ratings per-user to the files themselves, as suggested in the original post, has the advantage of simplicity I suppose. What troubles me with this approach is this: I generally try to protect my files from inadvertent damage / loss from other users (e.g. the wife, the children etc), so permissions are set either to give them no access at all, or only read access. However, if they are to write custom ratings into the files then they must at least have write permissions. Perhaps I can give write permissions but not delete permissions, though even with write permissions they could end up inadvertently overwriting all of my tags with rubbish. That is the advantage of separate databases, I suppose.

Anyway, this strays a bit from the original topic, for which I apologise. I still think the rating solution presented in the OP is very neat, and now have it implemented in my setup. I managed to salvage a couple of WMP playlists I created to hold what I generally considered to be the "best" and "best + next-best" tracks in my collection, and this has at least enabled me to re-create the 5* and 4* track ratings in foobar2000 using the OP's scheme. I feel a lot safer with my data in foobar2000 than in WMP !

Mike
Go to the top of the page
+Quote Post
mikkevin
post Jan 9 2010, 00:53
Post #20





Group: Members
Posts: 1
Joined: 8-January 10
Member No.: 76863



This is a great thread ! I just like the concept of storing the rating in the id3tag itself. That way the your ratings will get stored permanently in the sound track itself !

All right ! Now, that we have managed to get the ratings embedded in the id3tags, the question would be - does foobar honours these ratings stored in id3tag ? I'm not quite sure how does foobar does things, I only started using it since the last week ! So, I'm guessing here, the ratings stored in the id3tag and displayed by foobar after following the tutorial in this thread, is a display only of the ratings (purely cosmetic) ! Right ?

Obviously, I would want to have the tracks that have been rated the highest played most frequently ! Is there a way to achieve this in foobar at all ? I read about the quicktag component, it wasn't very clear if the above would be possible by using quicktag ? If yes, how do I really do it, I mean have the ratings updated both in quicktag and id3tag in one go ? It won't be a good idea if you'd rate the tracks using the method outlined in sitalchauhan's tutorial and then repeat it using quicktag be it using script or manually, right ? The keyboard shortcut we set up should update the rating both ways. It should also be possible to import the tracks which have been rated by the method outlined in the tutorial, and simply run a script to import the ratings from the id3tag to the quicktag's database ?

Thanks for any replies.

Go to the top of the page
+Quote Post
v.43
post Jan 10 2010, 20:48
Post #21





Group: Members
Posts: 54
Joined: 2-June 09
Member No.: 70339



maybe you could find useful this script to increase/decrease the rating one mark per time

QUOTE
$if(%rating%,$min(higher_value,$add(%rating%,1)),default_value)
$if(%rating%,$max(lower_value,$sub(%rating%,1)),default_value)




my settings, for rating from 0 to 6:
$if(%rating%,$min(6,$add(%rating%,1)),3)
$if(%rating%,$max(0,$sub(%rating%,1)),2)

Go to the top of the page
+Quote Post
HiRsch
post Jan 21 2010, 15:03
Post #22





Group: Members
Posts: 13
Joined: 20-January 10
Member No.: 77340



what ist the font you are using in your playlist to display the stars? i do only get blank squares.
cheers
Go to the top of the page
+Quote Post
Yirkha
post Jan 21 2010, 15:25
Post #23





Group: FB2K Moderator
Posts: 2359
Joined: 30-November 07
Member No.: 49158



Are you on Windows XP? Try this.


--------------------
Full-quoting makes you scroll past the same junk over and over.
Go to the top of the page
+Quote Post
sti3
post Jan 22 2010, 07:19
Post #24





Group: Members
Posts: 19
Joined: 28-October 03
Member No.: 9513



Great thread. I had no idea it was so easy!
Go to the top of the page
+Quote Post
Ametz
post Jan 22 2010, 07:20
Post #25





Group: Members
Posts: 10
Joined: 18-November 09
Member No.: 75067



Have i understood correctly that this information is saved in the file itself so even if i move the file to another computer etc i can still se my rating (If i have the same script on that computer)
Go to the top of the page
+Quote Post

3 Pages V   1 2 3 >
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 19th May 2013 - 08:13