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 814617 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

foo_uie_trackinfo

Reply #275
Quote
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?
[a href="index.php?act=findpost&pid=287762"][{POST_SNAPBACK}][/a]

Code: [Select]
$div(%__samplerate%,1000).$substr(%__samplerate%,3,3)KHz

...maybe?
</signature>

foo_uie_trackinfo

Reply #276
Hi, i have a small problem with my trackinfo-codes!

Here you can see the statistic-part of my trackinfo.
)
THX

((((( Strictly4me )))))

foo_uie_trackinfo

Reply #277
In the code, change this
Code: [Select]
$puts(month,$left(%play_date%,2))

$puts(day,$substr(%play_date%,4,5))

to this
Code: [Select]
$puts(month,$substr(%play_date%,4,5))

$puts(day,$left(%play_date%,2))


and it should work.

foo_uie_trackinfo

Reply #278
Quote
In the code, change this and it should work.

It works!
Many thanks!

((((( Strictly4me )))))

foo_uie_trackinfo

Reply #279


Much longer config this version...

Code: [Select]
// the default (white) color
$puts(white,dbdbdb)

// text color for headings
$puts(head,918377)

// text color for info annotations (Kbit/s, MB, etc)
$puts(anno,b1b1b1)

// text color for special stuff (now playing, LAME profiles)
$puts(bright,97cddd)

// text color for extra song info (in parentheses/brackets)
$puts(extra,6c8e93)

// background color, for redundancy
$puts(background,524B3C)

// character used for progress bar
$puts(progchar,█)

// color used for foreground progress bar
$puts(progfore,ffffff)

// color used for background progress bar
$puts(progback,9d9d9d)

// progress bar length
$puts(proglength,40)

// transition color for fading out
$puts(trans_back,524B3C)

// transition color for foreground
$puts(trans_frnt,ffffff)

// song title output
$puts(title,[$replace(%title%,'(',$get(extra)'(',')',')'$get(bright),'[',$get(extra)'(',']',')'$get(bright))]$char(10))

// artist name output
$puts(artist,[%artist%]$char(10))

// album title output
$puts(album,[$iflonger(%album%,40,$cut(%album%,40)...,%album%)]$char(10))

// track and disc output 1
$puts(track,[CD$if(%disc%,%disc%', ',)]$num(%tracknumber%,2)$char(10))

// genre output
$puts(genre,[%genre%]$char(10))

// date/year output
$puts(date,[%date%]$char(10))

// codec name output
$puts(codec,[%__codec%]$char(10))

// bitrate/LAME output
$puts(bitr,$if(%__lame_profile%,$get(bright)--%__lame_profile%$get(anno) '('%__bitrate_dynamic% Kbit/s')',[%__bitrate%] $get(anno)Kbit/s)$char(10))

// compression precent outout
$puts(compr,$get(white)$muldiv(%__bitrate%,100,1411)$get(anno_color)$get(anno)'%'$char(10))

// filesize output
$puts(fsize,$div(%_filesize%,1048576).$num($div($mul($mod(%_filesize%,1048576),100),1048576),2) $get(anno)MB$char(10))

// audio channels output
$puts(chan,$caps($if($stricmp($codec(),MP3),%__mp3_stereo_mode%,$channels()))$char(10))

// samplerate output
$puts(samp,$if(%__samplerate%,%__samplerate% $get(anno)Hz,)$char(10))

// time played / total (remaining) output
$puts(leng,[%_time_elapsed% / ][%_length%] [$get(anno)'('%_time_remaining%')']$char(10))

// used to get filename
$puts(filename,$filename(%_path%).$ext(%_path%))

// filename output (used with above)
$puts(file,[$iflonger($get(filename),55,$cut($get(filename),55)...,$get(filename))$char(10)])

//////////////////////////////////////////
/////////// FINAL OUTPUT ///////////
/////////////////////////////////////////

