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:
From version 3.8c the Magic RDS control
software includes direct support for XML:
- Open the External Text window, select Text Sources
card and define new text source:
- Select the Media Touch XML file. In the Process
dropdown list select the XML option.
- 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.
- Click on the Test button:
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:
Add these values to the Text source
sheet:
Fill the 3rd attribute name: Category
as value %3%
Fill the output template: [%3%]Now playing: %1% - %2%
Select Text Replacing card:
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.
From now any item with Category other
than "MUS" will be replaced by the default text.
|