INTERACT FORUM

Please login or register.

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

Author Topic: Expression or Smartlist help please. (Populate a field)  (Read 2594 times)

slikvik

  • Regular Member
  • World Citizen
  • ***
  • Posts: 183
Expression or Smartlist help please. (Populate a field)
« on: November 28, 2006, 04:21:19 pm »

Hi,

Is there an expression I can write that will automatically take what is in AlbumArtist(Auto) and write it into AlbumArtist.

I would also like it to write 'Various Artists' into AlbumArtist if AlbumArtist(Auto) = (Multiple Artists)

Is this possible?

Cheers

Slik
Logged

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9139
Re: Expression or Smartlist help please. (Populate a field)
« Reply #1 on: November 29, 2006, 01:28:49 am »

You can use expressions to present existing data in a fashion that better fits your proposed usage example, manipulating how dates are displayed for instance, or you can use them to build completely new fields from existing database information that are automatically populated, and by their nature, non-editable. You cannot use expressions to populate an existing field such as [album artist]. You could use an expression to construct the info you desired, then copy that info to [album artist] using the "move/copy field" tool, but, I think, first of all, you need to fully understand how the two fields ([album artist] and [album artist (auto)]) actually work...

[album artist (auto)] is called "Auto" because it gets filled automatically, and once you understand the automation, you're home and hosed...

So:

It all hinges around the contents of the [artist] field, and the [album artist] field....

First, take all instances where the [album artist] field is empty...

If all the files in any given album have exactly the same info in the [artist] field, then [album artist (auto)] = [artist]

If any of the files in any given album have any difference in their [artist] fields, then [album artist (auto)] = (Multiple Artists)

and finally...

For any given album, regardless of what is in the [artist] field for any of the tracks, if [album artist] is not empty, then [album artist (auto)] = [album artist]
Real world examples often help better than words, so, take this Bob Dylan 30th Anniversary Concert cd...

Initially, MC catalogued this (correctly) as "(Multiple Artists)", but I prefer to have it filed along with all the other Bob Dylan albums, and I let MC know this by placing Bob Dylan in the [album artist] field.

So, let's see what you want and how best to achieve it:

Quote
Is there an expression I can write that will automatically take what is in AlbumArtist(Auto) and write it into AlbumArtist.
I would also like it to write 'Various Artists' into AlbumArtist if AlbumArtist(Auto) = (Multiple Artists)

Is this possible?
So, following the above logic, what you really want, is to copy the [artist] data over to the [album artist] field, except for where the album is a multi-artist album, in which case, you'd like to fill the [album artist] field with "Various Artists"

Deal with each set of albums at a time, let's do the (Multiple Artists) first.

1. open the tag info window, making sure you can see both the [album artist] and [album artist (auto)] fields.
2. click on "Audio" in the tree.
3. in the search box (top right of the program) type: [album artist (auto)]="Multiple Artists"
4. You now have all your multiple artist albums listed together. Select all files listed and the enter Various Artists into the [album artist] field. [album artist (auto)] for those files will now be "Various Artists"
5. clear the search box, then, in the search box, exclude all those albums by typing: -[album artist (auto)]="Multiple Artists"
6. Select all the files listed, right-click, library tools, move/copy field...
7. set source to [album artist (auto)], set destination to [album artist], set 'action' to 'copy' and click OK
8. Job done (untill you add more albums to your library and so need to keep up the regime) :)

that do for you?

-marko.

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9139
Re: Expression or Smartlist help please. (Populate a field)
« Reply #2 on: November 29, 2006, 03:06:59 am »

There's more:

You know that classic mistake we've all made at some point, where we rip a multi-artist album using [artist] in the folder name template, instead of [album artist (auto)], or not ticking the "use assorted.... etc." box? The one that results in a load of \artist\album\ folders that all contain just one file?

In this scenario, [album artist (auto)] = [artist] because all the files for the album are not in the same directory, but again, once you know this, it's easy enough to isolate any of those and fix them by directly filling the [album artist] field, then using the rename from properties tool to shuffle the files back into a single \album\ folder.

