Author Topic: RCS Zetta: Radiotext displaying songs before they are played  (Read 4242 times)

Bob Crittenden

  • Guest
Good morning!
We have been using the P332 with our Zetta system for over 5 years.  RCS had configured an .xlst file for us to work with the RDS received, but after going through an upgrade of our automation computers recently, we were having a variety of issues with program material displaying sporadically.

I had an .xlst template in a response to a post from back in 2019, which I installed and it brought instant stability.

My remaining issue is that when a song is concluded, the display advances to the next song.  This can be really aggravating in a live show, when there may be a lengthy break between songs.

I use the encoder dashboard to program our 3 units - is there a command I can use or something that can be written into the .xslt that can remedy this issue?  Thanks!

Jan

  • Hero Member
  • *****
  • Posts: 1131
Re: Radiotext displaying songs before they are played
« Reply #1 on: May 17, 2024, 06:13:02 pm »
Can you post the .xlst file you're currently using? And the output file generated by the Zetta? Some automation systems save not only the current song title but they add entire recent history or next song. It can be simply solved by specifying full path to the elements.

bobcvols

  • Newbie
  • *
  • Posts: 7
Re: Radiotext displaying songs before they are played
« Reply #2 on: May 17, 2024, 10:24:58 pm »
Sure thing!  Here is the .xslt file:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
   <xsl:output method="text" />
   <xsl:strip-space elements="*" />
   <xsl:variable name="newline">
      <xsl:text>&#13;</xsl:text>
   </xsl:variable>
   <xsl:template match="/">
      <xsl:apply-templates />
   </xsl:template>
   <xsl:template match="LogEventCollection">
      <xsl:for-each select="LogEvent">
         <xsl:text>RT1=</xsl:text>
         <xsl:choose>
            <xsl:when test="@Type='SONG'">
               <xsl:value-of select="Asset/@Title" />
               <xsl:text> by </xsl:text>
               <xsl:value-of select="Asset/@Artist1" />
            </xsl:when>
            <xsl:otherwise>
               <xsl:text>FAITH RADIO</xsl:text>
            </xsl:otherwise>
         </xsl:choose>
         <xsl:value-of select="$newline" />
      </xsl:for-each>
      <xsl:apply-templates />
   </xsl:template>
</xsl:stylesheet>

This is the output file:
RT1=New Song 1 by Artist Name 1 Song 1
RT1=New Song 2 by Artist Name 1 Song 2
RT1=FAITH RADIO
RT1=FAITH RADIO

Jan

  • Hero Member
  • *****
  • Posts: 1131
Re: Radiotext displaying songs before they are played
« Reply #3 on: May 17, 2024, 10:53:36 pm »
This setup has worked correctly for many years. They probably changed something in the latest Zetta update. You should contact RCS community for updated xlst template. There's no solution applicable on the RDS encoder side if the data comes already mismatched from the Zetta.
Does the current song keep the same line in the output file? Is there a way to show the original XML file (before applying the xslt template)?

bobcvols

  • Newbie
  • *
  • Posts: 7
