INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Expression help for View or Smartlist or special field  (Read 1913 times)

Arindelle

  • Citizen of the Universe
  • *****
  • Posts: 2772
Expression help for View or Smartlist or special field
« on: August 12, 2013, 07:59:15 am »

Hey!

Need a way to parse albums tagged with multiple genres with specific "super genres"

Like these examples:
Iftrue=Electronic (grouping), then show only genres Techno, House, Ambient, Down Tempo, Trip Hop, Electro-Pop
Iftrue= Country, then only show Trad. Country, Alt. Country, Nashville, Bluegrass etc.

Something like if(isequal([grouping],Jazz,1) ??

To understand what I would like to do, I have to explain how my library is organized.

I use the Grouping field as sort of a super-genre or category e.g. Pop/Rock; Latin; Jazz; Classical

I use the Genre Field to break this down e.g. Jazz as a Group then as Genre it could be Hard Bop, Swing, Cool

I then set up separate calculated data fields linked to standard fields e.g.  
Code: [Select]
Genres=[genre]&datatype=[list]
    .
    This allows multiple genres which can then be parsed separately for play lists, searches etc but the actual data in the tag field would look like this e.g. "Alt. Rock; Grunge" Same thing if I combine Grouping fields like with a genre like Jazz Vocals, I would put it both in the Category Vocals and Jazz.

    I want to set up a view for theater view/jremote which could be filtered more coherently for the "categories"

    E.g.,  at present if I click on Category (grouping field) Electronic I get albums broken down first by artists then by albums, but including fields like Alt. Rap and Indie Pop&Folk which I don't want to appear (they are tagged with multiple genres)

    In other words I need an expression for a view or smartlist,  or to create a field(s) (maybe even better, could be automatic) so even albums tagged with multiple genres like "Funk; Urban; Electro-Pop" would show up parsed under two categories R&B=>Funk and Urban AND Electronic=>Electro-Pop but Electro-Pop would not show under R&B nor would Funk and Urban show up under Electronic.

    Thanks to any who even took the time to read this  :D

    PS - I have 18 Categories and 146 genres  :-[ probably is going to be painful
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Expression help for View or Smartlist or special field
« Reply #1 on: August 12, 2013, 12:06:50 pm »

This sounds like a simple genre/sub-genre categorization.

If you've tagged your files with only the values you consider valid for your taxonomy, then any genre/sub-genre category layout will only show valid results as well.  For example, in your R&B/Funk and R&B/Urban and Electronic/Electro-Pop examples, these categories will only be created as per your tagging when you use:

   [Genre]
   [Sub-genre]

as the categories in Categories view.  Only when you have files incorrectly tagged will you get an incorrect sub-genre when you drill down into each genre.

In otherwords, it is not the list of all possible values in genre or sub-genre that drive the presentation in a view, but rather only the values actually in use across all the files.

Please comment if this doesn't address the issue.
Logged
The opinions I express represent my own folly.

Arindelle

  • Citizen of the Universe
  • *****
  • Posts: 2772
Re: Expression help for View or Smartlist or special field
« Reply #2 on: August 15, 2013, 07:23:43 am »

Hey Mr C,

Thanks so much for responding, I must have missed it....

OK short version -- I want to create a theater view to show only specific [subgenres] from genres -- drilling down from [genre] to [subgenre] to Artist to album

would like to create New Field(s) which auto-populate using only certain Genres  (GroupSummary(...) ?)

I have 15 genres and 147 subgenres - call the new field [Category] (or maybe there would be 15 new fields?)  e.g. If genre=Jazz; fill in only HardBop, Post-Bop, Swing If Pop/Rock fill in only A,B,C,D,E,F etc  

 :-[ long and convoluted, probably incomprehensible, explanation ...

Thinking about what you said I guess I should clarify, I have not made a mistake in tagging I have done it on purposes!

I use for Music:  Category [grouping] >Genres [genre] > Styles [style] in theory

So a reduced Linnaean ( ;D) Taxonomy e.g. would be Vertebrates, Mammals, Primates, =>Orangutans, etc  

But to be practical I prefer putting Bats as Mammals and Birds; and Flying Fish as Fish and Birds because if I want to see all the Birds - Bats and Fish will come up BUT when I want to see all the Mammals I want to see Bats not Flying Fish and if I look up Fish I want to see Flying Fish not Bats.

Allmusic Guide does this all the time - e.g. BB King: R&B and Blues various styles belonging to both genres Prince:  they him in 3 genres: R&B and Pop/Rock and Electronic

So MC handles this beautifully in one direction by creating for example secondary fields -- I have the standard Genre field + I created  "Genres" as a calculated data field with this expression [genre]&datatype=  -- these two auto populate in both direction which is great for tagging  -- I have also done this for the field Grouping/Group ...

BUT what actually is written to both fields (i.e. genre and genres) looks like this (separated by semi-colons ==>

a) Blues (Grouping) | Acoustic Blues (genre) --- no problem
b) Blues | Acoustic Blues; Delta Blues -- no problem
c) Blues; Country | Acoustic Blues; Alt. County -- problem
d) Jazz | Jazz-Funk; Contemporary Jazz; Hip-Hop -- problem

