Old 4th January 2006, 01:00   #41
Benski
Ben Allison
Former Winamp Developer
 
Benski's Avatar
 
Join Date: Jan 2005
Location: Brooklyn, NY
Posts: 1,057
Coming in 5.13 :)

More ATF features
code:

$pad($fill(*, %rating%), 5) - $padcut(%artist%, 25) - $padcut($if2(%title%,$filepart(%filename%)), 50) '['$lpad(%playcount%, 4)']'

Attached Images
File Type: png atf.png (26.6 KB, 1920 views)
Benski is offline   Reply With Quote
Old 4th January 2006, 01:44   #42
billyvnilly
Forum King, M.D.
 
billyvnilly's Avatar
 
Join Date: Mar 2004
Location: Detroit burbs
Posts: 3,379
Send a message via ICQ to billyvnilly Send a message via AIM to billyvnilly
OMG OMG OMG OMG OMG

This has to be the greatest news i've heard today.

Last edited by billyvnilly; 4th January 2006 at 03:29.
billyvnilly is offline   Reply With Quote
Old 13th January 2006, 21:34   #43
upsfeup
Member
 
Join Date: Feb 2005
Posts: 58
Is there a resource that states all tags codes and functions?

And benski? can you lift the veil a litle bit more? such as... any %_playlist_number% ? :twinkle_eyes: pleaaseee :twinkle_a_bit_more:
upsfeup is offline   Reply With Quote
Old 14th January 2006, 16:29   #44
Lion12
Senior Member
 
Lion12's Avatar
 
Join Date: Nov 2004
Location: Germany Markings: The Cheshire Cat
Posts: 168
Quote:
Originally posted by upsfeup
Is there a resource that states all tags codes and functions?
For shanehs advanced title formatting extended plugin?

You can find available tags in the toaster documentation -> advanced title formating:

%plpos% = The current position in the playlist

should do your job.

No, I'm not Lion King - neither related by marriage!
bookmarks: Joonas | DrO | shane.h
discussion bookmarks: DL | AL | JTFE | TRAP | Toaster | AWA | SUI | MlTree
Lion12 is offline   Reply With Quote
Old 27th January 2006, 16:48   #45
AsHopeDies
Senior Member
 
Join Date: Aug 2004
Posts: 107
Is there a way to display playcount if you don't rate?
Hm...acording to screenshot's it is...but not for me
AsHopeDies is offline   Reply With Quote
Old 28th January 2006, 22:46   #46
shaneh
Major Dude
 
Join Date: Jan 2004
Location: Brisbane, Australia
Posts: 1,193
Is there some reason why the winamp developers can't/aren't using the standard tags as devised by foobar2000?

http://wiki.hydrogenaudio.org/index....rmat_Reference

ie, the use of $fill instead of $repeat, and $ifstrequal instead of $strcmp etc. and omitting heaps of very useful and honestly not that difficult to implement functions. (eg $replace, and $len $left $right $directory $crlf (for other plugins) the list goes on). These wouldn't be too difficult to implement IMHO.

edit: Note some has actually been implemented: http://forums.winamp.com/showthread....20#post1854020

Last edited by shaneh; 28th January 2006 at 23:02.
shaneh is offline   Reply With Quote
Old 28th January 2006, 23:31   #47
Benski
Ben Allison
Former Winamp Developer
 
Benski's Avatar
 
Join Date: Jan 2005
Location: Brooklyn, NY
Posts: 1,057
Working on implementing some of these now. The main reason for the lack of support (and naming discrepancies) is simply the lack of requests. If you have any specific requests, feel free to contact me by PM, e-mail, or on the development support IRC channel.
Benski is offline   Reply With Quote
Old 29th January 2006, 01:47   #48
shaneh
Major Dude
 
Join Date: Jan 2004
Location: Brisbane, Australia
Posts: 1,193
There are a lot of tags from Toaster which would be good to not have to re-implement:
http://www.myplugins.info/gen_toaster.htm

ie things like "lastplayed" and "daysago" plus itd be good to have a $ifstream() and $isinml() function. Plus a %dir% field or function, maybe $dirpart(%filename%) etc. Plus all the stuff like %shuffle% and %vol% %status% etc. I think %playlistpos% and %playlistlength% would be necessary too, although I realise it might not make sense in all situations.

These might seem like strange things to want, as you wouldnt normally put them in the playlist, but for plugins like Toaster, or things like email signatures, or generally scripting winamp its pretty necessary. For example ATF is used by Toaster to work out what image to use for the cover (ie %dir%\Folder.jpg, C:\%artist%\image.jpg etc).

Its strange that you havent had many requests about ATF, as I get a lot, especially from people wanting to strip out tag strings from radio streams.

