INTERACT FORUM

Please login or register.

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

Author Topic: Smartlist Question  (Read 2425 times)

EpF

  • Citizen of the Universe
  • *****
  • Posts: 649
Smartlist Question
« on: October 19, 2005, 07:55:12 pm »

Anyone know why this isn't working:

I've got 2 sets of parameters, each set is enclosed in brackets with an 'or' between the two sets.  The second set of brackets has a couple of limits included which keeps the number of results per artist and per album down. 

The problem is that the limits seem to be acting on the first set of parameters as well, so instead of getting all my 5-star tracks and limiting the 4-star ones to 3 per artist and 2 per album, I'm getting 3 tracks per artist and 2 per album no matter what the rating...

Code: [Select]
(rating=5 [Season]=[Autumn],[Winter] [Instrumentation]=[Instrumental],[Instrumental (Vocal)],[Vocal Sample]) or (rating=4 [Season]=[Autumn],[Winter] [Instrumentation]=[Instrumental],[Instrumental (Vocal)],[Vocal Sample] ~limit=-1,3,[artist] ~limit=-1,2,[album])
 ?

hit_ny

  • Citizen of the Universe
  • *****
  • Posts: 3310
  • nothing more to say...
Re: Smartlist Question
« Reply #1 on: October 20, 2005, 02:16:40 am »

What if you separate it out into individual playlists and combine at the end.

Code: [Select]
playlist1 = rating=5 [Season]=[Autumn],[Winter] [Instrumentation]=[Instrumental],[Instrumental (Vocal)],[Vocal Sample]
Code: [Select]
playlist2 = rating=4 [Season]=[Autumn],[Winter] [Instrumentation]=[Instrumental],[Instrumental (Vocal)],[Vocal Sample] ~limit=-1,3,[artist] ~limit=-1,2,[album]
Code: [Select]
final playlist = playlist 1 or playlist 2
Marko mentioned earlier about some voodoo going on when 2 or more modifiers are used together, apparently the parentheses don't have any effect.

Logged

EpF

  • Citizen of the Universe
  • *****
  • Posts: 649
Re: Smartlist Question
« Reply #2 on: October 20, 2005, 04:37:03 am »

What if you separate it out into individual playlists and combine at the end.
Yes, that would work, thanks; I was hoping I wouldn't have to do that though, 'cause I was planning to make quite a few more lists like this.  It'll be more work and a lot more clutter...

Marko mentioned earlier about some voodoo going on when 2 or more modifiers are used together, apparently the parentheses don't have any effect.
I tried it with just one of the limiters and the effect was the same..

hit_ny

  • Citizen of the Universe
  • *****
  • Posts: 3310
  • nothing more to say...
Re: Smartlist Question
« Reply #3 on: October 20, 2005, 07:15:57 am »

Would work ? or did work.

We need to understand the precedence rules that modifiers have within an expression. Does any one know what they are ?

Using the playlist at the top of this thread

(plist(1)) or (plist(2) limit(1) limit(2))

One expects plist(1) & plist(2) to be calculated separately and OR'd at the end.

But i suspect whats happening is

(plist(1) or plist(2) ) and then limit (1) limit(2) [or some other combination]

How do you isolate modifiers from one another, apart from separating them into individual playlists ?

Logged

EpF

  • Citizen of the Universe
  • *****
  • Posts: 649
Re: Smartlist Question
« Reply #4 on: October 20, 2005, 02:44:19 pm »

Would work ? or did work.
Would work; I know it would, but I haven't done it.  I used BPM to limit the results for the moment.

But i suspect whats happening is

(plist(1) or plist(2) ) and then limit (1) limit(2) [or some other combination]

How do you isolate modifiers from one another, apart from separating them into individual playlists?
I think you're right; to experiment, I removed the second limiter and changed the first to return just one track per artist, and that was all I got for both sets of parentheses.  So the question is not 'How do you isolate modifiers from one another?', it's 'How do you isolate modifiers at all?'

Anybody? Matt?

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9143
Re: Smartlist Question
« Reply #5 on: October 21, 2005, 04:08:34 am »

I have a fair ammount of 'album art' imported and tagged. It's all hidden, except for two viewschemes designed specifically for them.

What drew my attention to this was the use of the "full albums" modifier.
If I specified something like:  mt=audio r=5 ~a I noticed that the album art was being drawn into the results, ignoring the [media type] rule.
I was informed that this was by design. (I searched for that reply, but guess the thread got mislaid somewhere)

I've had similar problems with ~limit in the past and just looked for an alternative approach to my goal, assuming that I had bumped into another ~modifier design hurdle. I don't want to call them 'bugs' because they're not really, we very rarely get our cake, and eat too. The reasons for a given behaviour always tip the balance sensibly towards "find another way"

modifiers are like women...
often unpredictable, not easy to tame, but when you get it right, very useful indeed ;):D

-marko.

hit_ny

  • Citizen of the Universe
  • *****
  • Posts: 3310
  • nothing more to say...
Re: Smartlist Question
« Reply #6 on: October 21, 2005, 08:41:26 am »