$char(1)C$transition(---------,$get(trans_back),$get(trans_frnt))  $get(white)S O N G  I N F O R M A T I O N  $transition(---------,$get(trans_frnt),$get(trans_back))$char(10)$char(10)
$get(head)Title:  $get(bright)$get(title)
$get(head)Artist:  $get(white)$get(artist)
$get(head)Album:  $get(white)$get(album)
$get(head)Track:  $get(white)$get(track)
$get(head)Genre:  $get(white)$get(genre)
$get(head)Date:  $get(white)$get(date)
$get(head)Codec:  $get(white)$get(codec)
$get(head)Bitrate:  $get(white)$get(bitr)
$get(head)Compression:  $get(white)$get(compr)
$get(head)Filesize:  $get(white)$get(fsize)
$get(head)Channels:  $get(white)$get(chan)
$get(head)Samplerate:  $get(white)$get(samp)
$get(head)Time:  $get(white)$get(leng)
$char(10)
$get(head)$get(file)
$progress2(%_time_elapsed_seconds%,%_time_total_seconds%,$get(proglength),$get(progfore)$get(progchar),$get(progback)$get(progchar))$get(bright)  $muldiv(%_time_elapsed_seconds%,100,%_time_total_seconds%)'%'

foo_uie_trackinfo

Reply #280
synth7,

I like your track info, but when I copy and pasted your config, the progress meter doesn't display.  Am I doing something wrong?

Kittens give Morbo gas.

foo_uie_trackinfo

Reply #281
Something wrong with this?

Code: [Select]
// character used for progress bar
$puts(progchar,█)

foo_uie_trackinfo

Reply #282
Quote
Something wrong with this?

Code: [Select]
// character used for progress bar
$puts(progchar,█)

[{POST_SNAPBACK}][/a]