Re: Radiotext displaying songs before they are played
« Reply #4 on: May 17, 2024, 11:18:25 pm »
Does this help?  .xml file (perhaps what you're lookin for)
<?xml version="1.0" encoding="utf-16"?>
<ZettaLite Version="0.0.0">
  <LogEventCollection>
    <LogEvent Type="SONG" ScheduledTime="2024-04-26T20:00:00.0000651Z" StartTime="2024-04-26T20:00:00.0000651Z" StartTimeLocal="4/26/2024 3:00:00 PM" Chain="SEGUE" Status="CURRENT" Duration="02:40" ZettaId="1234">
      <Asset Type="SONG" AssetTypeName="Song" Title="New Song 1" ZettaId="3456" ThirdPartyId="SongA" TotalLength="160" Artist1="Artist Name 1 Song 1" Album1="Album Name 1 Song 1" />
      <NotesCollection>
        <Note Title="Note 1" Script="Note 1' Script" />
        <Note Title="Note 2" />
      </NotesCollection>
    </LogEvent>
    <LogEvent Type="SONG" ScheduledTime="2024-04-26T20:10:00.0000651Z" StartTime="2024-04-26T20:10:00.0000651Z" StartTimeLocal="4/26/2024 3:10:00 PM" Chain="SEGUE" Status="READY" Duration="03:05" ZettaId="1236">
      <Asset Type="SONG" AssetTypeName="Song" Title="New Song 2" ZettaId="3457" ThirdPartyId="SongB" TotalLength="185" Artist1="Artist Name 1 Song 2" Artist2="Artist Name 2 Song 2" Album1="Album Name 1 Song 2" Album2="Album Name 2 Song 2" />
    </LogEvent>
    <LogEvent Type="LINK" ScheduledTime="2024-04-26T20:13:05.0000651Z" StartTime="2024-04-26T20:13:05.0000651Z" StartTimeLocal="4/26/2024 3:13:05 PM" Chain="SEGUE" Status="READY" Duration="00:15" ZettaId="1237">
      <Asset Type="LINK" AssetTypeName="Link" Title="New Link 1" ZettaId="3458" ThirdPartyId="LinkAlpha" TotalLength="15" Product1="Product Name 1 Link 1" Sponsor1="Sponsor Name 1 Link 1" />
    </LogEvent>
    <LogEvent Type="SPOT" ScheduledTime="2024-04-26T20:13:20.0000651Z" StartTime="2024-04-26T20:13:20.0000651Z" StartTimeLocal="4/26/2024 3:13:20 PM" Chain="SEGUE" Status="READY" Duration="01:00" ZettaId="1238">
      <Asset Type="SPOT" AssetTypeName="Spot" Title="New Spot 1" ZettaId="3459" ThirdPartyId="SpotOne" TotalLength="60" Product1="Product Name 1 Spot 1" Sponsor1="Sponsor Name 1 Spot 1" />
    </LogEvent>
  </LogEventCollection>
</ZettaLite>

Jan

  • Hero Member
  • *****
  • Posts: 1131
Re: Radiotext displaying songs before they are played
« Reply #5 on: May 17, 2024, 11:31:43 pm »
Great work. Well, note the Status="CURRENT" in the first LogEvent. Does this LogEvent always correspond to the current track? If so, the solution is simple. Anyway, it's too late here today, let's continue tomorrow.

Jan

  • Hero Member
  • *****
  • Posts: 1131
Re: RCS Zetta: Radiotext displaying songs before they are played
« Reply #6 on: May 18, 2024, 04:29:14 pm »
Try this template:

Code: [Select]
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
   <xsl:output method="text" />
   <xsl:strip-space elements="*" />
   <xsl:variable name="newline">
      <xsl:text>&#13;</xsl:text>
   </xsl:variable>
   <xsl:template match="/">
      <xsl:apply-templates />
   </xsl:template>
   <xsl:template match="LogEventCollection">
      <xsl:for-each select="LogEvent">
       <xsl:choose>
       <xsl:when test="@Status='CURRENT'">
         <xsl:text>RT1=</xsl:text>
         <xsl:choose>
            <xsl:when test="@Type='SONG'">
               <xsl:value-of select="Asset/@Title" />
               <xsl:text> by </xsl:text>
               <xsl:value-of select="Asset/@Artist1" />
            </xsl:when>
            <xsl:otherwise>
               <xsl:text>FAITH RADIO</xsl:text>
            </xsl:otherwise>
         </xsl:choose>
         <xsl:value-of select="$newline" />
       </xsl:when>
       </xsl:choose>
      </xsl:for-each>
      <xsl:apply-templates />
   </xsl:template>
</xsl:stylesheet>

If you find it working, I'll adapt the code for various situations (RT1=, XCMD=, XML)

bobcvols

  • Newbie
  • *
  • Posts: 7
Re: RCS Zetta: Radiotext displaying songs before they are played
« Reply #7 on: May 18, 2024, 09:07:49 pm »
Thank you!  I am not at the studio currently, but will work on it Monday and let you know the results!!

bobcvols

  • Newbie
  • *
  • Posts: 7
Re: RCS Zetta: Radiotext displaying songs before they are played
« Reply #8 on: May 21, 2024, 04:45:10 pm »
Tested it out yesterday - worked very, very well!
You had mentioned other commands - what would those do for us? 

Jan

  • Hero Member
  • *****
  • Posts: 1131
Re: RCS Zetta: Radiotext displaying songs before they are played
« Reply #9 on: May 21, 2024, 08:48:11 pm »
If you're using the PIRA P132 family RDS encoder (P132, P232, P232U, P332, P164), take advantage of its tagging support. Send RT+ directly. It's fully compatible with RT:

Code: [Select]
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
   <xsl:output method="text" />
   <xsl:strip-space elements="*" />
   <xsl:variable name="newline">
      <xsl:text>&#13;</xsl:text>
   </xsl:variable>
   <xsl:template match="/">
      <xsl:apply-templates />
   </xsl:template>
   <xsl:template match="LogEventCollection">
      <xsl:for-each select="LogEvent">
       <xsl:choose>
       <xsl:when test="@Status='CURRENT'">
         <xsl:text>XCMD=&lt;rds&gt;&lt;item&gt;&lt;dest&gt;3&lt;/dest&gt;&lt;text&gt;</xsl:text>
         <xsl:choose>
            <xsl:when test="@Type='SONG'">
               <xsl:text>&lt;title&gt;</xsl:text>
               <xsl:value-of select="Asset/@Title" />
               <xsl:text>&lt;/title&gt; - &lt;artist&gt;</xsl:text>
               <xsl:value-of select="Asset/@Artist1" />
               <xsl:text>&lt;/artist&gt;</xsl:text>
            </xsl:when>
            <xsl:otherwise>
               <xsl:text>FAITH RADIO</xsl:text>
            </xsl:otherwise>
         </xsl:choose>
         <xsl:text>&lt;/text&gt;&lt;/item&gt;&lt;/rds&gt;</xsl:text>
         <xsl:value-of select="$newline" />
       </xsl:when>
       </xsl:choose>
      </xsl:for-each>
      <xsl:apply-templates />
   </xsl:template>
</xsl:stylesheet>

Result:
XCMD=<rds><item><dest>3</dest><text><title>New Song 1</title> - <artist>Artist Name 1 Song 1</artist></text></item></rds>

Jan

  • Hero Member
  • *****
  • Posts: 1131
Re: RCS Zetta: Radiotext displaying songs before they are played
« Reply #10 on: May 21, 2024, 08:59:26 pm »
If you need to save the text as XML, use this code:

Code: [Select]
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
   <xsl:output method="xml" indent="yes" />
   <xsl:template match="LogEventCollection">
      <xsl:for-each select="LogEvent">
       <xsl:choose>
       <xsl:when test="@Status='CURRENT'">
         <current>
         <xsl:choose>
            <xsl:when test="@Type='SONG'">
               <title>
               <xsl:value-of select="Asset/@Title" />
               </title>
               <artist>
               <xsl:value-of select="Asset/@Artist1" />
               </artist>
            </xsl:when>
            <xsl:otherwise>
               <xsl:text>FAITH RADIO</xsl:text>
            </xsl:otherwise>
         </xsl:choose>
         </current>
       </xsl:when>
       </xsl:choose>
      </xsl:for-each>
   </xsl:template>
</xsl:stylesheet>

Result:
<?xml version="1.0" encoding="UTF-8"?>
<current>
   <title>New Song 1</title>
   <artist>Artist Name 1 Song 1</artist>
</current>

Can be read by the Magic RDS 4 External text tool.

The code is provided as an example. Further modifications are possible.

bobcvols

  • Newbie
  • *
  • Posts: 7
Re: RCS Zetta: Radiotext displaying songs before they are played
« Reply #11 on: May 21, 2024, 09:53:47 pm »
Thank you so much for all your help!