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: How can I make songs I like less, play less often? (Read 4934 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

How can I make songs I like less, play less often?

I want something very specific, and I think it is possible with existing plugins but I don't have the knowledge to figure out how.
There are some songs in my playlist that I skip most of the time. What I want is a system whereby if I skip a song, it will have a slightly lower chance of getting chosen.
However, if I then listen to the whole song, I want it to regain some of that chance.

I can't use DAR, or any other automatic rating system, because the score of songs I never skip will grow exponentially as they appear more often due to their high score.

For example: every song starts at 100% (maximum) value, every skip = -1%, a play = +1%, and there should be a minimum to avoid songs disappearing.

I am completely new to configuring foobar plugins. To give you an idea, the foo_random_pools help page did not make me ANY wiser.

Any help would be greatly appreciated.

ps, I don't mind if 2 or more songs from the same artist appear in a row, so don't worry about that.


How can I make songs I like less, play less often?

Reply #2
I can't use DAR, or any other automatic rating system,


No system can read your mind. You will have to manually rate your music, e.g. 5=great, 1=suck.

Which is EXACTLY why I said I can't use an automatic rating system...
I don't want a system based on ratings but based on playcount and skip count, as I said in my original post.


How can I make songs I like less, play less often?

Reply #4
derty2,

just for your information: this component isn't available anymore (or at least not at the moment).
This is HA. Not the Jerry Springer Show.

How can I make songs I like less, play less often?

Reply #5
Here is the text from the foo_skip webpage (copied from my computer):

Skip Track

By: Case

Allows you to skip tracks that match a specified search query. By default the component will skip all files with RATING set to 1. The query is configured in Preferences -> Advanced -> Playback -> Skip Tracks.

Starting from version 1.5 time expressions are supported. For example to skip all bad or recently played files you can use the following query: %rating% IS 1 OR %last_played% DURING LAST 8 HOURS

Skip query also offers $rand() field to generate random number from 0 to 2^32-1. %playlist_name% returns the name of the playlist where the current file is played from. And %playback_order% returns the playback order name.

The component also offers functionality to skip only parts of a track. To utilize the partial skipping set a tag field SKIP with timecodes that you want skipped. For example SKIP=0:00:00-0:01:25 (or simply SKIP=-0:01:25) to skip the first 85 seconds.

Track skipping has a few milliseconds of delay before activating which may allow beginning of gapless tracks to be heard. If you wish to have perfect glitchless skipping please add Skip Track as the last DSP in the DSP chain.

Latest changes:
Version 1.7.8: Changed DSP skip check to allow core callbacks more time to skip track before giving up.

Current version
1.7.8, released on 2013-04-13

Links
Download
-->http://www.foobar2000.org/getcomponent/8086f8e2939b594d14275a84241e4821/28cf43a7bd374f92aa03842dc3cf7895/foo_skip.fb2k-component
Home page
-->http://www.saunalahti.fi/~cse/foobar2000/?changes=foo_skip
Documentation
-->http://wiki.hydrogenaudio.org/index.php?title=Foobar2000:Components_0.9/foo_skip
Discussion
-->http://www.hydrogenaudio.org/forums/index.php?showtopic=30361&hl=

Download - foo_skip.dll included in Foobar2000 Component MEGAPACK by Gerguter on deviantART:
-->http://gerguter.deviantart.com/art/Foobar2000-Component-MEGAPACK-155159875?offset=20#comments

How can I make songs I like less, play less often?

Reply #6
foo_skip

This is kind of the opposite of what I want.
You can make it skip songs with a low rating. But what I want is for songs that I skip often to get a lower chance of playing.
I still want to hear them, just less often.
I'll try to show what I have in mind:

At the start, all songs have an equal chance of being played:
song A: 100%
song B: 100%
song C: 100%
-----------------
Now when I skip a song a few times, it will lose some of that chance.
If I don't skip it, it'll regain a bit:
song A: 89% (skipped 14 times, listened 3 times)
song B: 100% (skipped 1 time, listened 16 times)
song C: 57% (skipped 50 times, listened 7 times)
--------------------------------------------------------
This way, all songs in my playlist will get played at a rate equal to how often I want to hear them.

Can this be done, and if so, how?
Answers that look like "You can use [insert extension] for this if you configure it the right way" are useless to me, as I have no experience at all with configuring foobar extentions.

How can I make songs I like less, play less often?

Reply #7
I'm not aware of any component that keeps track of skips, so my guess is no, it cannot be done.

As foo_playcount is now, a track is considered played if it plays for 1 minute or, if the track is less than 60 seconds in length, it's considered played after its played in its entirety. This brings us to the problem of counting skips and plays and what should count as each. If you listen to 2 minutes of a 3-minute track before skipping to the next track, should that be counted as a listen, a skip or both?

Another problem as I see it is that you'd need three statistics (although with two the third could be determined) to arrive at a more accurate percentage for likelihood of playback: times played, times listened and times skipped (the problem explicitly being that only one exists now).
For example, your song "A" has been played approximately 17 times, skipped 14 times and listened to 3 times. This means you've listened to it about 18% of the time. Looking at way you wish to do it, I don't see why you'd want to assign it a playback likelihood of 89%.

To be honest, I don't see why you don't just rate the tracks. Yes, it's arbitrary and subjective, but so is basing the probability of playback on listens and skips. There are many contributing factors that can lead you to listen to or skip a track such as time of day, day of week, month/season, weather, personal mood, music genre, track mood, track theme, etc. Far too many to factor in to arrive at an accurate number at any given time.


As for foo_skip, you could probably modify this script (found here) to use play counts instead of ratings:
Code: [Select]
("$meta(rating)" IS 0 AND "$mod($rand(),100)" GREATER 1) OR (%rating% IS 1 AND "$mod($rand(),100)" GREATER 24) OR (%rating% IS 2 AND "$mod($rand(),100)" GREATER 49) OR (%rating% IS 3 AND "$mod($rand(),100)" GREATER 74)

Basically by modifying it, the higher a track's play count is, the less likely it is to be skipped.

How can I make songs I like less, play less often?

Reply #8
Quote
I'm not aware of any component that keeps track of skips, so my guess is no, it cannot be done.
But is it possible to assign probabilities to individual songs? Perhaps with that random pools plugin? From what I've seen it might be possible, even if it means making a pool for every % probability (between 20% and 100%).
Because then I could use my skip key to take off 1% (if you can bind stuff like that), and foo_playcount to add back 1% if I don't skip it (in the first minute).
I don't think that the total number of skips or plays is needed, it only has to know the current probability.

Quote
For example, your song "A" has been played approximately 17 times, skipped 14 times and listened to 3 times. This means you've listened to it about 18% of the time. Looking at way you wish to do it, I don't see why you'd want to assign it a playback likelihood of 89%.
It will even out over time, and when I start to like or hate a song it will automatically adjust, even when I don't realize it.

Quote
To be honest, I don't see why you don't just rate the tracks. Yes, it's arbitrary and subjective, but so is basing the probability of playback on listens and skips. There are many contributing factors that can lead you to listen to or skip a track such as time of day, day of week, month/season, weather, personal mood, music genre, track mood, track theme, etc. Far too many to factor in to arrive at an accurate number at any given time.
my musical taste is very specific (99% death/black metal, 90% of which is from sweden or finland), and mood/weather/time of day/etc does not have much effect on what I want to hear. (unless I'm annoyed. but then I can just put some more aggressive songs in queue)

again, I have no experience in scripting/coding/whatever this is called, but that is why I am asking for help here 

How can I make songs I like less, play less often?

Reply #9
No arbitrary system can ever know what exactly you want in a given moment. But it can still be a pretty decent help.

I personally use an algorithm very similar to DADA to automatically assign a 5-digit score to my tracks. It takes playcount, added, first played, last played and length into consideration. Skips could be another thing to track, however there's no component to my knowledge that can do so and when you start thinking about it, it might not be all that useful anyway. If you let the song run for a bit playcount takes precedence. If you only count instant skips, the reasons for those can be very inconsistent to provide useful data (e.g. song A ended, song B starts playing but you jump back to A to listen once more, B ends up being marked as skipped for no reason). The ideal solution would be to track total time played (and compare it to length) instead of playcount but we don't have that either.

I also have a 'favorite' tag which I fill manually when necessary (1=forces to show up on specific playlists even with a low score, 0=will not show up even with a high score). With a few filters/autoplaylists this covers a lot of possibilities (obligatory top playlist, favorite songs that I barely played, all songs that I like mixed etc).

If you really want to go with your adjusted random system you can probably do what BenB suggested with foo_skip or set up a playlist with foo_random and add playlist entries accordingly (For example one entry that must have a high rating and two with low ratings then play those randomly. That should result in 33% chance for the former and 66% for the latter), but I feel that's a bit of an overkill.

How can I make songs I like less, play less often?

Reply #10
I don't want to sound annoyed, snobby, whiny etc, BUT
For me it feels like everyone only reads the thread title, and then tries to think of their own, "better" solution. If I wanted a score/playcount based system, I would have asked for that.
Quote
No arbitrary system can ever know what exactly you want in a given moment.
I never asked for a system that does that.

Quote
I personally use an algorithm very similar to DADA to automatically assign a 5-digit score to my tracks. It takes playcount, added, first played, last played and length into consideration.
I explicitly said in my first post that I can't use something like DADA/DAR.

Quote
Skips could be another thing to track, however there's no component to my knowledge that can do so
I don't want to track skips. I just want the probability value to go down 1% when I press [next song] on my headset/keyboard, and up 1% when I don't. That's all I want

Quote
If you really want to go with your adjusted random system you can probably do what BenB suggested with foo_skip or set up a playlist with foo_random and add playlist entries accordingly

Quote
Answers that look like "You can use [insert extension] for this if you configure it the right way" are useless to me, as I have no experience at all with configuring foobar extentions.


Don't get me wrong, I appreciate the help, but the help I'm getting right now isn't really... helpful...

How can I make songs I like less, play less often?

Reply #11
As spec'd by you, can not be done.




How can I make songs I like less, play less often?

Reply #12
I suppose you could tag your files with a "SKIP" tag with a starting value of 0, then create a Masstagger script $add(%skip%,1) which you could bind as a keyboard shortcut to your "next" button. You'd have to remember that anytime you hit "next" a skip would be added. I think I'd bind it to a button instead of a keyboard shortcut if it were me doing this just so I'd have better control over when and if a skip is added.

Then you could use another script ( maybe $sub($add(100,%play_count%),%skip%) ) to format a "PROBABILITY" tag which you could use in foo_random_pools or foo_skip. Then again, you shouldn't have to store this value unless you wanted to.

How can I make songs I like less, play less often?

Reply #13
I suppose you could tag your files with a "SKIP" tag with a starting value of 0, then create a Masstagger script $add(%skip%,1) which you could bind as a keyboard shortcut to your "next" button. You'd have to remember that anytime you hit "next" a skip would be added. I think I'd bind it to a button instead of a keyboard shortcut if it were me doing this just so I'd have better control over when and if a skip is added.

Then you could use another script ( maybe $sub($add(100,%play_count%),%skip%) ) to format a "PROBABILITY" tag which you could use in foo_random_pools or foo_skip. Then again, you shouldn't have to store this value unless you wanted to.

This gave me hope again
I've been looking here and here and I am now confident that it can be done.

DISCLAIMER: I have never done something like this, I'd be surprised if this code would actually work. I don't even know if it's allowed to mix Title formatting and Query things.

subtract 1 probability when I press the programmable button on my headset to skip a song (so execute this and skip the song when I press that programmable button):
Code: [Select]
$if($and(%playback_time_seconds% LESS 60, %Probability% GREATER 20),$sub(1,%Probability%))

Add 1 probability when it reaches 60 seconds (not sure on this one, does it need something to activate it?):
Code: [Select]
$if($and(%playback_time_seconds% EQUAL 60, %Probability% LESS 100), $add(1,%Probability%))

Would this work? (with corrections if necessary)
If it works, there are 3 more things I need to know.
1. How do I use button inputs in scripts, or make scripts execute after a specific button combination?
2. Where do I put the scripts? I have literally no idea.
3. How can I make foo_random_pools use the resulting Probability value?



How can I make songs I like less, play less often?

Reply #15
Ok, then how about this
execute this when I press the button:
Code: [Select]
$if($and($greater(60, %playback_time_seconds%), $greater(%Probability%, 20)), $sub(1, %Probability%))

and add 1 probability when the song reaches 60 seconds
Code: [Select]
$if($and($ifequal(%playback_time_seconds%, 60), $greater(100, %Probability%), $add(1, %Probability))

How can I make songs I like less, play less often?

Reply #16
$sub and $add only return temporary copies of the updated values. They don’t physically update the original metadata fields being referenced.

As BenB said, you would need to use a tagging utility to physically update those values in the file. You can do this easily for the case where you manually press a button; a combination of BenB’s advice and your conditional clauses should be able to achieve this. As for an event-driven behaviour that monitors the elapsed time and automatically executes an update once it hits a certain point, I’ve never seen this described and am not aware whether it’s possible, so someone else would have to confirm or deny.

How can I make songs I like less, play less often?

Reply #17
Quote
As for an event-driven behaviour that monitors the elapsed time and automatically executes an update once it hits a certain point, I’ve never seen this described and am not aware whether it’s possible, so someone else would have to confirm or deny.

Is it then possible -in code- to to say  "1 gets added to %play_count%"? (from foo_playcount) I recall reading that it has a 60 second rule somewhere.
because then I could do
Code: [Select]
 $if($and(1 gets added to %play_count%, $greater(100, %Probability%), $add(1, %Probability%))

btw I was going to use masstag, I just need to figure out where to put the script, and how to bind it.

It feels like I'm almost there, exciting 

How can I make songs I like less, play less often?

Reply #18
Is it then possible -in code- to to say  "1 gets added to %play_count%"? (from foo_playcount) I recall reading that it has a 60 second rule somewhere.

I just found out that the dynamic fields component (foo_dynfil) recalculates script values after a song's metadata (playcount in this case) updates.
I tried this
Code: [Select]
$if($and($greater(%playback_time_seconds%, 59), $greater(100, %Probability%)), $add(1, %Probability%))
$greater(%playback_time_seconds%, 59) is there to make sure that it only runs after playcount updates at 60s, and not when I skip before that (as that would also change the metadata).

It's not working though, dynamic ratings uses a dynamic field thing, instead of tags. My PROBABILITY tag stays the same, but it doesn't create a %_Probability% dynamic field.
I am missing something (or multiple things, I don't know)

How can I make songs I like less, play less often?

Reply #19
It appears that time-related dynamic info isn't accessible to tagging, which kind of blows chunks. But even if it were accessible, you'd still have to manually trigger a tag write (which I'm assuming you were trying to avoid by attempting to use foo_dynfil). Still, it would have been nice having that time-related info accessible to enable time-constricted tagging.

How can I make songs I like less, play less often?

Reply #20
Ok, how about this:
Every time the song gets played (and probability < 100), add 1 probability.
Is that possible? To start a script when the song starts?

Skip before 60 seconds will now take off 2 points to compensate for the free point.

I will not rest until I get this done

Oh, and where do I put these scripts? In masstagger? In a txt file? I have no idea...

How can I make songs I like less, play less often?

Reply #21
You do realise this is exactly what DAR does?

I don't see much difference between a system where songs are punished for being skipped and one where songs are rewarded for not being skipped. But perhaps I'm missing something.

C.



PC = TAK + LossyWAV  ::  Portable = Opus (130)

How can I make songs I like less, play less often?

Reply #22
Okay, this is the way I would do it:

I'd create a playlist called SKIPPED.
I'd use Playlist Attributes to "Copy skipped tracks to Playlist ..." called SKIPPED.
I'd create a Mass Tagger script like so:

FORMAT "SKIPPED" using "$add(%skipped%,1)"

I'd setup DAR.

Then I'd alter the DAR code so that at the end it divides by 1 + %skipped%  [This is the clumsy way, a better way is below -- see note *]

Then I'd setup Random Pools so it picks one track at a time, and adds to the Playlist of your choice. I'd have 2 weightings, like so: 


Priority = 20
(%_dynamic_rating_with_skip% GREATER 7999) AND (NOT %last_played% DURING LAST 7 DAYS)

Priority = 1
(%_dynamic_rating_with_skip% LESS 8000) AND (NOT %last_played% DURING LAST 7 DAYS)


Then every once in a while I'd visit the SKIPPED playlist and run the masstagger script, then (importantly) empty the playlist.

----

This is what you'd get -- I'll give an example of one track from my collection:
This track (Track X) has been played 46 times in 859 days, is 5:11 in duration and has a DAR of 10322 - let's say it's never been skipped. The DAR+Skipped code will give it a "DAR-SKIP" of 10322 / (1 + 0) = 10322.

Let's say there's another track (Track Y) with identical characteristics that has been skipped 5 times, it will have a DAR-SKIP of 10322 / (1 + 5) = 1720.

Thus the former (Track X) would be 20 times more likely to be picked by Random Pools than the latter (Track Y). Which is what you want.
I can't think of a way to fully automate what you want -- but occasionally visiting a playlist and running a masstagger script (perhaps from a shortcut) is not a great deal of effort.

What would be nice is to have foo_scheduler to run a script that does this for you every day. Run masstagger script on contents of SKIPPED and then clear. But I'm not sure it can do this. Perhaps someone else may have some good ideas regarding how this part of the operation could be achieved.


* NOTE: -- A much better way to penalise skipped tracks:

A better way to do the skip penalty is like this:

Decide how long (number of days) you'd like the skip penalty (%skipped%) to last. Let's say 90 days. So after 90 days 1 skip will wear off. So if you'd skipped a track 3 times, after 90 days that penalty will have gone down to 2 skips.

Then you do this:

DAR / (1 + ((%skipped% - %age%) / %age%))

Example:

Let's say the track has been skipped 3 times and is only 90 days old (i.e. it was added 90 days ago).
Masstager would be set up like this:
FORMAT "SKIPPED" using "$add(%skipped%,90)"

So %skipped% would = 270  (i.e. 90 + 90 + 90)

DAR = 10322

"DAR-SKIP" = 10322 / (1 + ((270 - 90) / 90))
= 10322 / (1 + 2)
= 10322 / 3
= 3441

But if it wasn't skipped for another 90 days (i.e. its age = 180) that would have gone back up to:

"DAR-SKIP" = 10322 / (1 + ((270 - 180) / 180))
= 10322 / (1 + 0.5)
= 10322 / 1.5
= 6881

Then after another 90 days the 3 skips would have worn off completely:

"DAR-SKIP" = 10322 / (1 + ((270 - 270) / 270))
= 10322 / (1 + 0)
= 10322 / 1
= 10322

------

Hope that helps.

If you want me to alter the DAR code to do this then let me know; that wouldn't be hard to do.

C.
PC = TAK + LossyWAV  ::  Portable = Opus (130)

How can I make songs I like less, play less often?

Reply #23
Ok, how about this:
Every time the song gets played (and probability < 100), add 1 probability.
Is that possible? To start a script when the song starts?

Skip before 60 seconds will now take off 2 points to compensate for the free point.

Nope, at least not in any Playlist Renderer/Viewer that I tried to make it work.

Why not use %play_count% or a manipulation of it for this?

Oh, and where do I put these scripts? In masstagger? In a txt file? I have no idea...

Yes, you enter them into Masstagger and save them as a preset, then you can bind the preset to a button/keyboard shortcut. Masstagger is accessible under Tagging (once installed) in the context menu as "Manage Scripts" and any preset you create will be listed under "Scripts".

How can I make songs I like less, play less often?

Reply #24
Quote
I don't see much difference between a system where songs are punished for being skipped and one where songs are rewarded for not being skipped. But perhaps I'm missing something.

I was going to use DAR rating at first (I even have it set up), but then I thought about it more, and in my mind this is the issue:

If a song gets played, it will gain some score. If I then base the probability of being played on this score, songs with a higher score will get played more often. So far so good.
However, songs with a higher score will have a higher chance of being played, so they will gain score quicker than other songs. This will cause them to be played even more often, and so on until their score is way out of proportion.

Perhaps DAR is coded so that this doesn't happen, I can't tell with my limited coding knowledge.