I can't help wondering why you want to do the above task. It could be that you have a perfectly valid reason for it, there are some, but not many!!!

MC's [album artist (auto)] system really is a touch of genius. Once you have all your files correctly saved on the hard drive (all files for each album in the same directory) and all your [artist] and [album artist] fields filled as desired, you can basically key all your viewschemes around the [album artist (auto)] field. I don't think I have a single viewscheme that uses the [artist] field.

What you can then do, is write some pretty impressive [album artist (auto)] based expressions for building viewschemes. Is that why you're asking?
 Take my "Audio" viewscheme, for example...

It has three simple panes:
An expression based pane called 'artists'
An [album artist (auto)] pane
and an [album] pane.

I never use panes to view it, only the library browser views.
The 'artists' expression groups all the multi-artist albums together, all the artists with numbers for names, like 10cc and 4 non blondes, and uses letters to group the rest. I don't need to see the alphabet picker in the header, because when I click on "Audio", I see this instead:

(click to see full size image) (this is a v12 screenie, but it's not exclusive, 11.1 can do the same too)
I've never used any of those "move articles to the end" options that save "The Beatles" as "Beatles, The" because I just plain don't like the idea, but, I don't mind letting an expression take care of it for this kind of application. (Note the "The Who" album that is sorted under "W")

The artists expression goes like so:

if(isequal([album artist (auto)],/(multiple,8),/(various/),if(isequal(mid([album artist (auto)],0,3),the,1),mid([album artist (auto)],4,1),if(isequal(Mid([album artist (auto)],0,1),1,6),0 - 9,Mid([album artist (auto)],0,1)))

So, you see, the [album artist (auto)] field takes a lot of the hassle of maintaining an [album artist] field away from the user, and allows us to get on with enjoying our audio, which is, after all, what it's all about in the long run, isn't it!!

-marko.

slikvik

  • Regular Member
  • World Citizen
  • ***
  • Posts: 183
Re: Expression or Smartlist help please. (Populate a field)
« Reply #3 on: December 01, 2006, 04:03:50 pm »

Hi Marko,

Thanks for the very detailed posts. I have always understood how the Auto field works and you are right, it is a touch of genius.  :)

Your solution certainly makes things easier for me than having to do it on each new CD rip, even it isn't a complete automation.

As for why i would like to do it?

Well I don't just use my WMA files in MC. I also use them in Media Portal and other media programs. These programs very rarely support Various Artists at all or not very well. By having the AlbumArtist tag hard populated I can create views by it and finally see my albums stored by artist correctly; just like in MC!

I hope that makes sense.

Thanks again for the advice.

Vic
Logged

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9139
Re: Expression or Smartlist help please. (Populate a field)
« Reply #4 on: December 02, 2006, 03:00:33 am »

Makes perfect sense. I had a feeling it might be something like that, and apologies for rambling on needlessly, seems I slightly mis-understood the original question.

Anyhoo, while still not full automation, it is possible to make the steps easier by creating a custom library field that contains the info you want, then simply copy that over to [album artist] using the move/copy field tool.

Assuming you know how to add a custom library field, create a calculated field using the following expression:

if(isequal([album artist (auto)],/(multiple artists/),8),Various Artists,[album artist (auto)])

Your new field will bascally be a mirror of the [album artist (auto)] field, with the exception that every instance of (Multiple Artists) will be replaced by "Various Artists", allowing you to just copy one to the other without having to worry about whether or not it's (Multiple Artists)

-marko.

slikvik

  • Regular Member
  • World Citizen
  • ***
  • Posts: 183
Re: Expression or Smartlist help please. (Populate a field)
« Reply #5 on: December 06, 2006, 12:42:27 pm »

Makes perfect sense. I had a feeling it might be something like that, and apologies for rambling on needlessly, seems I slightly mis-understood the original question.

Not at all, your help was spot on. Cheers :)
Logged
Pages: [1]   Go Up