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 818977 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

foo_uie_trackinfo

Reply #700
I've had a look on the scroll speed. You're using the wrong concept imho. There's no fixed speed, as the user can only define: n seconds for the whole line. If the line is getting longer, it's scrolling unreadably fast. I've got some pretty long tags sometimes...

A per line definition of scrolling/wrapping behaviour would be nice...

I thought about that, but a problem would be that trackinfo can have multiple lines, and I'd have to keep track of scroll position for each of them.

It is possible, ofcourse. I guess I could also reinstate the $char(1) hack to get a per-line scrolling/wrapping/ellipsize option.

foo_uie_trackinfo

Reply #701
I would like to see Ctrl+A working in the Formating string area. It's useful if one wants to completely replace some config with another.
Another improvement - nonmodal configuration window like main foobar options, if possible.

Thank for your great work on this plugin!

foo_uie_trackinfo

Reply #702
It is possible, ofcourse. I guess I could also reinstate the $char(1) hack to get a per-line scrolling/wrapping/ellipsize option.
If you do that, I'd suggest to add custom functions for this, so the user doesn't have to remember those cryptic character codes.

foo_uie_trackinfo

Reply #703
G-Lite, i've few problems with the changes in the latest version ...

1) using two $tab() to center long string (when using wrap line option), it's not possible to center each resulting line (like it used to work with $char(1)C). as it's now, it puts first tab on the first line and second on the last, resulting in first line aligned to the right and last to the left.

i would like to be able to center each resulting line ...

2) using negative line spacing, the new line clears anything there may have been drawn by previous lines. i.e. you're drawing not only text for each line, but also it's background (and not first background and then each line).

that wouldn't be issue for normal use, but i used high negative spacing together with $char(10)text to move the line up. some fonts have more space above upper alignment line than bellow the bottom one, so i used this hack to visually center them in vertical axis.

maybe allowing negative padding would help.

3) could you add support for columns_ui's global variables which is possible in the latest api? you can find more info about this in this post.

foo_uie_trackinfo

Reply #704
Thanks Acedriver, I found it. A little bit hide in my opinion.

Best regards!

Jw

foo_uie_trackinfo

Reply #705
New version is up:
http://stephan.kochen.nl/proj/foobar2000.html#trackinfo

Changes:
  • 1) using two $tab() to center long string (when using wrap line option), it's not possible to center each resulting line (like it used to work with $char(1)C). as it's now, it puts first tab on the first line and second on the last, resulting in first line aligned to the right and last to the left.

    i would like to be able to center each resulting line ...

    Fixed this.
  • Global variables are now supported.
  • Per-line line ending styles are now supported. Add $line_end(wrap), $line_end(ellipsize) or $line_end(scroll) at the start of a line to override the default.

As for the other things:
2) using negative line spacing, the new line clears anything there may have been drawn by previous lines. i.e. you're drawing not only text for each line, but also it's background (and not first background and then each line).

that wouldn't be issue for normal use, but i used high negative spacing together with $char(10)text to move the line up. some fonts have more space above upper alignment line than bellow the bottom one, so i used this hack to visually center them in vertical axis.

maybe allowing negative padding would help.

Doesn't look like I can fix this. The background is already transparent as far as the code is concerned. It might be possible, but I'd probably have to reimplement all of foobar's color parsing and whatnot.

Different font sizes might also be a tricky thing.

I'm wondering if this is getting too complicated for this plugin, and whether there should be a separate rich textfield based version, or even a full blown HTML panel.

foo_uie_trackinfo

Reply #706
A full blown html panel would be cool.  I think it would be great to have a panel that could not only display track information from file tags, but which could also display web pages via tagz scripts such as artist biographies from wikipedia or allmusic.

foo_uie_trackinfo

Reply #707
can anyone look at this screenshot and then the code below and tell me why that code in front of the seekbar is showing and if someone can see if the code is pretty much all correct? its pissing me off seeing that white text like that.




Code: [Select]
// _________________
// CONFIGURE COLORS
// *****************

// BACKGROUND COLOR
// --------------------------
// $puts(background,$rgb(0,0,0))

$puts(background,000000)


