» Welcome Guest
[ Log In :: Register ]

 

[ Track this topic :: Email this topic :: Print this topic ]

Topic: Automatically increment tag numbers up by xx?< Next Oldest | Next Newest >
Jason
Unregistered





Posted: Mar. 11 2006,15:21

I'm a registered user and a huge fan. Recently I've found that combining 2-disc sets into one folder makes more sense in terms of navigating and playing from my media server. If I want to listen to the Best of the Doors, for example, I don't care about the distinction between what fit on the first album versus the second.

To do this, I retag the album name from "Greatest Hits Disc 1" and "Greatest Hits Disc 2" to just "Greatest Hits". I rename the album folder "Greatest Hits". For posterity I put the "Disc 1/Disc 2" into the Comments field (also helps if I ever want to burn it back to a CD).

The only tough part is renumbering the tracks, since now they would play each disc's track 1 in alphabetical order before getting to each disc's track 2, etc etc etc. So I manually type over each track number in "Browse" mode, adding x to the disc 2 track number where [x=# of tracks on disc 1].

My question: is there an automated way to add x to each track number? I looked at substring replacement, figuring that I could save 10 or so presets, one for each of the likely x=#'s (say 8 through 18 since most Disc 1's will have between 8 and 18 tracks) but it does not look like that would apply to TrackNr field, and in any case it's not an especially elegant solution.

Would anyone other than me find this useful?

Thanks!

--Jason

P.S. I have seen one other way which is to use a renaming program to renumber them in chronological order (as ripped) and then Retag from filenames, but I'd far prefer to do it from within my favorite MP3TagStudio.  Thanks!!
Back to top
calberga
Ancient Board Spirit



Group: Awaiting Authorisation
Posts: 254
Joined: Oct. 2002
Posted: Mar. 11 2006,16:56

The simplest method I can think of, off hand (and there are a few others) is:

I assume you have already set the track number tags for each CD.  If not you can by fiddling with the "track1", "track2", titles that most rippers provide.

First, construct a .txt file with each line containing a single number, from 1 to n, where n is the largest number of tracks you will ever have in an "album".  This is invaluable in many other cases.

Before you combine the folders, rename each of the files with something like (ignore the "[" and "]", they are just to make the pattern stand out) [1<TrackNr> - <Title>] and [2<TrackNr> - <Title>], as appropriate.  You'll have to use "advanced mode" to do this.

Then combine the files, and re-tag with [<trackNr> - <TRASH>].

If you are happy with track numbers 101, 102, ..., 10n, 201, 202, ..., then you are done.

Other wise use "Rename/tag form list", with your list of numbers, and select the "tag" option, using [<TrackNr>].  This will renumber the files in sequence, in the order you want.

Magnus, I welcome a better solution.

Edited by calberga on Mar. 11 2006,16:58
Back to top
Profile PM 
Magnus Brading
Almighty Author



Group: Super Administrators
Posts: 2751
Joined: Aug. 2002
Posted: Mar. 12 2006,00:33

The multi-disc track numbering format suggested by Calberga is indeed good, and is also probably the most commonly used one in this situation.

To avoid the initial file renaming in Calbergas technique (e.g. to also handle the case with badly/incompletely tagged files) you could also use the following procedure to accomplish the same thing:

1.
Use the direct tag manipulation tool with presets like:
Code Sample
1<TrackNr>   ----->    <TrackNr>

Code Sample
2<TrackNr>   ----->    <TrackNr>

2.
Rename the files to whatever format you please.


In case you still want to do the exact operation you asked for in the first place (the addition), there is a way for this too, although a little tricky:

Record a macro containing sweeps with the mass set tags tool, each having a filter only processing files with tracknumber X, setting the tracknumber to X + n (where n is the number you want to add). Use as many sweeps as the maximum number of files per disc want to be able to handle.

This macro will have to process the files a bunch of times to get the job done (although it will still be very quick), but it will work well, and also be available at the click of a single button, just like any macro will.

--------------
Software author and website owner
Back to top
Profile PM WEB 
calberga
Ancient Board Spirit



Group: Awaiting Authorisation
Posts: 254
Joined: Oct. 2002
Posted: Mar. 12 2006,14:02

Magnus,

Thank you for the better ways.  I had never known that the direct tag tool allowed constants to be introduced on the left.  Didn't pay attention to the "advanced mode" check-box.  As usual, your corrections and applifications teach me things every time!

Forgive me, but I'll keep jumping in with my ideas, if only to learn your better ways.
Back to top
Profile PM 
Jason
Board Newbie



Group: Members
Posts: 9
Joined: Mar. 2006
Posted: Mar. 14 2006,05:59

First off, thank you to both of you for your help with this!

I have to admit, I don't quite understand the Macros part of Magnus' solution -- would I be recording a macro for each possible increment, such as one macro to increase everything by 10 tracks, a different one to increase everything by 11 tracks, etc? And I can't find a reference to sweeps in the help file, so I'm not quite sure what those are.

However, in the mean time I started playing with the other solution and it led me to perhaps an even easier one:

If (as with me) you have your albums tagged in a two disc set as, for example, Anthology Disc 1 and Anthology Disc 2, then instead of going through the whole replacement of the TrackNr tag, you can actually just rename your files [Album - TrackNr]. Then combine them in one folder and apply calberga's technique of retagging TrackNr from the list. The files will be in the proper sequence because all of the "Anthology Disc 1 - xx.mp3" files will be before all of the "Anthology Disc 2 - xx.mp3" files.

But in the mean time you've saved the step of replacing the TrackNr tag.

Once you've retagged the TrackNr from the list, you can do a AutoRenameFromTags back into the original format such as [TrackNr Title] and you'll have your new track numbers and file names.

Does that seem to make sense?

--Jason
Back to top
Profile PM 
Magnus Brading
Almighty Author



Group: Super Administrators
Posts: 2751
Joined: Aug. 2002
Posted: Mar. 14 2006,11:43

Calberga, I always appreciate any help and assistance with answers here on the board, so just keep 'em coming! :)

Jason, there is often hundreds of ways to accomplish what you want in Mp3/Tag Studio. This flexibility is one of the main ideas with the program, and I'm glad you found a way that you liked best yourself. :)

About "sweeps", what I mean with this is one round of processing by Mp3/Tag Studio on a the current set of target files.

And yes, with the macro solution I mentioned you would have to make one macro for each possible increase number. The main idea with this is that it will eliminate all manual operations in the future, always making it possible to accomplish the operation in one single mouse click.

--------------
Software author and website owner
Back to top
Profile PM WEB 
Jason
Board Newbie



Group: Members
Posts: 9
Joined: Mar. 2006
Posted: Mar. 14 2006,14:57

Thanks, Magnus. Yes, as I describe the program to friends or colleagues when they ask me what I recommend to do tagging, I tell them that in my ~1000 cd music collection I've never come across anything I wanted to be able to do that MP3 Tag Studio could not do. Flexible it certainly is.

If you don't mind a follow-on question on the macros, let's say that of all the Disc 1 of 2's in my collection, the lowest number of tracks on Disc 1 is 8 and the highest number is 34 (Beatles Anthology, back when songs were 2:30). I'd then be recording (34-7=) 27 different macros, and call them "add8" "add9" "add10" . . . "add34".

What I'm wondering is does recording each of those macros involve recording just one step which would be to tell it to "add n" to the TrackNr? Cause if I'm understanding correctly it would actually be that each of the 27 macros would involve as many steps as there might be tracks on Disc 2.

So, for example, in the "add11" macro, I would record it filtering on TrackNr 1, setting all TrackNr to 12, then change filter to TrackNr2, set all TrackNr to 13, change filter to TrackNr3, set all TrackNr to 14, and so forth.

While this would create a truly automated solution, there would be 918 steps (27 macros x up to 34 tracks on the second disc) of changing the filter and changing the MassSet TrackNr to collect them.

I wonder, can I reference calberga's external file in a macro? In that case, I can instead create an external file listing numbers 9 through 100, save it as "add8.txt" then delete the top number, save it as "add9.txt" and so forth until I get to "add34.txt".

I'd then record 27 macros, just like above, but now each one would involve just a couple of steps instead of 34. The "add9" macro would involve going to the "Tag/Rename from List" tab, the selecting the "add9.txt" file, selecting TrackNr and Executing, and it would just need one pass through the folder to retag them all.

Can macros reference external files in such a way?

--Jason
Back to top
Profile PM 
Magnus Brading
Almighty Author



Group: Super Administrators
Posts: 2751
Joined: Aug. 2002
Posted: Mar. 14 2006,16:06

First of all, macros can contain anything that you can do manually with the "Name and tag tools" toolset in Mp3/Tag Studio (except the browse tool), so yes, they can reference external files too. To record a macro, you simply press the record button, do any number of arbitrary operations and then press the stop button and enter a name for the macro.

Second of all, I think you might have misunderstood my suggestion with the macros. You would only have to record one macro containing x operations, where x is the possible input tracknumbers you want to be able to use (normally this is 1-20, or in some extreme cases apparently 34 :)). This macro could then be used for any album where you want to add the number in question to the track numbers, with a single mouse click.

