INTERACT FORUM

Please login or register.

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

Author Topic: Size of list library fields and smartlist  (Read 2289 times)

Baron Samedi

  • Recent member
  • *
  • Posts: 36
Size of list library fields and smartlist
« on: October 04, 2007, 01:11:53 pm »

Hi,

is there a way to get the size of a field of type list in a smartlist expression?

I have tagged my jazz tracks with an user field holding the list of the musicians involved, and i want to do a smartlist with an hour of trio (so with a list of 3 musicians). Is it possible?

Thanks!
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 71645
  • Where did I put my teeth?
Re: Size of list library fields and smartlist
« Reply #1 on: October 05, 2007, 07:38:28 am »

Hi,

is there a way to get the size of a field of type list in a smartlist expression?

I have tagged my jazz tracks with an user field holding the list of the musicians involved, and i want to do a smartlist with an hour of trio (so with a list of 3 musicians). Is it possible?

Thanks!
I believe it is.  I'm not an expert on this though.  You could try reading some of user Marko's posts on smartlists.
Logged

hit_ny

  • Citizen of the Universe
  • *****
  • Posts: 3310
  • nothing more to say...
Re: Size of list library fields and smartlist
« Reply #2 on: October 05, 2007, 08:58:13 am »

is there a way to get the size of a field of type list in a smartlist expression?
As in count the number of musicians in that list field and if its 3 then select it ?

..hmm...i dont think thats possible.

MC can count how many tracks match a certain field, but is not able to count *within* a field as yet.

On the subject of groupings, i've been wondering myself how to do this with jazz music.

So far best i can think of is to create a custom field called [Grouping] and fill in either duet, trio, quartet, quintet etc.,then all you would need to do is select an hr's or two of music that had [Grouping]=trio.

The idea of filling in accompanying artists so you can find music by an artist from an album they featured in as well as accompanied is what i plan to do as well. I think this subject might need its own topic.

How to tag jazz music so you can specify a few parameters and have MC pick a random selection and have it all sound reasonably coherent :D
Logged

Baron Samedi

  • Recent member
  • *
  • Posts: 36
Re: Size of list library fields and smartlist
« Reply #3 on: October 06, 2007, 04:03:09 am »

Hi, thanks for the replies,

looking for Marko's posts i found his solution for getting tracks with a list of a single element :
Code: [Select]
[=isequal([people],;,8)]=0The 8 is a substring search mode, so if there is a ';' in the field (which happens as soon as there is 2 elements in list, as ';' is the element separator) this is not a single person file.