// HEAD TITLES LEFT OR CENTER
// -------------------------------------
// 0-Left, 1-Right
$puts(format,0)


// FORMAT LEFT HEAD
// ------------------------
// is used in Left Format
$puts(head_char,$char(9642))
//$puts(head_char,●)
$puts(head_lenght,25)
//
// SPECIAL COLOR
// $puts(head_special,0CEBA4)
$puts(head_special,$rgb(54,106,179))


// INFO HEADING COLOR > Ex: "Song Info"
// --------------------------------------------------
// $puts(head,$rgb(61,129,193))

$puts(head,0CEBA4)


// INFO ITEMS COLOR > Ex: "Artist:"
// ------------------------------------------
// $puts(info,$rgb(255,255,255))

$puts(info,D7B997)


// RESULT ITEM COLOR > Ex: "Vivaldi"
// -------------------------------------------
// $puts(result,$rgb(255,255,255))

$puts(result,F3EAE0)


// SPECIAL COLOR > Ex: "4:20" for highlight time, bitrate, title
// ------------------------------------
//$puts(high,$rgb(255,255,255))

$puts(high,FFFFFF)


// ___________________
// PROGRESS BAR CONFIG
// ********************

// PROGRESS BAR COLORS
// ------------------------------

$puts(progress_color1,$rgb(164,235,12))
$puts(progress_color2,$rgb(54,106,179))


// PROGRES BAR LENGH & CHAR
// -------------------------------------
// $puts(progress_char,$char(9642))
// $puts(progress_char,█)
$puts(progress_char,●)
$puts(progress_length,30)


//
// SYMBOL FOR ACCURATE LENGTH
// ----------------------------------------
// $puts(head_char,$char(9642))

$puts(accurate_char,●)


//
// ___
// END
// ***
//
// __________
// CODE START:
// ***********
//

// MODE
// *****
//DCAE8DMode: %_trackinfo_mode%
//$char(10)

