INTERACT FORUM

Please login or register.

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

Author Topic: Smartlist modifier with expression to remove specific tracks?  (Read 2263 times)

eCo

  • Recent member
  • *
  • Posts: 22

Hi,
I have created a complex smartlist for generating a random mix of complete albums.  The final modifier is ~a.

Is there a modifier that I can now add to remove specific tracks from this list that satisfy an expression?  For example, I'd like to remove tracks that have something like "alternate take" in their names, but otherwise leave the album(s) intact.  I've studied the Smartlist rules page, but don't see a modifier that would accommodate an expression like this.

To take this to another level, it would be fun to randomly remove the original, and leave an alternate take in its place; but that's pie in the sky I suspect.

Thx
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Smartlist modifier with expression to remove specific tracks?
« Reply #1 on: May 21, 2014, 12:38:13 pm »

Lots of ways to do this, but I find the easiest is:

1. Make a smartlist that shows all of the files you want excluded.

2. On your "real" Smartlist, add Playlist Is Not Any > list created above.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Smartlist modifier with expression to remove specific tracks?
« Reply #2 on: May 21, 2014, 12:47:19 pm »

For simpler things, you can use the entire expression language, though, so...

Code: [Select]
[=IsEqual([Name], alternate, 8)]=[0]
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

eCo

  • Recent member
  • *
  • Posts: 22
Re: Smartlist modifier with expression to remove specific tracks?
« Reply #3 on: May 21, 2014, 01:24:31 pm »

Thanks for the suggestions, but I don't think this works for the Smartlist I have in mind.  Your suggestions are "Rules" for setting up the initial playlist and it will be created without the tracks I mentioned as intended; however, the final modifier ~a will restore those tracks, no?  This smartlist generates 120 random complete albums, and I don't see how to do that without the ~a modifier.

Here's the current code:
Code: [Select]
[Media Type]=[Audio] -[Genre]=[Classical],[],[Ambient],[Audio Test],[Comedy],[Narrative],[Opera],[Reference],[Sound Clips] -[Genre]="Christmas" ~mix=15000,85%,{[Genre]=},15%,{[Genre]=Jazz} ~nodup=[Album Artist] ~mix=120,50%,{[Rating]=>2},50%,{[Rating]=[]} ~a
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Smartlist modifier with expression to remove specific tracks?
« Reply #4 on: May 21, 2014, 01:28:53 pm »

I'd do it this way:

   1. Make a smartlist that selects the number of random albums you want.
   2. Make a second smartlist that includes the first smartlist, and then excludes the files you want excluded.
Logged
The opinions I express represent my own folly.

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Smartlist modifier with expression to remove specific tracks?
« Reply #5 on: May 21, 2014, 01:30:46 pm »

Sorry... I wasn't completely clear.

Yes, in your case because you are using the ~a modifier, you need to use the nested Smartlists method.  For this particular item, you'll probably want two smartlists (or maybe three, depending on the complexity of your exclusion rules).

1. The list you already have.
2. A new list that INCLUDES all files from List A, but then EXCLUDES whatever you want excluded (such as the search I posted).

Use List B for playback.  List A can be hidden away and never used directly, if you so choose.

You can nest Smartlists as many "tiers" deep as you want.  So, List A can have a regular search.  Then List B can INCLUDE List A, while Excluding List C.  List D can include Lists A, B, and C and have a modifier to remove duplicates.  And so on and so forth.

PS. Darn.  Ninja-ed.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

eCo

  • Recent member
  • *
  • Posts: 22
Re: Smartlist modifier with expression to remove specific tracks?
« Reply #6 on: May 21, 2014, 02:00:18 pm »

That does the trick.  Thanks so much!
Logged

eCo

  • Recent member
  • *
  • Posts: 22
Re: Smartlist modifier with expression to remove specific tracks?
« Reply #7 on: May 22, 2014, 12:31:23 am »

Okay, I'm going for pie in the sky now and I thought I found a simple way to do it, but it has turned out to not be as random as I'd hoped.

In this new smartlist version, I don't want to automatically exclude the alternate tracks. Instead, I want to choose at random just one track out of the original plus its alternates to include in the playlist.  This is particularly useful for "sessions" style cd's where there may be 3, 4 or even more takes for a given piece.

The idea I had was to find duplicates using the first few characters of the Name field (that is generally the same for the original and its alternates) plus the artist, and exclude all but one random track via the ~nodup modifier.  From the wiki regarding ~nodup: " The returned list include one random file from each [field]. (emphasis mine)

So I created a new field called "NameTrunc" (Trunc for "truncated") which is the expression Mid(Name,0,6).  It creates a 6 character string from the start of the Name field for each track.  I now modify my smartlist with ~nodup=[Artist],[NameTrunc] and the generated list works as expected except that the excluded tracks are NOT random.  The playlist is retaining the first (lowest numbered) track of the 'duplicates' which is usually the original version of the piece.

This behavior doesn't seem fixable to me, but I'm open to suggestions.  (And perhaps the wiki should be corrected.  ::) )

After reviewing several generated lists, I've concluded both approaches remove alternates with very low error rates but they 'miss' in opposite directions.  A 'miss' using the 'alternate take exclusion' approach of the previous posts leads to the retention of an undesirable track, whereas a 'miss' in this approach leads to the removal of a desirable track.  I guess I would prefer the former over the latter even tho the former is somewhat 'messy'.  To wit, I had to pool 6 or 7 smartlists to account for all the different nomenclatures used for alternate takes, issues, versions, etc., and I probably still haven't found them all.



Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Smartlist modifier with expression to remove specific tracks?
« Reply #8 on: May 22, 2014, 01:42:00 am »


The idea I had was to find duplicates using the first few characters of the Name field (that is generally the same for the original and its alternates) plus the artist, and exclude all but one random track via the ~nodup modifier.  From the wiki regarding ~nodup: " The returned list include one random file from each [field]. (emphasis mine)

So I created a new field called "NameTrunc" (Trunc for "truncated") which is the expression Mid(Name,0,6).  It creates a 6 character string from the start of the Name field for each track.  I now modify my smartlist with ~nodup=[Artist],[NameTrunc] and the generated list works as expected except that the excluded tracks are NOT random.  The playlist is retaining the first (lowest numbered) track of the 'duplicates' which is usually the original version of the piece.

This behavior doesn't seem fixable to me, but I'm open to suggestions.  (And perhaps the wiki should be corrected.  ::) )

This might explain what you are seeing:

    http://yabb.jriver.com/interact/index.php?topic=88760.msg609131#msg609131
Logged
The opinions I express represent my own folly.

eCo

  • Recent member
  • *
  • Posts: 22
Re: Smartlist modifier with expression to remove specific tracks?
« Reply #9 on: May 22, 2014, 10:11:02 am »

Hot darn....that fixed it!

I applied a random sort prior to the ~nodup=[Artist],[NameTrunc] then re-sorted, and now I'm generating unique album versions with no duplicated tracks on each refresh of the smartlist.

That's just too slick.  Thanks again!
Logged
Pages: [1]   Go Up