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: DADA Auto-Rating (DAR) for foobar2000 (Read 83851 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

DADA Auto-Rating (DAR) for foobar2000

Reply #50
The $rgb() syntax is no longer supported by the DUI since foobar2000 v1.0

And I am glad that my recommendations above (both the removal of the word wraps and the use of that pattern as the columns code) have not been wrong.
This is HA. Not the Jerry Springer Show.

DADA Auto-Rating (DAR) for foobar2000

Reply #51
Hi,

perhaps you might try my modified code with these dots "•". I had problems with the original-code on XP & DUI, too.

Code: [Select]
$puts(r3,%_dynamic_rating%)$puts(r4,$ifgreater($get(r3),0,$get(r3),1))$puts(maxdar,10800)$puts(mindar,7800)$puts(minmax,$sub($get(maxdar),$get(mindar)))$puts(darind1,$sub($get(r4),$get(mindar)))$puts(darind2,$div($mul($get(darind1),10),$get(minmax)))$puts(darind3,$ifgreater($get(darind2),1,$get(darind2),1))$puts(display,$repeat(>>>•<<<,$get(darind3))$repeat(<<<•>>>,$sub(10,$get(darind3))))$puts(notplayed,- n/a -)$ifgreater(%play_count%,0,$get(display) $get(darind3),$get(notplayed))


@Carpman:

Thank you very much for the Auto-Rating.

Thank you !!!

It works fine now.

It may be a good thing to update the documentation in order to avoid further questions about that tricky thing.

P.S. : Thank you to Carpman, Yirkha and of course Peter !


DADA Auto-Rating (DAR) for foobar2000

Reply #53
OMG. I just realized that the rating algorithm is not hard-coded into the component but can be tweaked myself.
This is the sexiest component in years! Thanks so much Yirkha for implementing it and to carpman for fiddling giving the DADA inspiration.

Now I'm modifying the algorithm for my use case, i.e. unofficial play count without %added% and many long tracks (DJ mixes with 1 to 2 hours length) which get too much attention with the L²/9000 part. Thanks again both! This is such a nice toy!

Yirkha: Do I assume correctly that a %_dynamic_rating% refresh of the currently played track is not possible due to the use of %now% and possible repaint glitches?

DADA Auto-Rating (DAR) for foobar2000

Reply #54
For example, if I copy some songs to an iPod and play them while jogging, can I easily tell my foobar library and this plugin that I played those songs, without having to actually play them from within foobar?
It depends which playback statistics you use. The DAR rating will reflect whatever stats you have, so this is really a question for the foo_playcount thread. I've already made a suggestion there to be able to reduce playcount by one, perhaps you'd like to ask to be able to add playcount by one.
Well I hear foo_playcount works with foo_dop fine, i.e. the play counts from the iPod are synced into the database when you plug the device in next time.

So DUI has issues with that dot, as well as rgb(etc..) by the looks of it.
I'll make a note for the next release, especially for DUI users.
Regarding the dot, I see it only as a a question mark in you initial and subsequent posts here, so I wonder how else should it look like? The "for DUI" line in the linked .txt has a proper bullet though.
To avoid this kind of issues, maybe it would be better to use [font= "Courier New"]$char(8226)[/font] or similar instead.

Do I assume correctly that a %_dynamic_rating% refresh of the currently played track is not possible due to the use of %now% and possible repaint glitches?
No, possible and coming - see [a href='index.php?act=findpost&pid=724796']my posts in the old DAR thread[/a].
Full-quoting makes you scroll past the same junk over and over.

DADA Auto-Rating (DAR) for foobar2000

Reply #55
Now I'm modifying the algorithm for my use case, i.e. unofficial play count without %added% and many long tracks (DJ mixes with 1 to 2 hours length) which get too much attention with the L²/9000 part. Thanks again both! This is such a nice toy!

Just to let you know that the next release will deal with the very long tracks issue, but sure without %added% I'm sure it'll require some interesting tweaks.

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

DADA Auto-Rating (DAR) for foobar2000

Reply #56
Regarding the dot, I see it only as a a question mark in you initial and subsequent posts here, so I wonder how else should it look like? The "for DUI" line in the linked .txt has a proper bullet though.
To avoid this kind of issues, maybe it would be better to use $char(8226) or similar instead.

It should look like this:
http://www.giantpygmy.net/stuff/dar/DAR_v1.6.2_top10.png

Yikha, how do I look up the appropriate $char number, is there a reference table somewhere?
I'll take your advice and replace the dot with appropriate code, once I've found what I'm after.

Cheers,

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

DADA Auto-Rating (DAR) for foobar2000

Reply #57
For example, find the character in Windows Character map, see the value in the bottom-right corner, e.g. U+2022, convert from hex to decimal using your favourite way.
Full-quoting makes you scroll past the same junk over and over.

DADA Auto-Rating (DAR) for foobar2000

Reply #58
Thanks Yirkha.

Also I found another way, simply paste the symbol direct into the HA forum post box and preview, returns:
&#9679 = $char(9679). Couldn't find it in the Windows Character map. I knew there was a reason I stayed away from such visuals.

Code updated in instructions: http://www.giantpygmy.net/gpa/data/uploads..._dar_v1.6.4.txt

Cheers,

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

DADA Auto-Rating (DAR) for foobar2000

Reply #59
Main page updated. Released 1.6.3. (SLT):  Only affects tracks > 60 mins
Quote
  • DAR 1.6.3 - Introduced Super Long Track duration suppression (this only affects songs > 60 mins). The original DAR didn't foresee tracks longer than the duration of a CD. Though rare, such tracks do exist. This update ensures their ratings are not artificially high.
The default code is on the front page (No.2 in the graph below). I've posted a number of alternatives which are explained in the graph below. No.1 is what would be the default if foo_playcount only counted at say 67% played.



DAR 1.6.3. SLT @ 60 mins - Default (release version - No.2 in graph)

Code: [Select]
$puts(pc,%play_count%)
$puts(x,$add($date_diff(%added%),2))
$puts(y,$date_diff(%added%,%last_played%))
$puts(z,$sub($get(x),$get(y),2))
$puts(l,%length_seconds%)
$puts(d0,$ifgreater($get(l),3599,$muldiv(9000,$get(l),3600),9000))
$puts(d1,$muldiv($add($get(l),540),1,4))
$puts(d2,$muldiv($get(l),$get(l),$get(d0)))
$puts(d3,$add($get(d1),$get(d2)))
$puts(r0,$mul($add(1000,$muldiv($get(d3),$get(pc),100)),10))
$puts(dd,$div($add($get(y),50),10))
$puts(pp,$muldiv($get(pc),10000,$get(x)))
$puts(2,$muldiv($get(dd),$get(pp),100))
$puts(3,$muldiv($get(x),135,100))
$puts(4,$div($get(pp),50))
$puts(5,$div($muldiv($add($date_diff(%added%,%first_played%),2000),500,$add($div($get(d3),6),70)),$add($mul($get(pc),$get(pc)),1)))
$puts(6,$muldiv($get(pc),625,$get(x)))
$puts(7,$add($get(3),$get(5),$get(6)))
$puts(r1,$add($get(2),$get(r0)))
$puts(r2,$add($get(4),$sub($get(r1),$get(7))))
$puts(r3,$sub($get(r2),$div($mul($get(r2),$get(l),$get(z),$get(pc)),500000000)))
$puts(r4,$ifgreater($get(r3),0,$get(r3),1))
$ifgreater($get(pc),0,$num($get(r4),5),-----)

DAR 1.6.3. SLT @ 60 mins - Mild (mild duration effect - No.3 in graph)

Code: [Select]
$puts(pc,%play_count%)
$puts(x,$add($date_diff(%added%),2))
$puts(y,$date_diff(%added%,%last_played%))
$puts(z,$sub($get(x),$get(y),2))
$puts(l,%length_seconds%)
$puts(d0,$ifgreater($get(l),3599,$muldiv(10000,$get(l),3600),10000))
$puts(d1,$muldiv($add($get(l),720),1,5))
$puts(d2,$muldiv($get(l),$get(l),$get(d0)))
$puts(d3,$add($get(d1),$get(d2)))
$puts(r0,$mul($add(1000,$muldiv($get(d3),$get(pc),100)),10))
$puts(dd,$div($add($get(y),50),10))
$puts(pp,$muldiv($get(pc),10000,$get(x)))
$puts(2,$muldiv($get(dd),$get(pp),100))
$puts(3,$muldiv($get(x),135,100))
$puts(4,$div($get(pp),50))
$puts(5,$div($muldiv($add($date_diff(%added%,%first_played%),2000),500,$add($div($get(d3),6),70)),$add($mul($get(pc),$get(pc)),1)))
$puts(6,$muldiv($get(pc),625,$get(x)))
$puts(7,$add($get(3),$get(5),$get(6)))
$puts(r1,$add($get(2),$get(r0)))
$puts(r2,$add($get(4),$sub($get(r1),$get(7))))
$puts(r3,$sub($get(r2),$div($mul($get(r2),$get(l),$get(z),$get(pc)),500000000)))
$puts(r4,$ifgreater($get(r3),0,$get(r3),1))
$ifgreater($get(pc),0,$num($get(r4),5),-----)

DAR 1.6.3. SLT @ 60 mins - Weak (weak duration effect - No.4 in graph)

Code: [Select]
$puts(pc,%play_count%)
$puts(x,$add($date_diff(%added%),2))
$puts(y,$date_diff(%added%,%last_played%))
$puts(z,$sub($get(x),$get(y),2))
$puts(l,%length_seconds%)
$puts(d0,$ifgreater($get(l),3599,$muldiv(20000,$get(l),3600),20000))
$puts(d1,$muldiv($add($get(l),720),1,5))
$puts(d2,$muldiv($get(l),$get(l),$get(d0)))
$puts(d3,$add($get(d1),$get(d2)))
$puts(r0,$mul($add(1000,$muldiv($get(d3),$get(pc),100)),10))
$puts(dd,$div($add($get(y),50),10))
$puts(pp,$muldiv($get(pc),10000,$get(x)))
$puts(2,$muldiv($get(dd),$get(pp),100))
$puts(3,$muldiv($get(x),135,100))
$puts(4,$div($get(pp),50))
$puts(5,$div($muldiv($add($date_diff(%added%,%first_played%),2000),500,$add($div($get(d3),6),70)),$add($mul($get(pc),$get(pc)),1)))
$puts(6,$muldiv($get(pc),625,$get(x)))
$puts(7,$add($get(3),$get(5),$get(6)))
$puts(r1,$add($get(2),$get(r0)))
$puts(r2,$add($get(4),$sub($get(r1),$get(7))))
$puts(r3,$sub($get(r2),$div($mul($get(r2),$get(l),$get(z),$get(pc)),500000000)))
$puts(r4,$ifgreater($get(r3),0,$get(r3),1))
$ifgreater($get(pc),0,$num($get(r4),5),-----)

DAR 1.6.3. SLT @ 90 mins (No.1 in graph - recommended for those who use alternatives to foo_playcount, likely you'd need to change %play_count% to whatever. I'm not going to support this (help wise - i.e. questions about foo_custom_db), but while foo_playcount is like it is, I think users should have an alternative.)

Code: [Select]
$puts(pc,%play_count%)
$puts(x,$add($date_diff(%added%),2))
$puts(y,$date_diff(%added%,%last_played%))
$puts(z,$sub($get(x),$get(y),2))
$puts(l,%length_seconds%)
$puts(d0,$ifgreater($get(l),5399,$muldiv(9000,$get(l),5400),9000))
$puts(d1,$muldiv($add($get(l),540),1,4))
$puts(d2,$muldiv($get(l),$get(l),$get(d0)))
$puts(d3,$add($get(d1),$get(d2)))
$puts(r0,$mul($add(1000,$muldiv($get(d3),$get(pc),100)),10))
$puts(dd,$div($add($get(y),50),10))
$puts(pp,$muldiv($get(pc),10000,$get(x)))
$puts(2,$muldiv($get(dd),$get(pp),100))
$puts(3,$muldiv($get(x),135,100))
$puts(4,$div($get(pp),50))
$puts(5,$div($muldiv($add($date_diff(%added%,%first_played%),2000),500,$add($div($get(d3),6),70)),$add($mul($get(pc),$get(pc)),1)))
$puts(6,$muldiv($get(pc),625,$get(x)))
$puts(7,$add($get(3),$get(5),$get(6)))
$puts(r1,$add($get(2),$get(r0)))
$puts(r2,$add($get(4),$sub($get(r1),$get(7))))
$puts(r3,$sub($get(r2),$div($mul($get(r2),$get(l),$get(z),$get(pc)),500000000)))
$puts(r4,$ifgreater($get(r3),0,$get(r3),1))
$ifgreater($get(pc),0,$num($get(r4),5),-----)

As always feedback and testing welcome.

C.

EDIT: Grammar/spelling.
PC = TAK + LossyWAV  ::  Portable = Opus (130)

DADA Auto-Rating (DAR) for foobar2000

Reply #60
Would this work with ELPlaylist? What code would be necessary?


DADA Auto-Rating (DAR) for foobar2000

Reply #62
I think I should have been more specific: I'm trying to display the dynamic ratings in ELPlaylist in the "dots" form. I can't get it to work however. All I get is some random numbers.

DADA Auto-Rating (DAR) for foobar2000

Reply #63
I don't know about ELPlaylist, but:
1) Can you post the code you're using, and
2) Does the normal DAR code give proper results? i.e. what range of values are you getting, and
3) When you say random numbers, can you give an example.

