INTERACT FORUM

Please login or register.

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

Author Topic: a little help building a smartlist  (Read 8182 times)

Saucepan

  • Junior Woodchuck
  • **
  • Posts: 73
a little help building a smartlist
« on: August 23, 2010, 09:36:26 pm »

i'm trying to build a smartlist that will randomly select an album and play 3 songs from it.

here's the hard part (for me):

i want every year in my library to be covered (i.e. an album from 1981 that will play 3 songs from a random album, then skip to an album from 2003 that will play 3 songs from a random album, then skip to an album from 1997 that will...) and on and on.

every year. 3 songs per album. all randomly selected.
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: a little help building a smartlist
« Reply #1 on: August 23, 2010, 10:40:33 pm »

Such as :

~limit=-1,3,[Year]

This selects all Years available, 3 albums from each.
Logged
The opinions I express represent my own folly.

Saucepan

  • Junior Woodchuck
  • **
  • Posts: 73
Re: a little help building a smartlist
« Reply #2 on: August 23, 2010, 10:54:31 pm »

that doesn't do it.

i want the smartlist to:

grab a random year, select a random album from it, and then play any 3 songs from it.

then...

jump to the next random year, the next random album from that year, and play any 3 songs from it.

and on and on until every year in my library has been hit.
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: a little help building a smartlist
« Reply #3 on: August 23, 2010, 11:21:52 pm »

I misunderstood.

Let see if this works for you...

[Media Type]=[Audio] ~limit=-1,3,[Album] ~limit=-1,-1[Year] ~n=100000

Sort also by track if you want them in track order.


Sorry, doesn't work.
Logged
The opinions I express represent my own folly.

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9139
Re: a little help building a smartlist
« Reply #4 on: August 24, 2010, 01:12:08 am »

MrC, you were real close there...

This ought to do the trick:

[media type]=[audio] ~limit=-1,3,[album],[year] ~sort=[album]

regards,
-marko.

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: a little help building a smartlist
« Reply #5 on: August 24, 2010, 01:42:48 am »

I might have tried this.

The problem is that it selects the year several times.

I have 53 different year categories.  So, the smartlist should select 53 (years) * 1 (album per year) * 3 (tracks per album) for a total of about 159 tracks.  This expression returns about 3800 files.
Logged
The opinions I express represent my own folly.

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9139
Re: a little help building a smartlist
« Reply #6 on: August 24, 2010, 02:01:07 am »

Indeed...

This is closer, but picks three different tracks from the same albums every time:

[Media Type]=[audio] ~limit=-1,3,[album] ~sort=[Album] ~limit=-1,3,[year]

gappie

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4580
Re: a little help building a smartlist
« Reply #7 on: August 24, 2010, 02:02:20 am »

does this one do the trick then?

[Media Type]=[audio] ~limit=-1,3,[album] ~sort=[Album] ~limit=-1,3,[year]

 :)
gab

edit... was a close finish..  :)
Logged

rick.ca

  • Citizen of the Universe
  • *****
  • Posts: 3729
Re: a little help building a smartlist
« Reply #8 on: August 24, 2010, 02:08:47 am »

Come on guys, listen to the customer! Random year, random album, three tracks! ;)

I couldn't figure out how to do it with a smartlist either. :(

I did come up with this rather ugly solution:

1. Create a Categories view with one category—[Year - Album]. Set the sorting for that category to random.
2. Set the Rules for file display to [Album Type]=[Single artist /(complete/)] ~limit=-1,3,[Year - Album]
3. In the resulting view, sort the categories in descending order of Track #. This will move those with only 1 or 2 tracks to the bottom of the list.
4. For reasons I don't understand, step 3 may undo the random sort setting in step 1. If it does, reset it and redo step 3. ::)
5. Select all categories and Play.

In my library, Year is that in which the track was originally released, which may be earlier than the year the Album was released. I felt this solution was a better interpretation of the requirement. As stated, the three tracks from an album would likely be from different years whenever a compilation album is picked. If there are large portion of compilation albums in the library, a better approach would be to use a [Artist] - [Year] expression field instead of [Year - Album].

Gappie posted before I was finished...Getting warmer, but how are the results to be played in random year-album order?
Logged

gappie

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4580
Re: a little help building a smartlist
« Reply #9 on: August 24, 2010, 02:19:05 am »

ok... this one i think does it:
[Media Type]=[audio] ~limit=-1,1,[album] ~limit=-1,1,[year] ~a ~limit=-1,3,[album],[album artist (auto)]

 :)
