1 Template Files

A template file is a pre-defined text file containing special CSRDS merge codes where the now playing or promotional information is to be placed. CSRDS reads the template file, merges the appropriate information and creates a new file or feed for each template. CSRDS supports up to three templates for any one instance. These are the "Now Playing template, a Playlist History template and an IP Output template.

The Now Playing template contains the current song or promotional metadata normally sent via FTP to the station’s web site. The Playlist History template contains the last ”xxx” number of songs played which may also be sent via FTP to the station’s website. Like the Now Playing template, the IP template contains the current song or promotional message, but may be sent via TCP/IP, UDP, HTTP or HTTPS to other systems such as online streams. The Center Stage Live installation package includes two templates specifically for Stream-the-World (STW.TXT and STWCUE.TXT), and one for ANDO Media (ANDO.TXT). These can be found in the Center Stage Live installation
directory.

In addition to sending these files to the web and/or online player, you may also choose to save a copy of the file for verification or use in other systems or devices.

1.1 Now Playing/IP Output Templates

These templates are used to capture and send metadata for the current song or promotional message to the website, online stream, etc. Since promotional messages are optional, we can have a situation where the last song stays on the display during commercial or talk segments. To overcome this situation, CSRDS has an “END CART” option that will send a special message when a song is completed. This will allow the developer to trigger upon receiving this message and display either the END CART message or a pre-defined static message until the next song appears. Of course, we can also configure CSRDS to send promotional messages during commercial and talk segments, but it is up to the receiving system to decide what to do with these messages.

For streams, we can configure CSRDS to send a promotional message between songs. When selected, CSRDS will send the promo 15 seconds before the end of the current song. If the next event is another song, the new artist and title information overlays the promotional messages. However, if the station goes into a commercial break or talk segment, the promotional message is displayed and not the last song.

1.2 History Template

If desired, we can direct CSRDS to create a playlist of the last number of songs played. The number of songs shown is determined by the CSRDS configuration setting. Regardless of the setting in the automation system, CSRDS will track the number of songs specified and send this information using the History Template. If CSRDS is configured to save the playlist, we can use the History.htm template included in the install set to create and upload an html playlist directly to the website.

1.3 Common Template Files

If you are developing routines for several stations and would like to ensure all sites are using the same template, you may save the template on your http site and direct CSRDS to download and use the common version. When directed, CSRDS will check the download site each hour for updates. When found, the file is downloaded and verified. If valid, it will replace the existing template. If it cannot be downloaded or is invalid, the file will be ignored and CSRDS will continue to use the last valid template.
To direct CSRDS to use the common template, enter the URL to the template file in the Now Playing, Playlist History or Merge Template as: http://www.yoursite.com/folder/filename.xml.

1.4 Included Templates

The following templates are included in the installation set. These templates should not be modified as changes could be lost during a software update. If necessary, make a copy of the template and configure CSRDS to use the modified template.

CSRDS.XML
Normally used to send now playing information to the web site, this template includes all of the information that can be captured from the automation system. However, not all automation systems provide all the information. Additionally, those that do may not have the information if it was not entered into the music library. If desired, you can use this template as a base and change or remove any of the tags.

Playlist.txt
This template contains a special ***PLAYLIST*** command that sends the playlist in a fixed XML format. (see samples for details)

Streaming Templates
While you can create your own template for other streaming services, devices or applications, several streaming templates are included in the installation set. New streaming templates are added to the install set when Arctic Palm receives the necessary formats from these streaming services for their products. These Include:

Abacast                                   ABACAST.TXT
Ando                                        ANDO.TXT
iHeart Radio                            iHeart_Flash_6214.txt and iHeart_Orban_Mobile_6211.txt
LeanStream                             LEANSTREAM.TXT
Liquid Compass                      LiquidCompass.txt
Sam Cast                                 SamCast.txt
SecureNet                               SecureNet.txt
ShoutCast/Icecast                  ShoutCast.txt
Stream On!                              RDS.XML
Stream the World                   STW.TXT and STWCUE.TXT
Surfernet                                 SurferNet.txt
Telos ProStream                     Telos.txt
TuneGenie                              Tunegenie.txt