Although Im not exactly sure how ATF is being implemented in 5.2.. do we still have to handle all the fields ourselves? If so, itd be good to implement a lot of that stuff as functions instead so that Winamp can handle the bulk of it.

Ive done up a quick wiki which I will fill in over time:
http://www.myplugins.info/winamp-wik...tle_formatting
shaneh is offline   Reply With Quote
Old 29th January 2006, 11:32   #49
shaneh
Major Dude
 
Join Date: Jan 2004
Location: Brisbane, Australia
Posts: 1,193
Dynamic colours, too, would be a welcome addition. The ability to colourize the text in the playlist based on playcount, rating, last played, having yellow rating stars , $transition() etc would be nice. Im guessing it wouldnt cause too much of a performance hit or implementation issue. And the extra bling would help bring it up to scratch with other players.
shaneh is offline   Reply With Quote
Old 30th January 2006, 17:07   #50
Benski
Ben Allison
Former Winamp Developer
 
Benski's Avatar
 
Join Date: Jan 2005
Location: Brooklyn, NY
Posts: 1,057
shane -

I started to fill in little tidbits on your wiki.

What do you think about replacing the %tags% with $meta(blah) for stuff that's supposed to be queried from the input plugin?
Benski is offline   Reply With Quote
Old 31st January 2006, 12:16   #51
shaneh
Major Dude
 
Join Date: Jan 2004
Location: Brisbane, Australia
Posts: 1,193
I think thats probably a good idea. The %artist% as determined by the media library or winamp, may be quite different from the $meta(artist) as returned by the input plugin - and its good to have the distinction. Theres input plugins that may have no concept of "artist" yet the media library can figure one out anyway, in this case %artist% would return something, whereas $meta(artist) would have no meaning.

I see no reason not to do it that way. Theres just a couple small things which may or may not be an issue:

would "[the wmid is : $meta(wm/id)]" work as expected? (note the squate brackets).

General plugins have no way to override the fields if they wanted to - winamp would bypass the 'callback' for ATF processing as it is a 'function' rather than a 'field'. This probably isnt an issue.

Speaking of which, it would be good if ATF processing allowed you to offload to winamp the atual handling of unknown fields for a particular file. At the moment you have to take care of every possible tag - ie any plugins that do ATF processing will not support the new '%folder%' tag without being re-written. Actually, %folder% may be better written as a function, ie $folder(%filename%).
shaneh is offline   Reply With Quote
Old 31st January 2006, 15:03   #52
Benski
Ben Allison
Former Winamp Developer
 
Benski's Avatar
 
Join Date: Jan 2005
Location: Brooklyn, NY
Posts: 1,057
the WM/stuff already works (should work in 5.12, also)
(see attached)
[edit: nevermind, i misinterpreted your question]

For 5.2, I've implemented a "fallback" API for title formatting. That is, it will call your tag function, and fall back to Winamp's tag function if you return 0 (but not an empty string, which is supposed to signify "deliberately empty"). A 5.2 SDK is forthcoming. I don't want to give the details out yet because the whole thing isn't finalized. I'm hoping to also allow plugins to "register" additional $functions, but I don't know if that's going to be ready in time or not.
Attached Images
File Type: png tags.png (70.4 KB, 394 views)
Benski is offline   Reply With Quote
Old 31st January 2006, 17:35   #53
Benski
Ben Allison
Former Winamp Developer
 
Benski's Avatar
 
Join Date: Jan 2005
Location: Brooklyn, NY
Posts: 1,057
Shane - Beta Build 393 has some tag function updates.
Benski is offline   Reply With Quote
Old 1st February 2006, 11:13   #54
shaneh
Major Dude
 
Join Date: Jan 2004
Location: Brisbane, Australia
Posts: 1,193
Cool, Ill look into it. Ive taken a quick look and seems to be some useful functions there.
shaneh is offline   Reply With Quote
Old 3rd February 2006, 19:33   #55
qwert73
Senior Member
 
Join Date: Jun 2004
Posts: 118
2 days ago i discovered on the site of shaneh that ATF improvement doesn't mean just some tags and some functions more (read the changelog of 5.2 beta) but a whole set of functions close to foobars TAGZ. I am fascinated and very curios how far the new ATF language will go.

Is it planned to use it in ML too??
I mean something similar like COLUMNS_UI where the columns can be defined. For example: artist = $if2(%album artist%,%artist%) and title = $if(%album artist%, %artist% - %title%,%title%). Or columns with calculated content: f.e. daily plays or hotness.
qwert73 is offline   Reply With Quote
Old 3rd February 2006, 21:39   #56
CraigF
Passionately Apathetic
Administrator
 
CraigF's Avatar
 
Join Date: May 2000
Location: Hell
Posts: 5,435
winamp supported "tagz" before foobar, since peter put it into winamp in the first instance. 5.2 includes a long awaited updated to tagz.

CraigF is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > Winamp Development

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