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: "hotness" (Read 201989 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

"hotness"

Reply #325
Version 1.6.c.1, wherein I introduce a new approach to softening the hotness of recently played songs.  I'm excited about this change, so I urge you to try it out and see how different things look when you play tracks -- no more sharp leaps to 100.


It seems you did this job too well - no matter how hot a song really is(tested with new, just-played track and some thousands plays), it just won't reach 100.

Other than that - I've found this to be one of the most helpfull add-ons for Foobar! Great job!

By the way, where is the cooperation with CWBowron headed? Is it still possible?

"hotness"

Reply #326
Version 1.6.c.1, wherein I introduce a new approach to softening the hotness of recently played songs.  I'm excited about this change, so I urge you to try it out and see how different things look when you play tracks -- no more sharp leaps to 100.


It seems you did this job too well - no matter how hot a song really is(tested with new, just-played track and some thousands plays), it just won't reach 100.

Other than that - I've found this to be one of the most helpfull add-ons for Foobar! Great job!

By the way, where is the cooperation with CWBowron headed? Is it still possible?

Thanks for the positive feedback.  Hopefully this will be implemented into some CWB component, we're still working out some kinks.

In the meantime, now that foo_playback_custom supports PLAY_STAMP, I can finally begin work on a new Hotness algorithm, one that I think will be much more interesting.


"hotness"

Reply #328
I just put a long-overdue update in the first post.  I recommend "upgrading."  Same approach, better code.

As always please offer feedback.  I'm also curious to see how people are implementing it.  What I've done is multiplied values by 10 to get higher granularity for reference, and also converted to a five-point scale for a quick glimpse of hotness.

Thanks for using this.

"hotness"

Reply #329
I use the Foobar2k 0.9.4.4, along with  coumns_ui 0.2.0 beta 1, and playcount 1.9.2.

I copied and pasted this text into the globals section of columns UI. I then made a new column, called it 'Hotness' and in it I put the string: $get_global(hotness)

Then I got "UNKNOWN" for the column.

Where did I go wrong? What do I do to see circles denoting hotness?

"hotness"

Reply #330
I use the Foobar2k 0.9.4.4, along with  coumns_ui 0.2.0 beta 1, and playcount 1.9.2.

I copied and pasted this text into the globals section of columns UI. I then made a new column, called it 'Hotness' and in it I put the string: $get_global(hotness)

Then I got "UNKNOWN" for the column.

Where did I go wrong? What do I do to see circles denoting hotness?


try %_hotness%  thats what I am using to display the hotness number. 

I got the code for making circles showing the hotness at the start of this thread.

EDIT: I did not realise there was a newer version.  I just updated to the latest version and I cant make hotness work either. The hotness in columns just stays blank

EDITAGAIN:  I worked out what was wrong with mine. In the new version theres the line $puts(pc,[%play_count%])
my mp3s are tagged using %play_counter% so i changed this and its all good.

Someone pls tell me whats now the standard playcount tag.. because I thought the standard was play_counter

"hotness"

Reply #331
Someone pls tell me whats now the standard playcount tag.. because I thought the standard was play_counter

I don't think a standard has been established.  In fact, I think the reason two practices are in place is so that they can be distinguished.  The official playback statistics component uses %play_count%, so that's what I use, and what I've put as the default in the Hotness code.

@ezuk: are you still having trouble, or did vader897's advice help?

"hotness"

Reply #332
Quote
@ezuk: are you still having trouble, or did vader897's advice help?


Well, shortly after I installed the play_count module (the most recent one) foobar2k started crashing horribly. Every couple songs or so, it would crash and burn with multiple pop-up MFC error dialogs and no detailed information. I started troubleshooting and eventually removed the playcount module. That fixed the problem, but now I'm not sure if I can use the hotness thing. Should I re-configure something, change a variable name? I don't now what the "official" module is.

(I sound like an utter n00b, and I do apologize. I've been using fb2k for 2-3 years now, and have never got really deep into it.)


"hotness"

Reply #334
topdownjimmy.

I really like your hotness algorithm and I use it regularly, thanks for coming up with it.
I have recently discovered foo_playlist_tree and would really like to create some dynamic playlists based on hotness, particularly for creating a CD mix of random hot songs.  The big problem is that I cannot access %hotness% outside of columns UI.  However this doesn't mean all is lost because we should be able to port your hotness algorithm into foo_playlist_tree.  This should be either possible using the criteria field in foo_playlist_tree  or by porting your algorithm into scheme code.

I did a uni subject last semester on scheme, so i have some experience with that.  I just may need help understanding your algorithm.  Would you consider porting it or working on porting it with me?

It will be a bit redundant to be calculating hotness in two components, but it seems like the only way i can think of to create query based playlists based on hotness.

Thanks
-vader897

"hotness"

Reply #335
topdownjimmy.

I really like your hotness algorithm and I use it regularly, thanks for coming up with it.
I have recently discovered foo_playlist_tree and would really like to create some dynamic playlists based on hotness, particularly for creating a CD mix of random hot songs.  The big problem is that I cannot access %hotness% outside of columns UI.  However this doesn't mean all is lost because we should be able to port your hotness algorithm into foo_playlist_tree.  This should be either possible using the criteria field in foo_playlist_tree  or by porting your algorithm into scheme code.

I did a uni subject last semester on scheme, so i have some experience with that.  I just may need help understanding your algorithm.  Would you consider porting it or working on porting it with me?

It will be a bit redundant to be calculating hotness in two components, but it seems like the only way i can think of to create query based playlists based on hotness.

Thanks
-vader897

Actually, cwbowron is still considering putting hotness into one of his components, something like $tdj_hotness()

Until then, the hotness code can be reduced to a single line, and used as a reverse sort string for Playlist Tree queries (I just did this myself recently).  Just remove all the line breaks, pad the result with $num(), and reverse sort.

I'll probably post this single-line code shortly to save people the trouble.

"hotness"

Reply #336
[/quote]
Actually, cwbowron is still considering putting hotness into one of his components, something like $tdj_hotness()

Until then, the hotness code can be reduced to a single line, and used as a reverse sort string for Playlist Tree queries (I just did this myself recently).  Just remove all the line breaks, pad the result with $num(), and reverse sort.

I'll probably post this single-line code shortly to save people the trouble.
[/quote]

Does this solution give a playlist of only songs with hotness? or will it give a playlist with hot songs up the top and song without hotness all trailing on the end of the playlist?
It would be very much appreciated if you could post the code.. I will have a crack at it but foo_playlist_tree has caused me a bit of grief as I haven't quite gotten the hang of the syntax yet.  I look forward to hotness being integrated into other components. 
Thanks,
-vader897

"hotness"

Reply #337
Would love to know how to get this to work in either a SCPL/panelsui or how to make a autoplaylist or playlist tree that does this all.

EDIT: Is it possible to use hotness in an autoplaylist? That's what I really want to do. And then to add hotness to a SCPL so I can see it next to the song title.

"hotness"

Reply #338
Is there support for this in the new 0.9.5 default UI? I haven't tried, and I haven't read anything about it.



"hotness"

Reply #341
great work ! that was very useful!
No Foobar? No music

"hotness"

Reply #342
Just added a single-line version to the first post for easy use with Playlist Tree.

Please let me know if you note any bugs or room for improvement in it or in the standard block code.

Thanks.

"hotness"

Reply #343
Does this code work without columns component?

"hotness"

Reply #344
Does this code work without columns component?

It should work in any interface that allows global definitions.  I think I've seen it successfully implemented in Panels UI, but I don't follow that component's development, so I can't be sure.

 

"hotness"

Reply #345
I hope its okay

works without cwb_hooks
but activate "Make date info available" option in columns ui

Code: [Select]
///////////////////////////////////////////
// HOTNESS - an algorithm for meta-rating
// v1.7.c (foo_cwb_hooks version)
// July 8, 2007 - by topdownjimmy@gmail.com
///////////////////////////////////////////
// v2 (foo_version)
// June 19, 2008 - modded by chiwou
///////////////////////////////////////////
//
// configure baselines: define baseline playfrequency and decay period (in days)
//
$puts(baselinefrequency,90) // decrease if songs stay hot too long, or: high to accentuate success, low to accentuate recentness
$puts(baselinedecay,28) // decrease if too many songs are hot, or: high to accentuate success, low to accentuate recentness
//
// configure playback statistics
//
$puts(lp,[%last_played%])
$puts(fp,[%first_played%])
$puts(pc,[%play_count%])
$puts(rating,[%rating%])
$puts(avgrating,3)
//
$puts(lp_mod,$sub($add($add($mul($year(%last_played%),365),$mul($month(%last_played%),30)),$day_of_month(%last_played%)),730000))
$puts(fp_mod,$sub($add($add($mul($year(%first_played%),365),$mul($month(%first_played%),30)),$day_of_month(%first_played%)),730000))
$puts(date_diff,$sub($add($add($mul(%_system_year%,365),$mul(%_system_month%,30)),%_system_day%),730000))
// DO NOT EDIT BELOW THIS LINE //
$puts(baselinefrequency,$mul($get(baselinefrequency),24))
$puts(baselinedecay,$mul($get(baselinedecay),24))
$puts(lp_age,$add($substr($get(lp),12,13),$mul(24,$get(lp_mod))))
$puts(fp_age,$add($substr($get(fp),12,13),$mul(24,$get(fp_mod))))
$puts(age,$sub($get(lp_age),$get(fp_age)))
$puts(now_age,$add(%_system_hour%,$mul(24,$get(date_diff))))
$puts(recentness,$sub($get(now_age),$get(lp_age)))
$puts(decay,$div($div($mul($get(pc),$get(baselinefrequency),$get(baselinedecay),$if2($get(rating),$get(avgrating)),100),$mul($max($get(age),$get(baselinefrequency)),$get(avgrating))),100))
$puts(rawhotness,$div($mul($max($sub($get(decay),$get(recentness)),0),100),$get(decay)))
$puts(forecast,$div($mul($max($sub($get(decay),$add($div($max(0,$sub($get(baselinedecay),$get(recentness))),2),$get(recentness))),0),100),$get(decay)))
$puts(hotness,$div($add($get(rawhotness),$get(forecast)),2))

$set_global(hotness,$get(hotness))
// END HOTNESS //

"hotness"

Reply #346
I hope its okay

works without cwb_hooks
but activate "Make date info available" option in columns ui

Code: [Select]
///////////////////////////////////////////
// HOTNESS - an algorithm for meta-rating
// v1.7.c (foo_cwb_hooks version)
// July 8, 2007 - by topdownjimmy@gmail.com
///////////////////////////////////////////
// v2 (foo_version)
// June 19, 2008 - modded by chiwou
///////////////////////////////////////////
//
// configure baselines: define baseline playfrequency and decay period (in days)
//
$puts(baselinefrequency,90) // decrease if songs stay hot too long, or: high to accentuate success, low to accentuate recentness
$puts(baselinedecay,28) // decrease if too many songs are hot, or: high to accentuate success, low to accentuate recentness
//
// configure playback statistics
//
$puts(lp,[%last_played%])
$puts(fp,[%first_played%])
$puts(pc,[%play_count%])
$puts(rating,[%rating%])
$puts(avgrating,3)
//
$puts(lp_mod,$sub($add($add($mul($year(%last_played%),365),$mul($month(%last_played%),30)),$day_of_month(%last_played%)),730000))
$puts(fp_mod,$sub($add($add($mul($year(%first_played%),365),$mul($month(%first_played%),30)),$day_of_month(%first_played%)),730000))
$puts(date_diff,$sub($add($add($mul(%_system_year%,365),$mul(%_system_month%,30)),%_system_day%),730000))
// DO NOT EDIT BELOW THIS LINE //
$puts(baselinefrequency,$mul($get(baselinefrequency),24))
$puts(baselinedecay,$mul($get(baselinedecay),24))
$puts(lp_age,$add($substr($get(lp),12,13),$mul(24,$get(lp_mod))))
$puts(fp_age,$add($substr($get(fp),12,13),$mul(24,$get(fp_mod))))
$puts(age,$sub($get(lp_age),$get(fp_age)))
$puts(now_age,$add(%_system_hour%,$mul(24,$get(date_diff))))
$puts(recentness,$sub($get(now_age),$get(lp_age)))
$puts(decay,$div($div($mul($get(pc),$get(baselinefrequency),$get(baselinedecay),$if2($get(rating),$get(avgrating)),100),$mul($max($get(age),$get(baselinefrequency)),$get(avgrating))),100))
$puts(rawhotness,$div($mul($max($sub($get(decay),$get(recentness)),0),100),$get(decay)))
$puts(forecast,$div($mul($max($sub($get(decay),$add($div($max(0,$sub($get(baselinedecay),$get(recentness))),2),$get(recentness))),0),100),$get(decay)))
$puts(hotness,$div($add($get(rawhotness),$get(forecast)),2))

$set_global(hotness,$get(hotness))
// END HOTNESS //
Unfortunately, this code produces weird figures like "1964039" for a song recently played for the first time or "982067" for one played yesterday. Any ideas?

"hotness"

Reply #347
Did you remember to tick "Make date info available" (and possibly the others) on Columns UI?

"hotness"

Reply #348
hooks doesn't work anymore with the latest foobar.. perhaps a rewrite is in order..

"hotness"

Reply #349
Yep, I did tick that (and even the other three) option in CUI. And I used chiwou's cwb_hooks-independent version, of course.

Ow, and I've forgotten to mention that I tried using it in ELPlaylist, not NG or the old CUI one. That should be the cause, I think. Anyone having any luck porting this code to ELPlaylist?