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.


From SpacialAudio

Jump to: navigation, search



SAM Broadcaster has direct support for the PCI MAX 3000+ PC stereo FM transmitter card available from PCS Electronics.

This card instantly turns your computer into a radio station with full RDS support. The card with a basic antenna gives you about a block range, but with a better antenna and/or booster you can increase your range to many miles!

Quick links:

Advanced SAM integration

You can completely control all of the FM Card's features directly within SAM Broadcaster.

  • Set the broadcast frequency.
  • Set the output power.
  • Toggle Traffic Announcement mode with the press of a button.
  • View status, output power, temperature and alarms.
  • Automatically update RDS data so the radio displays the currently playing track information.
  • Set your RDS details like Alternative freqencies, Program Type, Mono/Stereo, Location settings.
  • SAM Broadcaster can also directly send the audio to the FM Card, avoiding complicated cable routing and splitting.
  • Best of all is that you can control all these features via PAL scripting - giving you unlimited flexibility.

Main Interface Overview

If your FM Card is not enabled in SAM, or SAM is unable to communicate with the card over the COM port the main FM Card window will display in an in-active state (See image below). Press the configuration button (The button named "Cfg") to change the settings. Also make sure your FM Card is properly installed.


If you configured your card correctly and you enabled it within SAM - then you should see the active window state display as seen below:


Lets quickly go over the main interface features - from top left to bottom right:

  • Power
    The power toggle will switch the FM Card power off or on. Dark green indicates Off while the bright green indicates On.
  • RDS
    Toggle RDS On or Off for the FM Card. If RDS is disabled, then none of the RDS features will work and the FM Card will purely broadcast the audio signal without any additional data.
  • TA
    The Traffic Announcement toggle. Toggle this on only during actual traffic announcement programs.
    This will be disabled if you did not enable the "Traffic Program" option within the configuration. (See below)
  • Cfg
    The configuration button. Click this to bring up the advanced configuration screen.
  • Frequency bar
    A simply visual display of the selected frequency. You can not use this to adjust the frequency - it is for display purposes only.
  • Frequency
    Use the buttons to adjust the frequency in real-time.
  • Alarm
    Dark green - all OK
    Blue - Warning / Notice
    Red - Critical warning, like card overheating.
  • Auto update RDS
    Check this if you want SAM to automatically apply the Template as the RDS Text each time the track changes in SAM.
  • RDS Radio Text and Send button
    If auto-update is disabled, then you are allowed to manually enter the RDS Text to send to the radio receiver. Click the send button to send the manually entered text.
    Note that in auto mode the text sent to the received by the automated Template will be displayed here.
  • Status bar
    The status bar is split into 4 sections:
    1. Status
    2. Power output
    3. Temperature
    4. Firmware version



Main settings

  • Enable FM Transmitter support
    You must check this to enable the FM Card functionality in SAM Broadcaster.
  • COM Port
    The is the communications port that the FM Card is installed on in your computer. This is usually COM5, but could be the next available COM port on your system.
    So when in doubt, just start at COM1 and work your way up - clicking "Apply Settings" after each change. If you have the wrong port (or your card is not properly installed) you will notice this error in the event log:
    Tip: Make sure the Event log window is visible before you open the FM Card configuration screen so you can view any errors while you work.
  • Frequency
    Your broadcasting frequency. Remember to set it to a frequency where no station is currently broadcasting!
  • Power on
    Check this to turn on the FM Card transmitter to start broadcasting.
    Note: This is the same "Power" toggle available from the main interface.
    Also pay attention to the difference between the "Enable FM Transmitter support" and the "Power on". If not enabled, SAM will not even try to communicate with the FM Card. However, turning off the power to the card only stops the card from broadcasting - SAM will continue to send all the commands to the card.
  • Power off on program exit
    Automatically Turn Off the transmitter card when shutting down the SAM program.
  • Power level
    Set power level from 0% to 100%. This will set the maximum performance of your card. So if your card is rated at 1W then setting it to 80% will mean the card then transmits at 0.8W.
  • Send audio directly to FM Card's audio device
    If checked you will be allowed to pick the soundcard device. This will be the virtual soundcard driver that is installed by the FM Card, usually called USB Sound Device. The same audio that is sent to your encoders will be sent directly to the FM Card in this case - saving you the trouble of manually routing the audio to the card.
    The other option is to manually route the audio (in analog) to the FM Card using a normal audio cable that connects to the back of the FM Card.

PS settings

  • Enable RDS
    Check this to enable all the RDS features of the FM Card.
  • Automatically update RDS data as track changes
    Enable this to allow SAM to automatically update your RDS data as the track changes.
    ONLY tracks with song type of "S" (i.e. normal songs) will be used. For all other songs the Static text will be displayed.
  • Static
    This is the text that will be displayed by default on the radio device.
  • Template
    The Template is a dynamic text template that will be filled in with the data from the currently playing track. Here are a few options you can use in the template:
    • $station$ - Your station name, as configured in SAM->Config->Station details
    • $artist$ - Artist name
    • $title$ - Track title
    • $combine$ - Artist/Title name combined.
    • $album$ - Album name
    • $albumyear$ - Year the album was released, usually in yyyy format.
    • $mmss$ - Displays the track duration in mm:ss format.
    Note: This template is only applied for tracks with song type of "S", i.e. normal songs - the Static text above is used for the rest.

