IPB

Welcome Guest ( Log In | Register )

41 Pages V  « < 9 10 11 12 13 > »   
Reply to this topicStart new topic
foo_uie_trackinfo, now-playing/selected-item panel
waileongyeo
post Mar 29 2005, 13:28
Post #251





Group: Members
Posts: 101
Joined: 23-November 04
Member No.: 18278



QUOTE (Mr_Rabid_Teddybear @ Mar 29 2005, 07:57 PM)
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....
*

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. smile.gif
Go to the top of the page
+Quote Post
Mr_Rabid_Teddybe...
post Mar 29 2005, 13:44
Post #252





Group: Members
Posts: 1197
Joined: 3-September 03
From: Bergen, Norway
Member No.: 8667



QUOTE (waileongyeo @ Mar 29 2005, 04:28 AM)
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. smile.gif
*

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
Go to the top of the page
+Quote Post
waileongyeo
post Mar 30 2005, 06:43
Post #253





Group: Members
Posts: 101
Joined: 23-November 04
Member No.: 18278



QUOTE (Mr_Rabid_Teddybear @ Mar 29 2005, 08:44 PM)
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?
*


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. wink.gif
Go to the top of the page
+Quote Post
necropimp
post Mar 30 2005, 08:29
Post #254





Group: Members
Posts: 52
Joined: 18-February 05
Member No.: 19936



how do i get the percentage for track progress?


--------------------
- sig removed, no code allowed
Go to the top of the page
+Quote Post
Smitty Jones
post Mar 30 2005, 21:18
Post #255





Group: Members
Posts: 33
Joined: 9-February 05
Member No.: 19696



$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)
Go to the top of the page
+Quote Post
gfngfgf
post Mar 30 2005, 22:02
Post #256





Group: Members
Posts: 899
Joined: 2-November 04
Member No.: 17951



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.
Go to the top of the page
+Quote Post
Smitty Jones
post Mar 30 2005, 23:55
Post #257





Group: Members
Posts: 33
Joined: 9-February 05
Member No.: 19696



eh, i was close tongue.gif i use the second one, but yeah, time_elapsed, i don't know why i wrote remaining...
Go to the top of the page
+Quote Post
necropimp
post Mar 31 2005, 02:56
Post #258





Group: Members
Posts: 52
Joined: 18-February 05
Member No.: 19936



thanks that worked out just fine


--------------------
- sig removed, no code allowed
Go to the top of the page
+Quote Post
gob
post Mar 31 2005, 11:54
Post #259





Group: Members
Posts: 412
Joined: 13-July 03
From: bc.ca
Member No.: 7732



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

CODE
// 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

This post has been edited by gob: Apr 18 2005, 07:16
Go to the top of the page
+Quote Post
Mr_Rabid_Teddybe...
post Mar 31 2005, 13:10
Post #260





Group: Members
Posts: 1197
Joined: 3-September 03
From: Bergen, Norway
Member No.: 8667



QUOTE (waileongyeo @ Mar 29 2005, 09:43 PM)
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.  wink.gif
*

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
Go to the top of the page
+Quote Post
upNorth
post Mar 31 2005, 16:13
Post #261





Group: Members
Posts: 1099
Joined: 18-March 03
From: Oslo, Norway
Member No.: 5569



QUOTE (waileongyeo @ Mar 30 2005, 06:43 AM)
QUOTE (Mr_Rabid_Teddybear @ Mar 29 2005, 08:44 PM)
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?
*


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. wink.gif
*

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

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
$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.
Go to the top of the page
+Quote Post
.zolder
post Mar 31 2005, 17:29
Post #262





Group: Members
Posts: 73
Joined: 20-March 04
Member No.: 12874



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
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.
Go to the top of the page
+Quote Post
Mr_Rabid_Teddybe...
post Mar 31 2005, 18:09
Post #263





Group: Members
Posts: 1197
Joined: 3-September 03
From: Bergen, Norway
Member No.: 8667



QUOTE (.zolder @ Mar 31 2005, 08:29 AM)
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 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 formatting string to truncate the comment field if it's longer than 297 characters (just an arbitrary number I chose):