gab

nope.. only tracks 1-3
Logged

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9139
Re: a little help building a smartlist
« Reply #10 on: August 24, 2010, 02:41:54 am »

This looks like it :)

[Media Type]=[audio] ~nodup=[date],[album] ~nodup=[date] ~a ~sort=Random ~limit=-1,3,[album] ~sort=[album]

Swapped the sort from date to album. That was for me checking, now it should be good to go.

gappie

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4580
Re: a little help building a smartlist
« Reply #11 on: August 24, 2010, 02:59:46 am »

nice idea too marco.. but that still sorts by album.  8)

this is what i tried and i think works:
[Media Type]=[audio] ~limit=-1,1,[album] ~limit=-1,1,[year] ~a ~seq ~sort=Random ~limit=-1,3,[album],[album artist (auto)] ~sort=[Sequence]

 :P
gab
Logged

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9139
Re: a little help building a smartlist
« Reply #12 on: August 24, 2010, 03:22:17 am »

Looks good gappie, That was a bit of chuckle huh :)

A welcome break from the more serious and pressing issue of dealing with the fact that my 5 -6 yr old x-fi platinum card appears to have died on me :(

gappie

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4580
Re: a little help building a smartlist
« Reply #13 on: August 24, 2010, 03:26:44 am »

Looks good gappie, That was a bit of chuckle huh :)

A welcome break from the more serious and pressing issue of dealing with the fact that my 5 -6 yr old x-fi platinum card appears to have died on me :(
that was fun indeed.  :)
and a nice thing to keep myself from working too..

im sorry to hear about the card.. hope he has just a bad hair day...
Logged

rick.ca

  • Citizen of the Universe
  • *****
  • Posts: 3729
Re: a little help building a smartlist
« Reply #14 on: August 24, 2010, 03:37:29 am »

Now wait just a minute. Before we declare gappie the winner of this round of Smarlist Smack-Down, I would like to get some value for my headache!

An explanation/walk-through of how these expressions work would be much appreciated. I wonder if a variation of this can address my concern about tracks from compilation albums being from different years. Okay, I'm not really concerned about that. But I'd love to be able to construct expressions that handle whatever the wacky requirement. ;)
Logged

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9139
Re: a little help building a smartlist
« Reply #15 on: August 24, 2010, 04:04:22 am »

[Media Type]=[audio] = Only show audio
~limit=-1,1,[album] = show 1 track from every existing album
~limit=-1,1,[year] = show 1 example of each year that exists

The list of all audio has now been filtered down to include 1 random track from 1 random album for each year that exists in the library.

~a = show all the tracks of the albums listed (these are listed randomly, grouped by album)
~seq = give each list entry a sequential number
~sort=Random = shuffle the list
~limit=-1,3,[album],[album artist (auto)] = Give 3 tracks from each album (the [album artist (auto)] inclusion helps prevent us getting 9 tracks, all from "Greatest Hits" albums by different artists, and you only get one (Multiple Artists) album.
~sort=[Sequence] = Returns the list to the 'seq' order specified earlier. (as this was grouped by album, it effectively puts each of the 3 tracks back in their album grouping)

Easy huh? Just needs a little lateral thinking!!

gappie

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4580
Re: a little help building a smartlist
« Reply #16 on: August 24, 2010, 04:04:34 am »

I would like to get some value for my headache!

;D
no.. winners, and there is sill a minor problem with my solution.  :-X
of course compilation albums with tracks from different years might be a problem too in this case, but i guess that that is inherent to the question.
the trick in my expression is the use of the sequence. remember that sequence does not work when you put 'expand to full album' after it.
what my solution does is: take one track from every album > take for every year one track from that list > expand to full album > and turn on the sequence>
... now every track gets its own number in order sorted randomly one album per year and grouped by album..
> the next limit takes three tracks per album, but hussels the list again > by sorting it back to the sequence it is sorted randomly but grouped by album with only three trcks per album

does that answer your question?

 :)
gab

Edit.. marko was quicker again .. guess two explanations wont hurt.  ;)
Logged

rossp

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 772
Re: a little help building a smartlist
« Reply #17 on: August 24, 2010, 06:59:37 am »

Quote
Smarlist Smack-Down

LOL ;)
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72439
  • Where did I put my teeth?
Re: a little help building a smartlist
« Reply #18 on: August 24, 2010, 07:34:41 am »

