INTERACT FORUM

Please login or register.

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

Author Topic: Smartlist logic breakdown help  (Read 3694 times)

Vocalpoint

  • Citizen of the Universe
  • *****
  • Posts: 2007
Smartlist logic breakdown help
« on: July 06, 2016, 09:16:56 am »

In an on going effort - I am adding some new SL action to the library and found this classic example in the WIKI:

"Select up to 20 songs from different artist, with focus on newly released and imported music, but also some old classics. "

[media type]=[audio] ~mix=20,50%,{[rating]=[],3,4,5 [date (year)]=2004-2006 ~sort=[number plays],[Last Played]-d,[date imported]-d ~%=50 ~sort=random},20%,{[rating]=[],3,4,5 [date (year)]=2000-2003 ~sort=[number plays],[Last Played]-d,[date imported]-d ~%=50 ~sort=random},15%,{[rating]=[],4,5 [date (year)]=1990-1999 ~sort=[number plays],[Last Played]-d,[date imported]-d ~%=50 ~sort=random},10%,{[rating]=[],4,5 [date (year)]=1980-1989 ~sort=[number plays],[Last Played]-d,[date imported]-d ~%=50 ~sort=random},5%,{[rating]=[],5 [date (year)]=<1980 ~sort=[number plays],[Last Played]-d,[date imported]-d ~%=50 ~sort=random} ~nodup=[Artist]

Can someone help me understand some parts of this behemoth :) I get the ratings and the year parameters etc but what's with all the "-d" ,"~sort random" and number of plays?

Also - if I understand this correctly - when using Mix - I can combine ratings AND a date range within the percentages? For my use - I am really keen on using Mix to pull a higher ratio of higher rated songs for specific date ranges but am having a hard time assembling this in the Smartlist window.

Finally - for this Smartlist above - is that long string of text all typed in a single long field under Modify Results?

Whoever came up with that one is brilliant!

Appreciate any help in deciphering this thing so I understand what's going on with it.

Cheers!

VP
Logged

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9165
Re: Smartlist logic breakdown help
« Reply #1 on: July 06, 2016, 09:34:15 am »

"-d" means "descending"

I may be wrong, but I think that smartlist was born from this, eleven year old post...
http://yabb.jriver.com/interact/index.php?topic=29940.msg206134#msg206134

For the "Mix", you can specify independent searches inside the curly braces, as many as you like, and once MC has them worked out, it presents your mix to you.

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9165
Re: Smartlist logic breakdown help
« Reply #2 on: July 06, 2016, 09:43:12 am »

If you break it down like so:

[media type]=[audio] ~mix=20,
         50%,{[rating]=[],3,4,5 [date (year)]=2004-2006 ~sort=[number plays],[Last Played]-d,[date imported]-d ~%=50 ~sort=random},
         20%,{[rating]=[],3,4,5 [date (year)]=2000-2003 ~sort=[number plays],[Last Played]-d,[date imported]-d ~%=50 ~sort=random},
         15%,{[rating]=[],4,5 [date (year)]=1990-1999 ~sort=[number plays],[Last Played]-d,[date imported]-d ~%=50 ~sort=random},
         10%,{[rating]=[],4,5 [date (year)]=1980-1989 ~sort=[number plays],[Last Played]-d,[date imported]-d ~%=50 ~sort=random},
         5%,{[rating]=[],5 [date (year)]=<1980 ~sort=[number plays],[Last Played]-d,[date imported]-d ~%=50 ~sort=random} ~nodup=[Artist]

It's a bit easier to see what's going on.
It does need to be in one single line, yes, but remember, you can construct the the thing in a text editor, then paste it into the import/export box of the smartlist editor.

Vocalpoint

  • Citizen of the Universe
  • *****
  • Posts: 2007
Re: Smartlist logic breakdown help
« Reply #3 on: July 06, 2016, 09:53:45 am »

If you break it down like so:

[media type]=[audio] ~mix=20,
         50%,{[rating]=[],3,4,5 [date (year)]=2004-2006 ~sort=[number plays],[Last Played]-d,[date imported]-d ~%=50 ~sort=random},
         20%,{[rating]=[],3,4,5 [date (year)]=2000-2003 ~sort=[number plays],[Last Played]-d,[date imported]-d ~%=50 ~sort=random},
         15%,{[rating]=[],4,5 [date (year)]=1990-1999 ~sort=[number plays],[Last Played]-d,[date imported]-d ~%=50 ~sort=random},
         10%,{[rating]=[],4,5 [date (year)]=1980-1989 ~sort=[number plays],[Last Played]-d,[date imported]-d ~%=50 ~sort=random},
         5%,{[rating]=[],5 [date (year)]=<1980 ~sort=[number plays],[Last Played]-d,[date imported]-d ~%=50 ~sort=random} ~nodup=[Artist]