CODE
[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
Go to the top of the page
+Quote Post
.zolder
post Mar 31 2005, 18:48
Post #264





Group: Members
Posts: 73
Joined: 20-March 04
Member No.: 12874



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

i simply used:

CODE
[$meta(comment)]
Go to the top of the page
+Quote Post
Mr_Rabid_Teddybe...
post Mar 31 2005, 20:36
Post #265





Group: Members
Posts: 1197
Joined: 3-September 03
From: Bergen, Norway
Member No.: 8667



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
Go to the top of the page
+Quote Post
jkwarras
post Apr 1 2005, 09:13
Post #266





Group: Members
Posts: 808
Joined: 10-June 03
From: Zaragoza
Member No.: 7113



QUOTE (.zolder @ Mar 31 2005, 08:29 AM)
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 rolleyes.gif


--------------------
Iván
My Blog: http://www.ivancastell.org
Go to the top of the page
+Quote Post
necropimp
post Apr 2 2005, 09:23
Post #267





Group: Members
Posts: 52
Joined: 18-February 05
Member No.: 19936



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
$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'|','|')
)


This post has been edited by necropimp: Apr 3 2005, 05:30


--------------------
- sig removed, no code allowed
Go to the top of the page
+Quote Post
Lycox
post Apr 2 2005, 11:55
Post #268





Group: Members
Posts: 58
Joined: 24-October 04
From: near Berlin
Member No.: 17807



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
$div(%__samplerate%,1000).$div($num($div($mul($mod(%__samplerate%,1000),2),2),2),100) kHz


Has anyone a better solution?
Go to the top of the page
+Quote Post
AstreaEdge
post Apr 2 2005, 16:24
Post #269





Group: Members
Posts: 74
Joined: 20-August 03
Member No.: 8446



@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
// 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:


This post has been edited by AstreaEdge: Apr 2 2005, 17:14
Go to the top of the page
+Quote Post
waileongyeo
post Apr 5 2005, 08:09
Post #270





Group: Members
Posts: 101
Joined: 23-November 04
Member No.: 18278



QUOTE (upNorth @ Mar 31 2005, 11:13 PM)
For some reason I always fiddle with this file size issue when I'm really tired. Not always a good idea... rolleyes.gif

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
$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.
*


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
$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
$puts(ModSize,$muldiv($mod(%_filesize%,1048576),100,1048576))
$div(%_filesize%,1048576).$ifgreater($get(ModSize),99,99,$num($get(ModSize),2)) MB


This post has been edited by waileongyeo: Apr 5 2005, 08:14
Go to the top of the page
+Quote Post
shevchenic
post Apr 5 2005, 15:58
Post #271





Group: Members
Posts: 15
Joined: 10-December 04
Member No.: 18603



If it can let me choose my own font type, it's more wondfull...........


--------------------
[COLOR=orange].:: Evchenic.S+udio ::.
Go to the top of the page
+Quote Post
Mr_Rabid_Teddybe...
post Apr 6 2005, 02:55
Post #272





Group: Members
Posts: 1197
Joined: 3-September 03
From: Bergen, Norway
Member No.: 8667



QUOTE (shevchenic @ Apr 5 2005, 06:58 AM)
If it can let me choose my own font type, it's more wondfull...........
*

Preferences > Components >Track info panel > font
blink.gif ?


--------------------
"ONLY THOSE WHO ATTEMPT THE IMPOSSIBLE WILL ACHIEVE THE ABSURD"
- Oceania Association of Autonomous Astronauts
Go to the top of the page
+Quote Post
shevchenic
post Apr 8 2005, 09:33
Post #273





Group: Members
Posts: 15
Joined: 10-December 04
Member No.: 18603



QUOTE (Mr_Rabid_Teddybear @ Apr 5 2005, 05:55 PM)
QUOTE (shevchenic @ Apr 5 2005, 06:58 AM)
If it can let me choose my own font type, it's more wondfull...........
*

Preferences > Components >Track info panel > font
blink.gif ?
*



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...


--------------------
[COLOR=orange].:: Evchenic.S+udio ::.
Go to the top of the page
+Quote Post
sPeziFisH
post Apr 8 2005, 10:09
Post #274





Group: Members
Posts: 380
Joined: 9-October 02
Member No.: 3506



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...
Go to the top of the page
+Quote Post
Zurman
post Apr 10 2005, 23:19
Post #275





Group: Members
Posts: 238
Joined: 22-February 04
Member No.: 12193



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
Go to the top of the page
+Quote Post

41 Pages V  « < 9 10 11 12 13 > » 
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 30th August 2014 - 11:54