(post is http://yabb.jriver.com/interact/index.php?topic=39665.0)

That's a smart idea, so i tried to apply it to my needs, but i didn't find a way to count a character in a field in the various functions available. isequal returns 1 wherever how many ; are there. I tried to search for 2 ;, but i don't know how to express it : i tried with some jokers (*;*;*) but it didn't seem to work.

About the jazz tagging, i'm using two fields : the existing "band", in which i store personel and instruments, usually copied/pasted from cduniverse or allaboutjazz when i'm too lazy to type it. I add a "line-up" (*) user fields, which is a list with all the musicians without instruments. I'm using these two fields because when i used only band i got different entries for the same artist if he played various instruments (soprano saxophone, alto and so on).

These two fields allow me to make these smartlists :

by instruments, by looking in "band" for it. Here's my "guitar jazz" smartlist :
Code: [Select]
[Media Type]=[Audio] [Genre]=[Jazz] [Band]="guitar" ~t=1h
and by perfomer, using the "line-up" field. Here's Pat Metheny :
Code: [Select]
[Media Type]=[Audio] [Line up]=[Pat Metheny] ~t=1h
I have made a View Scheme with the line-up field too.

Logged

hit_ny

  • Citizen of the Universe
  • *****
  • Posts: 3310
  • nothing more to say...
Re: Size of list library fields and smartlist
« Reply #4 on: October 06, 2007, 05:41:14 am »

looking for Marko's posts i found his solution for getting tracks with a list of a single element :
Code: [Select]
[=isequal([people],;,8)]=0The 8 is a substring search mode, so if there is a ';' in the field (which happens as soon as there is 2 elements in list, as ';' is the element separator) this is not a single person file.

(post is http://yabb.jriver.com/interact/index.php?topic=39665.0)

That's a smart idea, so i tried to apply it to my needs, but i didn't find a way to count a character in a field in the various functions available. isequal returns 1 wherever how many ; are there. I tried to search for 2 ;, but i don't know how to express it : i tried with some jokers (*;*;*) but it didn't seem to work.

Way i read it is that it only works if there is more than one element in a list (look for a ";"), so you can use it to find either
- if a list has more than one element  or the inverse.
- if a list has only one element. (find all solo's)

That's as far as it goes, looking at the wiki, there does not appear to be any function that can do more.

About the jazz tagging, i'm using two fields : the existing "band", in which i store personel and instruments, usually copied/pasted from cduniverse or allaboutjazz when i'm too lazy to type it. I add a "line-up" (*) user fields, which is a list with all the musicians without instruments. I'm using these two fields because when i used only band i got different entries for the same artist if he played various instruments (soprano saxophone, alto and so on).

These two fields allow me to make these smartlists :

by instruments, by looking in "band" for it. Here's my "guitar jazz" smartlist :
Code: [Select]
[Media Type]=[Audio] [Genre]=[Jazz] [Band]="guitar" ~t=1h

I guess you are using [Band] here in place of a user field called [Instrument] to imply what instrument the featured artist is playing.


and by perfomer, using the "line-up" field. Here's Pat Metheny :
Code: [Select]
[Media Type]=[Audio] [Line up]=[Pat Metheny] ~t=1h
I have made a View Scheme with the line-up field too.
So there is
- the [line up] field that contains all supporting artists as well as the featured artist.
- the [Band] field that contains only the instrument of the featured artist.

I was undecided whether to also add the instruments the featured artists were playing to the [line up] field, so instead of just the artist names maybe artist name (instrument) for each line up artist, but then this seems like a compound field of [Artist][Instrument].

But i think your method of just artist names only in line up is sufficient for a smartlist will find all tracks by an artist in either a featured or supporting role.

The other fields i was considering was
- [composer] for the track's composer to help find an artist's orginal work.
- [grouping] for number of players in the band.
- [styles] as indicated here
Logged

Baron Samedi

  • Recent member
  • *
  • Posts: 36
Re: Size of list library fields and smartlist
« Reply #5 on: October 07, 2007, 03:38:38 am »

Quote
Way i read it is that it only works if there is more than one element in a list (look for a ";"), so you can use it to find either
- if a list has more than one element  or the inverse.
- if a list has only one element. (find all solo's)

That's it.

Quote
I guess you are using [Band] here in place of a user field called [Instrument] to imply what instrument the featured artist is playing.

Not exactly : the band is the list of performers with their instruments : Michael Lewis (saxophone); Erik Fratzke (bass); Dave King (drums). I'm using it too for display on visualisation screens.

The difference between the two smartlists is on the search mode :
  • The performer smartlist looks for an exact string, as the criteria is expressed between brackets [Pat Metheny]
  • The guitar smartlist looks for any string containing guitar : criteria is between quotes "guitar". So my previous example will not be selected, but this one will : Pat Metheny (guitar); Dewey Redman, Michael Brecker (tenor saxophone); Charlie Haden (acoustic bass); Jack DeJohnette (drums). A drawback of that method is that it will select bass guitar too

I'm using a view scheme sorting tracks by performer. If i only use the band tag, i would have more than one entry for each artist :
  • John Coltrane (soprano saxophone)
  • John Coltrane (alto saxophone)
and so on...

Else, i have a composer tag too, but i'm downloading (legally!) a lot and it's hard to get that information without the booklet. I may use that [grouping] tag but i'm discouraged by the number of tracks to tag!
Logged

hit_ny

  • Citizen of the Universe
  • *****
  • Posts: 3310
  • nothing more to say...
Re: Size of list library fields and smartlist
« Reply #6 on: October 10, 2007, 05:05:07 am »

I'm using a view scheme sorting tracks by performer. If i only use the band tag, i would have more than one entry for each artist :
  • John Coltrane (soprano saxophone)
  • John Coltrane (alto saxophone)
and so on...
If i got you right, the [Band] standard field is just a plain string field, so if you typed

Artist A (instrument), Artist B (instrument)...Artist N (instrument)

then that's what will be displayed in the [Band] column of a viewscheme.

[Band] is not a list type field, for the purposes of just searching for strings in a smartlist this is prefectly ok. But it makes me wonder whether i should use it or instead designate a custom list type field for the purpose.

Quote
[Media Type]=[Audio] [Genre]=[Jazz] [Band]="guitar" ~t=1h

will find all music where a guitar was present in the band. Now guitars are there in loads of bands but when i think of guitar music, maybe its when the guitar is the lead instrument played by the featured artist, so its maybe more in the foreground with the other instruments doing support.

Are we getting closer to the reason you wanted to do groupings :)...that a guitar or a piano in a trio is maybe more obvious than in a larger group.
Logged

Baron Samedi

  • Recent member
  • *
  • Posts: 36
Re: Size of list library fields and smartlist
« Reply #7 on: October 13, 2007, 12:36:24 pm »

Quote
[Band] is not a list type field, for the purposes of just searching for strings in a smartlist this is prefectly ok. But it makes me wonder whether i should use it or instead designate a custom list type field for the purpose.

I'll suggest the custom list field, as it allows to do view schemes cleaner than the band field.
Logged

hit_ny

  • Citizen of the Universe
  • *****
  • Posts: 3310
  • nothing more to say...
Re: Size of list library fields and smartlist
« Reply #8 on: November 04, 2007, 07:00:50 am »

Hi,

is there a way to get the size of a field of type list in a smartlist expression?

I have tagged my jazz tracks with an user field holding the list of the musicians involved, and i want to do a smartlist with an hour of trio (so with a list of 3 musicians). Is it possible?

Thanks!
This may just be possible with the new expression ListCount() introduced in 12.0.363

From the wiki

ListCount(...): Use to return the number of items in a delimited listList: List
Delimiter: Delimiter (optional -- defaults to semi-colon)


   Examples:
   ListCount([People])
   ListCount([Filename (path)], \)
Logged

Baron Samedi

  • Recent member
  • *
  • Posts: 36
Re: Size of list library fields and smartlist
« Reply #9 on: November 04, 2007, 02:59:52 pm »

Yeah i was just playing with it....

And it works perfectly with the following smartlist expression :

[Media Type]=[Audio] [Genre]=[Jazz] [=IsEqual(ListCount([line up]),3,2)]=1 [Band]="piano" ~t=1h

It took me some time to find a way to express the listcount = 3 ... Is there an easier one?

Well whatever with that and the new radio feature it's an early christmas for me  ;D
Logged

Baron Samedi

  • Recent member
  • *
  • Posts: 36
Re: Size of list library fields and smartlist
« Reply #10 on: November 06, 2007, 02:59:34 pm »

I keep on playing with ListCount and found a shorter expression for my needs :

Code: [Select]
[=ListCount([Line up])]=[3]
Why is there brackets around the 3? To get an exact match : =3 returns all tracks which ListCount([line up]) value contains a 3. So if there's 3, or 13, or 30, or 375 musicians, it will be selected. And 375 is not exactly a trio  :o

So my "Art of trio" smartlist is now :
Code: [Select]
[Media Type]=[Audio] [Genre]=[Jazz] [=ListCount([Line up])]=[3] ~t=1h
As ListCount isn't restricted to list fields, it's working too with [band]
Logged

gappie

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 4566
Re: Size of list library fields and smartlist
« Reply #11 on: November 06, 2007, 03:18:26 pm »

nice.  8)
Logged

hit_ny

  • Citizen of the Universe
  • *****
  • Posts: 3310
  • nothing more to say...
Re: Size of list library fields and smartlist
« Reply #12 on: November 07, 2007, 02:18:52 am »

I keep on playing with ListCount and found a shorter expression for my needs :

Code: [Select]
[=ListCount([Line up])]=[3]
Why is there brackets around the 3? To get an exact match : =3 returns all tracks which ListCount([line up]) value contains a 3. So if there's 3, or 13, or 30, or 375 musicians, it will be selected. And 375 is not exactly a trio  :o
It has to do with limiting the query, from the help file

[ ] is used to specify where the query begins & ends.

you could alternatively use "3" too.
Logged
Pages: [1]   Go Up