The font you use?
Look [a href="http://www.hydrogenaudio.org/forums/index.php?showtopic=30988&view=findpost&p=289560]here[/url].
Maybe that helps?
"ONLY THOSE WHO ATTEMPT THE IMPOSSIBLE WILL ACHIEVE THE ABSURD"
        - Oceania Association of Autonomous Astronauts

foo_uie_trackinfo

Reply #283
Yea, I used to use Tahoma as my font, but it has no Unicode support, so I switched to Arial.

I also updated the end, removes the filename and puts the percent in a better place. Replace the last 2 lines...

Code: [Select]
$char(1)C$get(head)Track Progress $get(bright)$muldiv(%_time_elapsed_seconds%,100,%_time_total_seconds%)'%'$char(10)
$char(1)C$progress2(%_time_elapsed_seconds%,%_time_total_seconds%,$get(proglength),$get(progfore)$get(progchar),$get(progback)$get(progchar))

foo_uie_trackinfo

Reply #284
I've done this to kinda emulate it showing me when it sends the song data to Audioscrobbler:

Code: [Select]
$if(%_isplaying%,$char(10)$char(10)$ifgreater(
$muldiv(%_time_elapsed_seconds%,100,%_time_total_seconds%),50,
c2b1a3Audioscrobblered.,666666Non-audioscrobblered.)


But I'd want it to sense if I have been seeking through the current song. Would that be possible without someone modding foo_audioscrobbler?

foo_uie_trackinfo

Reply #285
Thanks for the replies.  In the end, Mr. Rabid Teddybear and synth7 were right.  Switching to Arial fixed the problem.  Thanks!
Kittens give Morbo gas.

foo_uie_trackinfo

Reply #286
Hello, can anybody help me by this trackinfo code?

If i start Foobar i have nothing in my playlist, till i select a song in playlist-tree. - Thats ok, but i have some stuff in my trackinfo.
You can see in this screenshot:



I dont want to see this existing "A" near "Song Info" and "0.00MB" near "Tech Info".
Know someone whats wrong in my trackinfo-code?

Here the whole code:

Code: [Select]
//////////////////////////////////////////////////////////////////////////////////////////////

////  A simple formatting script for foo_uie_trackinfo.

////  It will work with the following tags:

////  %RATING%, %PLAY_COUNTER%, %PLAY_TIME%,

////  %LABEL% and/or %PUBLISHER%.

////  Best viewed in Arial 8pt Bold

////  Created by: korsairr@cogeco.ca

////  Date: Jan 31, 2005

/////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////

//Colors, etc.

////////////////////////////////

$puts(default_color,dee8e5)

$puts(rating_color_1,dee8e5)

$puts(rating_color_2,938881)

$puts(rating_symbol,♫)

$puts(is_playing_color,5357EF)

$puts(tag_missing_color,5357EF)

$puts(heading_color_l,ffb00d)

$puts(heading_color_r,dee8e5)

$puts(is_playing_color,5357EF)

////////////////////////////////

//Code

////////////////////////////////

////////////////////////////////

///////Song Info

////////////////////////////////

$transition(  ----- Song Info ------------------------------------------------------,$get(heading_color_l),$get(heading_color_r))

$char(10)$get(default_color)
 
$if(%title%,$if(%_isplaying%,

$get(is_playing_color)$iflonger(%title%,36,$cut(%title%,33)...,%title%),

$iflonger(%title%,36,$trim($cut(%title%,33))...,%title%)),

A$if(%_isplaying%,

$get(is_playing_color)$iflonger(%_filename_ext%,36,$cut(%_filename_ext%,33)...,%_filename_ext%),

$iflonger(%_filename_ext%,36,$trim($cut(%_filename_ext%,33))...,%_filename_ext%)))

$char(10)$get(default_color) 

$if(%artist%,

$iflonger(%artist%,36,$cut(%artist%,33)...,%artist%),

$get(tag_missing_color)Keine Artist Informationen)

$char(10)$get(default_color) 

$if(%album%,

$iflonger(%album%,36,$cut(%album%,33)...,%album%),

$get(tag_missing_color)Keine Album Informationen)

$char(10)$get(default_color) 

$if($or(%publisher%.%label%,%date%),$if($or(%publisher%,%label%),© ,)%date%$if($or(%publisher%,%label%),'. ',)[%publisher% ][label],

$get(tag_missing_color)Keine Datum oder Copyright Informationen)

$char(10)$get(default_color) 

$if(%rating%,

$repeat($get(rating_color_1)$get(rating_symbol) ,%rating%)$repeat($get(rating_color_2)$get(rating_symbol) ,$sub(3,%rating%)) ,)

$get(default_color)$if(%genre%,%genre%,$get(tag_missing_color)Keine Genre Informationen)

$char(10)$char(10)

////////////////////////////////

///////Statistics

////////////////////////////////

$transition(  ----- Statistics -------------------------------------------------------,$get(heading_color_l),$get(heading_color_r))

$char(10)$get(default_color) 

$if(%play_date%,

$puts(month,$substr(%play_date%,4,5))

$puts(day,$left(%play_date%,2))

$if($strcmp($left($get(day)1),0),$puts(day,$right($get(day),1)))

$puts(year,$right(%play_date%,2))

$puts(month_name,$select($get(month),

Jän,Feb,März,April,Mai,Juni,Juli,Aug,Sept,Okt,Nov,Dez))

$if($strcmp($right($get(day),1),1),$puts(xx,),

$if($strcmp($right($get(day),1),2),$puts(xx,),

$if($strcmp($right($get(day),1),3),$puts(xx,),

$puts(xx,)))))

$puts(time_of_year,$get(day)$get(xx). $get(month_name) 20$get(year))

$if(%play_counter%,Abgespielt $if($strcmp(%play_counter%,1),

einmal','$if(%play_date%, am $get(time_of_year) um %play_time%),

%play_counter% mal$if(%play_date%,

$char(10)  dee8e5Zuletzt gespielt am $get(time_of_year)) um %play_time%),Dieser Song wurde noch nicht gespielt)

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

$char(10)$char(10)

////////////////////////////////

///////Tech Info

////////////////////////////////

$transition(  ----- Tech Info -------------------------------------------------------,$get(heading_color_l),$get(heading_color_r))

$char(10)$get(default_color) 

[%__codec%]

$if(%__bitrate_dynamic%,%__bitrate_dynamic%,[%__bitrate% kbps])

$if($stricmp(%__codec%,mp3),$if($stricmp(%__extrainfo%,vbr),VBR,CBR))

$if($stricmp($codec(),MP3),%__mp3_stereo_mode%,$channels())

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

$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)Keine Replaygain Informationen)

Here trackinfo in action:



Thanks in advance.
((((( Strictly4me )))))

foo_uie_trackinfo

