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

foo_uie_trackinfo

Reply #250
Quote
I've got a file that triggers a bug in the code
$div(%_filesize%,1048576).$num($muldiv($mod(%_filesize%,1048576),100,1048576),2) MB
It reports back 2.100 MB.

Windows properties reports back
Size: 2,99 NB (3 142 362 bytes)
Size on disk: 3,00 MB (3 145 728 bytes)
%_filesize% reports 3142362
UpNorth's version reports back 2.10 MB, which is even worse. 2.100 MB should probably be 3.00 MB. For any other file I've checked this code produces very accurate results, BTW.

I'm really not too good at maths. This is not something I can figure out how to fix. A very minor issue anyways, just reporting my findings....
[a href="index.php?act=findpost&pid=286623"][{POST_SNAPBACK}][/a]

haa.. Guess what? Try out the code below:
$div($mul($mod(3142362,1048576),100),1048576)    => 99
$muldiv($mod(3142362,1048576),100,1048576)        => 100

So, probably your this bug is solved by getting your file size as follow:
$div(%_filesize%,1048576).$num($div($mul($mod(%_filesize%,1048576),100),1048576),2) MB
OR
$div(%_filesize%,1048576).$div($mul($mod(%_filesize%,1048576),100),1048576) MB since this number should not greater than 100.

foo_uie_trackinfo

Reply #251
Quote
So, probably your this bug is solved by getting your file size as follow:
$div(%_filesize%,1048576).$num($div($mul($mod(%_filesize%,1048576),100),1048576),2) MB
OR
$div(%_filesize%,1048576).$div($mul($mod(%_filesize%,1048576),100),1048576) MB since this number should not greater than 100.
[a href="index.php?act=findpost&pid=286630"][{POST_SNAPBACK}][/a]

Yes, this seems to produce accurate results. However, the $num(X,2) are necessary  to display the result with 2 decimals, which is what we want... Do you think theres other scenarios which can trigger errors in rounding to 2 decimals?
"ONLY THOSE WHO ATTEMPT THE IMPOSSIBLE WILL ACHIEVE THE ABSURD"
        - Oceania Association of Autonomous Astronauts

foo_uie_trackinfo

Reply #252
Quote
Yes, this seems to produce accurate results. However, the $num(X,2) are necessary  to display the result with 2 decimals, which is what we want... Do you think theres other scenarios which can trigger errors in rounding to 2 decimals?
[a href="index.php?act=findpost&pid=286632"][{POST_SNAPBACK}][/a]


ic. True, it's necessary to get the result in 2 decimal points else a file size of 6.03MB will be display as 6.3MB.

The correct one should be as follow:
$div(%_filesize%,1048576).$num($div($mul($mod(%_filesize%,1048576),100),1048576),2) MB

Thanks. 

foo_uie_trackinfo

Reply #253
how do i get the percentage for track progress?
- sig removed, no code allowed

foo_uie_trackinfo

Reply #254
$muldiv(%_time_remaining_seconds%,%_time_total_seconds%,100)

that should do the trick...  i think.  or this should too...

$mul($div(%_time_remaining_seconds%,%_time_total_seconds%),100)

foo_uie_trackinfo

Reply #255
That should be:

$muldiv(%_time_elapsed_seconds%,100,%_time_total_seconds%)

To show percentage elapsed rather than remaining, plus $muldiv multiplies by the second argument, then divides by the third.

foo_uie_trackinfo

Reply #256
eh, i was close  i use the second one, but yeah, time_elapsed, i don't know why i wrote remaining...

foo_uie_trackinfo

Reply #257
thanks that worked out just fine
- sig removed, no code allowed

foo_uie_trackinfo

Reply #258
Updated my track info strings. thought the updates were worth a new post. well, here it is:

Code: [Select]
// Basik Track Info 1.01
// Written by korsairr
// April 18th 2005

// Basik Track Info works best with:
// Arial bold 8pt
// Vertical padding  3
// Horizontal padding  5
// Line spacing  -1
// Background color  Black

// Adjust the following to suit your tastes

$puts(info_box_width,34)
$puts(default_color,d4d4d4)
$puts(rating_color_1,5357EF)
$puts(rating_color_2,042573)
$puts(rating_symbol,♫)
$puts(is_playing_color,5357EF)
$puts(tag_missing_color,575757)
$puts(heading_color_l,ffb00d)
$puts(heading_color_r,000000)
$puts(is_playing_color,5357EF)



