Old 23rd October 2003, 20:44   #1
fredou64
Junior Member
 
Join Date: Oct 2003
Posts: 24
advanced title formatting

hello

I test winamp 5 béta and my wish is to manage to align (in colums) all the mp3 tags those are in playlist.
like that:

artist1 - title1 - album1 ...
artist2 - title2 - album2 ...
artist3 - title3 - album3 ...
etc..

$padcut is not enough to that....

i think there are not enough functions to configure the title display in the playlist.

i would like to find some of these functions for exemple...
in fact i would like manage to change several things in the playlist (color font, alignement etc...)

* filename/location display:

- %__bitrate% - bitrate in kbps
- %__samplerate% - samplerate in Hz
- %__channels% - number of channels
- %__extrainfo% - file format specific informations

- %_filename% - filename w/o extension
- %_filename_ext% - filename incl. extension
- %_path% - full path to file
- %_path_raw% - full url-style path
- %_directoryname% - the directory in which the file resides

- %_subsong% - current subsong index starting from 0 (tfmx/sid/ogg, but shown for every filetype)


* currently playing track stats:

- %_isplaying% - true for the currently playing track, false for all others (playlist only)
- %_playlist_number% - the playlist number (playlist only)

- %_length% - the track length
- %_length_seconds% - the track length in seconds

- %__replaygain_track_gain% - replaygain's track based volume adjustment in dB, it's only present if you have applied track or album gain information to that track
- %__replaygain_track_peak% - highest peak of track in relation to digital fullscale (FullScale=1) for non RG'd track, it's only present if you have applied track or album gain information to that track
- %__replaygain_album_gain% - replaygain's album based volume adjustment in dB, it's only present if you have applied album gain information to that track
- %__replaygain_album_peak% - highest peak of the album in relation to digital fullscale (FullScale=1) for non RG'd album, it's only present if you have applied album gain information to that track

note: the replaygain information is lost after deleting the metadata for formats that don't store it in tags, eg. modules



_colors (playlist only)_


- XXXXXX - set text color to XXXXXX, where XXXXXX is new text color in hex; inverts the color on selected fields
- XXXXXX|YYYYYY - set text color to XXXXXX on non-selected fields and to YYYYYY on selected fields
-  - reset to default color

note: additional playlist color settings are under preferences > display



_title formatting functions_


* filename/misc:

- $ext(A) - "$ext(%_path%)" displays the file extension
- $filename(A) - "$filename(%_path%)" displays the filename, the same as %_filename%
- $null() - does nothing


* string manipulations:

- $strcmp(A,B) - is true if A and B are equal; eg. "$if($strcmp(%__bitrate%,128),bleh,blah)" displays "bleh" if the bitrate is 128, otherwise displays "blah"
- $stricmp(A,B) - the same as $strcmp but not case sensitive

- $strstr(A,B) - displays the position of substring B in string A, eg. $strstr(hello,lo) displays 4
- $strlchr(A,B) - the same as $strchr(A,B)

- $strchr(A,B) - displays the first occurrence of character B in string A, eg. "$strchr(hello,l)" displays 3
- $strrchr(A,B) - displays the last occurrence of character B in string A, eg. "$strrchr(hello,l)" displays 4

- $replace(A,B,C,D,E,..) - replaces all occurrences of substring B in string A with C and all occurrences of substring C with D and so on, eg. "$replace(hellohello,hel,k)" displays "kloklo"

- $substr(A,x,y) - displays a substring of string A starting at position x and ending at position y, eg. "$substr(hello,4,5)" displays "lo"

- $repeat(A,x) - repeats string A x times (including original), eg. "$repeat(hello,3)" displays hellohellohello

- $right(A,x) - displays x chars from the right of string A, eg. "$right(hello peter,5)" displays "peter"
- $left(A,x) - displays x chars from the left of string A, eg. "$left(hello peter,5)" displays "hello"

- $abbr(A) - displays an abbreviation of string A, eg. "$abbr(%album%)" converts "Final Fantasy VI" to "FFVI"
- $abbr(A,x) - displays an abbreviation of string A if A is longer than x characters, otherwise displays the full value of A, eg. "$abbr(%album%,10)"

- $lower(A) - displays string A in lowercase, eg. "$lower(%title%)"
- $upper(A) - displays string A in uppercase

- $caps(A) - converts the first letter in every word of string A to uppercase and all other letters to lowercase, eg. "blah BLAH" -> "Blah Blah"
- $caps2(A) - similar to $caps, but leaves uppercase letters as they are, eg. "blah BLAH" -> "Blah BLAH"

- $cut(A,x) - truncates string A to x characters, eg."$cut(hello,4)" displays "hell"