Web Service Templates
Commotion Commotion.txt
Tagstation/Next Radio TagStation.txt
TuneIn Tunein.txt

Histoty.htm
This template is used in conjunction with the playlist history created by CSRDS. This template creates an HTML version of the playlist which can be uploaded to the web site; ready to display. For customization, you may use this template as a base and add this code to a web page in your web page format with all the necessary links. (See Sample History HTML)

Please note, to use this format, you must select “Play List History" in the General Tab of the CSRDS program.

While some of these templates are fixed for a specific feed, others can be used as a base for creating your own templates in any text format required. The STW, STWCUE and ANDO templates are in the formats required for these systems. If you are using another company, you will only need to create a text file in the format they require and add the CSRDS merge codes for where the data needs to go.

2 Now Playing Merge Codes

Note: Not all codes are available in all versions of CSRDS
Source
• RAS
               o Radio automation system, satellite service or CenterStage (CS) application
                  (CSWeather, CSRAS, CSLogIt)
• CSRDS
               o Generated by CSRDS based on CSRDS Configuration Setting
• CSL
               o Entered in Center Stage Live application (CSScheduler)
• TS
               o Data returned from Tag Station


Table 1: Now Playing Merge Codes, Generic Data

Code                              Source     Description
***PASSTHROUGH***    RAS         Use raw data as it is received from the radio source
                                                        (RAS)
***COPY***                    CSRDS      Format data as it is formatted for the RDS encoder
                                                        command
***RDS***                       CSRDS      Full RDS command as it is sent to the encoder
                                                         Eg. TEXT=The Classic Rock Station 103.9FM

Table 2: Now Playing Merge Codes, Station Info
Station ID. Usernames and Passwords.

Code                             Source      Description
***USER***                     CSRDS     User name from the FTP/File Output tab for FTP post
                                                        Otherwise, user name from the HD/IP Output tab
***PASS***                     CSRDS      Password from the FTP/File Output tab for FTP Post
                                                        Otherwise, password from the HD/IP Output tab
***STN***                       CSRDS      Station ID from the FTP/File Output tab (if entered).
                                                        Otherwise, Station ID from the drop down field in the
                                                        General tab. For stream, it’s the StreamID in the
                                                        HD/IP Output tab (if entered). Otherwise, from the
                                                        drop down field in the General tab.
***STBID***                   CSRDS      Station ID as it is defined in the drop down field in
                                                        the General tab.
***DBUSER***               CSRDS      The DAB username from the HD/IP Output tab
***DBPPSWD***            CSRDS      The DAB password from the HD/IP Output tab
***TSEP***                     CSRDS      The artist and title separator from the Other tab
                                                        (TagStation section)
***TAGID***                   CSRDS      The Tag Station username from the Other tab (Tag
                                                        Station section)
***TAGPSWD***           CSRDS       The Tag Station password from the Other tab (Tag
                                                        Station section)
***PID***                       CSRDS       TuneIn User ID – Partner Name
***PKEY***                    CSRDS      TuneIn Password – Partner Key
***TUNE***                   CSRDS       TuneIn Station ID excluding “S”


Table 3: Now Playing Merge Codes, IP/Ports/FTP
IP and Internet Settings
Code                           Source        Description
***IP***                         CSRDS        IP from Main IP field in HD/IP Output tab
***PORT***                  CSRDS        Port from Main port field in HD/IP Output tab
***HDIP***                   CSRDS        IP and port from the HD section of the HD/IP Output
                                                        tab
***SXMCHANNEL***   CSRDS        SiriusXM Satellite Channel
***SXPID***                 CSRDS        Sirius XM Program ID

Table 4: Now Playing Merge Codes, Date/Time
Event Posting Date and Time