//
// NO TRACK
// ********
$if(%_trackinfo_notrack%,
//$char(1)C$get(head)%_foobar2000_version%  $char(10)$get(high)

// if track selected
,
//
//
// TRACK INFO
// **********
//
$if($strcmp($get(format),0),
// LEFT FORMAT
$get(head_special)$get(head_char)$get(head_char)$get(head) TRACK INFO $transition($repeat($get(head_char),$get(head_lenght)),$get(head_special),$get(background))
,
// CENTER FORMAT TEXT
$char(1)C$get(head)Song Info  )

//$char(10)
$if(%artist%,$char(10)$get(info)Artist: $get(result)$caps2(%artist%),)

//$if(%title%,$char(10)$get(info)Title: $get(high)$caps2(%title%),)
//
// SPECIAL FOR REMIXES
// ******************
// TITLE CONTROL FOR CD
//
$if(%title%,$if($stricmp(%__codec%,CDDA),,$char(10)$get(info)Title:
$if(%_isplaying%,
// ADD REMIX MOD
$replace($get(high)$caps2(%title%),'(',$get(result)'(',')',')'$get(result)),$replace($get(high)$caps2(%title%),'(',$get(result)'(',')',')'$get(high)))),)


$if(%album artist%,$char(10)$get(info)Performer: $get(result)$caps2(%album artist%),)

$if(%album%,$char(10)$get(info)Album: $get(result)$caps2(%album%),)

$if(%tracknumber%,$char(10)$get(info)Track: $get(result)%tracknumber%,)

$if(%date%,$char(10)$get(info)Date: $get(result)%date%,)

$if(%genre%,$char(10)$get(info)Genre: $get(result)$caps(%genre%),)

$if(%partinset%,$char(10)$get(info)Set: $get(result)$caps(%partinset%),)

$if(%__path_volumelabel%,$char(10)$get(info)Label: $get(result)$caps(%__path_volumelabel%),)

$if(%comment%,$char(10)$get(info)Comments: $get(result)$if($greater($len(%comment%),33),$cut(%comment%,33)...,%comment%),)

//
//
// NO MP3-OGG ID3 TAGS
// *******************
//
$if(%artist%,,$if(%title%,,$if(%album%,,$if(%tracknumber%,,$if(%date%,,$if(%genre%,,$if(%comment%,,
$if(%_filename%,$char(10)$get(info)File: $get(high)$caps2(%_filename%),)
//$char(10)
$char(10)$get(info)Directory: $get(result)$if(%_directoryname%,%_directoryname%,$cut(%_path%,3))

$char(10)$get(info)Path: $get(result)%_path%
//%_path_raw%
)))))))

//
//
//
// STREAMING SPECIAL
// *****************
//
$if(%_isplaying%,$if(%_time_total%,,$char(10)$get(info)Location: $get(result)%_path%),)
//
//
$char(10)

//
//
// TECH INFO
// **********
//
$if($strcmp($get(format),0),
// LEFT FORMAT
$get(head_special)$get(head_char)$get(head_char)$get(head) TECH INFO $transition($repeat($get(head_char),$get(head_lenght)),$get(head_special),$get(background))
,
// CENTER FORMAT TEXT
$char(1)C$get(head)Tech Info 
)
$char(10)

$if(%_isplaying%,,$if(%_length%,$get(info)Time: $get(result)%_length%$char(10),))
//
// CODEC
// ******
$if(%__codec%,$get(info)Codec: $get(result)$caps2(%__codec%)
$if(%__extrainfo%, '('$caps2(%__extrainfo%)')',)$char(10),)
// DESCRIPTION LIST OF CODEC
// ************************
$if($stricmp(%__codec%,MP3),$get(info)Description: $get(result)MPEG-1 Audio Layer 3$char(10),)
$if($stricmp(%__codec%,AAC),$get(info)Description: $get(result)Advanced Audio Coding$char(10),)
$if($stricmp(%__codec%,FLAC),$get(info)Description: $get(result)Free Lossless Audio Codec$char(10),)
$if($stricmp(%__codec%,ATSC A/52),$get(info)Description: $get(result)Dolby Digital AC3$char(10),)
$if($stricmp(%__codec%,Vorbis),$get(info)Description: $get(result)$caps($ext(%_filename_ext%)) File$char(10),)
$if($stricmp(%__codec%,PCM),$get(info)Description: $get(result)Wave$char(10))
$if($or($stricmp($ext(%_filename_ext%),mka),$stricmp($ext(%_filename_ext%),mkv)),$get(info)Description: $get(result)Matroska$char(10),)
$if($stricmp($cut(%__codec%,6),Monkey),$get(info)Description: $get(result)Lossless Audio Compressor$char(10),)
$if($stricmp(%__codec%,Musepack),$get(info)Description: $get(result)MPEGPlus/MP+$char(10),)
$if($stricmp(%__codec%,MP2),$get(info)Description: $get(result)MPEG-1 Audio Layer 2$char(10),)
$if($stricmp(%__codec%,CDDA),$get(info)Description: $get(result)CD Digital Audio$char(10),)

// BITRATE
$get(info)Bitrate: $get(result)$if(%__bitrate_dynamic%,$if(%_isplaying%,$select($add($mod(%_time_elapsed_seconds%,2),1),%__bitrate_dynamic%,$get(high)%__bitrate_dynamic%),%__bitrate_dynamic%),%__bitrate%) $get(result)Kbit/s$char(10)
//
// LAME PROFILE
// ************
//$if(%__lame_version%,$get(info)Preset: $get(result)$left(%__lame_version%,4) $right(%__lame_version%,4) [$upper(%__lame_profile%)]$if($greater(%__lame_profile_index%,0),%__lame_profile_index%,)$if(%__mp3_accurate_length%,$get(accurate_char),)$char(10),)
$if(%__lame_version%,$get(info)Preset: $get(result)$left(%__lame_version%,4) $right(%__lame_version%,4) [$upper(%__lame_profile%)]$if($greater(%__lame_profile_index%,0),%__lame_profile_index%,)$if(%__mp3_accurate_length%,$get(accurate_char),)$char(10),)
$if($greater(%__lame_profile_index%,0),$get(info)Profile: $get(result)$select(%__lame_profile_index%,R3Mix,Extreme,Standard,Fast Standard,Fast Extreme,Insane)$char(10),)

)
// LAME DELAY/PADDING
$if(%__enc_delay%,$get(info)Enc Del/Pad: $get(result)%__enc_delay% / %__enc_padding%$char(10),)
// MONKEYS AUDIO APE
$if(%__version%,$get(info)Preset: $get(result)$upper($if2($ext(%__referenced_file%),$ext(%_path%))) %__version%$char(10),)
$if(%__compression%,$get(info)Profile: $get(result)%__compression%$if(%__flags%, / %__flags% Flags,)$char(10),)
// FLAC VENDOR
$if(%__flac_vendor%,$get(info)Encoder: $get(result)$if($stricmp(%__flac_vendor%,reference libFLAC 1.1.2 20050205),FLAC 1.1.2 -8,$substr(%__flac_vendor%,14,23))$char(10),)
// VORBIS BITRATE NOMINAL
$if(%__bitrate_nominal%,$get(info)Nominal: $get(result)%__bitrate_nominal% Kbit/s$char(10),)
// VORBIS VERSION
$if(%__vorbis_vendor%,$get(info)Preset: $get(result)$cut(%__vorbis_vendor%,8)$if(%__vorbis_version%, %__vorbis_version%,)$char(10),)
// MUSEPACK
$if(%__mpc_encoder%,$get(info)Preset: $get(result)$upper($if2($ext(%__referenced_file%),$ext(%_path%))) %__mpc_encoder% $if($greater(%__mpc_streamversion%,0),%__mpc_streamversion%,)$if(%__mpc_accurate_length%,$get(accurate_char),)$char(10),)
$if(%__mpc_profile%,$get(info)Profile: $get(result)%__mpc_profile%$char(10),)
// AAC PROFILE
$if(%__aac_profile%,$get(info)Profile: $get(result)%__aac_profile%$char(10),)

