Skip to content

Instantly share code, notes, and snippets.

@croensch
Created April 26, 2012 16:28
Show Gist options
  • Save croensch/2500772 to your computer and use it in GitHub Desktop.
Save croensch/2500772 to your computer and use it in GitHub Desktop.
Foobar2000 Scoring Column
/**
* a nice foobar2000 scoring algorithm,
* wich emphasizes half on a baseline of tags
* and the other half on the bitrate of MP3 or AAC
* with a slightly tricked curve for AAC (bonus)
* current max is 12 Points or 6 nice stars
*
* tipp: use php highlighter to edit
*/
# Scoring -v
$if(%artist%,1)+$if(%album%,1)+$if(%title%,1)+$if(%tracknumber%,2)+$if($strcmp(%codec%,MP3),$div(%bitrate%,64))+$if($strcmp(%codec%,AAC),$div($div($mul(%bitrate%,3),2),64))
# Scoring -n
$add($if(%artist%,1),$if(%album%,1),$if(%title%,1),$if(%tracknumber%,2),$if($strcmp(%codec%,MP3),$div(%bitrate%,64)),$if($strcmp(%codec%,AAC),$div($div($mul(%bitrate%,3),2),64)))
# Scoring -s
$pad(,$div($add($if(%artist%,1),$if(%album%,1),$if(%title%,1),$if(%tracknumber%,2),$if($strcmp(%codec%,MP3),$div(%bitrate%,64)),$if($strcmp(%codec%,AAC),$div($div($mul(%bitrate%,3),2),64))),2),★)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment