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: Compression/Quality ratio bar (for trackinfo panel) (Read 18373 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Compression/Quality ratio bar (for trackinfo panel)

 So here it comes for all of you who going crazy about some extra info:
Compression\quality bar for trackinfo panel
What it does:it visualizes the compression of the music file you're listening to+tells you what quality is it.


It's better to have it in separate trackinfo panel,this way you'll be able to set the font and font size without
messing up your existing trackinfo design,but again it's optional and up to you.
(The font you see at the image is Lucida Sans Unicode 8pt)

Code: [Select]
$if(%isplaying%,
//change to the desired symbol
$puts(symbol,$char(9610))
//1-bar+comment,0-bar only
$puts(verbal_mode,1)
Bitrate:$info(bitrate)KB/s$char(10)
$puts(precent,$div($mul(100,$info(bitrate)),1411))
$puts(yellowtr,$muldiv(250,$get(precent),13))
$puts(greentr,$muldiv(250,$get(precent),34))
$puts(redsh,$muldiv(100,$get(precent),13))
$puts(greensh,$muldiv(100,$sub($get(precent),13),24))
$if($greater(14,$get(precent)),
$transition($repeat($get(symbol),$get(precent)),$rgb(250,0,0),$rgb(250,$get(yellowtr),0))
$transition($repeat($get(symbol),$sub(13,$get(precent))),$rgb(100,$get(redsh),0),$rgb(100,100,0))
$transition($repeat($get(symbol),21),$rgb(100,100,0),$rgb(0,100,0))
$rgb(100,100,100)$repeat($get(symbol),3)
)
$if($and($greater($get(precent),13),$greater(35,$get(precent))),
$transition($repeat($get(symbol),13),$rgb(250,0,0),$rgb(250,250,0))
$transition($repeat($get(symbol),$sub($get(precent),13)),$rgb(250,250,0),
$rgb($sub(250,$get(greentr)),$get(greentr),0))
$transition($repeat($get(symbol),$sub(34,$get(precent))),$rgb($sub(100,$get(greensh)),100,0),
$rgb(0,100,0))
$rgb(100,100,100)
$repeat($get(symbol),3)
)
$if($greater($get(precent),34),
$transition($repeat($get(symbol),13),$rgb(250,0,0),$rgb(250,250,0))
$transition($repeat($get(symbol),21),$rgb(250,250,0),$rgb(0,250,0))
$rgb(250,250,250)$repeat($get(symbol),3)
)

$ifequal($get(verbal_mode),1,
$char(10)
$if($greater(161,$info(bitrate)),'Poor quality')
$if($and($greater($info(bitrate),160),$greater(201,$info(bitrate))),'Average quality')
$if($and($greater($info(bitrate),200),$greater(251,$info(bitrate))),'Good quality')
$if($and($greater($info(bitrate),250),$greater(321,$info(bitrate))),'Excellent quality')
$if($and($greater($info(bitrate),320),$greater(501,$info(bitrate))),'Insane quality')
$if($greater($info(bitrate),500),'CD quality'),
))


It works for me,but if you have problems with it plese tell me,enjoy

P.S. if i'll get a nice feedback i'll also write a column version of this code  but feel free to do it yourself
Favourite artist:CD-R
Favourite album:700MB

Compression/Quality ratio bar (for trackinfo panel)

Reply #1
You need to switch the [/code] and [code] to make a codebox.
Is over the of = % over 100

Compression/Quality ratio bar (for trackinfo panel)

Reply #2
Thanks, nice idea. I will definetly use it!

Compression/Quality ratio bar (for trackinfo panel)

Reply #3
Columns version.This way you can tell the quality of all the files in your playlist without even playing them.
Create a new column and copy paste this code into "style" tab,just remember to check the
"use custom style spec" box for this column in the display tab just put any character you like
(i used $char(9608) with Franklin gothic medium font)

[a href="http://img243.imageshack.us/my.php?image=22229pl.png" target="_blank"]
Favourite artist:CD-R
Favourite album:700MB

Compression/Quality ratio bar (for trackinfo panel)

Reply #4
Hey could you please post your whole track info config?

Compression/Quality ratio bar (for trackinfo panel)

Reply #5
Hey could you please post your whole track info config?


Hmm,i'm really surprised somebody would like to have my config (it's not so fancy like the others)
Code: [Select]
$puts(AltColour,$rgb(126,16,16))
$puts(pbarColour1,$rgb(126,16,16))
$puts(pbarColour2,$rgb(170,170,170))

