Go Back   Winamp & Shoutcast Forums > Winamp > Winamp Technical Support

Reply
Thread Tools Search this Thread Display Modes
Old 13th January 2015, 18:27   #1
Supra107
Member
 
Supra107's Avatar
 
Join Date: Oct 2014
Posts: 64
Adv. Title Formatting ignoring "The" at the beginning of title

Hi, can anyone give me the form of advanced title formatting that will delete/ignore the "The" at the beginning of titles?
Supra107 is offline   Reply With Quote
Old 13th January 2015, 20:34   #2
Pawel
Moderator
 
Pawel's Avatar
 
Join Date: Aug 2004
Location: Poland
Posts: 533
Send a message via ICQ to Pawel
Maybe you should use $replace

For example:
$replace(%title%,The, )

It will replace all instances of "The" in title on empty string "" (I don't know method that will replace only first instance).
Pawel is offline   Reply With Quote
Old 14th January 2015, 01:37   #3
ryerman
Major Dude
 
ryerman's Avatar
 
Join Date: Mar 2010
Location: Canada
Posts: 741
Try this:
code:
$IfStrEqual2($left(%title%,4),the ,$right(%title%,$sub($len(%title%),4)),%title%)

Windows 10 Home, 64 bit, Winamp 5.666, Bento Skin
ryerman is offline   Reply With Quote
Old 14th January 2015, 12:58   #4
Supra107
Member
 
Supra107's Avatar
 
Join Date: Oct 2014
Posts: 64
Nope, doesn't work.

I mainly wanted something like in Media Library so it will ignore it and use the first letter of next word, but I wanted it to work while loading files to playlist, because I have Winamp and my music on my pendrive and for example, when I'm at school and I have some free time I plug up my pendrive and headphones to the computer, boot up my portable Winamp, add the folder from my drive that usually changes it's letter and listen to music.

So, if adv. title formatting fails, how to make a portable local library?
Supra107 is offline   Reply With Quote
Old 14th January 2015, 14:14   #5
ryerman
Major Dude
 
ryerman's Avatar
 
Join Date: Mar 2010
Location: Canada
Posts: 741
It works on my system. (see attachment)

When you change the ATF string, Winamp asks if you want to update the titles in the current playlist.
If you do, only the titles in the Playlist Editor are updated, not the Library playlists.
They maintain the "old" formatting, even in the Playlist Editor when enqueued.

To update the titles in Library playlists, open each playlist, select all items, and click "Rebuild titles on selection" (on the Misc menu, at the bottom)
Attached Thumbnails
Click image for larger version

Name:	Remove 'The ' from beginning of Title.jpg
Views:	248
Size:	51.5 KB
ID:	51627  

Windows 10 Home, 64 bit, Winamp 5.666, Bento Skin
ryerman is offline   Reply With Quote
Old 14th January 2015, 15:44   #6
Supra107
Member
 
Supra107's Avatar
 
Join Date: Oct 2014
Posts: 64
I did reloaded the playlist, even readded the test file, and still nothing.

Also, I don't use the tags of the song, i sort them by the filename, in the form of "Artist - Title.mp3", and I have no bloody idea how the ATF works.
Supra107 is offline   Reply With Quote
Old 14th January 2015, 18:02   #7
ryerman
Major Dude
 
ryerman's Avatar
 
Join Date: Mar 2010
Location: Canada
Posts: 741
Right
That format string works only when ATF is enabled and only if the tag field "Title" is used.

But ATF can also be used to create titles by parsing the file path.
Try this:
code:
$puts(MyTitle,$filepart(%filename%))$IfStrEqual2($left($get(MyTitle),4),the ,$right($get(MyTitle),$sub($len($get(MyTitle)),4)),$get(MyTitle))

And make sure ATF is enabled: Preferences > General Preferences > Titles > check-mark "Use advanced title formatting when possible"
Click "ATF Help" on the same page to see the documentation.

Windows 10 Home, 64 bit, Winamp 5.666, Bento Skin
ryerman is offline   Reply With Quote
Old 14th January 2015, 18:54   #8
Supra107
Member
 
Supra107's Avatar
 
Join Date: Oct 2014
Posts: 64
Ah, it works fine! Except the stuff with tags are named by the filename, but that's fine.

Thank you for your help
Supra107 is offline   Reply With Quote
Old 14th January 2015, 19:35   #9
Aminifu
Forum King
 
Aminifu's Avatar
 
Join Date: Aug 2011
Location: Phoenix, AZ
Posts: 4,818
Winamp is designed to use tags and some of it's best features depend on having proper tags. By default some options will try to make tags if they do not exist. If you don't want Winamp to use tags, you must disable these options and remove all tags from your music files. This will make some parts of Winamp useless or more difficult to use.

Winamp Pro v5.666.3516 fully-patched - Quinto Black CT v3.6 skin
Windows 10 Home 64-bit v21H2 desktop - Logitech Z906 5.1 speaker system
Aminifu is offline   Reply With Quote
Old 14th January 2015, 19:48   #10
Supra107
Member
 
Supra107's Avatar
 
Join Date: Oct 2014
Posts: 64
Anyways, I wanted that setting only for my Winamp on the USB stick.

Oh, and is there a program (or Total Commander plugin) for adding tags basing of the filenames?
Supra107 is offline   Reply With Quote
Old 14th January 2015, 20:35   #11
ryerman
Major Dude
 
ryerman's Avatar
 
Join Date: Mar 2010
Location: Canada
Posts: 741
Quote:
Originally Posted by Supra107 View Post
Oh, and is there a program (or Total Commander plugin) for adding tags basing of the filenames?
Many. Maybe hundreds.

I use Mp3tag.

Windows 10 Home, 64 bit, Winamp 5.666, Bento Skin
ryerman is offline   Reply With Quote
Old 28th January 2015, 17:59   #12
Supra107
Member
 
Supra107's Avatar
 
Join Date: Oct 2014
Posts: 64
I'm reviving the thread, I've used Mp3tag on my music collection and there is a problem.

1. The first ATF preset shown here only shows title. When I change %title% to %artist%, it only shows the artist name, but it works.

2. I have bunch of songs with only a title, and I want them to blend with the ones with artist and title. ie:

I don't want them to be like this:
1.Title
2.Title
3.Artist - Title
4.Artist - Title

I want them to be like this:
1.Title
2.Artist - Title
3.Title
4.Artist - Title

But if the ATF will change the artist and there is none present, i think it will be like:
- Title

As there is no artist, or it will freak out.

So, yeah, that's a problem.
Supra107 is offline   Reply With Quote
Old 19th February 2015, 23:30   #13
Old Skool
Junior Member
 
Join Date: Feb 2015
Posts: 9
Is there a way to remove the artist name from being displayed in the playlist when the artist name is part of the actual file name? If so could someone please tell me how to configure that string.

Example: Tom Petty and the Heartbreakers - Built to Last.mp3 is the actual filename, as well as the song title meta data. I want to only display the name of the song without the artist. So it shows Built to Last only on the display.

Using 5.66 on windows 7 64bit and running taskbar intergration add in.


Thanks
Old Skool is offline   Reply With Quote
Old 20th February 2015, 11:53   #14
ryerman
Major Dude
 
ryerman's Avatar
 
Join Date: Mar 2010
Location: Canada
Posts: 741
Quote:
Originally Posted by Old Skool View Post
Is there a way to remove the artist name from being displayed in the playlist when the artist name is part of the actual file name? If so could someone please tell me how to configure that string....
I bet you' re still using the default string.
Experiment by creating your own string.

Make sure ATF is enabled: Preferences > General Preferences > Titles > check-mark "Use advanced title formatting when possible"
Click "ATF Help" on the same page to see the documentation.

Windows 10 Home, 64 bit, Winamp 5.666, Bento Skin
ryerman is offline   Reply With Quote
Old 23rd February 2015, 02:49   #15
Old Skool
Junior Member
 
Join Date: Feb 2015
Posts: 9
I have looked myself sideways and that stuff has fried my brains. I have experimented a lot and nothing I have come up with removes the artist name from displaying. I did however get the artist name to show up three times in the playlist for one song. I have tried $trim(%artist%) and so on and have come up with either the name duplicated or syntax errors. I don't want to go through my collection and rename every one of the files.

Any help is appreciated.
Old Skool is offline   Reply With Quote
Old 23rd February 2015, 16:57   #16
ryerman
Major Dude
 
ryerman's Avatar
 
Join Date: Mar 2010
Location: Canada
Posts: 741
code:
$trim(%artist%)
is a legitimate ATF string and will not cause a syntax error.
It will return the value of the ARTIST field with all leading and trailing spaces removed.
But you want the song TITLE.
Perhaps you misread the documentation.

You have made things difficult for yourself by using the TITLE field to contain the file name.
It would be logical to use the tag fields for there intended purpose and thereby improve the flexibilty of formatting titles.
I suggest re-tagging your files.

In the meantime, try this:
code:
$trim($split(%title%,-,2))

Windows 10 Home, 64 bit, Winamp 5.666, Bento Skin
ryerman is offline   Reply With Quote
Old 23rd February 2015, 17:37   #17
Aminifu
Forum King
 
Aminifu's Avatar
 
Join Date: Aug 2011
Location: Phoenix, AZ
Posts: 4,818
Hi Old Skool,

So far, computer programs can only respond to a limited number of circumstances that correspond to a fixed set of rules. If your file names and/or tags do not follow a single consistent set of rules that Winamp understands, then there is not much Winamp can do that will work in all cases.

You can try using "MP3Tag" to automatically rename or re-tag files based on current tags or names, but I would be very careful doing that and be sure to have backups of the original files.

Winamp Pro v5.666.3516 fully-patched - Quinto Black CT v3.6 skin
Windows 10 Home 64-bit v21H2 desktop - Logitech Z906 5.1 speaker system
Aminifu is offline   Reply With Quote
Old 24th February 2015, 00:33   #18
Old Skool
Junior Member
 
Join Date: Feb 2015
Posts: 9
I'll try that string ryerman. I appreciate the pointer, like I said I looked at the ATF string help file for a few days before posting for assistance. I am stubborn that way and like trying to figure stuff out.

Amiinfu renaming my collection has been an ongoing process. I started at the beginning of November an dam still working on my main directory collection of over 6900 files give or take a few hundred. I did have them named (artist/groupname)-Title_remaining_words.mp3 I have them all renamed artist/group - title no underscores.mp3

I use mp3tag as well as tag&rename and have had a few instances where my tag/title got wacked out. I am nearing the end of the whole renaming process and do not want to start over. I would just like to see just the artist name in the taskbar plugin I am using do the scrolling because I can staticly put the album, artist, track number and year in the display. It scrolls the song name which also has the artist/group name.

In other words, "I wanna make it pretty."
Old Skool is offline   Reply With Quote
Old 26th February 2015, 10:54   #19
Old Skool
Junior Member
 
Join Date: Feb 2015
Posts: 9
That string didn't work. I tried a bunch more that made sense that it would do what I want, but it didn't. Like the if2(%title%(%contains%,%artist%)$cut and so forth, also tried a bunch more. I think it's not going to let me do it the way I would like it to do. I'm still plugging away at the formatting to see if by chance I stumble across the correct formatting.

Thanks again ryerman.
Old Skool is offline   Reply With Quote
Old 26th February 2015, 19:45   #20
Aminifu
Forum King
 
Aminifu's Avatar
 
Join Date: Aug 2011
Location: Phoenix, AZ
Posts: 4,818
Hi Old Skool,

If your title tag contains the artist name and song title separated by 3 characters (i.e. " - ") and these 3 characters do not occur together in the artist's name, then you should be able to extract the song title from the title tag by combining 3 string operations.

What you need to do is put together an expression that will determine the number of characters in the %title% string ($len), subtract the number where the " - " starts in the %title% string ($strstr) + 2 to get the number of characters left in the %title% string (i.e. the number of characters in the song title), and use the $right string operation to return this number of characters from the end of the %title% string (i.e. the song title).

In other words, say the artist name is 12 characters and the song title is 16 characters. So the total string length is 31 characters. The " - " starts at character number 13. 13 + 2 = 15. 31 - 15 = 16. The 16 characters at the end of the string are the song title.

Winamp Pro v5.666.3516 fully-patched - Quinto Black CT v3.6 skin
Windows 10 Home 64-bit v21H2 desktop - Logitech Z906 5.1 speaker system
Aminifu is offline   Reply With Quote
Old 27th February 2015, 03:21   #21
ryerman
Major Dude
 
ryerman's Avatar
 
Join Date: Mar 2010
Location: Canada
Posts: 741
Quote:
Originally Posted by Old Skool View Post
That string didn't work. I tried a bunch more that made sense that it would do what I want, but it didn't. Like the if2(%title%(%contains%,%artist%)$cut and so forth, also tried a bunch more. I think it's not going to let me do it the way I would like it to do. I'm still plugging away at the formatting to see if by chance I stumble across the correct formatting.

Thanks again ryerman.
Aminifu and I are gently trying to help you learn the ATF code but apparently you are completely baffled!
code:
if2(%title%(%contains%,%artist%)$cut

Are you kidding me!! That has at least 5 syntax errors.
And what is "%contains%"?

You can't just skim the documentation and then create something that makes sense to you. The string must make sense to Winamp.
The ATF code is like any other computer code: it must be used with correct syntax and with adherence to its own internal logic.
Don't stumble. Be methodic and use "trial and error". Start small and build onto what works.

Aminifu's instructions can be translated into this string:
code:
$right(%title%,$sub($len(%title%),$strstr(%title%, - ),2))

That works, just as the string I suggested in post #16 works. (As usual, there is more than one way to produce the desired result.)

If neither string works for your files then perhaps your files are not tagged as you indicated.
To be sure, you can post the desired title for a particular file and upload the file to a file sharing site.
Include a link to the file in your post and we can check the files tag.

Windows 10 Home, 64 bit, Winamp 5.666, Bento Skin
ryerman is offline   Reply With Quote
Old 27th February 2015, 15:01   #22
Aminifu
Forum King
 
Aminifu's Avatar
 
Join Date: Aug 2011
Location: Phoenix, AZ
Posts: 4,818
Hi ryerman,

I wanted Old Skool to do the formatting himself, but you are probably right that it is better to provide the expression for him at this stage of his learning (and not specifying the $sub arithmetic operation might have thrown him off).

When Old Skool said your suggestion in post #16 didn't work, I thought $split was objecting to the hypen and wanted a "/" instead. I should know better since you're the reigning ATF string formatting expert.

Either Old Skool copied the expression incorrectly or his file's title tag is not as indicated. He should provide a file for examination.

Winamp Pro v5.666.3516 fully-patched - Quinto Black CT v3.6 skin
Windows 10 Home 64-bit v21H2 desktop - Logitech Z906 5.1 speaker system
Aminifu is offline   Reply With Quote
Old 27th February 2015, 18:40   #23
ryerman
Major Dude
 
ryerman's Avatar
 
Join Date: Mar 2010
Location: Canada
Posts: 741
Hi Aminifu

Yeah, I agree that it is better to encourage people to learn by doing.
I felt a little guilty about providing the string based on your hints, but I'm over it now.
FYI, my first suggestion
code:
$trim($split(%title%,-,2))

will crash Winamp under certain conditions.
I will make a bug report.

Thanks for the compliment but rather than an expert, I'm just stubborn and persistent.
I try to be methodical and use "trial and error", as I encouraged Old Skool.

I'm betting an example file from Old Skool will be helpful.

Windows 10 Home, 64 bit, Winamp 5.666, Bento Skin
ryerman is offline   Reply With Quote
Old 28th February 2015, 20:08   #24
Old Skool
Junior Member
 
Join Date: Feb 2015
Posts: 9
I apologize, The string you originally gave me works perfectly and exactly how it is meant to reyrman.
Quote:
$trim($split(%title%,-,2))
I thought I had posted that I was trying to get it to not display the artist who is in the title of the song and filename for the plugin I am using. I assumed that the strings for the plugin were the same as used in Winamp, because the plugin uses the same style of formatting, i.e. %artist% displays the artist, %track% shows track, %album% shows album, etc. etc.

I haven't been running around just trying whatever made sense to me in my head, or skimming through the help file. I have been trying what I thought I read in the ATF help file along with seeing formatting inside of Mp3Tag as Aminfu had suggested. I must have looked at something on one monitor and went to write it in another monitor and reversed something I had saw in the reference of what I wanted.
Quote:
if2(%title%(%contains%,%artist%)$cut
That is more than likely where the came from.

I have been working on getting the tags into back into my mp3 main directory since November and have been a little brain fried. I had ripped all the meta data out of the files many many many years ago. Plus I had them named (Artist/Group)-Song_Title.mp3 and if it was like a live version or remix it was named(Artist/Group)-Song_Title_{Live/Remix}.mp3. I decided to clean the directory up and rename and tag them again. I have been using Mp3Tag, along with Tag&Rename to do this and it has been a long drawn out process.

I will be happy to upload a file for you guys to check out and make sure that it does have the correct tag and is done properly. What I have been putting in is the Artist, Album, Year, Original Artist, Album Art and encoded by me. And of course the filename has the artists/groups name in it, so it is in the title as well. I have also been wondering what bitrate would be the best sound for my system as well as other peoples including portable mp3 players. I have always used the 128/44 joint and Lame 3.99 for the encoder.

https://www.sendspace.com/file/e4ak4a


Let me know. Again thanks for your time and help.

Oh, and the plugin is Windows Taskbar Integration 2.0 and I already sent them an email on how to as well. You guys have been a great help.
Old Skool is offline   Reply With Quote
Old 28th February 2015, 22:53   #25
Aminifu
Forum King
 
Aminifu's Avatar
 
Join Date: Aug 2011
Location: Phoenix, AZ
Posts: 4,818
Winamp's ATF, the Windows Taskbar Integration plug-in, and Mp3Tag all use different methods for formatting text. The fact that some of the variables are the same is just a coincidence. These 3 text string building formats are not interchangeable with each other.

You did mention the plug-in in post #13, but you asked how to prevent the artist name from being displayed in the playlist (the Winamp playlist was assumed). The Windows Taskbar Integration plug-in does not support stripping text from a file's title tag.

Winamp Pro v5.666.3516 fully-patched - Quinto Black CT v3.6 skin
Windows 10 Home 64-bit v21H2 desktop - Logitech Z906 5.1 speaker system
Aminifu is offline   Reply With Quote
Old 1st March 2015, 14:07   #26
ryerman
Major Dude
 
ryerman's Avatar
 
Join Date: Mar 2010
Location: Canada
Posts: 741
Quote:
Originally Posted by Old Skool View Post
...I will be happy to upload a file for you guys to check out and make sure that it does have the correct tag and is done properly. What I have been putting in is the Artist, Album, Year, Original Artist, Album Art and encoded by me. And of course the filename has the artists/groups name in it, so it is in the title as well.....
The only reason I wanted an example file was to make sure that the %title% field was formatted as you said.
That is now unnecessary since you have confirmed that my suggested ATF string works.

But I have learned that there is a bug in the $trim function that may crash Winamp.
So use the suggested string in post #21.

Many people create the tag first, with all the desired fields. (eg. %artist%, %albumartist%, %title%, etc.)
The file is renamed last, using the tag values, according to whatever format you want.

When you say "And of course the filename has the artists/groups name in it, so it is in the title as well.", it sounds as if you think the title must be the filename.
But %title% usually contains only the song title. The filename can be anything you want.
%title% and filename are usually different.

Windows 10 Home, 64 bit, Winamp 5.666, Bento Skin
ryerman is offline   Reply With Quote
Old 1st March 2015, 17:33   #27
Old Skool
Junior Member
 
Join Date: Feb 2015
Posts: 9
No I know that the naming is artist/group - songname.mp3 and with Tag&Rename you can (and I have been) using the "Get Tags from File Name" option which puts the title as the title for that section. Needless to say as I had mentioned earlier I started this whole redoing my collection of for lack of better words "sorted and working" mp3's (meaning what I queue up and listen to on a daily basis is over 6800 files and I have them sorted in alphabetical order in Tag&Rename, I am roughly 500 or so files from finishing. To backtrack and take the artist out of the title, there really is not a quick and simple way to do it, and the same for renaming the files which I really don't want to rename the actual files again. As there are a few artists that have the same name of a song. would be kind of messy.
I saw that you had said that there is a bug and can cause Winamp to crash with the original string you gave me, which like I said worked exactly like it is supposed to for the actual Winamp playlist display. I noticed that mine had crashed a few times, and I just thought it was something I was doing. I switched over to the other string.
Quote:
$right(%title%,$sub($len(%title%),$strstr(%title%, - ),2))
Again I do apologize for my assumption that the formatting was universal. I work on computers for a living so I should have known better and did more research, but it does do that with a lot of programs out there. If x program does this then y program add on uses the same arguments for z result.
Old Skool is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Winamp > Winamp Technical Support

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