That might give me and those who use ELPlaylist more to go on.

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

DADA Auto-Rating (DAR) for foobar2000

Reply #64
1. Code I'm using:

Code: [Select]
$puts(r3,%_dynamic_rating%)
$puts(r4,$ifgreater($get(r3),0,$get(r3),1))
$puts(maxdar,10800)
$puts(mindar,7800)
$puts(minmax,$sub($get(maxdar),$get(mindar)))
$puts(darind1,$sub($get(r4),$get(mindar)))
$puts(darind2,$div($mul($get(darind1),10),$get(minmax)))
$puts(darind3,$ifgreater($get(darind2),1,$get(darind2),1))
$puts(display,$repeat(•,$get(darind3))$repeat(•,$sub(10,$get(darind3))))
$puts(notplayed,- n/a -)
$ifgreater(%play_counter%,0,$get(display) $get(darind3),$get(notplayed))

2. Yes, I tried using it in a "normal" columns ui playlist and it works, it shows the dots and everything.

3. In ELPlaylist the fields (like title, tracknumber, etc.) are shown using the $drawtext(variable) command. Trying to use the same $drawtext to show %_dynamic_rating% it shows random numbers like 06479, etc. (I guess it is the value returned by DR).

I don't know if it makes any sense, I am no expert on this matter at all. Thank you all for helping me!

