How to get song information from Media Touch XML file?

The Media Touch automation produces a text file with current song title and artist. The file has an XML structure as shown in this example:

metc1.gif (6792 bytes)

From version 3.8c the Magic RDS control software includes direct support for XML:

  1. Open the External Text window, select Text Sources card and define new text source:
      

      
  2. Select the Media Touch XML file. In the Process dropdown list select the XML option.
      
  3. Fill the attribute names: Title as value %1%, Artist as value %2%. Fill the output template: Now playing: %1% - %2%

    Note 1: Since the attribute names occur only once in the file, there's no need to fill full path to the attributes. The full paths in this case would be /PlayList/Entry/Title and /PlayList/Entry/Artist, respectively.
      
  4. Click on the Test button:

    ngxml4.gif (2731 bytes)

    Yes, it's okay!

 

Advanced use: How to show the item only if the Category matches a predefined value?

The Media Touch outputs also the item Category, whose value can be different for music and different for commercials etc. We usually want to show the Artist and Title for the music only while during commercials the listener should see a default text. So we use the Category value for simple text filtering:

  1. Add these values to the Text source sheet:

    metc3.gif (19886 bytes)

    Fill the 3rd attribute name: Category as value %3%
    Fill the output template: [%3%]Now playing: %1% - %2%

  2. Select Text Replacing card:

    metc4.gif (12621 bytes)


    Fill first line:
    Change [MUS] to empty string

    Fill secong line:
    Change %REGEXP%^\[.*\] to %CLEAR%Station default text%END%

    The Station default text can be changed to any text desired.

  3. From now any item with Category other than "MUS" will be replaced by the default text.

 

(C) 1999-2022 Pira.cz. All rights reserved.