// COMRPESSION
$if($greater($muldiv(%__bitrate%,100,1411),0),$if($strcmp($muldiv(%__bitrate%,100,1411),100),,$get(info)Compression: $get(result)$div(1411,%__bitrate%).$substr($muldiv(1411,100,%__bitrate%),2,3):1 '('$sub(100,$muldiv(%__bitrate%,100,1411))'%)'$char(10)),)
// SAMPLERATE
$if(%__samplerate%,$get(info)Samplerate: $get(result)%__samplerate% Hz$char(10),)
//$get(info)Channels: $get(result)$if(%__channels%,$ifgreater(%__channels%,2,%__channels%ch,$ifgreater(%__channels%,1,' 'Stereo,''Mono)),)$char(10)
// CHANELS
// for Joint Stereo, 4Ch or 5.1/7.1
$if(%__channels%,$get(info)Channels: $get(result)$if($stricmp($codec(),MP3),$get(space2)$caps(%__mp3_stereo_mode%),$if(%__channels%,$ifgreater(%__channels%,1,Stereo,Mono),$if($strcmp(%__channels%,4),4 Ch,$sub(%__channels%,1)'.1' Ch)))$char(10),)
// BITDEPTH
$if(%__bitspersample%,$get(head)$get(info)Bitdepth: $get(result)%__bitspersample% bits/sample$char(10),)
// FILE SIZE
$if($greater(%_filesize%,0),$if($stricmp($upper($ext(%_path%)),CUE),$get(info)Font: $get(result)Cue File$char(10),$get(info)Size: $get(result)$div(%_filesize%,1048576).$num($muldiv($mod(%_filesize%,1048576),100,1048576),2) MB$char(10)),)

//
//
//
// MORE INFO
// **********
//
//$char(1)C$get(head)Special Info  $char(10)
$if($or(%__replaygain_track_gain%,%__replaygain_album_gain%,%last_played%,%play_counter%,%rating%),
//$char(10)

// MORE INFO
// **********
$if($strcmp($get(format),0),
// LEFT FORMAT
$get(head_special)$get(head_char)$get(head_char)$get(head) USER INFO $transition($repeat($get(head_char),$get(head_lenght)),$get(head_special),$get(background))
,
// CENTER FORMAT TEXT
$char(1)C$get(head)User Info 
)
$char(10)
$if(%__replaygain_track_gain%,$get(info)Track Gain: $get(result)%__replaygain_track_gain%$char(10),)
$if(%__replaygain_album_gain%,$get(info)Album Gain: $get(result)%__replaygain_album_gain%$char(10),)
$if(%last_played%$get(info)Last Played: $get(result)%last_played%$char(10),)
$if(%play_counter%,$get(info)Nº Times: $get(result)%play_counter%$char(10),)
$if(%rating%,$get(info)Rating: $get(result)%rating% / $get(high)5$char(10),)
,)

