title
Products            Buy            Support Forum            Professional            About            Codec Central
 

Trying to figure out how to use [IFEQUALS] function

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chaos719

    • Feb 2012
    • 7

    Trying to figure out how to use [IFEQUALS] function

    I'm trying to use the [IFEQUALS] function to create a soundtrack directory if the genre is soundtrack or showtunes.

    Ideally I'm trying to have a folder structure

    /Music/Artist/F/Franz Ferdinand/Tonight (2009)/
    /Soundtrack/S/Star Wars/
    /Various Artist/J/Jock Jams (1998)/


    The priority is that all soundtracks go into the soundtrack folder even if its a various artist album. Then the remaining various artist albums. followed by single musician & band albums into the artists folder.

    The following is the naming scheme I'm using at the moment without the soundtrack sorting into another folder.

    [IFCOMP][IFVALUE]album artist,[album artist],Various Artists[]\[grab]1,1,[album][]\[album] [year]\[IFMULTI]Disc [SETLEN]2,48,,[disc][]\[][track]–[title]-[artist]-[album] [year][IFMULTI] Disc [SETLEN]2,48,,[disc][][][][IF!COMP]Artist\[IFVALUE]album artist,[GRAB]1,1,[album artist][],[artist][]\[album artist]\[album] [year]\[IFMULTI]Disc [SETLEN]2,48,,[disc][]\[][track]–[title]-[album artist]-[album] [year][IFMULTI] Disc [SETLEN]2,48,,[disc][][][]
  • mville
    dBpoweramp Guru

    • Dec 2008
    • 4021

    #2
    Re: Trying to figure out how to use [IFEQUALS] function

    It isn't clear from your post what the problem is? Have you tried adding the [IFEQUALS] function to your current naming string and if so, what was the result?

    Comment

    • chaos719

      • Feb 2012
      • 7

      #3
      Re: Trying to figure out how to use [IFEQUALS] function

      I've used ifequals for a single value but in version 16.x & above ifequals check will match from multiple stored values, such as one match from 3 genres.

      i have no problem figuring out how to use the function for my naming structure but there seems to be no documentation as to how to to store multiple values for it to match.
      Last edited by chaos719; January 03, 2017, 02:53 AM.

      Comment

      • mville
        dBpoweramp Guru

        • Dec 2008
        • 4021

        #4
        Re: Trying to figure out how to use [IFEQUALS] function

        Originally posted by chaos719
        i have no problem figuring out how to use the function for my naming structure but there seems to be no documentation as to how to to store multiple values for it to match.
        Multi-value tags such as genre are stored the same as a single tag, with the addition of a data separator. The separator in the Illustrate software is a semi-colon followed by a space e.g. genre could contain Cuban Traditions; Latin Jazz; World Fusion.

        I assume therefore, that you can test on genre being equal to Latin Jazz. I cannot test this as I am not using dBpoweramp Music Converter R16.x.

        Comment

        • chaos719

          • Feb 2012
          • 7

          #5
          Re: Trying to figure out how to use [IFEQUALS] function

          the semicolon space didnt work. I tried [IFEQUALS]genre,soundtrack; showtunes,Soundtrack[] but got no result.

          Comment

          • mville
            dBpoweramp Guru

            • Dec 2008
            • 4021

            #6
            Re: Trying to figure out how to use [IFEQUALS] function

            Originally posted by chaos719
            the semicolon space didnt work. I tried [IFEQUALS]genre,soundtrack; showtunes,Soundtrack[] but got no result.
            Firstly, the semicolon space is only inserted in the tag, not the function.

            Secondly you have the syntax for this function wrong, [IFEQUALS]tag,equals,string[]
            e.g. [IFEQUALS][genre],soundtrack,my text[]

            You might also want to consider the [IF]tag,condition,match,stringmatch,stringnomatch[] function
            e.g. [IF][genre],=,soundtrack,my text,my alternative text[]

            Comment

            • mville
              dBpoweramp Guru

              • Dec 2008
              • 4021

              #7
              Re: Trying to figure out how to use [IFEQUALS] function

              Originally posted by chaos719
              the semicolon space didnt work. I tried [IFEQUALS]genre,soundtrack; showtunes,Soundtrack[] but got no result.
              It is my understanding that the [IFEQUALS] function in R15.3 performs a single operation. What you are trying to do here is more complex (i.e. testing genre against 2 possible values). This may be possible in R16.x, but as stated earlier, I am unable to confirm this.

              To clarify, in logical terms which of the following are you trying to achieve:
              1. If genre contains soundtrack and showtunes, output Soundtrack (i.e. genre contains both soundtrack and showtunes)
              2. If genre contains soundtrack or showtunes, output Soundtrack (i.e. genre contains either soundtrack or showtunes, but not both)
              3. If genre contains soundtrack or showtunes, or soundtrack and showtunes, output Soundtrack (i.e. genre contains either soundtrack or showtunes, or both)

              Depending on the above scenarios, you may be able to use nested functions:
              e.g. If genre contains soundtrack and showtunes, output Soundtrack you could try using
              [IFEQUALS][genre],soundtrack,[IFEQUALS][genre],showtunes,Soundtrack[][]

              More documentation and more examples showing the use of the naming functions is desirable, especially when changes to the functions occur.
              Last edited by mville; January 04, 2017, 11:45 AM. Reason: clarify logic

              Comment

              • chaos719

                • Feb 2012
                • 7

                #8
                Re: Trying to figure out how to use [IFEQUALS] function

                scenario 3 is what I'm going for. i want the folder to be soundtrack if the genre is either soundtrack or showtunes not both together. I was trying to simplify with the new functionality of r16 but it looks like i'll just have to go with a nested function.

                Comment

                • mville
                  dBpoweramp Guru

                  • Dec 2008
                  • 4021

                  #9
                  Re: Trying to figure out how to use [IFEQUALS] function

                  Originally posted by chaos719
                  scenario 3 is what I'm going for. i want the folder to be soundtrack if the genre is either soundtrack or showtunes not both together.
                  Don't you mean Scenario 2, then? Do you have any tracks where the genre contains both soundtrack and showtunes?

                  Be aware, that even though the logic is fairly simple here, in my experience, the Naming functions are not sophisticated and using nested functions does not always provide the expected output. You will have to experiment with the functions to see what is achievable.

                  If you are after scenario 2 (and you do not have any tracks where the genre contains both soundtrack and showtunes), the following will work ok and is not nested:
                  [IFEQUALS][genre],soundtrack,Soundtrack[][IFEQUALS][genre],showtunes,Soundtrack[]
                  Last edited by mville; January 05, 2017, 12:40 PM.

                  Comment

                  • chaos719

                    • Feb 2012
                    • 7

                    #10
                    Re: Trying to figure out how to use [IFEQUALS] function

                    I went with a nested if/if route. Seems to get the job done. I think it could be optimized a bit more if i flip things around a bit.

                    [IF][genre],=,showtunes,Soundtrack\[GRAB]1,1,[album][]\,[IF][genre],=,soundtrack,Soundtrack\[GRAB]1,1,[album][]\,[IF!COMP]Artist\[GRAB]1,1,[album artist][]\[album artist]\[][IFCOMP]Various Artist\[GRAB]1,1,[album][]\[][][][album] [year]\[IFMULTI]Disc [SETLEN]2,48,,[disc][]\[][track]-[title]-[artist]-[album] ([year])[IFMULTI] (Disc [disc]\[disc_total])[]

                    Comment

                    Working...

                    ]]>