modifiers are like women...
often unpredictable, not easy to tame, but when you get it right, very useful indeed ;):

Heh i won't comment about women cos i dont think even a lifetime's experience would suffice.

But modifiers must follow some clearly defined rules. Certain operators have precedence over others, in most programming languages the use of parentheses dictates the order of execution. Why should modifiers be any different.
Logged

EpF

  • Citizen of the Universe
  • *****
  • Posts: 649
Re: Smartlist Question
« Reply #7 on: October 21, 2005, 08:34:45 pm »

I am guessing your wife does not read Interact much.    8)
I bet you're right, LisaRCT!

..modifiers must follow some clearly defined rules. Certain operators have precedence over others, in most programming languages the use of parentheses dictates the order of execution. Why should modifiers be any different.
I agree; as it stands, to achieve the result I want (or any similar result), each set of parentheses with a limit in it would have to be put in its own smartlist, with a final smartlist to combine them all.  That makes for cumbersome organisation, and the inconsistency is frustrating.

The reasons for a given behaviour always tip the balance sensibly towards "find another way"
Not sure I understand this one, Marko; if you mean that there's a particular reason for the 'exceptional' behaviour of modifiers and there's some kind of trade-off, I'd like to know what that trade-off is.

In your example of the cover art, I can't see what the advantage is; if you wanted a list with complete albums plus the cover art, you could do it without having to have a modifier that ignored preceding parameters, so why design that inconsistency in in the first place?

 ?

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9143
Re: Smartlist Question
« Reply #8 on: October 22, 2005, 02:21:44 am »

You're right, the wife doesn't read interact so I'm safe there. I knew Lisa would be cool (Lisa is an online friend of mine, everyone say "ahhh") wasn't sure how mesue, twherreman or others might react. just a chuckle, you know, I enjoy the battle of the sexes, but no offense is ever intended.

I don't have any experience of programming languages so I'm not going to get caught out by any expectations drawn from that area, I just try to work out how MC does things and go with the flow. Guess I'm fortunate in that respect, though I do understand the gripe.

Matt explained it when I called 'bug' on the problem, and yesterday I searched, using the forum, and google, for quite some time looking for the thread but was unable to find it.

The library browser behaves in a similar fashion, and when I brought that up, it was suggested by Matt that I use access control instead. An access control toggle hotkey was half-promised at the time but it never did materialise :(
There's a new build cycle just starting, so maybe we can get it in there this time around.

What's really needed, is for a staff member to detail a "proper use" guide for modifiers that includes expected behaviours.
Well, after checking the available modifiers, the only ones that tend to baffle are:

~a and ~list

though having said that, ~mix can get a little unexpected at times, in that if you ask it to return say, 30 files from a particular search string, but there are only 15 results from the search, ~mix forces the instruction to be true by duplicating tracks untill the required number/percentage is met. Then you do a double-take when you see six tracks in the list, all displaying the currently playing icon. the ~nodupe modifier is needed to regain control.

-marko.

hit_ny

  • Citizen of the Universe
  • *****
  • Posts: 3310
  • nothing more to say...
Re: Smartlist Question
« Reply #9 on: October 22, 2005, 02:22:15 am »

I think the rule is one modifier per playlist. Any more and the results are ambiguous.
If more are needed you will have to break it out into separate playlists.

There are 7 modifiers atm (did i forget any ?)
- Database location
- Duplicates
- Full Albums
- Limit
- Or
- Sorting
- ~mix

Sorting is the only modifier i think that can be used with the other modifiers.
Logged

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9143
Re: Smartlist Question
« Reply #10 on: October 22, 2005, 02:47:49 am »

Morning hit_ny,
I found 10, assuming the tilde denotes modifier:

database location: ~d
Duplicates: ~dup or ~nodup
Full Albums: ~a
Limit: ~limit
Limit to n tracks: ~n
sort: ~sort
limit to s Megabytes: ~s
limit to t minutes: ~t
limits percentage of hits: ~%
mix: ~mix

This:
[media type]=audio ~limit=-1,1,[Album] ~sort=[date imported]-d ~n=5 ~a ~sort=[date imported],[album]

uses 4 of them and works. it returns the last 5 albums imported.
I *think* that the all-powerful fellows that are causing issues are ~a and ~limit, I also believe that results, unexpected or otherwise, depend largely upon the context in which they are used, and that the more complex the string, the more chance there is of quirkiness getting into the results.

hit_ny

  • Citizen of the Universe
  • *****
  • Posts: 3310
  • nothing more to say...
Re: Smartlist Question
« Reply #11 on: October 23, 2005, 11:45:23 am »

I *think* that the all-powerful fellows that are causing issues are ~a and ~limit, I also believe that results, unexpected or otherwise, depend largely upon the context in which they are used, and that the more complex the string, the more chance there is of quirkiness getting into the results.

OK, i was hoping to get this sorted out in this thread, once & for all.

~a & ~limit to be used once per playlist,  mutually exclusive from each other.

The smartlist at the top uses 2 ~limits at the end, so that's the best we are gonna get here.

I have not found a use for ~a to date..
Logged
Pages: [1]   Go Up