We are in the process of migrating the Spacial Wiki content to our new Help Center at spacial.com.
Please visit the Help Center for latest Tips and Tricks, Documentation and Troubleshooting.

SOS Event Adaptors

From SpacialAudio

Revision as of 17:25, 30 October 2007 by Chris (Talk | contribs)
(diff) ←Older revision | Current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search

Event adaptors allow SOS to connect to various automation systems to obtain song information and also cover commercials. This is in many cases the most difficult part of the SOS configuration. This option is found in the Configure Window in SOS.

Event Adaptor Options

On the Event adaptor screen you will find:

Select metadata adaptor – here you specify the type of adaptor to use. We will cover the main types:


A very simple HTTP interface to SOS. Many automation systems, including SAM Broadcaster, use HTTP calls to notify SOS about song information.

Note: HTTP is the same protocol webservers use to communicate with your internet browser. Thus SOS in this case acts like a mini-webserver. You can actually type the URL’s we are providing below directly into your browser to test SOS!

This adaptor only has one item to configure – the HTTP Adaptor port – which is 8181 by default.

To test, select the HTTP event adaptor, set the port (lets use 8181) and then make sure to Stop/Start SOS. Now type the following into your browser URL:

  • http://localhost:8181/?artist=myartist&title=mytitle&songtype=S&duration=240000

If SOS is configured correctly (and your Firewall is not blocking the connection), you should see something like this in your browser:

  • OK 2:09:21 AM

Inside the SOS event log you should see something like:

  • 2006-09-14 02:09:22> Song change: myartist - mytitle (4:00)

The critical fields to always include in the URL:

  • Duration
  • Songtype (One character only, i.e. S=Song, A=advertisement, P=Promo, J=Jingle, I=Station ID)
  • Title

Other valid fields:

  • Artist
  • Album
  • Picture(Name of picture or album cover art filename)
  • Year
  • Genre
  • Label
  • Composer
  • BuyCD - URL to where CD can be bought
  • Website - URL to artist website or information website
  • Overlay - Can be yes or no. By default SOS will cover any track with songtype=A, but if you specify overlay=no, then SOS will not overlay that track. Conversely, if you specify songtype=S (which will generally not be overlayed), with overlay=yes, SOS will overlay that track with commercials.
    Note: All these fields can also be encoded into your Windows Media scripts. See the Encoder setting details on how to set up the encoder to send customized captions and scripts.

A few more examples:

30sec commercial:

  • http://localhost:8181/?title=commercial&songtype=A&duration=30000

30sec commercial that is NOT overlayed:

  • http://localhost:8181/?title=commercial&songtype=A&duration=30000&overlay=no

Song that is forced to be overlayed:

  • http://localhost:8181/?artist=Unknown&title=Test&songtype=S&duration=30000&overlay=yes

Remote blackout trigger:

  • http://localhost:8181/?title=blackout&artist=na&songtype=B&duration=60000&filename=silence

(See Appendix C for more details on blackouts)

Note: For simplicity we avoided values that need to be “URL” encoded up to this point. Below is an example of a more complex query with some URL encoded values:

  • http://localhost:8181/?artist=Mellow%20Trax&title=Outta%20Space&songtype=S&duration=30000&album=The%20Album
    (%20 is the URL code for a <space>, sometimes also specified as just a + sign)

Scripted adaptors (Serial & TCP)

Note: All the NextGen adaptors as well as the Simian adaptor is considered legacy adaptors and should not be used. Their functionality can easily be handled by one of the core scripted adaptors that we cover in the section below.

The two scripted adaptors, Serial (Scripted) and TCP (Scripted) works in exactly the same way, but the communication differs.

The Serial adaptor receives its data via a null-modem serial cable connected from the Automation system directly to the machine where SOS is located on. The Serial adaptor has many configuration options, i.e. Port, Parity, Databits, Baudrate, Flowcontrol, Stop. These needs to match the settings you used when configuring your Automation system EXACTLY.

The TCP adaptor works over a normal network or internet connection. We however recommend that SOS should be located on the same local network as the automation system, as the internet can introduce a variable lag which will make it very hard for SOS to cleanly overlay commercials. For the TCP adaptor you need to specify the Port on which it will listen for TCP connections from the automation system. The default is 8181. Make sure to allow this port within your firewall configuration if you do use a firewall.

Ignore the “Script” tab for now – we will cover that later.

When configured correctly, you should see raw data in the SOS event log whenever a track changes in the automation system. (Note: The log might show some script or parsing errors. You can safely ignore those – we will fix that in the next section) Once you see this raw data coming in, we can move to the next step – writing an event adaptor script that will decode the raw data and then trigger the appropriate action in SOS.

We have successfully made SOS work with the following automation systems:

  • AudioVault
  • BSI / Simian
  • DAD32
  • Dalet
  • Enco
  • iMediaTouch
  • Maestro
  • OCP
  • Prophet/NextGen
  • Raduga
  • RCS
  • SAM Broadcaster
  • Scotts
  • XAutomation

In fact, we have not found an automation system yet which SOS was not able to connect to! So even if your automation system is not on the list – chances are we can develop a custom event adaptor script for you.

Also note that even if your automation system is listed above – the standard stock script we have for that automation system may not work for you due to your unique settings. In that case we will need to modify the script for you to meet your specific needs.

All script development is done out our standard development rate. You may also attempt to adapt the script yourself or hire another qualified script developer if you wish.

Please see Appendix B for some script examples and more details on how to write and modify your event adaptor scripts.

Personal tools