//$char(10)
//
// WHEN PLAYING
// ************
//
$if(%_isplaying%,
//
// SONG PLAYING
// *************
//
$if($strcmp($get(format),0),
// LEFT FORMAT
$get(head_special)$get(head_char)$get(head_char)$get(head) $if(%_time_total%,TIME INFO,STREAMING  ) $transition($repeat($get(head_char),$get(head_lenght)),$get(head_special),$get(background))
,
// CENTER FORMAT TEXT
$char(1)C$select($add($mod(%_time_elapsed_seconds%,2),1),$get(head)$if(%_time_total%,Time Info  ,Streaming  ),$get(head)Now Playing  )
)
//$char(1)C$if(%_isplaying%,$select($add($mod(%_time_elapsed_seconds%,2),1),$get(head)$if(%_time_total%,Time Info  ,Streaming  ),$get(head)Now Playing  ),)

$char(10)
$if(%_time_total%,$get(info)Total: $get(result)%_time_total%$char(10),)

$get(info)Elapsed: $get(result)$select($add($mod(%_time_elapsed_seconds%,2),1),$get(high)%_time_elapsed%,%_time_elapsed%)
$char(10)
$if(%_time_total%,$get(info)Remaining: $get(result)%_time_remaining%$char(10),)

$if(%_time_total%,$get(info)Listened: $get(result)$pad_right($muldiv(%_time_elapsed_seconds%,100,%_length_seconds%),3)'%',)
,)
$char(10)





//
//
//


// PREPARE COLOR-STRINGS
// =========================================
$puts(progress_color1a,$blend($get(progress_color1),000000,1,4.5))
$puts(progress_color2a,$blend($get(progress_color2),000000,1,5.7))
// progressbar
$puts(progressbar,
$if(%_length_seconds%,

$puts(progress,$muldiv(%_time_elapsed_seconds%,$get(progress_length),%_length_seconds%))
$transition($repeat($get(progress_char),$get(progress)),$get(progress_color1a),$get(progress_color1))
$transition($repeat($get(progress_char),$sub($get(progress_length),$get(progress))),$get(progress_color2a),$get(progress_color2))
$pad_right($muldiv(%_time_elapsed_seconds%,100,%_length_seconds%),3)'%'
,Streaming...
)
)
//
//
// PROGRESS BAR
// ------------------
//
$if(%_time_total%,
//
// NOW PLAYING
// **********
//
$if($strcmp($get(format),0),
// LEFT FORMAT
$get(head_special)$get(head_char)$get(head_char)$get(head) SEEKBAR $transition($repeat($get(head_char),$get(head_lenght)),$get(head_special),$get(background))
,
// CENTER FORMAT TEXT
$char(1)C$if(%_isplaying%,$select($add($mod(%_time_elapsed_seconds%,2),1),$get(head)Now Playing  ,$get(progress_color2)Now Playing  ),)
)

$char(10)
$if(%_isplaying%,$char(1)C$get(head)  $get(progressbar)$char(10),)
,)
//
// end progress bar
//

// end notrack info
)