- $rot13(A) - rot13 "encodes"/"decodes" string A, eg. "$rot13(foobar)" displays "sbbone" and "$rot13(sbbone)" displays "foobar"

note: rot13 replaces each Latin letter with the one 13 places forward, it can be used for encoding and decoding because it's self-inverse (the alphabet has 26 letters)


* math functions:

- $add(x,y,z,..) - displays sum of x + y + z... and so on, outputs only integers
- $sub(x,y,z,..) - substracts x from y and z from the result and so on, outputs only integers
- $mul(x,y,z,..) - multiplies x with y and the result with z and so on, outputs only integers
- $div(x,y,z,..) - divides x by y and the result by z and so on, outputs only integers
- $mod(x,y,z,..) - performs modular reductions (displays the remainder of the division of x by y), eg. "$mod(12,5)" displays 2
- $min(x,y,z,..) - displays the lowest value
- $max(x,y,z,..) - displays the biggest value
- $hex(x,y) - converts x to HEX with y digits
- $len(A) - displays the length of string A


* variable functions:

- $put(x,A) - sets x to string A and displays x, strings are evaluated on declaration - doesn't take changes to fields into account before $get() is called
- $puts(x,A) - same as put but doesn't display anything (silent)
- $get(x) - gets the value of x displays it, x will not be displayed if $get is used inside of another function, needs x to be set by $put or $puts


* logical operations:

- $xor(x,y,z...) - eXclusive OR, is true if either x, y or z is true, but not all three or two of them
- $or(x,y,z,..) - is true if either x, y, z, all three or two of them are true
- $and(x,y,z,..) - is true if x, y and z are true
- $not(x) - negates the result, it returns 0 if x is true, otherwise 1


* arrangement/padding:

- $num(x,y) - pads number x with zeros up to y characters (useful for track numbers), eg. $num(%tracknumber%,3) displays 001 for the first track
- $dec(x,y) - the same as $num(x,y)
- $pad(A,x) - pads string A with spaces up to x characters
- $pad_right(A,x) - aligns right in x characters
- $padcut(A,x) - pads A to x characters and truncates it to x if longer
- $padcut_right(A,x) - pads string A right aligned in x chars and truncates it to x if longer


* if/else functions:

- $if(A,B,C) - if A contains at least one valid tag, displays B, otherwise displays C; eg. "$if(%artist%,%artist%,unknown artist)" displays artist name if present; otherwise displays "unknown artist"; note that "$if(A,A,)" is equivalent to "[A]" (see below)
- $if2(A,B) - A is displayed if it contains at least one valid tag, otherwise B is displayed; eg. "$if2(%artist%,unknown artist)"

- $ifgreater(x,y,A,B) - if x is greater than y displays A, otherwise B
- $iflonger(A,B,C,D) - if A is longer than B (more characters) displays C, otherwise D

- $shortest(A,B,C,..) - compares lengths of output strings produced by A,B,C,.. and displays the shortest one, eg. "$shortest(%title%,%comment%)" displays either title if it's shorter than comment; otherwise it displays comment
- $longest(A,B,C,..) - the same as $shortest but displays the longest string



_reserved characters_


- [ ... ] - displays contents of brackets only if at least one of fields referenced inside has been found, it doesn't display the block either if it doesn't contain any fields, eg. "%artist% - [%album% / ]%title%" hides [] block if album field is not present
- ' (single quotation mark) - outputs raw text without parsing, eg, 'blah$blah%blah[][]' outputs the contained string and ignore all reserved characters (%,$,[,]) in it; you can use this feature to insert square brackets for an example.
- '' (two single quotation marks) - displays a single quotation mark, similar: $$ and %%
- (tab, playlist only) - right aligned text that is displayed on top of the other text, eg. " %_length%"



_example_


- [%artist% - ][$abbr(%album%,10)[ %tracknumber%] / ]%title%[ %streamtitle%]
fredou64 is offline   Reply With Quote
Old 23rd October 2003, 21:33   #2
Lion King
Major Dude
 
Join Date: Jan 2001
Posts: 1,670
this is an outdated version of foobar2000's tagz help, most of this stuff doesn't work in winamp

$padcut works fine with a fixed width font, look a the screenshot (based on some title formatting bits that fredou64 posted elsewhere)
Attached Images
File Type: png playlist.png (24.1 KB, 405 views)
Lion King is offline   Reply With Quote
Old 23rd October 2003, 22:27   #3
fredou64
Junior Member
 
Join Date: Oct 2003
Posts: 24
great!

here is my mail

fredou64_@hotmail.com

what did you wrote? that?!