$if(%_isplaying%,
$get(pbarColour2)'Codec:'$rgb()

$if($strcmp(%codec%,'ATSC A/52'),'            Dolby Digital AC3',
$if($info(lame_version),'            Lame MP3',
$if($strcmp(%codec%,'PCM'),'            PCM uncompressed',



$if($stricmp($ext(%_path%),ogg),'           Ogg '%codec% '('$cut($info(tool),9)')',
'           ' %codec%)))) [$info(codec_profile)]
//-----------------------------------------------------------------------------------------------------
$char(10)
$get(pbarColour2)'Encoding:       '$rgb()$caps($info(encoding))

$if($stricmp($codec(),Musepack) ,' [VBR]'  $puts(Avg,$info(bitrate)))

$if($stricmp($codec(),Mp3) ,$if($not(%__extrainfo%),' [CBR]',
' [VBR]'$puts(Avg,$info(bitrate))),)

$if($stricmp($codec(),vorbis),' [ABR]'$puts(Avg,$info(bitrate)))
$if($stricmp($info(encoding),'lossless'),' '$info(bitspersample)' bit/sample',)

//-----------------------------------------------------------------------------------------------------
$char(10)
$get(pbarColour2)'Bitrate:         ' $rgb()[' '%bitrate%' kb/s']
$if($get(Avg),' ('$get(Avg)' avg'[','$info(bitrate_nominal)' nom']')')
$char(10)


$get(pbarColour2)'Samplerate:   '$rgb()[%samplerate%' Hz']$char(10)
$get(pbarColour2)'Mode:           '$rgb()$ifgreater(%channels%,2,' '%channels%' channels',
$if($stricmp(%codec%,mp3),$caps('  '%__mp3_stereo_mode%),'  '$caps(%channels%)))


$char(10)
$get(pbarColour2)'Playing:          '$rgb()%_time_elapsed%[' of '%_time_total%]

//------------------------------------------------------------------------------------------------------

$puts(precent,$sub(100,$div($mul(100,$info(bitrate)),1411)))
$char(10)
$get(pbarColour2)'Com/Q:          '$rgb(250,250,250)
$if($not($or($stricmp(%codec%,'pcm'))$stricmp(%codec%,'CDDA')),

$puts(qwerty,$div($mul(250,$sub(91,$get(precent))),35))
$puts(qwert,$add($get(qwerty),155))
$rgb()$repeat($char(171),4)
$transition($repeat($char(171),$mul($sub($get(precent),67),1)),$rgb(0,250,0),$rgb($sub(250,$get(qwerty)),$get(qwert),0))

$puts(show,$sub(1000,$muldiv(1000,$info(bitrate),1411)))
$puts(rest,$substr($get(show),3,3))
$substr($get(show),1,2)
$if($greater($get(rest),0),'.'$get(rest),)'%',


$rgb()'Uncompressed media')

//---------------------------------------------------------------------------------------------------------------------------------------------------

//----------------------------------------------------------------------------------------------------------------------------------------
$char(10)

$progress2(%_time_elapsed_seconds%,%_time_total_seconds%,
33,
$get(pbarColour1)$char(9679),$get(pbarColour2)$char(9679)
),$char(10)$char(10)
$char(10)$get(pbarColour2)'                        No data to display')
Favourite artist:CD-R
Favourite album:700MB

Compression/Quality ratio bar (for trackinfo panel)

Reply #6
Nothing fancy with black, white and red elements is exactly what I need. Thanks!

Compression/Quality ratio bar (for trackinfo panel)

Reply #7
Not to sound like a dick, but this is pretty pointless. Even if all of your music was encoded in the same exact format with the same exact encoder of the same exact version, it would still be impossible to simply use bit rate as an indicator of 'quality'.