PI settings

  • Country
    Identifies the country of the broadcast. See Country - ECC below.
  • Country - ECC
    Due to the limited values for Country above, the Country - ECC can help uniquely identify the location of the broadcast. It is best to refer to this PDF reference for exact details, but here is a quick extract that includes the values for a group of countries.
  • Area Coverage
    L (Local) Local program transmitted via a single transmitter only during the whole transmitting time.
    I (International) - The same program is also transmitted in other countries.
    N (National) - The same program is also transmitted throughout the country.
    S (Supra-regional) - The same program is transmitted throughout a large part of the country.
    R1..R12 (Regional) - The program is available only in one location or regent over one or more frequencies, and there exists no definition of its frontiers.
  • Program Reference
    This information consists of a code enabling receiver to distinguish between countries, areas in which the same program is transmitted, and the identification of the program itself. The code is not intended for direct display and is assigned to each individual radio program, to enable it to be distinguished from all other programs.
    One important application of this information would be to enable the receiver to search automatically for an alternative frequency in case bad reception of the program to which the receiver is tuned; the criteria for the change-over to the new frequency would be the presence of a better signal having the same Program Reference code.

A0 settings

  • Traffic Program
    Check this option if the broadcast will contain a Traffic Announcement some time during the broadcast.
  • Traffic Announcement
    Check this option if the broadcast is CURRENTLY carrying traffic information. You can also toggle this mode from the TA switch on the main interface. This will cause certain receivers to tune into the traffic announcement while the TA is active, and then back to the original source once it is done. For example if your receiver is set up to switch to a Traffic Announcement, then it could stop playing your CD and switch to the traffic announcement - then switch back to the CD once the traffic announcement is done.
  • Artificial head
    Artificial head flag.
  • Compression
    Compression flag.
  • Dynamic PTY
    Set this flag if the PTY code below does not stay the same for the entire broadcast period.
  • Program Type (PTY)
    This is an identification number to be transmitted with each program item and which is intended to specify the current Program type within 31 possibilities. This code could be used for search tuning. The code will, moreover, enable suitable receivers and recorders to be preset to respond only to program items of the desired type. The last number, i.e. 31, is reserved for an alarm identification which is intended to switch on the audio signal when a receiver is operated in a waiting reception mode.
  • Music / Speech
    This is a signal to provide information on whether music or speech is being broadcast. The signal would permit receivers to be equipped with two separate volume controls - one for music and one for speech - so that the listener could adjust the balance between them to suit his individual listening habits.
  • Mono / Stereo
    Specifies if the card broadcasts in mono or stereo.

Alternative frequencies

Alternative Frequencies allow a radio to search for a new frequency that carries your station if you move out of range of the current frequency. You can set up to 7 different alternative frequencies.

Note that this does not cause your FM Card to broadcast at these additional frequencies - it simply means some OTHER transmitter carrying your signal is operating at the specified alternative frequency.

PAL script control

One of the best things is that all of the card's features can be controlled via PAL scripting. That really gives you the power to adjust the card settings exactly like you need it, when you need it. If you for example do not like the automated RDS Text update logic, simply disable auto updates and write your own PAL script to take care of things.

SAM ships with a great tutorial PAL script called FMCardDemo.pal (Also listed below for reference) Please note the FMCard object is not currently included in the PAL Script Reference help document, so this PAL script is your only reference to the available FM Card object properties and methods.

I'm sure if you study the example script below you can see how powerful and easy it is to control the FM Card via PAL scripting.

var AlarmMode : Integer;
var AlarmStr, Temp, Power, FirmWare : String;
var I : Integer;

function BoolStr(Val : Boolean):String; forward;

//## Read FMCard basic settings
//## NOTE: All of these settings can also be set via a PAL script!
//## Example: FMCard.Frequency := 105300; {Set to 105.300 MHz}
//Main settings
PAL.LockExecution; //For the sake of speed
WriteLn('COMPort: '+IntToStr(FMCard.COMPort));
WriteLn('Frequency: '+IntToStr(FMCard.Frequency));

//Activation settings
WriteLn('Enabled :'+BoolStr(FMCard.Enabled));
WriteLn('Active: '+BoolStr(FMCard.Active));
WriteLn('PowerOn: '+BoolStr(FMCard.PowerOn));
WriteLn('Power: '+IntToStr(FMCard.Power));
WriteLn('RDSEnabled: '+BoolStr(FMCard.RDSEnabled));

//RDS settings
WriteLn('AutoRDS: '+BoolStr(FMCard.AutoRDS));
WriteLn('RDSTemplate: '+FMCard.RDSTemplate);
WriteLn('RDSStaticText: '+FMCard.RDSStaticText);
WriteLn('RadioText: '+FMCard.RadioText);