I added this to the wiki.  Great fun.  Thanks.
Logged

rick.ca

  • Citizen of the Universe
  • *****
  • Posts: 3729
Re: a little help building a smartlist
« Reply #19 on: August 24, 2010, 02:04:35 pm »

Thanks marko and gappie. My headache is gone. I won't dare say I understand, but I'm much less confused.  :D

I was completely missing the meaning and rather critical purpose of ~seq. I was also forgetting ~a is the only such command—there's no equivalent for expanding selections based on categories other than Album. So I need to bear that in mind when I dream of what might be done with such expressions.

This exercise also reminds me the question is as important as the solution. This solution is true to the literal meaning of the question—in that each year that exists has an equal chance of being selected (every year will be represented once). Then an album from each year is selected. That makes perfect sense if I want a flat distribution by year. (And that may have been the very point of this request.) But if what I really want is a distribution that reflects that of my collection, it would suffice to just choose albums at random.
Logged

Saucepan

  • Junior Woodchuck
  • **
  • Posts: 73
Re: a little help building a smartlist
« Reply #20 on: August 24, 2010, 06:07:18 pm »

This is some pretty impressive customer service I must say.

Thank you gappie for that great solution, and to everyone else that helped.
Logged

Vocalpoint

  • Citizen of the Universe
  • *****
  • Posts: 2007
Re: a little help building a smartlist
« Reply #21 on: August 24, 2010, 06:30:58 pm »

[Media Type]=[audio] = Only show audio
~limit=-1,1,[album] = show 1 track from every existing album
~limit=-1,1,[year] = show 1 example of each year that exists

The list of all audio has now been filtered down to include 1 random track from 1 random album for each year that exists in the library.

~a = show all the tracks of the albums listed (these are listed randomly, grouped by album)
~seq = give each list entry a sequential number
~sort=Random = shuffle the list
~limit=-1,3,[album],[album artist (auto)] = Give 3 tracks from each album (the [album artist (auto)] inclusion helps prevent us getting 9 tracks, all from "Greatest Hits" albums by different artists, and you only get one (Multiple Artists) album.
~sort=[Sequence] = Returns the list to the 'seq' order specified earlier. (as this was grouped by album, it effectively puts each of the 3 tracks back in their album grouping)

Easy huh? Just needs a little lateral thinking!!

Wow...fascinating. Would anyone be able to screen-cap the end result as it would appear in the Smartlist dialog?

As a Smartlist Smackdown Newb...I must admit - I have no idea how to input this...except for maybe [Media Type]=[audio] :)

Cheers!

VP
Logged

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: a little help building a smartlist
« Reply #22 on: August 24, 2010, 06:41:47 pm »

Add a new smartlist and press the Import/Export button in the Edit Smartlist window. Paste Gappie's final rule into the import/export box:

[Media Type]=[audio] ~limit=-1,1,[album] ~limit=-1,1,[year] ~a ~seq ~sort=Random ~limit=-1,3,[album],[album artist (auto)] ~sort=[Sequence]
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

Vocalpoint

  • Citizen of the Universe
  • *****
  • Posts: 2007
Re: a little help building a smartlist
« Reply #23 on: August 24, 2010, 08:59:20 pm »

Add a new smartlist and press the Import/Export button in the Edit Smartlist window. Paste Gappie's final rule into the import/export box:

[Media Type]=[audio] ~limit=-1,1,[album] ~limit=-1,1,[year] ~a ~seq ~sort=Random ~limit=-1,3,[album],[album artist (auto)] ~sort=[Sequence]

Thanks! Worked great.

Cheers!

VP
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: a little help building a smartlist
« Reply #24 on: August 24, 2010, 11:17:40 pm »

This thread caused me to start some work on the Wiki page for smartlists[.  Perhaps someone with some better understanding of how things work can take a look and offer any clarifications.  I have some embedded questions and TBDs.

Have I mentioned how much I despise editing via Wiki - what should take 20 minutes takes hours.  We haven't advanced much from troff/nroff.

Perhaps the OP can add [Solved] to the Subject and make it better describe this particular smartlist request?
Logged
The opinions I express represent my own folly.

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72439
  • Where did I put my teeth?
Re: a little help building a smartlist
« Reply #25 on: August 25, 2010, 07:39:52 am »

This thread caused me to start some work on the Wiki page for smartlists.
Thanks for that!
Logged
Pages: [1]   Go Up