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: Hot or not? (Read 27617 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Hot or not?

Yet  another modification of rating column for Columns ui.
What it does:if you play some track a lot you'll get a green bar,if you forget about this song for X days
it will drop and eventually go red.The raeson i did it is because i wanted to know what files in my
media library is absolutly "hopless" ,get no "radio time" and therefore should be removed.
So basicly it displays positive and negative rating of a track.
Maybe it wil be useful for someone.I did it in a hurry and so fell free to leave your comments.
BTW:the font used is Franklin gothic medium 9pt and you can change the time period in days after which the
rating drops.




Code: [Select]
//Change "decreaserange" value to the desired period after which the rating drops (in days)
$puts(decreaserange,15)
//------------------------------------------------------------------------------
//Change background color
$puts(background,$rgb(122,122,122))
//-----------------------------------------------------------------------------
$puts(month,$mul(30,%_system_month%))
$puts(day,%_system_day%)
$puts(year,$mul(%_system_year%,365))
$puts(date,$add($get(month),$get(day),$get(year)))

$puts(symbol,$char(9608))
$puts(fmonth,$mul(30,$num($substr(%first_played%,6,7),2)))
$puts(fday,$num($substr(%first_played%,9,10),2))
$puts(fyear,$mul(365,$num($substr(%first_played%,1,4),4)))
$puts(fdate,$add($get(fmonth),$get(fday),$get(fyear)))
$if($stricmp($get(fdate),0),$puts(fdate,$get(date)))
$puts(daterange,$sub($get(date),$get(fdate)))
$puts(fix,$div($get(daterange),$get(decreaserange)))
$if(%play_counter%,$puts(rating,%play_counter%),$puts(rating,0))
$if($greater(%play_counter%,5),$puts(rating,$sub(5,$get(fix))),
$puts(rating,$sub($get(rating),$get(fix))))

$if($greater(-5,$get(rating)),$puts(rating,-5))
$if($greater($get(rating),5),$puts(rating,5))

$puts(neg,$transition($repeat($get(symbol),5),$rgb(250,0,0),$rgb(250,100,0)))
$puts(pos,$transition($repeat($get(symbol),5),$rgb(100,250,0),$rgb(0,250,0)))


$if($greater(0,$get(rating)),
$get(background)$repeat($get(symbol),$add(5,$get(rating)))
$right($get(neg),$add(2,$mul(9,$mul(-1,$get(rating)))))
$rgb(150,150,0)$get(symbol)
$get(background)$repeat($get(symbol),5),
$if($greater($get(rating),0),
$get(background)$repeat($get(symbol),5)
$rgb(150,150,0)$get(symbol)
$left($get(pos),$mul($get(rating),9))
$get(background)$repeat($get(symbol),$sub(5,$get(rating)))
,
$get(background)$repeat($get(symbol),5)
$rgb(150,150,0)$get(symbol)
$get(background)$repeat($get(symbol),5)
))

Oh yeah,you need to use the unofficial playcount component to run this script
Favourite artist:CD-R
Favourite album:700MB

Hot or not?

Reply #1
Soooo cooool!!! Nice idea! 

((((( Strictly4me )))))

Hot or not?

Reply #2
Russell777 - this is excellent work.  Well done.

To take this concept further, I have a question to the forum.  Most of the time I'm using foobar I'm actively rating songs (0-5), but sometimes (such as a party) I would like to just listen to tracks.  I'd like those tracks with a rating of 5 to be played 5 times as often as those that have a rating 1.

I have worked out a way to do this using VB to create a playlist (create 5 seperate playlist entries for a rating 5) but wonder if there's a way in foobar to get the higher rating songs to play more often.  Or would this require the development of a plug-in?

Thanks,

c0utta

Hot or not?

Reply #3
Russell777 - this is excellent work.  Well done.

To take this concept further, I have a question to the forum.  Most of the time I'm using foobar I'm actively rating songs (0-5), but sometimes (such as a party) I would like to just listen to tracks.  I'd like those tracks with a rating of 5 to be played 5 times as often as those that have a rating 1.

I have worked out a way to do this using VB to create a playlist (create 5 seperate playlist entries for a rating 5) but wonder if there's a way in foobar to get the higher rating songs to play more often.  Or would this require the development of a plug-in?

Thanks,

c0utta


Yes,if you managed to create sush a playlist,then setting playback order to "shuffle" should give 5
rated tracks 5X playtime.Although i never tried to do it plus shuffle option is far from being perfect
i do believe it should work.Or am i wrong?
Favourite artist:CD-R
Favourite album:700MB

Hot or not?

Reply #4
Two more versions:


Code: [Select]

//Change "decreaserange" value to the desired period after which the rating drops (in days)
$puts(decreaserange,15)
//------------------------------------------------------------------------------
//Change background color
$puts(background,$rgb(122,122,122))
//-----------------------------------------------------------------------------
$puts(month,$mul(30,%_system_month%))
$puts(day,%_system_day%)
$puts(year,$mul(%_system_year%,365))
$puts(date,$add($get(month),$get(day),$get(year)))

$puts(symbol,$char(9608))
$puts(fmonth,$mul(30,$num($substr(%first_played%,6,7),2)))
$puts(fday,$num($substr(%first_played%,9,10),2))
$puts(fyear,$mul(365,$num($substr(%first_played%,1,4),4)))
$puts(fdate,$add($get(fmonth),$get(fday),$get(fyear)))
$if($stricmp($get(fdate),0),$puts(fdate,$get(date)))
$puts(daterange,$sub($get(date),$get(fdate)))
$puts(fix,$div($get(daterange),$get(decreaserange)))
$if(%play_counter%,$puts(rating,%play_counter%),$puts(rating,0))
$if($greater(%play_counter%,5),$puts(rating,$sub(5,$get(fix))),
$puts(rating,$sub($get(rating),$get(fix))))

$if($greater(-5,$get(rating)),$puts(rating,-5))
$if($greater($get(rating),5),$puts(rating,5))


$if($greater(0,$get(rating)),
$rgb(250,0,0)$repeat($char(8595),$mul(-1,$get(rating)))
,$if($greater($get(rating),0),
$rgb(0,250,0)$repeat($char(8593),$get(rating)),
$rgb(250,250,0)$char(8616))
)



Code: [Select]

//Change "decreaserange" value to the desired period after which the rating drops (in days)
$puts(decreaserange,15)
//------------------------------------------------------------------------------
//Change background color
$puts(background,$rgb(122,122,122))
//-----------------------------------------------------------------------------
$puts(month,$mul(30,%_system_month%))
$puts(day,%_system_day%)
$puts(year,$mul(%_system_year%,365))
$puts(date,$add($get(month),$get(day),$get(year)))

$puts(symbol,$char(9608))
$puts(fmonth,$mul(30,$num($substr(%first_played%,6,7),2)))
$puts(fday,$num($substr(%first_played%,9,10),2))
$puts(fyear,$mul(365,$num($substr(%first_played%,1,4),4)))
$puts(fdate,$add($get(fmonth),$get(fday),$get(fyear)))
$if($stricmp($get(fdate),0),$puts(fdate,$get(date)))
$puts(daterange,$sub($get(date),$get(fdate)))
$puts(fix,$div($get(daterange),$get(decreaserange)))
$if(%play_counter%,$puts(rating,%play_counter%),$puts(rating,0))
$if($greater(%play_counter%,5),$puts(rating,$sub(5,$get(fix))),
$puts(rating,$sub($get(rating),$get(fix))))

$if($greater(-5,$get(rating)),$puts(rating,-5))
$if($greater($get(rating),5),$puts(rating,5))

$if($greater(0,$get(rating)),
$get(rating)$rgb(250,0,0)$char(9660)
,$if($greater($get(rating),0),
$get(rating)$rgb(0,250,0)$char(9650),
$rgb(250,250,0)$char(9668)$char(9658))
)
Favourite artist:CD-R
Favourite album:700MB

Hot or not?

Reply #5
I love the third one you posted, much more compact and IMO a bit easier to read.

Hot or not?

Reply #6
hey, great function, thank you so much.
one question, would it be possible to use this without the unofficial playcount component? just using the official one without the %fist_played% field?

Hot or not?

Reply #7
Your question came right on time!Because today the unoficial playcount component had been updated
(finaly!) and it now features the %first played% field also,all you'll need to do is to go through the code
and change the %play_counter% to %play_count%.Enjoy!
P.S. the updated official component is much better because if you disable tag writing you'll get rid
of the annoying tag updating dialog.Link: http://www.foobar2000.org/components/index.html
Favourite artist:CD-R
Favourite album:700MB

Hot or not?

Reply #8
hm using the official one, no problems at all, changed the play_counter to play_count and everything is fine.

Hot or not?

Reply #9
great!! thanks again

Hot or not?

Reply #10
Newbie question, and if it's just a link that would forward me to the answer, I'd be very grateful. How do I implement the code to use this feature?

Thank you very much.

Hot or not?

Reply #11
Newbie question, and if it's just a link that would forward me to the answer, I'd be very grateful. How do I implement the code to use this feature?

Thank you very much.

Well first of all you will need Columns UI and foo_playcount.dll installed

Then:Preferences->ColumnsUI->playlist view.
Click on "columns" tab,select "new" and copy\paste the code in the "display" window.
Also go to "globals" tab and make sure you have "make date info available" box checked.
That's about it.
Favourite artist:CD-R
Favourite album:700MB

Hot or not?

Reply #12
This looks interesting.  Can you explain to me how hotness is calculated mathematically?  I'm having trouble figuring it out easily from the code.  Thanks.

Hot or not?

Reply #13
This looks interesting.  Can you explain to me how hotness is calculated mathematically?  I'm having trouble figuring it out easily from the code.  Thanks.

It's quite simple:play count-((last played date-first played date)/decrease range).
So eventually you'll end up with positive or negative hotness.For example if the file had just been added
it's hotness will be set on "0".And after X days without playback it will go negative.
I hope it explains it. 
Favourite artist:CD-R
Favourite album:700MB

Hot or not?

Reply #14
Hm! It's not possible to show this infos in Trackinfo?
By example: I have ...

First played: 2005-01-10 15:05:29
Last played: 2006-08-17 14:36:45


In playlist i have: -5 and red arrow
In trackinfo i have: 4 and green arrow

Other example: I have ...

First played: 2006-08-16 15:05:29
Last played: 2006-08-16 15:05:29
(same time because first play of this song)

In playlist i have: 1 and green arrow
In trackinfo i have: 5 and green arrow

Any Idea?
((((( Strictly4me )))))

Hot or not?

Reply #15
Hm! It's not possible to show this infos in Trackinfo?
By example: I have ...

First played: 2005-01-10 15:05:29
Last played: 2006-08-17 14:36:45


In playlist i have: -5 and red arrow
In trackinfo i have: 4 and green arrow

Any Idea?
((((( Strictly4me )))))


the problem is that you don't have access to the system date fields in the trackinfo panel.You can
try to export that data from the columns ui playlist by setting a global variable and accessing it
from the trackinfo or you can wait and i'll try to implement it today.
Favourite artist:CD-R
Favourite album:700MB

Hot or not?

Reply #16
or you can wait and i'll try to implement it today.

  *g* I will wait    and many thanks in advance. 

((((( Strictly4me )))))

EDIT:

Seems to be another problem in playlist.
I have:

First played: 2005-01-10 15:05:29
Last played: 2005-11-24 17:02:08
In playlist i have: -5 and red arrow (i think it's ok)

but i have also -5 and red arrow with:

First played: 2005-01-10 15:05:29
Last played: 2006-08-17 14:34:27 (i think this is not ok)

((((( Strictly4me )))))

Hot or not?

Reply #17
or you can wait and i'll try to implement it today.

  *g* I will wait    and many thanks in advance. 

((((( Strictly4me )))))

EDIT:

Seems to be another problem in playlist.
I have:

First played: 2005-01-10 15:05:29
Last played: 2005-11-24 17:02:08
In playlist i have: -5 and red arrow (i think it's ok)

but i have also -5 and red arrow with:

First played: 2005-01-10 15:05:29
Last played: 2006-08-17 14:34:27 (i think this is not ok)

((((( Strictly4me )))))


No,i believe it's quite allright.If you don't change the default value of the decrease range,your rating
will drop every 15 days,so in 75 days it will be -5,but it ofcourse depends on the %play_count% value
(see the calculation formula i brought in the earlier post).If you think the rating should be decreased more
slowly\rapidly you can change the "decrease range" value.
Example:with the default value (15 days):
playcount=7,last played-first played=75,rating=2
playcount=2,last played-first played=75,rating=-3

EDIT:it is possible to expand the rating range to lets say [-20,20] (right now it's limited to [-5,5])to give more clear vision of your rating and then your 6 month old file and one year old file with the same playcount won't have the same -5 rating.
Favourite artist:CD-R
Favourite album:700MB

Hot or not?

Reply #18
hm, i changed my systemdate to next week and the decreaserange to one day, but rating doesnt drop, im using the official component and changed play_counter to play_count, am i missing something??

Hot or not?

Reply #19
hm, i changed my systemdate to next week and the decreaserange to one day, but rating doesnt drop, im using the official component and changed play_counter to play_count, am i missing something??

I think i've found the problem,i edited all the three versions,try now,and if the problem remains,
please provide me some detail about the track you've been monitoring (first played,last played,play count)
Favourite artist:CD-R
Favourite album:700MB

Hot or not?

Reply #20
Track info versions:
You'll need this component to run the scripts: http://foobar.bowron.us/foo_cwb_hooks.zip
And now it's already tuned to work with the official foo_playcount.dll.




Code: [Select]
//Change "decreaserange" value to the desired period after which the rating drops (in days)
$puts(decreaserange,15)
//------------------------------------------------------------------------------
//Change background color
$puts(background,$rgb(122,122,122))
//-----------------------------------------------------------------------------
$puts(sysmonth,$num($substr(%systemdate%,6,7),2))
$puts(sysday,$num($substr(%systemdate%,9,10),2))
$puts(sysyear,$num($substr(%systemdate%,1,4),4))
$puts(month,$mul(30,$get(sysmonth)))
$puts(day,$get(sysday))
$puts(year,$mul(365,$get(sysyear)))
$puts(date,$add($get(month),$get(day),$get(year)))

$puts(symbol,$char(9608))
$puts(fmonth,$mul(30,$num($substr(%first_played%,6,7),2)))
$puts(fday,$num($substr(%first_played%,9,10),2))
$puts(fyear,$mul(365,$num($substr(%first_played%,1,4),4)))
$puts(fdate,$add($get(fmonth),$get(fday),$get(fyear)))
$if($stricmp($get(fdate),0),$puts(fdate,$get(date)))
$puts(daterange,$sub($get(date),$get(fdate)))
$puts(fix,$div($get(daterange),$get(decreaserange)))
$if(%play_count%,$puts(rating,%play_count%),$puts(rating,0))
$if($greater(%play_count%,5),$puts(rating,$sub(5,$get(fix))),
$puts(rating,$sub($get(rating),$get(fix))))

$if($greater(-5,$get(rating)),$puts(rating,-5))
$if($greater($get(rating),5),$puts(rating,5))

$puts(neg,$transition($repeat($get(symbol),5),$rgb(250,0,0),$rgb(250,100,0)))
$puts(pos,$transition($repeat($get(symbol),5),$rgb(100,250,0),$rgb(0,250,0)))


$if($greater(0,$get(rating)),
$get(background)$repeat($get(symbol),$add(5,$get(rating)))
$right($get(neg),$add(2,$mul(9,$mul(-1,$get(rating)))))
$rgb(150,150,0)$get(symbol)
$get(background)$repeat($get(symbol),5),
$if($greater($get(rating),0),
$get(background)$repeat($get(symbol),5)
$rgb(150,150,0)$get(symbol)
$left($get(pos),$mul($get(rating),9))
$get(background)$repeat($get(symbol),$sub(5,$get(rating)))
,
$get(background)$repeat($get(symbol),5)
$rgb(150,150,0)$get(symbol)
$get(background)$repeat($get(symbol),5)
))




Code: [Select]

//Change "decreaserange" value to the desired period after which the rating drops (in days)
$puts(decreaserange,15)
//------------------------------------------------------------------------------
//Change background color
$puts(background,$rgb(122,122,122))
//-----------------------------------------------------------------------------
$puts(sysmonth,$num($substr(%systemdate%,6,7),2))
$puts(sysday,$num($substr(%systemdate%,9,10),2))
$puts(sysyear,$num($substr(%systemdate%,1,4),4))
$puts(month,$mul(30,$get(sysmonth)))
$puts(day,$get(sysday))
$puts(year,$mul(365,$get(sysyear)))
$puts(date,$add($get(month),$get(day),$get(year)))

$puts(symbol,$char(9608))
$puts(fmonth,$mul(30,$num($substr(%first_played%,6,7),2)))
$puts(fday,$num($substr(%first_played%,9,10),2))
$puts(fyear,$mul(365,$num($substr(%first_played%,1,4),4)))
$puts(fdate,$add($get(fmonth),$get(fday),$get(fyear)))
$if($stricmp($get(fdate),0),$puts(fdate,$get(date)))
$puts(daterange,$sub($get(date),$get(fdate)))
$puts(fix,$div($get(daterange),$get(decreaserange)))
$if(%play_count%,$puts(rating,%play_count%),$puts(rating,0))
$if($greater(%play_count%,5),$puts(rating,$sub(5,$get(fix))),
$puts(rating,$sub($get(rating),$get(fix))))

$if($greater(-5,$get(rating)),$puts(rating,-5))
$if($greater($get(rating),5),$puts(rating,5))


$if($greater(0,$get(rating)),
$rgb(250,0,0)$repeat($char(8595),$mul(-1,$get(rating)))
,$if($greater($get(rating),0),
$rgb(0,250,0)$repeat($char(8593),$get(rating)),
$rgb(250,250,0)$char(8616))
)



Code: [Select]

//Change "decreaserange" value to the desired period after which the rating drops (in days)
$puts(decreaserange,15)
//------------------------------------------------------------------------------
//Change background color
$puts(background,$rgb(122,122,122))
//-----------------------------------------------------------------------------
$puts(sysmonth,$num($substr(%systemdate%,6,7),2))
$puts(sysday,$num($substr(%systemdate%,9,10),2))
$puts(sysyear,$num($substr(%systemdate%,1,4),4))
$puts(month,$mul(30,$get(sysmonth)))
$puts(day,$get(sysday))
$puts(year,$mul(365,$get(sysyear)))
$puts(date,$add($get(month),$get(day),$get(year)))

$puts(symbol,$char(9608))
$puts(fmonth,$mul(30,$num($substr(%first_played%,6,7),2)))
$puts(fday,$num($substr(%first_played%,9,10),2))
$puts(fyear,$mul(365,$num($substr(%first_played%,1,4),4)))
$puts(fdate,$add($get(fmonth),$get(fday),$get(fyear)))
$if($stricmp($get(fdate),0),$puts(fdate,$get(date)))
$puts(daterange,$sub($get(date),$get(fdate)))
$puts(fix,$div($get(daterange),$get(decreaserange)))
$if(%play_count%,$puts(rating,%play_count%),$puts(rating,0))
$if($greater(%play_count%,5),$puts(rating,$sub(5,$get(fix))),
$puts(rating,$sub($get(rating),$get(fix))))

$if($greater(-5,$get(rating)),$puts(rating,-5))
$if($greater($get(rating),5),$puts(rating,5))

$if($greater(0,$get(rating)),
$get(rating)$rgb(250,0,0)$char(9660)
,$if($greater($get(rating),0),
$get(rating)$rgb(0,250,0)$char(9650),
$rgb(250,250,0)$char(9668)$char(9658))
)
Favourite artist:CD-R
Favourite album:700MB

Hot or not?

Reply #21

hm, i changed my systemdate to next week and the decreaserange to one day, but rating doesnt drop, im using the official component and changed play_counter to play_count, am i missing something??

I think i've found the problem,i edited all the three versions,try now,and if the problem remains,
please provide me some detail about the track you've been monitoring (first played,last played,play count)




hm... no diefference, first_played two days ago, last_played one minute ago, changed the system time when foobar was closed....play_count =2

Hot or not?

Reply #22
Quote
hm... no diefference, first_played two days ago, last_played one minute ago, changed the system time when foobar was closed....play_count =2


Well , i was unable to reproduce the problem you're having,but at the end i'll figure it out.for me everything
seems to work fine and the rating drops like it should.Does anybody encounts the same problem?
Favourite artist:CD-R
Favourite album:700MB

Hot or not?

Reply #23
Ok, i used the 3rd new code in playlist and trackinfo. Now both of them show me the same but i still have:

First played: 2005-01-10 15:05:29
Last played: 2006-08-17 14:34:27
In playlist i have: 2 and green arrow
Playcount shows me: 02

((((( Strictly4me )))))

Hot or not?

Reply #24
Quote
hm... no diefference, first_played two days ago, last_played one minute ago, changed the system time when foobar was closed....play_count =2


Well , i was unable to reproduce the problem you're having,but at the end i'll figure it out.for me everything
seems to work fine and the rating drops like it should.Does anybody encounts the same problem?



is it possible, that the official statistic component desnt write "first_played"?