Ok so a and b are easy. These artists or albums are tagged with genres "taxonomically" correct

c) is how I like to tag when necessary -- alternative country, for the theater view,  I would want to see only under Country with Acoustic Blues under Blues  now they are showing up under both (understandable) --- this is the most important to me to resolve
d) I put this down to illustrate what would happen if I retagged putting artists in what I perceive would be there "dominant" category -- I would also like it shown under R&B=>Hip-Hop

I only see 3 solutions other than never attributing one genre per album or artist

1) Create another field like a Phylum  :P -- and manually populate this would be a real pain for ripping and tagging -- if this could be auto-populated by an expression however this would be the best IMO, but not sure how this can work
2) To figure out a type of rule/modifierer that would parse multiple genre-populated fields into a list that would be concatenated (euh not sure of the right word here) like Album - Year some how and use that for a view
3) Create a sort of Boolean expression which would show subgenres filtering out specific genres without NOT showing music tagged with multiple genres (of course I have no clue how to do this
OR remove [subgenre]from the drill down in my Theater View and go directly from a genre to all the artists then to the albums of each -- really not an option for me, too much music ...


Like Bonnie Raitt is in Pop/Rock and Country and Blues (depending on the album) - imagine Album X with a tag like Acoustic Blues; Country-Rock; Folk-Rock -- Click country, see only Country-Rock, see Artists which include Bonnie Raitt.  Click Pop/Rock, see only Folk-Rock, click that and see artists including Bonnie Raitt Click country etc; etc.

Any input would really be appreciated ... thanks to anyone who even tried to read this  :)



                          
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Expression help for View or Smartlist or special field
« Reply #3 on: August 15, 2013, 10:57:02 am »

Lets simplify and generalize.  You have two categories, which I'll call lists:

   List 1: A, B
   List 2: 1,2,3,4

With MC's two category levels, you'll get these now:

   Now: A1, A2, A3, A4, B1, B2, B3, B4

but you only want to only show:

   Valid: A1, A3, B2, B4

and should always avoid showing:

   Invalid: A2, A4, B1, B3

Where should the Invalid items go if they might exist?  They either need to be filtered out (Search rules) or categorized into some other bucket (e.g. Ignore These Items)

So, these two related question stand:

   a. What specifies the list of Valid (OK to show) combinations?
   b. What specifies the list of Invalid (never show) combinations?

You'd have to create a large list of Valid (or the inverse, Invalid) combinations to use as the basis for making a decision (OK to show Valid items, Never show Invalid items).  With 15 genres and 147 sub-genres, this list might be very large and difficult to manage.  But if you did create such a list, you could, say, at the List 2 level (i.e. sub-genre or style), use a rule such as either of the following:

    if L2 item is not any of Invalid List
    if L2 item is any of Valid List

So with this technique, you have 3 independent lists to manage and correlate.

Another technique avoids the work of managing three independent lists, and instead combines the two lists into a single list, and then splits those for presentation.  For example, the following tracks contain only your acceptable combinations that are valid:

   A/1, A/3, B/2, B/4
   A/3, B/4
   B/2
   B/4, A/1

Thus, you encode the concept of valid directly into each track, and let the expression language split them apart, leaving you with only valid items.
Logged
The opinions I express represent my own folly.

