INTERACT FORUM

Please login or register.

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

Author Topic: Smartlist - 2 songs by each artist sorted randomly by artist  (Read 1608 times)

ventilatedslacks

  • Regular Member
  • Junior Woodchuck
  • **
  • Posts: 87
  • bouncing off the walls, mr jones is back...
Smartlist - 2 songs by each artist sorted randomly by artist
« on: February 08, 2006, 08:40:45 pm »

Ok, I've been trying to figure out for a long time how to do this in Media Center and I'm convinced that, despite all the power of Smartlists, what I want to do is not possible.

I want to have a playlist with no more than 2 songs per artist. And I know that I can achieve this with the following:

[genre]=[rock] ~limit=-1,2,[Artist]

And I can sort it by Artist by adding ~sort=Artist

But this means that I can only listen to the playlist in alphabetical order by artist. What I want to do is something akin to when radio stations have "Two for Tuesday" - two songs by each artist, but the pairs of songs are delivered randomly. So two songs by The Replacements might be followed by two songs by AC/DC.

Is there any way to do this??
Logged

PollyQ

  • Regular Member
  • Junior Woodchuck
  • **
  • Posts: 65
Re: Smartlist - 2 songs by each artist sorted randomly by artist
« Reply #1 on: February 09, 2006, 09:33:07 am »

This isn't exactly what you're looking for, but it's a reasonable facsimile.

Create a new calculated field (I called mine RightSort), with this formula:

     Mid([Artist,0],1,-1)

and use that for the sort.  When you do that, it will sort on the Artist, but start at the 2nd letter.   It won't actually be random, but it might feel more random.
Logged

ventilatedslacks

  • Regular Member
  • Junior Woodchuck
  • **
  • Posts: 87
  • bouncing off the walls, mr jones is back...
Re: Smartlist - 2 songs by each artist sorted randomly by artist
« Reply #2 on: February 10, 2006, 08:11:12 pm »

Very cool. In playing around with this (4th character, 5th character, etc), I've discovered that changes to calculated fields using expressions unfortunately do not take effect without restarting the program!

A couple of followup questions:

1. What is the 0 in ([Artist,0] used for?
2. Is there any way (perhaps using expressions?) to limit the playlist only to those artists with at least two tracks. I've got the limit indicating no more than 2 songs, but can you specify at least and no more than 2 songs?

Thanks for your great suggestion!
Logged

PollyQ

  • Regular Member
  • Junior Woodchuck
  • **
  • Posts: 65
Re: Smartlist - 2 songs by each artist sorted randomly by artist
« Reply #3 on: February 11, 2006, 12:27:44 pm »

The ",0" in "[Artist,0]" turns off any automatic formatting that MC applies.  In this case, it makes no difference.

To get exactly 2 songs by each artist, add a Duplicates modifier, e.g.

[Genre]=[Classic Rock],[Oldies] ~sort=[Random] ~sort=[RightSort] ~dup=[Artist] ~limit=-1,2,[Artist]

Without the "~sort=[Random]", you always get the same 2 songs even if you refresh the list, which didn't seem quite the thing.
Logged

ventilatedslacks

  • Regular Member
  • Junior Woodchuck
  • **
  • Posts: 87
  • bouncing off the walls, mr jones is back...
Re: Smartlist - 2 songs by each artist sorted randomly by artist
« Reply #4 on: February 11, 2006, 08:22:16 pm »

Thank you, thank you, thank you! I never would have figured this out without your help  :)
Logged

PollyQ

  • Regular Member
  • Junior Woodchuck
  • **
  • Posts: 65
Re: Smartlist - 2 songs by each artist sorted randomly by artist
« Reply #5 on: February 11, 2006, 09:27:42 pm »

Happy to help -- I enjoyed the challenge!   8)
Logged
Pages: [1]   Go Up