Code                                           Source         Description
***UTC***                                     CSRDS        Date and time of posting in UTC format
***TIME(YYYYMMDDHHNNSS) CSRDS        Use this code to format the date as
                                                                         required.
                                                                         Eg: YYYY-MM-DD HH:NN:SS 2009-02-27
                                                                         15:32:03
                                                                         YYYY or YY for year.
                                                                         MM, MMM or MMMM for month.
                                                                         MM-01-12. MMM (Jan) MMMM (January).
                                                                         DD, DDD or DDDD.
                                                                         DD=01-97. DDD (Tue). DDDD (Tuesday).
                                                                         HH for hours.
                                                                         NN for minutes.
                                                                         SS for Seconds
                                                                        AMPM for 12 hour clocks.
***TIME***                                   CSRDS        Current date as DDD HH:MMampm
                                                                        eg: WED 03:43pm
***ETME***                                  RAS             End time of the event based on the start
                                                                        time and duration.
***TSTAMP***                             CSRDS        Current date/time as
                                                                        YYYY-MM-DDTHH:MM:SSTime Zone
                                                                       eg: 2016-12-16T08:43:25T-05:00
***STWTIME***                           CSRDS        Current date/time as
                                                                       DD/MM/YYYY HH:MM:SS AM/PM
                                                                       Eg: 23/05/2016 11:33:06 AM
***UPDATE***                             CSRDS        Current date/time as
                                                                        YYYY-MM-DDTHH:MM:SS Time Zone
                                                                        Eg: 2016-12-16T03:45:12-05:00
***DELAY***                               CSRDS         Time, in ms, required to post event
***IPDELAY***                            CSRDS         Delay time set for IP buffer to wait for data
***PDELAY***                             CSRDS         Profanity delay as defined in General tab of
                                                                        CSRDS


Table 5: Now Playing Merge Codes, Event Duration
The Duration as received from the source of the interval as defined in the General tab in CSRDS

Code                                        Source          Description
***LENGTH***                           RAS               Time, in seconds, with leading zeros
                                                                        eg: 000240
***LEN***                                   RAS               Time, in seconds, with no leading or trailing
                                                                        zeros eg: 240
***LTIME***                               RAS               Time as HH:MM:SS or MM:SS
                                                                       eg: 03:45
***DTIME***                             RAS                Time as HH:MM:SS
                                                                       eg: 00:03:45