Arindelle

  • Citizen of the Universe
  • *****
  • Posts: 2772
Re: Expression help for View or Smartlist or special field
« Reply #4 on: August 15, 2013, 12:07:36 pm »

I like the theory behind the second technique ... but wouldn't you have to tag each album Valid or not? As there are not just one yes or no for this but 15, wouldn't it just be like adding a Supra-Genre Field?  I could retag my entire library, it would take some time but not a lot,  by selecting everything and putting it into this field. Doing this once ok, BUT having to do it continually? I want to avoid an additional field to tag manually every time I rip. Or maybe I misunderstood.

The first method seems a lot more complicated, but it seems to make more sense. I already have a spreadsheet with a real Taxonomy to "show" and an export from MC that is easy to find things that would have to be re-validated so to speak.  SO this big list is already made (used Dreamweaver  ;D ) If I added or modified the 2 lists, it would not be a big deal to modify the expression. What stumps me is if Acoustic blues is Validated to be shown only under Blues that would be fine IF it was the only genre in the field. Or to remain simple, where L1=genre L2 =sub-genre, L1: A, B; AND A;B == L2: 1,2,2;4,3,3;1;2. So I thought multiple entries in L1 and L2  would be parsed out using the semicolon to a 3rd list  - L3 with nothing separated by the semicolon --provided that the rules of whats included is defined beforehand.  If you have to include all variants containing 3 in L2 (like 3 or 3;2 or 1;3;2) that wouldn't be 147 variables that would be ... euh a big list ::)

I was hoping for more of a filter like If A, show records containing 1,2,3 , but only show on the screen 1 (without filtering out records that could have 1;2 in the field ....

I got to think about this maybe the highest "category" cannot have multiple values -- which would be too bad  :'(

Oh, oh now i have confused myself
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Expression help for View or Smartlist or special field
« Reply #5 on: August 15, 2013, 12:26:33 pm »

No, you wouldn't have to tag them as valid or not.  ANY Genre/Subgenre value you added to the file is by definition valid (you wouldn't add them otherwise).

For example, you would tag files with:

   R&B/Funk; R&B/Urban; Electronic/Electro-Pop

but never with:

   R&B/Electro-Pop
   
so MC will just do the right thing when you output the list, with some expression magic to break out the levels automatically.

The way you have it now, you'd need to create N lists, where N is the number of Genres, each specifying the valid sub-genres:

   R&B:  Funk; Urban
   Electronic:  Electro-Pop

and create N rules (either via Search Lists or a lengthy genre/sub-genre set of rules) to only show files that match those criteria, and every time you added a new genre or sub-genre, you have to then go update all your views that use these rules.
Logged
The opinions I express represent my own folly.

Arindelle

  • Citizen of the Universe
  • *****
  • Posts: 2772
Re: Expression help for View or Smartlist or special field
« Reply #6 on: August 16, 2013, 06:36:14 am »

Ok I follow you -- I think .... just to be sure

N List = [genre] + acceptable [subgenre]

lets say I have this for 4 different albums tagged in the subgenre field like so:

Funk
Funk; Urban
Urban; Funk
Funk; Urban; Electro-Pop

I hope the N list would look like  ;):
R&B == Funk
R&B == Urban

or would it have to be  :(
R&B == Funk
R&B == Urban
R&B == Funk; Urban
R&B == Urban; Funk

Goal = All 4 Albums would show up, but Electro-Pop would not be visible on "drill-down. Albums 2,3,4 would show up under both Funk and Urban album 1 just under Funk


I'll try and do the N list this weekend. If its the second scenario its going to take some time

Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Expression help for View or Smartlist or special field
« Reply #7 on: August 16, 2013, 12:16:29 pm »

Tagging with this scheme would work fine:

   R&B == Funk
   R&B == Urban
   Electronic == Electro-Pop

You'll have to Replace() the " == " with a "\" if you want the hierarchy built:

   replace([N List], / ==/ , \)&datatype=[list]

If you use backslash instead, there's no work to do:

   R&B\Funk
   R&B\Urban
   Electronic\Electro-Pop

    [N List]&datatype=[list]

So long as you use a unique separator between your genre/sub-genre, you can use the Replace() method above.
Logged
The opinions I express represent my own folly.
Pages: [1]   Go Up