It's a bit easier to see what's going on.
It does need to be in one single line, yes, but remember, you can construct the the thing in a text editor, then paste it into the import/export box of the smartlist editor.

Awesome. Now what is the significance of this:

"~%=50"

near the end of each line?

And why this:

~sort=[number plays]

? How does number of plays (Or lasted played) work into it?

Seems like a lot of sorting going on inside the construct?

Finally - this - ~sort=random

I thought a Smartlist (and especially one with "MIX" in it) was doing random by default?

VP
Logged

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9165
Re: Smartlist logic breakdown help
« Reply #4 on: July 06, 2016, 10:16:43 am »

~%=50 - This means, once you have the results, just give me half of them, discard the other half. It keeps the top half, so sorting is important. Having specified sorting rules to get at the files you want for that particular part of the mix, their order is subsequently randomised.

~sort=[number plays],[last played]-d,[date imported]-d - These push least played stuff to the top of the list, so they get caught by the ~%=50 rule. As you play these more, they will drop down the list, and new stuff will become "least played" and so the list remains fresh, automatically.

RE: ~sort=random - You may be right. That is an old ~mix string from way back in its early days. It's certainly not doing any harm, nor messing with the results.

Vocalpoint

  • Citizen of the Universe
  • *****
  • Posts: 2007
Re: Smartlist logic breakdown help
« Reply #5 on: July 06, 2016, 10:21:34 am »

~%=50 - This means, once you have the results, just give me half of them, discard the other half. It keeps the top half, so sorting is important. Having specified sorting rules to get at the files you want for that particular part of the mix, their order is subsequently randomised.

~sort=[number plays],[last played]-d,[date imported]-d - These push least played stuff to the top of the list, so they get caught by the ~%=50 rule. As you play these more, they will drop down the list, and new stuff will become "least played" and so the list remains fresh, automatically.

RE: ~sort=random - You may be right. That is an old ~mix string from way back in its early days. It's certainly not doing any harm, nor messing with the results.

Very cool. This is exactly what I was looking for. Appreciate the help understanding the concept here.

Cheers!

VP
Logged

Vocalpoint

  • Citizen of the Universe
  • *****
  • Posts: 2007
Re: Smartlist logic breakdown help
« Reply #6 on: July 07, 2016, 01:03:23 pm »

~%=50 - This means, once you have the results, just give me half of them, discard the other half. It keeps the top half, so sorting is important. Having specified sorting rules to get at the files you want for that particular part of the mix, their order is subsequently randomised.

~sort=[number plays],[last played]-d,[date imported]-d - These push least played stuff to the top of the list, so they get caught by the ~%=50 rule. As you play these more, they will drop down the list, and new stuff will become "least played" and so the list remains fresh, automatically.

Still something very strange with this smartlist. Regardless of what total number of tracks I ask for at the start of the Mix parameter - I never actually get that number of tracks. It's always less.

Here what it current looks like:

[Media Type]=[audio] +[Chart]=[Billboardİ Rock Tracks] -[Style]=[Alternative Metal],[Hard Rock],[Heavy Metal],[Pop Adult]

~mix=40

,50%,{[rating]= 4,5 [date (year)]=2005-2016 ~sort=[number plays],[Last Played]-d,[date imported]-d ~%=50 ~sort=random}
,20%,{[rating]= 4,5 [date (year)]=1995-2004 ~sort=[number plays],[Last Played]-d,[date imported]-d ~%=50 ~sort=random}
,15%,{[rating]= 4,5 [date (year)]=1985-1994 ~sort=[number plays],[Last Played]-d,[date imported]-d ~%=50 ~sort=random}
,10%,{[rating]= 4,5 [date (year)]=1975-1984 ~sort=[number plays],[Last Played]-d,[date imported]-d ~%=50 ~sort=random}
,5%,{[rating]= 4,5 [date (year)]=<1975 ~sort=[number plays],[Last Played]-d,[date imported]-d ~%=50 ~sort=random}

~nodup=[Artist]

If I ask for 20 tracks as originally stated - I get 17. If I ask for 40 - I get 32.