////////////////////////////////
/////// Song Info Code
////////////////////////////////


$transition(----- Song Info $repeat(-,$sub($get(info_box_width),5)),$get(heading_color_l),$get(heading_color_r))

$char(10)$get(default_color)

$if(%_filename_ext%,
$if(%title%,$if(%_isplaying%,
$get(is_playing_color)$iflonger(%title%,$get(info_box_width),$cut(%title%,$sub($get(info_box_width),2))...,%title%),
$iflonger(%title%,$get(info_box_width),$trim($cut(%title%,$sub($get(info_box_width),3)))...,%title%)),
$if(%_isplaying%,
$get(is_playing_color)$iflonger(%_filename_ext%,$get(info_box_width),$cut(%_filename_ext%,$sub($get(info_box_width),3))...,%_filename_ext%),
$iflonger(%_filename_ext%,$get(info_box_width),$trim($cut(%_filename_ext%,$sub($get(info_box_width),2)))...,%_filename_ext%))),
$get(tag_missing_color) no track selected)

$char(10)$get(default_color)

$if(%_filename_ext%,
$if(%artist%,
$iflonger(%artist%,$get(info_box_width),$cut(%artist%,$sub($get(info_box_width),2))...,%artist%),
$get(tag_missing_color)no artist info)
)

$char(10)$get(default_color)

$if(%_filename_ext%,
$if(%album%,
$iflonger(%album%,$get(info_box_width),$cut(%album%,$sub($get(info_box_width),2))...,%album%),
$get(tag_missing_color)no album info)
)

$char(10)$get(default_color)

$if(%_filename_ext%,
$if($or(%publisher%.%label%,%date%),$if($or(%publisher%,%label%),© ,)%date%$if($or(%publisher%,%label%),'. ',)[%publisher% ][%label%],
$get(tag_missing_color)no date or copyright info)
)

$char(10)$get(default_color)

$if(%_filename_ext%,
$if(%rating%,$get(rating_color_1)
$repeat($get(rating_symbol) ,%rating%)
$get(rating_color_2)$repeat($get(rating_symbol) ,$sub(5,%rating%)) ,$get(tag_missing_color)$repeat($get(rating_symbol) ,5) )
 $get(default_color)$if(%genre%,%genre%,$get(tag_missing_color)no genre)
)

$char(10)$char(10)



////////////////////////////////
/////// Statistics Code
////////////////////////////////


$transition(----- Statistics $repeat(-,$sub($get(info_box_width),5)),$get(heading_color_l),$get(heading_color_r))

$char(10)$get(default_color)

$if(%_filename_ext%,

$if(%last_played%,$puts(lastplayed,%last_played%),
$if(%play_date%,$puts(lastplayed,%play_date%),))

$if($get(lastplayed),
$puts(month,$left($get(lastplayed),2))
$puts(day,$substr($get(lastplayed),4,5))
$if($strcmp($left($get(day),1),0),$puts(day,$right($get(day),1)))
$puts(year,$right($get(lastplayed),2))
$puts(month_name,$select($get(month),
Jan,Feb,March,April,May,June,July,Aug,Sept,Oct,Nov,Dec))
$if($or($strcmp($get(day),11),$strcmp($get(day),12),$strcmp($get(day),13)),$puts(xx,th),
$if($strcmp($right($get(day),1),1),$puts(xx,st),
$if($strcmp($right($get(day),1),2),$puts(xx,nd),
$if($strcmp($right($get(day),1),3),$puts(xx,rd),
$puts(xx,th))))))
$puts(time_of_year,$get(month_name) $get(day)$get(xx) 20$get(year))

$if(%play_counter%,Played $if($strcmp(%play_counter%,1),
once$if($get(lastplayed),',')$if($get(lastplayed), on $get(time_of_year)),
%play_counter% times$if($get(lastplayed),
$char(10)$get(default_color) Last played on $get(time_of_year))),This song has not played before)

$ifgreater(%play_counter%,1,,$char(10))

,$char(10))

$char(10)$char(10)



////////////////////////////////
/////// Tech Info Code
////////////////////////////////


$transition(----- Tech Info $repeat(-,$sub($get(info_box_width),5)),$get(heading_color_l),$get(heading_color_r))

$char(10)$get(default_color)