DADA Auto-Rating (DAR) for foobar2000

Reply #65
What happens if you use this?:

Code: [Select]
$puts(r3,%_dynamic_rating%)
$puts(r4,$ifgreater($get(r3),0,$get(r3),1))
$puts(maxdar,10800)
$puts(mindar,7800)
$puts(minmax,$sub($get(maxdar),$get(mindar)))
$puts(darind1,$sub($get(r4),$get(mindar)))
$puts(darind2,$div($mul($get(darind1),10),$get(minmax)))
$puts(darind3,$ifgreater($get(darind2),1,$get(darind2),1))
$puts(display,$rgb(150,150,150)$repeat($char(9679),$get(darind3)))
$puts(notplayed,$rgb(200,200,200)- n/a -)
$ifgreater(%play_count%,0,$get(display) $rgb(200,200,200)$get(darind3),$get(notplayed))
C.
PC = TAK + LossyWAV  ::  Portable = Opus (130)

DADA Auto-Rating (DAR) for foobar2000

Reply #66
It's the same. Actually, I think my problem is in showing the "dynamic rating" info in ELPlaylist. Neither $drawtext not $drawstring work.

DADA Auto-Rating (DAR) for foobar2000

Reply #67
Yeah. I'm not familiar with ELPlaylist, but it suggests that it doesn't handle $puts and $gets?
What I can't figure is how when you enter that code it gives the actual numeric DAR rating, seemingly ignoring everything but the %_dynamic_rating% part. Which is odd.