Also - I am specifically targetting tracks with ratings of 4 or 5 - but am seeing tracks returned with a rating of 1 etc.

Do the items at the top of the constuct take priority? In my case I am targetting ONLY tracks tagged with a chart = "Billboard Rock Tracks" and am dropping a few styles that I do not want to appear.

But I have a ton of tracks that meet the "chart" requirement - without having to resort to getting one with a rating of 1?

Thoughts?

VP
Logged

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9165
Re: Smartlist logic breakdown help
« Reply #7 on: July 07, 2016, 05:57:56 pm »

I'm not sure about the Ratings thing. I do know that the wizard can be funny about things like "[rating]=4,5". That works in the search bar, but I'm sure the wizard wants it as [rating]=4;5"

**I just pasted a string as an example at the end of this post, copied from your post above, and when I went to change the ratings rule, I found an extra space, which will definitely break the rule and explains why you're getting one star tracks...

[rating]= 4,5 should be...
[rating]=4,5

The easiest way to check that is to change the rule to "[rating]=>=4"
which converts to "greater than or equal to"

As for number of tracks returned, the final rule to remove duplicated artists will reduce the list size as it is not a part of the ~mix rule. I'm not sure what would happen if you removed that last rule and instead, added it to the end of each of the five mix rules, inside the curly braces. Might be worth a try...

Whilst constructing a complex mix like that, it's probably a good idea to check each search independently, especially if the mix result looks suspect.

So, for example, from the first search in the mix, try opening a new smartlist for testing with (press F9), and paste the search into the import/export dialogue
[rating]=>=4 [date (year)]=2005-2016 ~sort=[number plays],[Last Played]-d,[date imported]-d ~%=50 ~sort=random ~nodup=[artist]

Check that you're happy with that, and paste the next one in, replacing the first.

Vocalpoint

  • Citizen of the Universe
  • *****
  • Posts: 2007
Re: Smartlist logic breakdown help
« Reply #8 on: July 18, 2016, 05:21:44 pm »

Marko

I am continuing to experiment with this and need a bit more info on this piece:

~sort=[number plays],[last played]-d,[date imported]-d -

You said this logic "pushes" least played stuff to the top of the list, so they get caught by the ~%=50 rule. As you play these more, they will drop down the list, and new stuff will become "least played" and so the list remains fresh, automatically.

I love the "auto freshness" vibe that is implied here - but does this logic catch tracks that have NEVER been played at all?

Example: If I have 100 5 star rated songs - and 10 songs have been played in the last week and the other 90 have NEVER been played.

Will the smartlist logic above - will MC automatically lean on those 90 "Never played" BEFORE coming back to any of the 10 that saw some play in the past?

It is critical for me to get to formula (SL) that automatically gives me a tidy dose of NEVER played before it starts in with repeats of stuff already played in the past. (until of course everything racks up a play :)

Make sense?

Appreciate your thoughts.

VP
Logged

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9165
Re: Smartlist logic breakdown help
« Reply #9 on: July 19, 2016, 02:48:56 am »

I've not tested this out, but I don't think it will, no. Sorting empty values is dealt with by the setting at "Tools > Options > Tree & View > Sorting > Sort empty strings last"

It's either on, or off, and covers everything, everywhere. I'm almost certain the default is "On". I'm guessing you would probably want to keep it this way, rather than change all of your lists' behaviours for the sake of this project?

In your given example:
Quote
If I have 100 5 star rated songs - and 10 songs have been played in the last week and the other 90 have NEVER been played.

I'm tempted to say that the answer to your question is "Yes", but only because the ten tracks played previously will be sorted to the top, with 90 "Never Played" tracks beneath, so a large chunk of those are going to get caught in the results, but once you've reached 50 played and 50 never played, I don't *think* you'll get any more never played tracks in your results.

I took one of the existing mix searches and tried to "OR" some never played results into it, but I just made a horrible mess.
Unless someone else can think of a clever way to force a dose of unplayed tracks in there, I think you will have to specify them as an exclusive part of your ~mix criteria, in its simplest form, something along the lines of:
5%,{[Number Plays]=[]}

and then, I'm not sure what ~mix will do if there are no "never played" tracks to add. If I can find time later on, I may try and test this because I'm curious.
In the past when I played with ~mix, if, for example, I asked for a mix of 100 tracks, but the set parameters only returned a total of ten tracks, ~mix would repeat those ten tracks, ten times in order to satisfy the 100 track specification...
Pages: [1]   Go Up