Re: Naming Scheme tutorial for r12
dMC r12 also introduces a "programmable" element into the naming scheme:
Basics: the programmable elements are always within bracks "[IFCOMP]", "[IFMULTI]", etc., a "string" element, and ending braces "[]" that ends the naming string. The naming string can be a list of the above simple elements or nested (multiple levels) of programmable strings. Examples will be listed below.
[list][*][IFCOMP]string[] - Used if the CD is a compilation [*][IF!COMP]string[] - Used if the CD is NOT a compilation[*][IFMULTI]string[] - Used if the CD is part of a multi-disc set[*][IF!MULTI]string[] - Used if the CD is NOT part of a mutli-disc set[*][UPPER]string[] - changes the "string" to all uppercase[*][LOWER]string[] - changes the "string" to all lowercase[*][RIGHT]count,string[] - uses the last "count" number of characters from the end of the string[*][GRAB]from,to,string[] - grabs the portion of the string starting at "from" and going to "to"[*][TRIM]string[] - trims spaces from the beginning or the end of the string[*][DEL]from,to,string[] - similar to grab, but it removes the portion of the string specified, starting at "from" and going to "to"[*][SETLEN]count,pre,post,string[] - "count" specifies the length of the string that is desired. Pre and post are character ASCII codes. If the string is longer than count, the string is shortened and characters are removed from the end. If the string is shorter than count and pre is present, the string is extended by inserting the character to the front of the string. If the string is shorter than count and post is present, the string is extended by inserting the character to the end of the string[*][IFEQUALS]tag,equals,string[] - tests the given tag value against "equals". If they are equal, the string is included in the naming scheme[*][IF!EQUALS]tag,equals,string[] - tests the given tag value against "equals". If they are NOT equal, the string is included in the naming scheme[*][IFVALUE]tag,strifvalue,strnovalue[] - If the given tag name has a value, then "strifvalue" is used in the naming scheme, otherwise, if the given tag has no value, then "strnovalue" is used in the naming scheme[/list]
Edit: A table of ASCII characters for use with SETLEN: [url]http://www.goascii.com/[/url]
Re: Naming Scheme tutorial for r12
To try to show how the above can be used, the following will explain my personal naming scheme and the default naming scheme:
[code][IFCOMP][album][IFMULTI] - Disc [disc][]\[track] - [artist] - [title][][IF!COMP][IFVALUE]album artist,[album artist],[artist][]\[album][IFMULTI] - Disc [disc][]\[track] - [artist] - [title][][/code]To try to clarify this, I will break my naming scheme into the part used for compilations and the part used for single-artist albums
[code][album][IFMULTI] - Disc [disc][]\[track] - [artist] - [title][/code]Since the CD is a compilation, this is the effective compilation with the [IFCOMP] and trailing [] removed for clarity.
If the CD is only a single-disc set, the naming scheme is effective shortened to this:
[code][album]\[track] - [artist] - [title][/code]Now the naming scheme is easy to see and understand: album\track - artist - track title.
The following scheme gives the same results as my naming scheme:
[code][IF!COMP][IFVALUE]album artist,[album artist],[artist][]\[][album][IFMULTI] - Disc [disc][]\[track] - [artist] - [title][/code]
Next, the naming scheme used if the CD is NOT a compilation:
[code][IFVALUE]album artist,[album artist],[artist][]\[album][IFMULTI] - Disc [disc][]\[track] - [artist] - [title][/code]If the CD is not part of a multi-disc CD set, the naming scheme is shrank to this:
[code][IFVALUE]album artist,[album artist],[artist][]\[album]\[track] - [artist] - [title][/code]Normally, the album artist tag is the artist for the entire album, as by default AMG shows the artist with any guest artist, which can ruin a naming scheme that uses just [aritst]. Therefore, if the [album artist] tag has a value (i.e. is not empty), then the naming scheme becomes:
[code][album artist]\[album]\[track] - [artist] - [title][/code]Which is simply album artist\album\track - artist - title.
Now we will examine the default naming scheme:
[code][IFCOMP][IFVALUE]album artist,[album artist],Various Artists[]\[album][IFMULTI] Disc [disc][]\[track] [artist] - [title][][IF!COMP][IFVALUE]album artist,[album artist],[artist][]\[artist] - [album][IFMULTI] Disc [disc][] - [track] - [title][][/code]First, the compilation naming scheme
[code][IFVALUE]album artist,[album artist],Various Artists[]\[album][IFMULTI] Disc [disc][]\[track] [artist] - [title][/code]Again, assume album artist has a value and it is a single-CD set, we get:
[code][album artist]\[album]\[track] [artist] - [title][/code]Note, though, that if album artist does not have a value (i.e. many different artists), [album artist] is replaced with "Various Artists". Now we have a simple "album artist\album\'track title' artist - title"
Now, the CD that is NOT a compilation:
[code][IFVALUE]album artist,[album artist],[artist][]\[artist] - [album][IFMULTI] Disc [disc][] - [track] - [title][/code]Now, we will either use [album artist] or [artist] depending on if the "album artist" is present or not. Again, assuming it is and it is a single-CD set:
[code][album artist]\[artist] - [album] - [track] - [title][/code]Which is simply "album artist\artist - album - track - title".
Re: Naming Scheme tutorial for r12
Now, to explain how[code][IFCOMP][album][IFMULTI] - Disc [disc][]\[track] - [artist] - [title][][IF!COMP][IFVALUE]album artist,[album artist],[artist][]\[album][IFMULTI] - Disc [disc][]\[track] - [artist] - [title][][/code]and[code][IF!COMP][IFVALUE]album artist,[album artist],[artist][]\[][album][IFMULTI] - Disc [disc][]\[track] - [artist] - [title][/code] are equal. If you look at them, they are a little intimidating, granted. However, if you study them some, you see that most of the naming scheme is repeated, namely the "[album][IFMULTI] - Disc [disc][]\[track] - [artist] - [title]" part. Therefore, since the only difference is the beginning of the [IF!COMP] portion, we move the ending bracket of the "IF!COMP" section to just after the slash after [artist][], thereby giving us the same results in a shorter scheme. However, this concept is really only for advanced users.
Now, examples of how some of the programable elements works. Say your naming scheme involves a folder with the first letter of the artists name. To do this with the naming scheme, you need something like
[code][GRAB]1,2,[IFVALUE]album artist,[album artist],[artist][][][/code] will give you the first letter of the [album artist] or [artist], again depending on if there is an [album artist] or not. Since compilations might mess up this, you might want to put this after the "IF!COMP" portion of the naming scheme.
Next, say you want to change the naming scheme if there is composer for the CD, as you sometimes rip classical music but don't want to use multiple profiles or naming schemes. Then you could do something like
[code][IFVALUE]composer,[composer],[artist][][/code] or similar for conductor.
Remember, you can nest the programmable elements, as I did above with the [GRAB] example above. Just remember to put all of the closing brackets [] at the end of the programmable string.
Re: Naming Scheme tutorial for r12
Feedback? Questions? Comments? Please put it here: [url]http://forum.dbpoweramp.com/showthread.php?t=13931[/url]
Re: Naming Scheme tutorial for r12
To pad the disc number to 2 characters:
[code][SETLEN]2,48,,[disc][][/code]
Re: Naming Scheme tutorial for r12
To preserve the source filename and path (but convert to a different drive):
For example your files are:
C:\A Folder\A Filename.wav
And you want to convert to:
D:\A Folder\A Filename.mp3
Then use the 'Dynamic Naming' feature of dbPoweramp Reference (select dynamic for the output to) as:
D:\[origpath]\[origfilename]
Re: Naming Scheme tutorial for r12
Some dynamic naming elements that are not in the CD ripper naming scheme:
[TRIMFIRSTFOLDER]string[] - Remove the first folder from a path, normally used with [origpath]
[TRIMLASTFOLDER]string[] - Remove the last folder from a path, normally used with [origpath]
Re: Naming Scheme tutorial for r12
To change an artist such as 'The Beatles' to 'Beatles, The':
[IFEQUALS]artist,The [DEL]1,4,[artist][],[TRIM][DEL]1,4,[artist][], The[][]
Re: Naming Scheme tutorial for r12
A request we seem to be getting a lot of is how to have dMC make a folder for each album (NB is default in R13 and above). I will show you an example with the default naming scheme:[code][IFCOMP][IFCOMP][IFVALUE]album artist,[album artist],Various Artists[]\[album][IFMULTI] Disc [disc][]\[track] [artist] - [title][][IF!COMP][IFVALUE]album artist,[album artist],[artist][]\[artist] - [album][IFMULTI] Disc [disc][] - [track] - [title][][/code]
The compilation part of the string already makes an album folder, so we'll focus on the non-compilation part of the name: [code][IFVALUE]album artist,[album artist],[artist][]\[artist] - [album][IFMULTI] Disc [disc][] - [track] - [title][/code]
Now, most people want artist\album\filename, so we'll insert [album] after the artist part of the string but before the filename, as shown in bold below:[code][IFVALUE]album artist,[album artist],[artist][]\[b][album]\[/b][artist] - [album][IFMULTI] Disc [disc][] - [track] - [title][/code]Do note the trailing \ after album. Therefore, the entire string becomes:[code][IFCOMP][IFVALUE]album artist,[album artist],Various Artists[]\[album][IFMULTI] Disc [disc][]\[track] [artist] - [title][][IF!COMP][IFVALUE]album artist,[album artist],[artist][]\[album]\[artist] - [album][IFMULTI] Disc [disc][] - [track] - [title][][/code]
Re: Naming Scheme tutorial for r12
Changing a Year (such as 1995) to a \1990's\ folder, 1981 & 1989 would appear as 1980's:
[code][SETLEN]3,32,32,[year][]0's[/code]
Re: Naming Scheme tutorial for r12
To Make CD Ripper / Batch Ripper rip to unique folders if there is no metadata, change the artist section of the naming string to:
[IFEQUALS]artist,Unknown Artist,Unknown Artist ([cddb_id)[]