Due to enormous amounts of spam, the forum has been set to read-only mode.



Reply to topic  [ 4 posts ] 
Make data useful for iTunes 
Author Message

Joined: Fri Jun 29, 2012 9:41 am
Posts: 2
Post Make data useful for iTunes

Hi,

I would like to use the comment field in the id3 tags to store the musicians of the song, so i made a simple query (access) that puts together the musicians by song with the instrument, now i want to write this to the notes field of that song, that is where i get stuck. Since the query gives me of course different lines by track and i want to write these to one field access is complaining about this.

any idea's ?

raf


Fri Jun 29, 2012 9:46 am
Profile
Site Admin
User avatar

Joined: Fri Nov 22, 2002 3:52 pm
Posts: 13748
Post Re: Make data useful for iTunes

It's better to use the 'Customize tag write' feature to do this:

1. Choose Tools=>Audio File Setup, click the 'Tag Misc' tab, then click the 'Customize tag write' button.

2. Select "Comments" in the list to the left, then insert this code into the field to the right:

Code:
<?xml version="1.0" encoding="utf-8"?>
<?data type="record"?>
<?data table="track"?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text"/>

<xsl:template match="/">
  <xsl:for-each select="data/record/trackdata/bandmembers/bandmember">
    <xsl:value-of select="name"/>
    <xsl:if test="count(instruments/instrument)>0">
      <xsl:text> (</xsl:text>
      <xsl:for-each select="instruments/instrument">
        <xsl:value-of select="."/>
        <xsl:if test="position() &lt; last()">
          <xsl:text>/</xsl:text>
        </xsl:if>   
      </xsl:for-each>
      <xsl:text>)</xsl:text>
    </xsl:if>
    <xsl:if test="position() &lt; last()">
      <xsl:text>; </xsl:text>
    </xsl:if>   
  </xsl:for-each>
  <xsl:if test="count(data/record/trackdata/guestmusicians/guestmusician)>0">
    <xsl:text>; </xsl:text>
    <xsl:for-each select="data/record/trackdata/guestmusicians/guestmusician">
      <xsl:value-of select="name"/>
      <xsl:if test="count(instruments/instrument)>0">
        <xsl:text> (</xsl:text>
        <xsl:for-each select="instruments/instrument">
          <xsl:value-of select="."/>
          <xsl:if test="position() &lt; last()">
            <xsl:text>/</xsl:text>
          </xsl:if>   
        </xsl:for-each>
        <xsl:text>)</xsl:text>
      </xsl:if>
      <xsl:if test="position() &lt; last()">
        <xsl:text>; </xsl:text>
      </xsl:if>   
    </xsl:for-each>
  </xsl:if> 
</xsl:template>

</xsl:stylesheet>


4. Click the Test button to check that it works (data is taken from the selected track in the Track View, or the first track on the selected album in the Album View).

5. Click OK, and then OK again to save the changes.

Image

_________________
Fredrik Nordbakke
www.fnprg.com


Fri Jun 29, 2012 12:27 pm
Profile WWW

Joined: Fri Jun 29, 2012 9:41 am
Posts: 2
Post Re: Make data useful for iTunes

This is great, works perfect.

I suppose i can add other information to the comment box this way if i add the correct xml code ?

where can i find an example of the xml file to see the correct path ?

raf


Fri Jun 29, 2012 1:30 pm
Profile
Site Admin
User avatar

Joined: Fri Nov 22, 2002 3:52 pm
Posts: 13748
Post Re: Make data useful for iTunes

rverhoogen wrote:
This is great, works perfect.

I suppose i can add other information to the comment box this way if i add the correct xml code ?

Yes.

Quote:
where can i find an example of the xml file to see the correct path ?

You can examine the xml data file structure if you right-click an album in the Track View and choose "Save as XML" to save the data to an XML file.

_________________
Fredrik Nordbakke
www.fnprg.com


Mon Jul 02, 2012 10:32 am
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.