But yes, for the first album where you want to do this, recording the macro will be the exact same thing as doing it manually. That's the idea of macros, if you do something advanced, which you foresee yourself having to do again, you simply record it into a macro the first time you do it, and all the other times you just execute this macro with a single mouse click to have it all being done again.

--------------
Software author and website owner
Back to top
Profile PM WEB 
Jason
Board Newbie



Group: Members
Posts: 9
Joined: Mar. 2006
Posted: Mar. 15 2006,18:40

I feel pretty dumb writing more here, since there's obviously something that I'm completely missing, but oh, well, here goes:

Unless there is a place for inputting a variable, it seems to me that with the approach Magnus is describing I would need a different macro for every possible number I'd like to add.

I get that once they have the 1 or 2 prepended and they are combined in one folder, then I can retag them as simply 1, 2, 3, 4 . . . and that it will no longer matter how many tracks were on the first disc in order to determine what number to start the second disc at.

But, how can I use filters on the files in a Macro when I don't know whether there are 8 or 18 tracks on the first disc? For example,:

TrackNr=101 will always be retagged as TrackNr=1
TrackNr=102 will always be retagged as TrackNr=2
but if Disc 1 only has 8 tracks then
TrackNr=201 will be retagged as TrackNr=9
but if Disc 1 has 18 tracks then
TrackNr=201 will be retagged as TrackNr=19

If you're tired of explaining it, please rest assured that I have a workable solution and remain delighted with MP3 Tag Studio. But, if you feel like handholding me through it, I'd love it if you could give me one more explanation . . . really slowly . . . :D  :D
Back to top
Profile PM 
Magnus Brading
Almighty Author



Group: Super Administrators
Posts: 2751
Joined: Aug. 2002
Posted: Mar. 15 2006,19:13

Don't worry Jason, you got it right. You will indeed need one macro for each number you'd like to be able to add to a collection of files. But since the number you'd normally like to add is the total number of files on the first disc, you will pretty quickly have macros for all the common numbers (like 10-20), and will quite seldomly need to create a new macro.

Also, since the macro files are text based, you can use common text processing tools (read: text editors) with search and replace and similar, to quickly generate all the macro variations you need, from one originally recorded macro.

--------------
Software author and website owner
Back to top
Profile PM WEB 
Jason
Board Newbie



Group: Members
Posts: 9
Joined: Mar. 2006
Posted: Mar. 22 2006,05:44

Well, finally got around to giving this a try. Thanks to both of you for your help and support on it!

Based on Magnus' comment about macros being text files and easily  edited as such, I recorded a macro of one step, then copied the text into a spreadsheet, replaced the few relevant lines with formulas, had those formulas in turn reference a single cell which set the increment.

Now I can change that single cell, all of the Filter= and SetTrackNr= lines will update with the relevant numbers (going up to about 40 tracks in the folder) and then I just copy the column of text into a text file.

If anyone's interested in having copies of the resulting text files, I could post them somewhere (assuming this is legit by Magnus' opinion), but here's one learning I wanted to pass along that came to mind as I started to think through the logic:

Start with the HIGHEST possible track number you want to change, not the lowest. For example, if Disc 1 has 20 tracks and Disc 2 has 24 tracks, start your macro by filtering on Track=24 and setting it to 44, then filter on 23, set to 43, etc etc etc.

The reason will become obvious as you think about it, for if the number of tracks on the second disc is larger than the number on the first disc, you'll be retagging Track 1 to Track 10, but later when you get ready to retag to Track 10 there will be 2 of them.

Whereas if you start off naming 20 to 30, then you'll always be dealing with a gap rather than an overlap.

Thanks again for your help. The new macros are working great!!

--Jason
Back to top
Profile PM 
Magnus Brading
Almighty Author



Group: Super Administrators
Posts: 2751
Joined: Aug. 2002
Posted: Mar. 26 2006,23:46

I'm glad it worked out good for you Jason, and thanks for sharing your useful ideas and experiences.

And btw, there is even a dedicated forum on this board for sharing nice macros (and related stuff) that you have put together, so yes you are very welcome to submit it there (or in this thread too if you want). :)

http://www.magnusbrading.com/cgi-bin/ib3/ikonboard.cgi?act=SF;f=12

--------------
Software author and website owner
Back to top
Profile PM WEB 
11 replies since Mar. 11 2006,15:21 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]