***TX(#####)***                      RAS                Multiplication factor, in seconds, for systems
                                                                       requiring 100ths or 1000ths.
                                                                       Eg: ***TK(1000)*** would send 180000
                                                                       instead of 180 seconds
***ENDDAT***                        RAS                 End time of an event as
                                                                       YYYY-MM-DDTHH:MM:SS Time Zone
                                                                       eg: 2016-12-16T08:43:25T-05:00


Table 6: Now Playing Merge Codes, Event/Category Codes
Code defining the type of event. CSRDS may convert RAS code to standard code for easier processing by receiving device or service

Code                 Source                         Description
***TYPE***         CSRDS                         The Type codes are as follows:
                                                                     • MUS – Music (song currently playing)
                                                                     • COM – Commercial (commercial currently
                                                                       playing)
                                                                     • PRO – Promotional message from other
                                                                        sources such as CSScheduler
                                                                     • DWN – Promotional message downloaded
                                                                        from other sites via CSWeather
                                                                     • NXT – Promotional message about the next
                                                                        song to be played
                                                                     • END – Special message sent to the website
                                                                        when a song is completed and no other
                                                                        messages are being sent
***CTYPE***       CSRDS                        True for music events / False for non-music                                                                          events.
***SYSTYPE***    RAS                             Category code from source
***SONG***         CSRDS                       Type of event as follows:
                                                                     • SONG – Music event
                                                                     • COMMERCIAL – Commercial event
                                                                     • VOICETRACK – All other events
***ATYPE***         CSRDS                      Type of event as follows:
                                                                     • SONG – Music event
                                                                     • SPOT – Commercial event
                                                                     • MSG – All other events
***WTYPE***       CSRDS                      Type of event as follows:
                                                                     • Music – Music event
                                                                     • Spot – Commercial event
                                                                     • Other – All other events
***STYPE***        CSRDS                      Type of events as follows:
                                                                     • S – Music event
                                                                     • A – Commercial event
                                                                     • P – All other events
***ITYPE***         CSRDS                     Type of event as follows:
                                                                     • M – Music event
                                                                     • T – All other events

Table 7: Now Playing Merge Codes, Event Data
Data Associated with Event

Code                      Source                Description
***ARTIST***            RAS                    Artist of the current event as received from the
                                                           source
***TITLE***               RAS                   Title of song as received from source or
                                                           promotional message from other applications
***TSEP***               CSRDS               Artist and title seperator as defined in Tag Station’s
                                                           settings.
***ARTISTFIL***       RAS                    Artist of the current event as received from the
                                                          source
***AR40***               RAS                    Artist name padded to 40 characters
***TT40***               RAS                    Title information padded to 40 characters
***ARTISTID***        RAS                    Artist ID as received from the source
***GENRE***           RAS                    Genre of this song as received from the source
***MUSICID***        RAS                    Music/Library ID as received from the source
***CART***              RAS                    Cart or Audio ID as received from the source. May
                                                           include category code.
                                                           Eg: MUS1234
***NOTES***           RAS                    Notes or comments from the source or the
                                                          CSScheduler EDC description field.
***COMPOSER***   RAS                   Name of the composer as received from the source
***ALBUM***           RAS                    Name of the album as received from the source or
                                                          TagStation
***LABEL***             RAS                    Record label as received from the source
***YEAR***              RAS                    Year of album’s or song’s release as received from
                                                           the source
***HOST***             RAS                    Host of the program as received from the source or
                                                          CS Call Management
***SHOW***            RAS                    Name of the program as received from the source
                                                          or CS Call Management
***NXTARTIST***    RAS                   Name of the artist on the next event
***NXTTITLE***       RAS                   Name of the song to be played next
***NXTALBUM***    RAS                   Name of the album on which the next song is from
***NXTCAT***          RAS                  Category of the next event
***NXTLENGTH***  RAS                   Duration of the next event
***PRICE***              CSL                   Price as it is entered in CSScheduler EDC tab
***PHONE***            CSL                  Telephone number as it is entered in CSScheduler
                                                          EDC tab
***EMAIL***              CSL                   E-mail address as it is entered in CSScheduler
                                                          EDC tab
***SELLER***           CSL/TS             Seller name as it is entered in CSScheduler EDC
                                                         tab or from Tag Station
***VENDOR***        CSL/TS             Vendor name as it is entered in CSScheduler EDC
                                                         tab or from TagStation
***OWNERID***      CSL/TS             Owner ID as it is entered in the CSScheduler EDC
                                                         tab or from TagStation
***SONGID***         TS                     Song ID as it is received from Tag Station
***STOREID***        TS                     Store ID as it is received from Tag Station
***VALDATE***       CSL/TS             Valid Until date as it is entered in CSScheduler or
                                                         received from Tag Station
Table 8: Now Playing Merge Codes, Graphics/Art Work/Media
External links as entered in the EDC tab of CSScheduler
Code                     Source               Description
***MEDIA***           CSL                    Path to alternate media file as it is entered in EDC
                                                         tab of CSScheduler
***URL***                CSL                    URL linked to the event as it is entered in EDC tab
                                                         of CSScheduler
***COVER***         RAS/CSL            Link to the artwork from the source or as it is
                                                         entered in CSScheduler EDC tab
***GRAPHIC***     RAS/CSL             Path as received from source or as URL to logo as
                                                         defined in CSScheduler EDC tab
***IMGART***        CSL URL            to the logo as it is defined in CSScheduler
                                                         EDC tab
***HDART***         CSL                    Graphic as it is selected in the graphic browser
                                                        field (camera icon) in CSScheduler
**All codes are supported in CSRDS version 9.2 and higher.

3 Template Commands

In addition to the merge codes, we can also include some commands within the template to control how CSRDS processes the data. These commands are placed as the first characters in the template and will be stripped from the data before the data is posted. These commands are:

Table 9: Template Commands
Command            Description
URL=                     Use this command to tell CSRDS that this template is to be posted
                              as a URL post, and that the data should be URL encoded.
                              Eg: URL=https://***USER***:***PASS***@ws.mysite.com/web/ws/InsertSong?stationId=*
**STN***&songName=***TITLE***&artistName=***ARTIST***&timestamp=***TME(YY
YY-MM-DD:HH:NN:SS)&length=***LEN***&source=P


URL+=                    Same as URL, only the + sign will be used instead of the & in URL
                               encoding
PUT=                      Used for HTTP and HTTPS protocols where a PUT is used instead
                               of a POST command
JPUT=                    Same as PUT, but changes the application option to JSON from
                               XML
JSON=                   Uses the POST option and changes the application option to JSON
                               from XML

4 Sample Templates

4.1 Sample Now Playing Format in XML

RDS.XML template included with install set:

Template
 
<?xml version="1.0" encoding="utf-8" ?>
<Playing station="***STN***" RenderedAt="***UPDATE***">
<item type="***TYPE***">
<DateTime>***TIME***</DateTime>
<StartedAt>***TSTAMP***</StartedAt>
<Length>***LENGTH***</Length>
<Cart>***CART***</Cart>
<Artist>***ARTIST***</Artist>
<SongTitle>***TITLE***</SongTitle>
<album>***ALBUM***</album>
<musicid>***MUSICID***</musicid>
<Year>***YEAR***</YEAR>
<composer>***COMPOSER***</composer>
<NextArtist>***NXTARTIST***</NextArtist>
<NextTitle>***NXTTITLE***</NextTitle>
<NextAlbum>***NXTALBUM***</NextAlbum>
<URL>***URL***</URL>
<Graphic>***GRAPHIC***</Graphic>
<Media>***MEDIA***</Media>
</item>
</Playing>
Output
<?xml version="1.0" encoding="utf-8" ?>
<Playing station="KNAB-FM" RenderedAt="2007-06-14T17:13:25-04:00">
<item type="MUS">
<DateTime> Thu 05:13PM </DateTime>
<StartedAt> 2007-06-14T17:13:25-04:00</StartedAt>
<Length>000243</Length>
<Cart>MUSC1023</Cart>
<Artist>The Rolling Stones</Artist>
<SongTitle>Paint It Black</SongTitle>
<album>Best of The Stones</album>
<musicid>ISCI12122-R21</musicid>
<Year>1967</YEAR>
<composer></composer>
<NextArtist>Creedence Clearwater Revival</NextArtist>
<NextTitle>Proud Mary</NextTitle>
<NextAlbum>Willy and the Poor Boys</NextAlbum>
<URL>http://www.ccr.com/willy.htm</URL>
<Graphic></Graphic>
<Media></Media>
</item>

4.2 Sample CSV file

Template ***STN***,***ARTIST***,***TITLE***,***TYPE***
Output FM96,ELLIOTT YAMIN,WAIT FOR YOUR,MUS

4.3 Sample URL Posting Template

URL=http://***IP***:***PORT***/admin.cgi?pass=***PASS***&mode=updinfo&song=***RDS***

Output

http://192.168.1.102:8111/admin.cgi?pass=MyPassword&mode=updinfo&song=Wait%20for%20
You%20by Elliott%20Yamin

4.4 Sample Web Posting Template

http://***IP***:***PORT***/admin.cgi?pass=***PASS***&mode=updinfo&song=***RDS***
Output
http://192.168.1.102:8111/admin.cgi?pass=MyPassword&mode=updinfo&song=Wait%20for%20You%20b
y Elliott%20Yamin

4.5 Sample Now Playing HTML File

Template
<html>
<body>
<p>***STN***</p>
<p>***ARTIST***</p>
<p>***TITLE***</p>
<p>***TYPE***</p>
</body>
</html>
Output
<html>
<body>
<p>FM96</p>
<p>ELLIOTT YAMIN</p>
<p>WAIT FOR YOU</p>
<p>MUS</p>
</body>
</html>

5 History File Merge Codes

Like the now playing information, we may also choose to send a history of the last number of songs played on the air. The number of songs in the list is determined in the "Send To" tab of the CSRDS properties.

Depending on the needs and skills of the web developer, you may choose to create your own history using the information from the RDSXML file. Another option is to use the History.XML file included in the install set or your own file using the format codes ***COPY*** or ***HISXML***. As the names imply, the ***COPY*** simply merges the play line into the template file while the ***HISXML*** command inserts XML code along with the play line.

Summary History Template 

<?xml version="1.0" encoding="utf-8" ?>
<Playlist>
***HISXML***

Detailed History Template

<?xml version="1.0" encoding="utf-8" ?>
<Playlist>
***PLAYLIST***


In either case, the play line will show as day, time, cart, song and artist.
For example: Fri 11:31AM M102 Paint it Black by The Rolling Stones


Sample XML Summary History:
<?xml version="1.0" encoding="utf-8" ?>

- <Playlist>

<Song Id=”1”>Thu 08:48AM 6085-15 WON'T GET FOOLED AGAIN BY THE WHO</Song>
<Song Id=”2”>Thu 08:45AM 2165-99 SCHOOLS OUT FOR SUMMER BY ALICE COOPER</Song>
.
.
.
<Song Id=”15”>Mon 07:54AM 6005-75 CRUEL SUMMER BY ACE OF BASE</Song>
</Playlist>

Sample XML Detail History:
Playlist.
<?xml version="1.0" encoding="utf-8" ?>
<PlayList>
<Song id="1">
<Date>Thu 04:56PM</Date>
<Artist>The Who</Artist>
<Title>Who Are You</Title>
<Album>CSI:Crime Scene Investigation</Album>
</Song>
<Song id="2">
<Date>Thu 04:54PM</Date>
<Artist>Creedence Clearwater Revival</Artist>
<Title>Looking Out My Back Door</Title>
<Album>CCR at the Dome</Album>
</Song>
.
.
.

- <Song id="15">

<Date>Thu 12:18PM</Date>
<Artist>Alice Cooper</Artist>
<Title>SCHOOLS OUT FOR SUMMER</Title>
<Album>Alice Cooper Live</Album>
</Song>
</PlayList>

5.1 History HTML from the Playlist

This template creates a table of the last ### songs played and includes 3 special merge codes; ***STATIC***, ***DATE*** and ***TABLE***. The station’s static message, as defined in the General Tab of CSRDS, will be placed where the ***STATIC*** code is placed, and a Day, Month, Date, Year formatted date will be placed where the ***DATE*** code is located (eg. Monday, October 26, 2009). The ***TABLE*** is used to create a table of songs played.

HTML Template
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>***STN*** Schedule </title>
</head>
<body>
<p><font face="Arial" color="#000080"><b>***STN*** Playlist</b></font></p>
<p align="center"><font face="Arial" color="#990000" size="2"><b>***STATIC***</b></font></p>
</table>
<p><b><font face="Arial" size="1">***DATE***</font></b></p>
<table border="1" width="90%">
<tr>
<td width="90" align="center"><b><font face="Arial" size="1">On Time</font></b></td>
<td width="250" align="center"><b><font face="Arial" size="1">Artist</font></b></td>
<td width="250" align="center"><b><font face="Arial" size="1">Title</font></b></td>
</tr>
***TABLE***
</table>
</body>
</html>

Sample

Did this answer your question?