$if(%_filename_ext%,
%__codec%
$if(%__bitrate_dynamic%,%__bitrate_dynamic%,%__bitrate%)kbps
$if($or($stricmp(%__extrainfo%,vbr),$stricmp($codec(),musepack),$stricmp($codec(),vorbis)),VBR,CBR)
$caps($if($stricmp($codec(),MP3),%__mp3_stereo_mode%,$channels()))

$char(10)$get(default_color)

$if($or(%__replaygain_track_gain%,%__replaygain_album_gain%),
['['Tg']' %__replaygain_track_gain%][    '['Ag']' %__replaygain_album_gain%],
$get(tag_missing_color)there is no gain)

$char(10)$get(default_color)

[%_time_elapsed%/][%_length%][  -%_time_remaining%  ]
$if(%_isplaying%,
$muldiv(%_time_elapsed_seconds%,100,%_time_total_seconds%)'%',) 
$div(%_filesize%,1048576).
$left($num($muldiv($mod(%_filesize%,1048576),1000,1048576),3),2)' MB',
)


Click for full Foobar2000

 

foo_uie_trackinfo

Reply #259
Quote
ic. True, it's necessary to get the result in 2 decimal points else a file size of 6.03MB will be display as 6.3MB.

The correct one should be as follow:
$div(%_filesize%,1048576).$num($div($mul($mod(%_filesize%,1048576),100),1048576),2) MB

Thanks. 
[a href="index.php?act=findpost&pid=286839"][{POST_SNAPBACK}][/a]

Yes. That was exactly what I was thinking about... Well, I tested a bit, and this code seems to produce very accurate results, no errors so far, so thanks a lot!
"ONLY THOSE WHO ATTEMPT THE IMPOSSIBLE WILL ACHIEVE THE ABSURD"
        - Oceania Association of Autonomous Astronauts

foo_uie_trackinfo

Reply #260
Quote
Quote
Yes, this seems to produce accurate results. However, the $num(X,2) are necessary  to display the result with 2 decimals, which is what we want... Do you think theres other scenarios which can trigger errors in rounding to 2 decimals?
[a href="index.php?act=findpost&pid=286632"][{POST_SNAPBACK}][/a]


ic. True, it's necessary to get the result in 2 decimal points else a file size of 6.03MB will be display as 6.3MB.

The correct one should be as follow:
$div(%_filesize%,1048576).$num($div($mul($mod(%_filesize%,1048576),100),1048576),2) MB

Thanks.  [a href="index.php?act=findpost&pid=286839"][{POST_SNAPBACK}][/a]

For some reason I always fiddle with this file size issue when I'm really tired. Not always a good idea...

Anyway, the $muldiv() version is still a little more accurate in general, but introduces the the 99 vs 100 problem Mr_Rabid_Teddybear noted above.
Code: [Select]
$div(%_filesize%,1048576).$num($muldiv($mod(%_filesize%,1048576),100,1048576),2) MB
ensures that a 4673211 bytes file is displayed as 4.46MB, not 4.45MB
as 4673211 bytes / (1024^2) = 4.456 MB

This affects a lot of files, but the 99 vs 100 problem is rarer. IIRC, the latter was the reason I started changing this code the last time, but I was fooled by the size reported in Windows, and did a lot of strange things.

I don't really know why I even bother with this, as I rarely look at the file size anyway.

foo_uie_trackinfo

Reply #261
Hi, I accidentally pasted a review in the comment tags of an album which was completely bloated and it caused foobar to get really slow / unresponsive (freeze). after some trial and error i found that the trackinfopanel plugin caused the problem, cause with the panel disabled, foobar kept running fine after pasting the text into the tags.
removing dynamic info from the strings (%_time_elapsed% in my case) didnt help, disabling "Update every second" didnt fix it either. Foobar kept freezing.
For some reason the plugin has a problem with how it reads metadata.

here is the review i pasted:

Code: [Select]
On Highways, Lanterna offered more of the instrumental rock sounds for which they'd become known: shimmering, reverberant, oft-overlapping guitar lines by Henry Frayne that set some of the more pleasing moods to be had in early-21st century ambient music. The band Scenic is an inevitable point of comparison, and in fact Scenic's Bruce Licher did Highways' package design. Lanterna, though, are mellower and less edgy than Scenic, though hardly bland. While Frayne's compositions (on which he's supported by Eric Gebow's drums and Mike Brosco's tape effects) are soothing, they avoid the facile slickness of new age music, with more of a rock rhythm on some songs than any new age recording would allow. And though they (like Scenic) are apt to bring to mind a drive through the Southwest desert without the visuals, the guitar sustain and reverb don't seem as gratuitously geared toward evoking the desert landscape as they do when used by numerous more pop-oriented artists. Don't, incidentally, hit the "eject" button when the music fades away to apparent silence at the end of the eighth track; after four minutes of eerie vague sonic murmurings that are often only subliminally audible, the volume cranks up again to go into a "real" song, "Highways." After four minutes, that too fades away, this time into nothingness, only for some guitar passages to suddenly reappear after a five-minute gap; the 17-minute "Highways" continues to waver between false endings and snippets of music and sound before the CD really stops spinning. — Richie Unterberger\Media Jukebox: Tool Name: Media Center\Media Jukebox: Tool Version: 10.0.122\Media Jukebox: Styles: Instrumental Rock; Alternative Pop/Rock; Experimental Rock; United States of America\Media Jukebox: Replay Gain: -10.70423\Media Jukebox: Artist Labels: Badman (3)\Media Jukebox: Artist Genres: Rock\Media Jukebox: Born / Formed: in Champaign, IL\Media Jukebox: Peak Level: 0.97986\Media Jukebox: Artist Styles: Instrumental Rock; Alternative Pop/Rock; Experimental Rock; United States of America\Media Jukebox: Artist Albums: 1995 Lanterna;2001 Elm Street;2002 Sands;2004 Highways\Media Jukebox: Songs: 1. Clear Blue (Frayne) - 5:06;2. Brightness (Frayne) - 6:17;3. Last Practice (Frayne) - 8:54;4. Canyons (Frayne) - 4:38;5. Seasons (Frayne) - 7:12;6. Brooklyn (Frayne) - 4:37;7. Adriatic (Frayne) - 6:40;8. Half-Light (Frayne) - 8:24;9. Highways  performed by Henry Frayne - 17:07\Media Jukebox: Review: On Highways, Lanterna offered more of the instrumental rock sounds for which they'd become known: shimmering, reverberant, oft-overlapping guitar lines by Henry Frayne that set some of the more pleasing moods to be had in early-21st century ambient music. The band Scenic is an inevitable point of comparison, and in fact Scenic's Bruce Licher did Highways' package design. Lanterna, though, are mellower and less edgy than Scenic, though hardly bland. While Frayne's compositions (on which he's supported by Eric Gebow's drums and Mike Brosco's tape effects) are soothing, they avoid the facile slickness of new age music, with more of a rock rhythm on some songs than any new age recording would allow. And though they (like Scenic) are apt to bring to mind a drive through the Southwest desert without the visuals, the guitar sustain and reverb don't seem as gratuitously geared toward evoking the desert landscape as they do when used by numerous more pop-oriented artists. Don't, incidentally, hit the "eject" button when the music fades away to apparent silence at the end of the eighth track; after four minutes of eerie vague sonic murmurings that are often only subliminally audible, the volume cranks up again to go into a "real" song, "Highways." After four minutes, that too fades away, this time into nothingness, only for some guitar passages to suddenly reappear after a five-minute gap; the 17-minute "Highways" continues to waver between false endings and snippets of music and sound before the CD really stops spinning.  --  Richie Unterberger\Media Jukebox: Credits: Henry Frayne - Guitar, Vocals, Voices, Producer, Engineer, Mastering, Mixing;Mike Brosco - Producer, Engineer, Mastering, Mixing, Tape Effects;Bruce Licher - Design;Eric Gebow - Drums;Dylan Magierek - A&R;Kevin Salemme - Photography\Media Jukebox: Tones: Earthy; Hypnotic; Somber; Autumnal; Ominous; Ethereal; Eerie; Rousing\MusicMatch_Bio: by Andy Kellman - Henry Frayne's Lanterna is the Midwest counterpart to Scenic's Southwest-inspired soundtracks for a lonely journey through open lands. Combining his background in post-punk and dark dream pop with atmospherics drawing from spaghetti western soundtracks and ambient isolationism, Lanterna's mostly instrumental output generates a variety of moods, ranging from becalmed to unsettling to fiery.Although it wasn't until 1998's self-titled release through Rykodisc that Lanterna received widespread distribution, guitarist Frayne began the project as an alternate outlet outside of his duties in the Moon Seven Times in the early '90s. (Frayne also spent the latter half of the '80s in the 4AD-inspired Area.)With help from bandmates Brendan Gamble on drums and Lynn Canfield on vocals, Frayne recorded a 23-track cassette and released it himself in 1992. Later that year, the limited-edition Of Shapes That Haunt Thought's Wilderness was released through Greece's Elfish label on vinyl only, selecting most of its tracks from the original cassette; Parasol issued 17 songs from the same recording in 1995 on CD, and Rykodisc reissued the Parasol release in 1998. A year prior to the Rykodisc reissue, Lanterna and the like-minded Scenic shared a live split EP released on Independent Project, the label run by Scenic's Bruce Licher. New material didn't surface from Lanterna until 2001's Elm Street, issued by Badman during September of 2001.

foo_uie_trackinfo

Reply #262
Quote
Hi, I accidentally pasted a review in the comment tags of an album which was completely bloated and it caused foobar to get really slow / unresponsive (freeze). after some trial and error i found that the trackinfopanel plugin caused the problem, cause with the panel disabled, foobar kept running fine after pasting the text into the tags.
removing dynamic info from the strings (%_time_elapsed% in my case) didnt help, disabling "Update every second" didnt fix it either. Foobar kept freezing.
For some reason the plugin has a problem with how it reads metadata.
[{POST_SNAPBACK}][/a]

I don't think this plugin enjoys displaying to much text at the time, and there's no limit to what some will put in the comment field. This is the code I use in my [a href="http://www.hydrogenaudio.org/forums/index.php?showtopic=29363&view=findpost&p=283308]formatting string[/url] to truncate the comment field if it's longer than 297 characters (just an arbitrary number I chose):

Code: [Select]
[Comment: $iflonger($replace($meta(comment),$char(13),),297,
$cut($replace($meta(comment),$char(13),),292)'(...)',
$replace($meta(comment),$char(13),))$char(10)]
"ONLY THOSE WHO ATTEMPT THE IMPOSSIBLE WILL ACHIEVE THE ABSURD"
        - Oceania Association of Autonomous Astronauts

foo_uie_trackinfo

Reply #263
Hey, with your code everything is fine when i insert the bloated review..

i simply used:

Code: [Select]
[$meta(comment)]

foo_uie_trackinfo

Reply #264
I have a small issue with foo_uie_trackinfo:
If displayed text on a track makes it necessary to scroll down and I thereafter change track, display stays scrolled down, maybe hiding text. It would have been nice if the display simply scrolled back to top automatically on track change.
"ONLY THOSE WHO ATTEMPT THE IMPOSSIBLE WILL ACHIEVE THE ABSURD"
        - Oceania Association of Autonomous Astronauts

foo_uie_trackinfo

Reply #265
Quote
Hi, I accidentally pasted a review in the comment tags of an album which was completely bloated and it caused foobar to get really slow / unresponsive (freeze). after some trial and error i found that the trackinfopanel plugin caused the problem, cause with the panel disabled, foobar kept running fine after pasting the text into the tags.
removing dynamic info from the strings (%_time_elapsed% in my case) didnt help, disabling "Update every second" didnt fix it either. Foobar kept freezing.
For some reason the plugin has a problem with how it reads metadata.

I've also noticed that (I stored AMG review in %comment% tag) as reported here. I don't know if there's some plan to improve this behaviour in future releases 

foo_uie_trackinfo

Reply #266
few updates to mine...

lossless


musepack


mp3s encoded using lame preset


everything else (non mp3 doesn't have CBR or VBR next to bitrate)


Code: [Select]
$if(%_trackinfo_notrack%,$char(10)$char(10)$char(10)$char(10)$char(10)$char(1)CNo track playing,
$if(%date%,Date: a3a3a3%date%$char(10),)
$if(%genre%,Genre: a3a3a3%genre%$char(10),)
Length: a3a3a3$if(%_isplaying%,%_time_elapsed%/%_length%,%_length%)$char(10)
Codec: a3a3a3%__codec%$char(10)
Bitrate: a3a3a3
%__bitrate%Kbps $if($stricmp(%__codec%,mp3),$if($stricmp(%__extrainfo%,vbr),VBR,CBR))$char(10)
$if(%__lame_profile%,Preset: a3a3a3%__lame_version% %__lame_profile% $char(10),)
$if(%__mpc_profile%,Profile: a3a3a3%__mpc_profile%$char(10),)
Compression: a3a3a3$muldiv(%__bitrate%,100,1411)'%'$char(10)
Channels: a3a3a3$if($stricmp($codec(),MP3),%__mp3_stereo_mode%,$ifgreater(%__channels%,1,Stereo,Mono))$char(10)
$if(%__bitspersample%,Bitdepth:a3a3a3 %__bitspersample%$char(10),)
Samplerate: a3a3a3%__samplerate% Hz$char(10)
Filesize: a3a3a3$div(%_filesize%,1048576).$left($num($muldiv($mod(%_filesize%,1048576),100,1048576),2),2)'MB'$char(10)
$char(1)C-------------------------------$char(10)
$char(1)CTrack Progress a3a3a3$muldiv(%_time_elapsed_seconds%,100,%_time_total_seconds%)'%'$char(10)
$progress(%_time_elapsed_seconds%, %_time_total_seconds%, 53,a3a3a3'|','|')
)
- sig removed, no code allowed

foo_uie_trackinfo

Reply #267
Hey guys,

Just a little question.

I want to show the samplerate in a short form, like 44.1 kHz, so I tried to make a little code. But I'm not really happy with it.

Code: [Select]
$div(%__samplerate%,1000).$div($num($div($mul($mod(%__samplerate%,1000),2),2),2),100) kHz


Has anyone a better solution?

foo_uie_trackinfo

Reply #268
@necropimp

I like your config but I needed a bit easier color configuration so I modified it a little. Colors are now easily configurable. It also allows for optional display of track title, album and artist. Progress bar also changes to "streaming..." when playing Internet streams. Hope you don't mind if I post it here. I give you credit at the top of the code. Feel free to use it in future development if you want. The config below should have the exact same color schemes as the images you posted above.

Code: [Select]
// original code by necropimp


// show artist? (1 = show, 0 = don't show)
$puts(arts,0)

// show album?
$puts(albs,0)

// show title?
$puts(tils,0)

// info heading color
$puts(head,$rgb(239,239,239))

// info color
$puts(info,$rgb(163,163,163))

// info annotation color (e.g. kbps is the annotation)
$puts(anno,$rgb(163,163,163))

// progress bar divider color
$puts(div,$rgb(239,239,239))

// progress bar divider width (0 yeilds no divider)
$puts(divw,30)

// progress bar divider character (blank yeilds no divider)
$puts(divc,-)

// progress bar played portion color
$puts(prog1,$rgb(239,239,239))

// progress bar unplayed portion color
$puts(prog2,$rgb(163,163,163))

// progress bar width
$puts(progw,53)

// progress bar character
$puts(progc,|)



$if(%_trackinfo_notrack%,$char(10)$char(10)$char(10)$char(10)$char(10)$char(1)CNo track playing,
$if($strcmp(1,$get(arts)),$if(%artist%,$get(head)Artist: $get(info)%artist%$char(10),),)
$if($strcmp(1,$get(albs)),$if(%album%,$get(head)Album: $get(info)%album%$char(10),),)
$if($strcmp(1,$get(tils)),$if(%title%,$get(head)Title: $get(info)%title%$char(10),),)
$if(%date%,$get(head)Date: $get(info)%date%$char(10),)
$if(%genre%,$get(head)Genre: $get(info)%genre%$char(10),)
$get(head)Length: $get(info)$if(%_isplaying%,%_time_elapsed%$get(anno)$if(%_length%,/%_length%,),%_length%)$char(10)
$if(%__codec%,$get(head)Codec: $get(info)%__codec%$char(10),)
$get(head)Bitrate: $get(info)
$if2(%__bitrate_dynamic%,%__bitrate%) $get(anno)Kbps $if($stricmp(%__codec%,mp3),$if($stricmp(%__extrainfo%,vbr),VBR,CBR))$char(10)
$if(%__lame_profile%,$get(head)Preset: $get(info)%__lame_version% %__lame_profile% $char(10),)
$if(%__mpc_profile%,$get(head)MPC Profile: $get(info)%__mpc_profile%$char(10),)
$get(head)Compression: $get(info)$muldiv(%__bitrate%,100,1411)$get(anno)'%'$char(10)
$get(head)Channels: $get(info)$if($stricmp($codec(),MP3),%__mp3_stereo_mode%,
$if(%__channels%,$ifgreater(%__channels%,1,Stereo,Mono),'?'))$char(10)
$if(%__bitspersample%,$get(head)Bitdepth: $get(info)%__bitspersample%$char(10),)
$if(%__samplerate%,$get(head)Samplerate: $get(info)%__samplerate% $get(anno)Hz$char(10),)
$if(%_filesize%,$get(head)Filesize: $get(info)
$div(%_filesize%,1048576).$left($num($muldiv($mod(%_filesize%,1048576),100,1048576),2),2) $get(anno)'MB'$char(10),)
$char(1)C$get(div)$repeat($get(divc),$get(divw))$char(10)
$if(%_length_seconds%,$char(1)C$get(head)Track Progress $get(info)$muldiv(%_time_elapsed_seconds%,100,%_time_total_seconds%)$get(anno)'%'$char(10)
$char(1)C$progress2(%_time_elapsed_seconds%, %_time_total_seconds%,$get(progw),$get(prog1)$get(progc),$get(prog2)$get(progc)),
$char(1)C$get(head)streaming...)
)

here is what mine looks like currently:

foo_uie_trackinfo

Reply #269
Quote
For some reason I always fiddle with this file size issue when I'm really tired. Not always a good idea...

Anyway, the $muldiv() version is still a little more accurate in general, but introduces the the 99 vs 100 problem Mr_Rabid_Teddybear noted above.
Code: [Select]
$div(%_filesize%,1048576).$num($muldiv($mod(%_filesize%,1048576),100,1048576),2) MB
ensures that a 4673211 bytes file is displayed as 4.46MB, not 4.45MB
as 4673211 bytes / (1024^2) = 4.456 MB

This affects a lot of files, but the 99 vs 100 problem is rarer. IIRC, the latter was the reason I started changing this code the last time, but I was fooled by the size reported in Windows, and did a lot of strange things.

I don't really know why I even bother with this, as I rarely look at the file size anyway.
[a href="index.php?act=findpost&pid=287249"][{POST_SNAPBACK}][/a]


If this is the case to get a more accurate filesize, I think we can code to deal with the special case when 100 is returned using $muldiv as below:
Code: [Select]
$div(%_filesize%,1048576).
$ifgreater($muldiv($mod(%_filesize%,1048576),100,1048576),99
,99,
$num($muldiv($mod(%_filesize%,1048576),100,1048576),2)
) MB


OR

If additional variable used.
Code: [Select]
$puts(ModSize,$muldiv($mod(%_filesize%,1048576),100,1048576))
$div(%_filesize%,1048576).$ifgreater($get(ModSize),99,99,$num($get(ModSize),2)) MB

foo_uie_trackinfo

Reply #270
If it can let me choose my own font type, it's more wondfull...........
.:: Evchenic.S+udio ::.

foo_uie_trackinfo

Reply #271
Quote
If it can let me choose my own font type, it's more wondfull...........
[a href="index.php?act=findpost&pid=288461"][{POST_SNAPBACK}][/a]

Preferences > Components >Track info panel > font
  ?
"ONLY THOSE WHO ATTEMPT THE IMPOSSIBLE WILL ACHIEVE THE ABSURD"
        - Oceania Association of Autonomous Astronauts

foo_uie_trackinfo

Reply #272
Quote
Quote
If it can let me choose my own font type, it's more wondfull...........
[a href="index.php?act=findpost&pid=288461"][{POST_SNAPBACK}][/a]

Preferences > Components >Track info panel > font
  ?
[a href="index.php?act=findpost&pid=288583"][{POST_SNAPBACK}][/a]


oh, the effect i want is that : for example, the 1st line i can use a font type,
and in the 2nd line i can use a different font type...so as it...
.:: Evchenic.S+udio ::.

foo_uie_trackinfo

Reply #273
maybe there is a free project, Phi can get some code-snippet (or some librarys) from to give HTML-interpretation (like it was requested here in post 42) - limited interpretation (no images etc.) would be fine enough.
Maybe the author of this winamp-plugin could give some support.
Sure, Phi gave already an answer, but I hope it could finally be less work than guessed...

foo_uie_trackinfo

Reply #274
I have a few requests

Would it be possible to have multiple info panels with multiple configurations?
For example, one panel for the infos about the track, another for displaying the lyrics, another for the review of the CD...

And how about reading content from external files? (for those who use evillyrics for example)

anyway thanks for the plugin cool.gif