[!--sizeo:1--][span style=\"font-size:8pt;line-height:100%\"][!--/sizeo--]moderation: Please use codebox for long code fragments.[/size]

foo_uie_trackinfo

Reply #708
$char(1) is dead. Long live $tab().

foo_uie_trackinfo

Reply #709
$char(1) is dead. Long live $tab().

there are 9 $char(1) in that code and if I replace them all with $tab() the result is total mess, looks horrible.

If I leave it alone and remove from the following line of code $char(1)C then it is all fine. Unless I did something wrong updating the code as you suggested

$char(10)
$if(%_isplaying%,$char(1)C$get(head)  $get(progressbar)$char(10),)

to

$char(10)
$if(%_isplaying%,$get(head)  $get(progressbar)$char(10),)

foo_uie_trackinfo

Reply #710
To center text, you have to surround it with two $tab()'s, like

Code: [Select]
$tab()centered text goes here$tab()$char(10)

foo_uie_trackinfo

Reply #711
G-Lite, thank you so much for the update.

there are still some problems though, please see this image. i'm also getting some metadb_handle leaks, but i'm not 100% sure they are related to track info panel.

global variables work as they should, though i had no success with exporting %playlist_name% as global variable. it's not available in track info panel, however it is in columns_ui. so i put it into global variable, but accessing this global in track info returned only '?' - i think that that's because the global string gets evaluated in track info's context, which hasn't %playlist_name% available.

could you, maybe, somehow support this? i would really like to display current playlist's name ...

as for more advanced formatting - well Phi had development version with support for changing font style (bold / italics / underline) (info here). other than that, size changing (like $font_size(+1) etc.) and possibly font changing would be ultimate (i'm sure that would be pretty hard to implement though).

foo_uie_trackinfo

Reply #712
i'm getting the leaks as well. 

thanks for working on this.

foo_uie_trackinfo

Reply #713
Thx first G-Lite for the update!


$char(1) is dead. Long live $tab().
there are 9 $char(1) in that code and if I replace them all with $tab() the result is total mess, looks horrible.

I found out it's not necessarily easy to replace the old center command with 2 $tab(). My TI panel is full of if constructs. Finally, I'll have to rewrite the code (use more variables) to introduce $tab(), to have it readable and working.

BTW ("puts(blah,%_globalvar%") didn't work: How can I access a global variable?

foo_uie_trackinfo

Reply #714
You can access the global variables through $get_global, just like it is in the playlist view.

foo_uie_trackinfo

Reply #715
i got the "metadb_handle leaks: 1 object" problem... so what's up with that.
OOOOO!!! what's this button do!!!

 

foo_uie_trackinfo

Reply #716
i can't make lyrics show in the track info
i've put [%LYRICS%] in the script but it makes nothing

foo_uie_trackinfo

Reply #717
thanks gfngfgf, that worked.

foo_uie_trackinfo

Reply #718
I have Columns UI 013b1v5 and Trackinfo 0.8
I'm experiencing the "meta_db handle leaks..." error when I close foobar. But also, the foobar process is taking nearly the 98% of processor usage.
I deactivate the Trackinfo panel, and processor usage goes normal again.

foo_uie_trackinfo

Reply #719
Quote
I'm experiencing the "meta_db handle leaks..." error when I close foobar. But also, the foobar process is taking nearly the 98% of processor usage.

You're not alone

foo_uie_trackinfo

Reply #720
I agree with the Error :/

foo_uie_trackinfo

Reply #721
i can't make lyrics show in the track info
i've put [%LYRICS%] in the script but it makes nothing

%lyrics% isn't implemented in 0.9. might wanna check this out.

http://wiki.hydrogenaudio.org/index.php?ti...ormat_Reference

also if you want it to display lyrics, you could probably do something like

Code: [Select]
$meta(lyrics)

or

$meta(unsynced lyrics)
i forgot what it really was.

foo_uie_trackinfo

Reply #722
Quote
But also, the foobar process is taking nearly the 98% of processor usage.
I deactivate the Trackinfo panel, and processor usage goes normal again.


I've got a similar issue...  I think it's related to the scrolling function.
On a completely new layout with just an trackinfo panel and the playlist, foobar's CPU usage is generally between 20-40% with scroll on, and 0% with scroll off...

foo_uie_trackinfo

Reply #723
Ok, I think I found a temporal fix for the high processor uses.
In my case, I used the WRAP option, and still I had the processor at 98%

To temporaly fix this, go to the Trackinfo options and configure the SCROLL STEPS to 0 (even if you are not using the scroll!!).
I think I found a Bug

With this, my foobar works as always (0 to 5% of processor usage)

foo_uie_trackinfo

Reply #724
DualBlade, thx, it works for me.
But why
Quote
In my case, I used the WRAP option, and still I had the processor at 98%