Reply #287
Code: [Select]
A$if(%_isplaying%,


Maybe that's what's wrong?

Remove the A from the beginning of the line.

And substitute

Code: [Select]
$left($num($muldiv($mod(%_filesize%,1048576),1000,1048576),3),2)' MB'


for

Code: [Select]
$if(%_filesize%,$left($num($muldiv($mod(%_filesize%,1048576),1000,1048576),3),2)' MB')


and then try it out.

foo_uie_trackinfo

Reply #288
Thanks "Storm"

I dont have "A" now, but with the other code is still something wrong:



One more idea?

((((( Strictly4me )))))

foo_uie_trackinfo

Reply #289
Did you write all this code yourself or have you copied it from someone else?

Anyways, of course it should be

Code: [Select]
$if(%_filesize%,$div(%_filesize%,1048576).
$left($num($muldiv($mod(%_filesize%,1048576),1000,1048576),3),2)' MB')$char(10)


instead of

Code: [Select]
$div(%_filesize%,1048576).

$left($num($muldiv($mod(%_filesize%,1048576),1000,1048576),3),2)' MB'

$char(10)


And also you can remove a $char(10) up there just before the artist information, to get rid of that empty line.

foo_uie_trackinfo

Reply #290
Quote
Did you write all this code yourself or have you copied it from someone else?

No, i found this code.
Anyway, it works correct now.
Many thanks to you! 
Great.

((((( Strictly4me )))))

foo_uie_trackinfo

Reply #291
Iv been following this forum but I may have missed the answer b4...if so please provide a link...Im too tired to trudge through 12 pages to find the answer. 
My problem is that when a title eg ALBUM : The Miseducation Of Lauryn Hill
is too long for my track info box, it goes on to another line (so pushing down the other info)
I want it on the same line so it would be ALBUM : The Miseducation Of Lau....
This works on my playlist.  Any one know the string to make this work in Track Info??
TIA

foo_uie_trackinfo

Reply #292
I also have a bug report. When you use color codes to... um, color your text, and a line break occurs; it continues on the next line but with the standard color. You should be able to color code an entire sentence or whatever without "risking" anything looking out of place if the metadata is too long.

foo_uie_trackinfo

Reply #293
Quote
Iv been following this forum but I may have missed the answer b4...if so please provide a link...Im too tired to trudge through 12 pages to find the answer. 
My problem is that when a title eg ALBUM : The Miseducation Of Lauryn Hill
is too long for my track info box, it goes on to another line (so pushing down the other info)
I want it on the same line so it would be ALBUM : The Miseducation Of Lau....
This works on my playlist.  Any one know the string to make this work in Track Info??
TIA
[a href="index.php?act=findpost&pid=291183"][{POST_SNAPBACK}][/a]

use this
Code: [Select]
$puts(info_box_width,60)

$iflonger(%album%,$get(info_box_width),$trim($cut(%album%,$sub($get(info_box_width),3)))...,%album%)

code found somewhere in this thread.. change info_box_width value to adjust length

foo_uie_trackinfo

Reply #294
Thx once again empeethree 
I havent got my head into these strings yet....that has made my info box look neat now...sad I know but its the little things that annoy me 
Thanks 

foo_uie_trackinfo

Reply #295
Is there any way to get the current date and time, to be able to do comparisons; if I want my info box to show:

Last played 2 months ago, February 17th.

for example?

foo_uie_trackinfo

Reply #296
Quote
Thanks "Storm"

I dont have "A" now, but with the other code is still something wrong:



One more idea?

((((( Strictly4me )))))
[a href="index.php?act=findpost&pid=290814"][{POST_SNAPBACK}][/a]


hey, it looks like your usinng my track info panel as a base for your own. try using the newest version, there were a lot of little bugs i overlooked.

foo_uie_trackinfo

Reply #297
Quote
hey, it looks like your usinng my track info panel as a base for your own. try using the newest version, there were a lot of little bugs i overlooked.

Thats great "gob"!
But the problem is, i cann't remember where i can take it from?
You have a link to your new version? - Thanks. 

((((( Strictly4me )))))

foo_uie_trackinfo

Reply #298
Hey, I got a minor problem with the "Last Played" code in my track info.

Example: "Last played: 19.04.2020 05:14:24"

As you can see, the year is messed up. Also, I never played this track 5am in the morning. So.. could someone point out to me where the code fails?

Code: [Select]
$if($and(%play_date%,%play_time%),$substr(%play_date%,1,2).$substr(%play_date%,3,4).20$substr(%play_date%,5,6) $substr(%play_time%,1,2):$substr(%play_time%,3,4):$substr(%play_time%,5,6),$rgb(128,128,128)No date found)$char(10)

The code was written by Shadikka and posted here, so I just copied it.
Also, is there a way to change the date format to "April 19th 2005"?...

foo_uie_trackinfo

Reply #299
Maybe this can be useful. Could be improved upon and it is really simple, but I can't sit all day configuring my Foobar TAGZ... sadly. Hmm, I should write also that the code for printing the playcount is originally gob's but I modified it somewhat.

Meant to be used with black/dark gray background and white text.

Anyone who knows their shit, please do give comments on how to optimize it...

Here goes.

Code: [Select]
$if($strstr(%_trackinfo_mode%,playing),
20bcff$if(%_isplaying%,,)Now playing,
ffffffSelected track)
9a9a9amode.$char(10)$char(10)

$if(%_trackinfo_notrack%,
9a9a9aNo track$if(%_trackinfo_nowplaying%, playing).
9a9a9aStatistics unavailable.,

$if($and(%_trackinfo_nowplaying%,$not(%_isplaying%)),
9a9a9aPlayback stopped. ,

$if($or(%artist%,%title%,%album%),
[»$replace(%title%,'(',c2b1a3'(',')',')','[',c2b1a3'[',']',']')«]
[ 9a9a9aby »%artist%«]

$if(%tracknumber%,9a9a9a',' 9a9a9atrack 9a9a9a#
$if($strcmp($left(%tracknumber,1),0),$right(%tracknumber%,1),%tracknumber%)
)

[ 9a9a9afrom 9a9a9athe 9a9a9aalbum »
$replace(%album%,'(',c2b1a3'(',')',')','[',c2b1a3'[',']',']')«]

[ 9a9a9areleased 9a9a9ain %date%]
[9a9a9a, 9a9a9aoriginally
9a9a9areleased 9a9a9ain %origyear%]9a9a9a.,
Does not contain artist/album info.))

$if($and(%_trackinfo_nowplaying%,$not(%_isplaying%)),,
$if($or(%play_counter%,%rating%),$char(10)$char(10))

//// If rating exists, print it
$if(%rating%,069bffRated %rating%. )

//// If playcount exists, print in appropriate form
$if(%play_counter%,Played
$if($strcmp(%play_counter%,1),$puts(p1,1)once,
$if($strcmp(%play_counter%,2),twice,%play_counter% times)) 9a9a9a,
$if($not(%play_date%),$char(10)$char(10)666666Never played ))
$if($or(%play_counter%,$not(%play_date%)),since Dec 2004$if($get(p1),',',.))

////  Play date needs to be in DDMMYY format)
$if(%play_date%,$char(10)
$if($get(p1),9a9a9aon,$char(10)9a9a9aLast played)

//// Make day 01 -> 1
$puts(pday,$left(%play_date%,2))
$if($strcmp($left($get(pday),1),0),$puts(pday,$right($get(pday),1)))

//// Make 12th, 23rd, 74th, 1st, 42nd etc
$if($or($strcmp($get(pday),11),$strcmp($get(pday),12),$strcmp($get(pday),13)),$puts(xx,th),
$if($strcmp($right($get(pday),1),1),$puts(xx,st),
$if($strcmp($right($get(pday),1),2),$puts(xx,nd),
$if($strcmp($right($get(pday),1),3),$puts(xx,rd),
$puts(xx,th)))))

//// Name the months
$puts(pmonth,$select($substr(%play_date%,3,4),
Jan,Feb,March,April,May,June,July,Aug,Sept,Oct,Nov,Dec))

//// Fix year to tell millennium as well ()
$puts(pyear,$right(%play_date%,2))
$puts(pyear,$if($greater($get(pyear),80),19,20)$get(pyear))

$puts(ptime,$left(%play_time%,2):$substr(%play_time%,3,4))

//// Print date
$get(pmonth) $get(pday)$get(xx) $get(pyear)
$if(%play_time%, 9a9a9aat $get(ptime))9a9a9a.
)))

//// Playing a song? then print audioscrobbler status
$if(%_isplaying%,$char(10)$char(10)Playing. $ifgreater(
$muldiv(%_time_elapsed_seconds%,100,%_time_total_seconds%),50,
c2b1a3Audioscrobblered.,9a9a9aNon-audioscrobblered.))