Why not ask on the ELPlaylist thread. In the meantime perhaps a current DAR user may know the answer and post here.

If you do find out let me know and I'll add intructions for it.

Good luck,

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

DADA Auto-Rating (DAR) for foobar2000

Reply #68
What about if you use this as the last line. I'm guessing, but I saw $char() used with $drawtextex.
However, searching for a decent manual for ELPlaylist isn't fun.
Code: [Select]
$ifgreater(%play_count%,0,$drawtextex($get(display) $rgb(200,200,200)$get(darind3)),$drawtextex($get(notplayed)))

If that's no good please go direct to ELPlaylist thread. 

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

DADA Auto-Rating (DAR) for foobar2000

Reply #69
Actually, I got it working. There was a conflict somewhere else in the code for ELPlaylist. The last line I used is:
Code: [Select]
$ifgreater(%play_counter%,0,$drawtext($get(display) $get(darind3),,,,,,vcenter),$drawtext($get(notplayed),,,,,,vcenter))

Thanks again for helping me and for the great algorithm.

DADA Auto-Rating (DAR) for foobar2000

Reply #70
Actually, I got it working. There was a conflict somewhere else in the code for ELPlaylist. The last line I used is...

Static, would you mind pasting the whole DAR (dots) code that you used for ELPlaylist, to be on the safe side?

