Skip to Content
It is currently October 6th, 2022, 2:37 am

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 27 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: June 17th, 2009, 9:46 pm 
Offline
New User
New User

Joined: June 17th, 2009, 9:39 pm
Posts: 19
Hi guys,

First off, I know that there are already posts in here that deal with this. But, I have been selected to program a station for 1.FM, and while I know how to use SAM in a pretty efficient way, PAL scripting has never been/will never be my forte. So it would be great if someone could reply with a tried-and-true PAL script that only allows 'S' category artist-title info to be transmitted to the Shoutcast server.

I've looked through the help files and have spent the last 2 hours searching through the forums to no avail. While it seems that many people have had this question, a script that carries out this function has never actually been posted.

Thanks in advance,
Adam


Top
 Profile  
Reply with quote  
PostPosted: June 19th, 2009, 1:54 pm 
Offline
Alumni
Alumni

Joined: March 11th, 2003, 1:34 pm
Posts: 9959
Location: Maui, HI
Consider opening a support ticket for PAL coding assistance.

_________________
- Steve Kunitzer
- SVS (Spacial Volunteer Support) / Forum Administrator

Image
Image


Top
 Profile  
Reply with quote  
PostPosted: June 22nd, 2009, 6:34 am 
Offline
Junior User
Junior User

Joined: February 15th, 2009, 9:54 am
Posts: 73
Location: Massachusetts
What version of SAM are you using?


Top
 Profile  
Reply with quote  
PostPosted: June 22nd, 2009, 6:51 am 
Offline
New User
New User

Joined: June 17th, 2009, 9:39 pm
Posts: 19
4.3.6


Top
 Profile  
Reply with quote  
PostPosted: June 22nd, 2009, 6:57 am 
Offline
Junior User
Junior User

Joined: February 15th, 2009, 9:54 am
Posts: 73
Location: Massachusetts
Not fully tested, and probably could use more error-checking, but try this. Remember to turn off 'Enable title streaming' in your encoder'.
Code:
// ==========================================================================
// ScriptName:          SendEncoderData.pal
//
// Author    :          newagecelticmusic
//
// Date      :          June 22, 2009
//
// Purpose   :          Sends only 'S' songtype data to the encoder
//
// Info      :          You must turn off 'Enable title streaming'
//                      in your encoder. This script will handle the
//                      title streaming for you.
//
//                      Give credit where credit is due - don't remove
//                      the header from this script or bad karma will result!
//
// ===========================================================================
//
// Declarations
//
var Song           : TSongInfo;
//
// This is going to run continuously
//
PAL.Loop := True;
//
if ActivePlayer <> nil then
   begin
      Song := ActivePlayer.GetSongInfo;
      if Song['songtype'] = 'S' then
         Encoders.SongChange(Song);
   end;
PAL.WaitForPlayCount(1);
//


Try it out and let me know if it does what you want.


Top
 Profile  
Reply with quote  
PostPosted: June 22nd, 2009, 6:59 am 
Offline
New User
New User

Joined: June 17th, 2009, 9:39 pm
Posts: 19
Oh you are too kind, my friend. I will insert this in about 30 minutes and report back. Thanks!

Adam


Top
 Profile  
Reply with quote  
PostPosted: June 22nd, 2009, 7:10 am 
Offline
New User
New User

Joined: June 17th, 2009, 9:39 pm
Posts: 19
Do I recognize you from the Breakaway forums?


Top
 Profile  
Reply with quote  
PostPosted: June 22nd, 2009, 7:12 am 
Offline
Junior User
Junior User

Joined: February 15th, 2009, 9:54 am
Posts: 73
Location: Massachusetts
Been known to hang around there :-)


Top
 Profile  
Reply with quote  
PostPosted: June 22nd, 2009, 12:20 pm 
Offline
Junior User
Junior User

Joined: February 15th, 2009, 9:54 am
Posts: 73
Location: Massachusetts
So, did this work out for you?


Top
 Profile  
Reply with quote  
PostPosted: June 22nd, 2009, 1:19 pm 
Offline
Alumni
Alumni

Joined: March 11th, 2003, 1:34 pm
Posts: 9959
Location: Maui, HI
Make sure to free that song object before the script terminates.

_________________
- Steve Kunitzer
- SVS (Spacial Volunteer Support) / Forum Administrator

Image
Image


Top
 Profile  
Reply with quote  
PostPosted: June 22nd, 2009, 1:45 pm 
Offline
Junior User
Junior User

Joined: February 15th, 2009, 9:54 am
Posts: 73
Location: Massachusetts
Yep, good catch - I knocked it out quickly ... add a Song.Free; before the end;


Top
 Profile  
Reply with quote  
PostPosted: June 22nd, 2009, 5:30 pm 
Offline
New User
New User

Joined: June 17th, 2009, 9:39 pm
Posts: 19
Sorry, I got home and could not get back into the forums through Firefox.

After adding the Song.Free; before end; the script only seems to work with Title Streaming enabled in the encoder options. What happens is that SAM now sends the song data twice, but sweepers are only being sent once (leading me to believe that the script is somehow working). But if I disable title streaming in the encoder, no metadata gets sent at all.

Any thoughts on that?

Adam


Top
 Profile  
Reply with quote  
PostPosted: June 22nd, 2009, 7:14 pm 
Offline
Junior User
Junior User

Joined: February 15th, 2009, 9:54 am
Posts: 73
Location: Massachusetts
Hmmm ... actually, add the Song.Free before the PAL.WaitForPlayCount(1) - after the end; and see what happens ....

This SHOULD work ... but it now seems in testing that with title streaming turned off in the encoder, even though the SongChange is happening for just songtype 'S', the ShoutCast server is not updating.

FesterHead, could you help out here?


Top
 Profile  
Reply with quote  
PostPosted: June 22nd, 2009, 8:27 pm 
Offline
Alumni
Alumni

Joined: March 11th, 2003, 1:34 pm
Posts: 9959
Location: Maui, HI
I will see about setting up a dummy encoder and DNAS to see what happens on my end.

_________________
- Steve Kunitzer
- SVS (Spacial Volunteer Support) / Forum Administrator

Image
Image


Top
 Profile  
Reply with quote  
PostPosted: June 22nd, 2009, 8:51 pm 
Offline
Alumni
Alumni

Joined: March 11th, 2003, 1:34 pm
Posts: 9959
Location: Maui, HI
Not working for me; title stream off = no Encoders.SongChange update.
Latest non-Beta SAM.

Consider opening a support ticket; it should work and has worked before.

_________________
- Steve Kunitzer
- SVS (Spacial Volunteer Support) / Forum Administrator

Image
Image


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 27 posts ]  Go to page 1, 2  Next

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group