INTERACT FORUM

Please login or register.

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

Author Topic: Extract partial information from a tag by template to populate another tag?  (Read 2827 times)

Simon Chick

  • Recent member
  • *
  • Posts: 46

I am trying to upgrade my Classical tagging to use more of the standard tag fields.

My original schema is Artist = composer, and performers are all put in the Comment tag.

It is easy to populate the Composer tag, and I've done that already.

Now I want to populate the Conductor tag, and then Orchestra.

In the comment tag it will say xxx xxx Orchestra, cond. John Smith

Is there a way to automate a tag rewrite so that the program looks for the text after cond. and puts that in the Conductor field?

I am trying to find a way that does no need manual intervention for all 25,000 or so tracks involved.

Any suggestions gratefully received, especially if I can understand them  ::)
Logged
NAS > noiseless PC > Ayre QB-9 USB DAC > Ayre KX-R pre-amp > Ayre MX-R monoblocs > Dynaudio Confidence C4 Signatures
Chord Sarum interconnects and speaker cables
Missing Link Opus, MCRU Ultimate and Transparent Reference Powerlink power cables
PS Audio P10 Power Plant. Sonority isolation platforms.

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014

This is untested, but something like this should work:

Code: [Select]
regex([Comment],/#cond\.\s(.+)#/,-1,0)[R1]
Try that in an expression column and see how it works.

Brian.
Logged

Simon Chick

  • Recent member
  • *
  • Posts: 46

Thank you.

This is definitely outside my experience zone, but I will have a crack at it this weekend and report back.
Logged
NAS > noiseless PC > Ayre QB-9 USB DAC > Ayre KX-R pre-amp > Ayre MX-R monoblocs > Dynaudio Confidence C4 Signatures
Chord Sarum interconnects and speaker cables
Missing Link Opus, MCRU Ultimate and Transparent Reference Powerlink power cables
PS Audio P10 Power Plant. Sonority isolation platforms.

Simon Chick

  • Recent member
  • *
  • Posts: 46

I fell at the first fence, or rather never reached it.

How and where can I open an expression column to enter the expression to test its effect?
Logged
NAS > noiseless PC > Ayre QB-9 USB DAC > Ayre KX-R pre-amp > Ayre MX-R monoblocs > Dynaudio Confidence C4 Signatures
Chord Sarum interconnects and speaker cables
Missing Link Opus, MCRU Ultimate and Transparent Reference Powerlink power cables
PS Audio P10 Power Plant. Sonority isolation platforms.

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014

Right click on the column headers of any view that shows files.  Then select "add expression column".

Brian.
Logged

Simon Chick

  • Recent member
  • *
  • Posts: 46

Thank you again, and apologies, but I am a total novice for this aspect of MC.

So I found an album with the comment in the ideal format, clicked on the headings, immediately saw add expression as the second option in the drop down, named it extract conductor, pasted in the code and .. nothing happened. The new column in the view and the Conductor field were both empty. Then I realised I had left a blank line at the top when I did the pasting. Cleared that, hit OK again et voila.

So after that I guess I use a move command to put the result in the Conductor field then delete the expression column, and do this on a higher level so many are done at the same time.

Many thanks. Clearly a whole new field of learning here.  :o
Logged
NAS > noiseless PC > Ayre QB-9 USB DAC > Ayre KX-R pre-amp > Ayre MX-R monoblocs > Dynaudio Confidence C4 Signatures
Chord Sarum interconnects and speaker cables
Missing Link Opus, MCRU Ultimate and Transparent Reference Powerlink power cables
PS Audio P10 Power Plant. Sonority isolation platforms.

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014

Expression columns are used as a testing feature.  You put your expression into the column, then select different albums and see the results.  This is to verify that your expression is correct and will work on many, or all of your files.  Once you are satisfied that the expression works correctly, then you actually use it to populate your Conductor field.

To populate the field, it's actually very easy:

Highlight some files you want to populate with conductor.
Open the tagging window (edit > tag).
Go find the conductor field in the tagging window.  You may have to use the pull down "gear" menu to make that field show.
Now, paste in your expression with an equals sign (=) in front of it.  So, like this:

Code: [Select]
=regex([Comment],/#cond\.\s(.+)#/,-1,0)[R1]
That will populate conductor for every file you have selected.  You could do your whole library at once if you wanted to.  I would suggest doing a smaller group first, then verifying your results.  Eventually doing larger groups until you are done.

Good luck.

Brian.
Logged
Pages: [1]   Go Up