Glad you got it working. 

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

DADA Auto-Rating (DAR) for foobar2000

Reply #71
Here it is. It includes green colouring for the dots and also font and alignment options that fit my ELPlaylist setup.

Code: [Select]
///DYNAMIC RATING

$puts(r3,%_dynamic_rating%)
$puts(r4,$ifgreater($get(r3),0,$get(r3),1))
$puts(maxdar,10800)
$puts(mindar,7800)
$puts(minmax,$sub($get(maxdar),$get(mindar)))
$puts(darind1,$sub($get(r4),$get(mindar)))
$puts(darind2,$div($mul($get(darind1),10),$get(minmax)))
$puts(darind3,$ifgreater($get(darind2),1,$get(darind2),1))
$puts(display,$rgb(164,191,71)$repeat(•,$get(darind3))$rgb(190,190,190)$repeat(•,$sub(10,$get(darind3))))
$puts(notplayed,$rgb(190,190,190)- n/a -)
$ifgreater(%play_counter%,0,$get(display) $get(darind3),$get(notplayed))
$ifgreater(%play_counter%,0,$drawtext($get(display)
$font(consolas,8,bold) $rgb(140,160,140)$get(darind3),584,,80,,,vcenter),$drawtext($get(notplayed),604,,80,,,vcenter))



DADA Auto-Rating (DAR) for foobar2000

Reply #72
Thanks Static.
So in theory, an ELPlaylist user, who was using foo_playcount, could use the following:

Code: [Select]
$puts(r3,%_dynamic_rating%)
$puts(r4,$ifgreater($get(r3),0,$get(r3),1))
$puts(maxdar,10800)
$puts(mindar,7800)
$puts(minmax,$sub($get(maxdar),$get(mindar)))
$puts(darind1,$sub($get(r4),$get(mindar)))
$puts(darind2,$div($mul($get(darind1),10),$get(minmax)))
$puts(darind3,$ifgreater($get(darind2),1,$get(darind2),1))
$puts(display,[color=#FF0000]$rgb(164,191,71)[/color]$repeat([color=#FF0000]$char(9679)[/color],$get(darind3))[color=#FF0000]$rgb(190,190,190)[/color]$repeat([color=#FF0000]$char(9679)[/color],$sub(10,$get(darind3))))
$puts(notplayed,[color=#FF0000]$rgb(190,190,190)[/color]- n/a -)
$ifgreater(%play_count%,0,$drawtext($get(display)
[color=#FF0000]$font(consolas,8,bold) $rgb(140,160,140)[/color]$get(darind3),[color=#FF0000]584[/color],,[color=#FF0000]80[/color],,,vcenter),$drawtext($get(notplayed),[color=#FF0000]604[/color],,[color=#FF0000]80[/color],,,vcenter))
... and adjust the "superficial" variables highlighted above to suit their aesthetic sensibilities.
Any ELPlaylist types, who use foo_playcount and want to test this code, I'd be grateful. If this works, I'll link to it from the help file. But due to the number of positioning and display variables I'm tempted to stay well clear.

Thanks again,

C.

EDIT: Used codebox
PC = TAK + LossyWAV  ::  Portable = Opus (130)

DADA Auto-Rating (DAR) for foobar2000

Reply #73
Yes, that's correct. The code also works with Playback Statistics Custom (foo_playback_custom), as long as %play_count% is replaced with %play_counter% in the original code of Dynamic rating, under the Media Library.

DADA Auto-Rating (DAR) for foobar2000

Reply #74
Yep, I'm running a dual test between foo_playcount and foo_playback_custom (with custominfo_sqlite.db). The latter using 67% as played and with the ability to reduce and increase playcounts. So foo_playback_custom has what I would call the actual playcount data, and foo_playcount has a kind of "turbo charged" playcount data. It should give some indication of the distorting effect of foo_playcount.

Thanks again for providing the ELPlaylist solution.

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