For example, it's perfectly conceivable that one lossless file (let's say encoded in Monkey's Audio) will have a good compression ratio and result in maybe a 700 kbps file, whereas another lossless file (let's say encoded in SHN) will have a worse compression ratio and result in maybe a 1000 kbps file. (I'm making the numbers up, but you get the idea.) Although the SHN would have a significantly higher bit rate, both files are the same quality.

And that doesn't even get into comparisons between lossy codecs -- you can not assume that, e.g., a 320-kbps Xing-encoded MP3 is 'better quality' than a 192-kbps LAME-encoded MP3.
~

Compression/Quality ratio bar (for trackinfo panel)

Reply #8
Not to sound like a dick, but this is pretty pointless. Even if all of your music was encoded in the same exact format with the same exact encoder of the same exact version, it would still be impossible to simply use bit rate as an indicator of 'quality'.

For example, it's perfectly conceivable that one lossless file (let's say encoded in Monkey's Audio) will have a good compression ratio and result in maybe a 700 kbps file, whereas another lossless file (let's say encoded in SHN) will have a worse compression ratio and result in maybe a 1000 kbps file. (I'm making the numbers up, but you get the idea.) Although the SHN would have a significantly higher bit rate, both files are the same quality.

And that doesn't even get into comparisons between lossy codecs -- you can not assume that, e.g., a 320-kbps Xing-encoded MP3 is 'better quality' than a 192-kbps LAME-encoded MP3.


Thats why the color shades changes only in the range of lossy formats,after which it doesn't make any difference,it's lossless and displayed in solid white colour.

P.S. Later on when i'll have some time i gonna do a little studying about formats and their quality
factors and add the correction to the colour sheme.For example the mp3 and mpc file with same bitrate
won't be displayed in the same colour.

P.S.S. BTW it's almost impossible to dermine what file have better quality by technical measurements
that's why blind listening tests are performed (where most of the testers cannot tell if there's any difference)
that's why i assumed that the bitrate is the only possible way to determine quality in more or less optimal way,but if there's others please point me out
Favourite artist:CD-R
Favourite album:700MB

Compression/Quality ratio bar (for trackinfo panel)

Reply #9
Very creative idea, thanks
And if you believe theres not a chance to die...

Compression/Quality ratio bar (for trackinfo panel)

Reply #10
Thats waaay cool, but is there any way to make it not so long?

Compression/Quality ratio bar (for trackinfo panel)

Reply #11
This is pretty cool, man.  Cheers.

Compression/Quality ratio bar (for trackinfo panel)

Reply #12
Quote
Thats waaay cool, but is there any way to make it not so long?


Using the default font makes it alot smaller.
And if you believe theres not a chance to die...


Compression/Quality ratio bar (for trackinfo panel)

Reply #14
Thats waaay cool, but is there any way to make it not so long?


You have two options:
1-Choose smaller symbol
2-Tell me what length do you want it to be 
Favourite artist:CD-R
Favourite album:700MB

Compression/Quality ratio bar (for trackinfo panel)

Reply #15

Thats waaay cool, but is there any way to make it not so long?


You have two options:
1-Choose smaller symbol
2-Tell me what length do you want it to be 


Do you know if there are any symbols like the one used in that script in other fonts? Id like kind of a small font. My current trackinfo panel is tahoma 8pt and id like something about that size and looks good.

Compression/Quality ratio bar (for trackinfo panel)

Reply #16
I'm using @Arial Unicode MS 8pt and it is nice sized and look quite good.

Compression/Quality ratio bar (for trackinfo panel)

Reply #17
Quote
Do you know if there are any symbols like the one used in that script in other fonts? Id like kind of a small font. My current trackinfo panel is tahoma 8pt and id like something about that size and looks good


Well,sorry to tell you but that kind of symbol is commonly found in almost every font except Tahoma.
Tip:use ../WINDOWS/system32/charmap.exe to find a font that looks nice and also contains the symbol
you like
Favourite artist:CD-R
Favourite album:700MB

Compression/Quality ratio bar (for trackinfo panel)

Reply #18
Quote

Do you know if there are any symbols like the one used in that script in other fonts? Id like kind of a small font. My current trackinfo panel is tahoma 8pt and id like something about that size and looks good


Well,sorry to tell you but that kind of symbol is commonly found in almost every font except Tahoma.
Tip:use ../WINDOWS/system32/charmap.exe to find a font that looks nice and also contains the symbol
you like


Alright, ive settled on Arial 8pt. Can you make the bar 22 charaters long with no spaces between them?