$if(%title%,N° $dec(%tracknumber%,2) $padcut(%artist%,20) - $padcut(%title%,30) / Album : $padcut(%album%,30) / Genre : %genre%,$filepart(%filename%))

give me the exactly instructions you wrote please and a copied-pasted of the listing of the file pledit.txt i must modify for the police..

thanks
fredou64 is offline   Reply With Quote
Old 23rd October 2003, 22:52   #4
fredou64
Junior Member
 
Join Date: Oct 2003
Posts: 24
thanks a lot

i managed with another skin!
you were right!!

but now how change police in new skin of winamp 5?
that is the question!

an idea?
Attached Images
File Type: jpg screenshot008.jpg (36.4 KB, 367 views)
fredou64 is offline   Reply With Quote
Old 23rd October 2003, 22:56   #5
fredou64
Junior Member
 
Join Date: Oct 2003
Posts: 24
sorry

police in french = font in english...
fredou64 is offline   Reply With Quote
Old 23rd October 2003, 23:04   #6
Lion King
Major Dude
 
Join Date: Jan 2001
Posts: 1,670
like i said in the other thread i have no idea how to change the playlist font in the "modern" skin, sorry
Lion King is offline   Reply With Quote
Old 23rd October 2003, 23:19   #7
fredou64
Junior Member
 
Join Date: Oct 2003
Posts: 24
what a shame...........
fredou64 is offline   Reply With Quote
Old 24th October 2003, 11:33   #8
iron2000
Senior Member
 
iron2000's Avatar
 
Join Date: Mar 2002
Location: Singapore
Posts: 391
I tried for hours but I can't get mine to display straight columns.
What fonts are fixed-width?

Thanx
iron2000 is offline   Reply With Quote
Old 24th October 2003, 12:09   #9
fredou64
Junior Member
 
Join Date: Oct 2003
Posts: 24
Courier New

but the problem is to find the place to change this font..

if you know you can tell us..

thanks
fredou64 is offline   Reply With Quote
Old 24th October 2003, 14:23   #10
fredou64
Junior Member
 
Join Date: Oct 2003
Posts: 24
greaaaaaaaaaaaaat

Lion King

Great!!!!!!!!!!!!!

i've finally get what i wanted with the modern skin of winamp...

see the sreenshot...
Attached Images
File Type: jpg screenshot009.jpg (69.7 KB, 448 views)
fredou64 is offline   Reply With Quote
Old 24th October 2003, 15:01   #11
Lion King
Major Dude
 
Join Date: Jan 2001
Posts: 1,670
and how did you do it?
Lion King is offline   Reply With Quote
Old 24th October 2003, 15:50   #12
fredou64
Junior Member
 
Join Date: Oct 2003
Posts: 24
i used a program which allows to see in the winamp.exe and i found what i want and modify what i want.

fredou64 is offline   Reply With Quote
Old 25th October 2003, 01:06   #13
sanosuke
Major Dude
 
sanosuke's Avatar
 
Join Date: Dec 2001
Location: Singapore
Posts: 1,891
gee is the trend today to use such programs to modify the main winamp.exe?

Big-assed signature deleted by errr.. whats his name again??
sanosuke is offline   Reply With Quote
Old 3rd November 2003, 15:53   #14
Dipso
Senior Member
 
Dipso's Avatar
 
Join Date: Aug 2002
Location: Norway
Posts: 379
Well it IS how skinning started I don't know, but i have often tended to find my own way around problems when the software isn't working the way i want it to.. at one time i used custom/hacked drivers for my soundcard, mouse, tv-card and multimedia keyboard.

Right now im using custom software and drivers for my logitec mouse and my tv-card. One of the beuties of computers is that you can tweak them to your liking. One of the things that are threatened by the DMCA, RIAA and Microsoft (Paladium (DRM)).

On the title formating topic, there should seriously be some way of getting this alignment right without hacking the exe. And my bet is its gonna get fixed

Phear the headbanging llama!!!

http://dipso.deviantart.com <- Art, Graphics, Photography.
Dipso is offline   Reply With Quote
Old 3rd November 2003, 17:19   #15
DJ Egg
Techorator
Winamp & SHOUTcast Team
 
Join Date: Jun 2000
Posts: 35,780
It's easy to do for classic skins.
Just change the font= line in pledit.txt inside the .wsz skin

Like LK, I've also got no idea how to change the playlist font for modern skins (which doesn't involve hacking winamp.exe). Maybe it's a fixed font, or maybe a WAL skinner can reveal all to us?
Whatever the case, if it's not already possible, then this is one feature that should definitely be implemented asap.
DJ Egg is offline   Reply With Quote
Reply
Go Back   Winamp & SHOUTcast Forums > Winamp > Winamp Wishlist

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump