title
Products            Buy            Support Forum            Professional            About            Codec Central
 

Naming Scheme Tutorial

Collapse
This is a sticky topic.
X
X
 
  • Time
  • Show
Clear All
new posts
  • LtData
    dBpoweramp Guru

    • May 2004
    • 8288

    Naming Scheme Tutorial

    At the request of multiple users, I am writing a short tutorial on how to use the naming scheme in dMC r12.

    The basics of the naming scheme are simple to get:
    • [artist] - use for the artist name
    • [album artist] - use for the album artist, NOT the same as artist necessarily
    • [album] - use for the album title
    • [title] - use for the track title
    • [track] - use for the track number
    • [disc] - use for the disc number
    • [disc_total] - use for the total number of discs
    • [composer] - use for the composer of the CD
    • [conductor] - use for the conductor of the CD, normally used for classical music CDs
    • [genre] - use for the genre of the CD
    • [year] - use for the year of recording
    • [track_total] - use for the total number of tracks
    • [tag]<element>[] - use if you want to insert a non-standard track into the filename. The ending [] is used to tell dMC that the end of the tag element has been reached, in case there are spaces
    • [length] - use for the track length in milliseconds
    • [length_mmss] - use for the track length in minutes and seconds (mm.ss)
    • [length_hhmmss] - use for the track length in hours, minutes, and seconds (hh.mm.ss)
    • [encoder] - use for the name of the encoder (LAME, Nero, etc.)
    • [encoder+] - use for more detailed encoder information
    • [extension] - audio format extension (mp3, flac, etc.)
    • [cddb_id] - use for the CDDB disc ID
    • [date] - current date
    • [time] - current time
    • [day_of_week] - current day of the week
    • [now_year] - current year
    [*][unique] - adds a unique value
    Last edited by Spoon; October 18, 2017, 01:56 PM.
  • LtData
    dBpoweramp Guru

    • May 2004
    • 8288

    #2
    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.
    • [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


    Edit: A table of ASCII characters for use with SETLEN: http://www.goascii.com/
    Last edited by LtData; August 30, 2007, 02:26 AM.

    Comment

    • LtData
      dBpoweramp Guru

      • May 2004
      • 8288

      #3
      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][]
      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]
      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]
      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]
      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]
      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]
      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]
      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][]
      First, the compilation naming scheme
      Code:
      [IFVALUE]album artist,[album artist],Various Artists[]\[album][IFMULTI] Disc [disc][]\[track] [artist] - [title]
      Again, assume album artist has a value and it is a single-CD set, we get:
      Code:
      [album artist]\[album]\[track] [artist] - [title]
      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]
      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]
      Which is simply "album artist\artist - album - track - title".

      Comment

      • LtData
        dBpoweramp Guru

        • May 2004
        • 8288

        #4
        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][]
        and
        Code:
        [IF!COMP][IFVALUE]album artist,[album artist],[artist][]\[][album][IFMULTI] - Disc [disc][]\[track] - [artist] - [title]
        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][][]
        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][]
        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.

        Comment

        • LtData
          dBpoweramp Guru

          • May 2004
          • 8288

          #5
          Re: Naming Scheme tutorial for r12

          Feedback? Questions? Comments? Please put it here: http://forum.dbpoweramp.com/showthread.php?t=13931

          Comment

          • Spoon
            Administrator
            • Apr 2002
            • 44510

            #6
            Re: Naming Scheme tutorial for r12

            To pad the disc number to 2 characters:

            Code:
            [SETLEN]2,48,,[disc][]
            Spoon
            www.dbpoweramp.com

            Comment

            • Spoon
              Administrator
              • Apr 2002
              • 44510

              #7
              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]
              Spoon
              www.dbpoweramp.com

              Comment

              • LtData
                dBpoweramp Guru

                • May 2004
                • 8288

                #8
                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]

                Comment

                • Spoon
                  Administrator
                  • Apr 2002
                  • 44510

                  #9
                  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[][]
                  Last edited by Spoon; July 03, 2013, 10:43 AM.
                  Spoon
                  www.dbpoweramp.com

                  Comment

                  • LtData
                    dBpoweramp Guru

                    • May 2004
                    • 8288

                    #10
                    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][]
                    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]
                    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]
                    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][]
                    Last edited by Spoon; June 24, 2008, 08:29 PM.

                    Comment

                    • Spoon
                      Administrator
                      • Apr 2002
                      • 44510

                      #11
                      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
                      Spoon
                      www.dbpoweramp.com

                      Comment

                      • Spoon
                        Administrator
                        • Apr 2002
                        • 44510

                        #12
                        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)[]
                        Spoon
                        www.dbpoweramp.com

                        Comment

                        Working...

                        ]]>