Thanks a bunch!

Compression/Quality ratio bar (for trackinfo panel)

Reply #19
Quote
Alright, ive settled on Arial 8pt. Can you make the bar 22 charaters long with no spaces between them?

Thanks a bunch!


You mean like this?



Code: [Select]
//22-cahracter long version
$if(%isplaying%,
//change to the desired symbol
$puts(symbol,$char(9608))
//1-bar+comment,0-bar only
$puts(verbal_mode,1)
Bitrate:$info(bitrate)KB/s$char(10)
$puts(precent,$div($mul(100,$info(bitrate)),1411))
$puts(precent,$muldiv($get(precent),20,34))
$puts(yellowtr,$muldiv(250,$get(precent),8))
$puts(greentr,$muldiv(250,$get(precent),20))
$puts(redsh,$muldiv(100,$get(precent),8))
$puts(greensh,$muldiv(100,$sub($get(precent),8),12))
$if($greater(9,$get(precent)),
$transition($repeat($get(symbol),$get(precent)),$rgb(250,0,0),$rgb(250,$get(yellowtr),0))
$transition($repeat($get(symbol),$sub(8,$get(precent))),$rgb(100,$get(redsh),0),$rgb(100,100,0))
$transition($repeat($get(symbol),12),$rgb(100,100,0),$rgb(0,100,0))
$rgb(100,100,100)$repeat($get(symbol),2)
)
$if($and($greater($get(precent),8),$greater(20,$get(precent))),
$transition($repeat($get(symbol),8),$rgb(250,0,0),$rgb(250,250,0))
$transition($repeat($get(symbol),$sub($get(precent),8)),$rgb(250,250,0),
$rgb($sub(250,$get(greentr)),$get(greentr),0))
$transition($repeat($get(symbol),$sub(20,$get(precent))),$rgb($sub(100,$get(greensh)),100,0),
$rgb(0,100,0))
$rgb(100,100,100)
$repeat($get(symbol),2)
)
$if($greater($get(precent),20),
$transition($repeat($get(symbol),8),$rgb(250,0,0),$rgb(250,250,0))
$transition($repeat($get(symbol),12),$rgb(250,250,0),$rgb(0,250,0))
$rgb(250,250,250)$repeat($get(symbol),2)
)

$ifequal($get(verbal_mode),1,
$char(10)
$if($greater(161,$info(bitrate)),'Poor quality')
$if($and($greater($info(bitrate),160),$greater(201,$info(bitrate))),'Average quality')
$if($and($greater($info(bitrate),200),$greater(251,$info(bitrate))),'Good quality')
$if($and($greater($info(bitrate),250),$greater(321,$info(bitrate))),'Excellent quality')
$if($and($greater($info(bitrate),320),$greater(501,$info(bitrate))),'Insane quality')
$if($greater($info(bitrate),500),'CD quality'),
))


For Arial 8pt use $char(9608)
Favourite artist:CD-R
Favourite album:700MB

Compression/Quality ratio bar (for trackinfo panel)

Reply #20
Quote
Alright, ive settled on Arial 8pt. Can you make the bar 22 charaters long with no spaces between them?

Thanks a bunch!


You mean like this?



For Arial 8pt use $char(9608)


Oh dude, thats perfect! Thank you so much!

Compression/Quality ratio bar (for trackinfo panel)

Reply #21
Thats a pretty radical bar, nice idea - I'll probably adapt this if I ever make infosexual layout like I used to.
hi

Compression/Quality ratio bar (for trackinfo panel)

Reply #22
2 tool++

can you explain please what "infosexual" means?  Maybe i'm having infosexual layout without even knowing it?
(is it connected to the colours in some twisted way?)
Favourite artist:CD-R
Favourite album:700MB

Compression/Quality ratio bar (for trackinfo panel)

Reply #23
I think it means you're destroying the sanctity of foobar.
~

Compression/Quality ratio bar (for trackinfo panel)

Reply #24
I think it means you're destroying the sanctity of foobar.

Well,speaking of sanctity i think that every custom made modification is "destroing" it.
If you wish to stick to sanctity you should not change anything and leave things as they are,but wasn't
Foobar created the way it was just so people could modify it?
Favourite artist:CD-R
Favourite album:700MB