//Program info
WriteLn('Country: '+IntToStr(FMCard.Country));
WriteLn('CountryECC: '+IntToStr(FMCard.CountryECC));
WriteLn('AreaCoverage: '+IntToStr(FMCard.AreaCoverage));
WriteLn('ProgramRef: '+IntToStr(FMCard.ProgramRef));
WriteLn('PTY: '+IntToStr(FMCard.PTY));
WriteLn('isDynamicPTY: '+BoolStr(FMCard.isDynamicPTY));
WriteLn('isTrafficProgram: '+BoolStr(FMCard.isTrafficProgram));
WriteLn('isTrafficAnnouncement: '+BoolStr(FMCard.isTrafficAnnouncement));
WriteLn('isMusic: '+BoolStr(FMCard.isMusic));
WriteLn('isStereo: '+BoolStr(FMCard.isStereo));
WriteLn('isArtificialHead: '+BoolStr(FMCard.isArtificialHead));
WriteLn('useCompression: '+BoolStr(FMCard.useCompression));

//Alternative Frequencies
for I := 1 to 7 do
 WriteLn('AF'+IntToStr(I)+': '+IntToStr(FMCard.AF[I]));

//Waiting to you can review the settings output

  Call this to request an information read from the FM Card.
  It might take a second or two for the data to actually arrive!
PAL.WaitForTime('+00:00:02'); //Give system a chance to read the info

{FMCard.ReadInfo(AlarmMode : integer; AlarmStr, Temp, Power, FirmWare : String);
  AlarmMode = 0:amUnknown, 1:amOK, 2:amHighTemp, 3:amHighSWR, 4:amHighTempAndSWR
FMCard.ReadInfo(AlarmMode, AlarmStr, Temp, Power, FirmWare);
WriteLn('AlarmMode: '+IntToStr(AlarmMode));
WriteLn('AlarmStr: '+AlarmStr);
WriteLn('Temp: '+Temp);
WriteLn('Power: '+Power);
WriteLn('FirmWare: '+FirmWare);

if AlarmMode <> amOK then
 WriteLn('Warning: FMCard may not be ready! Check selected COM Port');

{FMCard.UpdatePS(Index : Integer; PS : String; Delay: Integer);
  Index: 0..39
  Delay: 0..9
  This function is simply a shortcut method to use instead of:
    PS[Index] := PS;
    PSDelay[Index] := Delay;
FMCard.UpdatePS(0,'TEST1', 1);
FMCard.UpdatePS(1,'TEST2', 2);
FMCard.UpdatePS(2,'TEST3', 3);
//Make sure to clear the remaining items!
for I := 3 to 39 do
  FMCard.UpdatePS(I,'', 0);

WriteLn('Waiting so you can see results of UpdatePS test');

{FMCard.setPSStr(PSStr : String; Delay : Integer)
  Delay: 0..9
  This function is a helper function that automatically breaks a long string
  up into many short strings of 8 characters, split on the word boundaries if
  possible, and then assign them to the PS[Index] properties.
  For example: FMCard.setPSStr('TEST1234 GO NOW', 2)
  is equal to:
    UpdatePS(1,'GO NOW',2);
    for I := 3 to 39 do
FMCard.setPSStr('PSStr Test - hope you can see this!', 2);
FMCard.RadioText := 'My Test Radio Text';
WriteLn('Waiting so you can see results of setPSStr and RadioText test');

FMCard.isTrafficProgram := True;
FMCard.isTrafficAnnouncement:= True;
FMCard.setPSStr('IN-TA', 1);
WriteLn('Going into TA!');
WriteLn('Leaving TA...');
FMCard.isTrafficAnnouncement:= False;

  property FMCard.AutoRDS : Boolean;
  property FMCard.RDSTemplate : String;
  property FMCard.RDSStaticText : String;
  If AutoRDS is true, then SAM will use the RDSTemplate to send out the
  a string to RadioText and PS using the newly played track data.
  Note: ONLY songs with a songtype of "S" is automatically updated,
  for anything else the RDSStaticText is used!
  You can use almost any songlist field name in the template, common ones are:
  artist, title, album, albumyear, mmss
  station is a special tag that is the station name as entered in SAM->Config->Station Details
FMCard.AutoRDS := True;
FMCard.RDSStaticText := 'My Test Station';
FMCard.RDSTemplate := '$station$ $artist$ $title$';
if ActivePlayer <> nil then ActivePlayer.FadeToNext;
WriteLn('See automated RDS metadata - template1');
FMCard.RDSTemplate := 'MYTEST $title$ ($MMSS$)';
if ActivePlayer <> nil then ActivePlayer.FadeToNext;
WriteLn('See automated RDS metadata - template2');

WriteLn('## End of FMCard PAL demo ##');
FMCard.setPSStr('THE END', 1);
FMCard.RadioText := 'THE END';

// Helper functions
function BoolStr(Val : Boolean):String;
  if Val then
    Result := 'Y'
    Result := 'N';

Related Links

Personal tools