Skip to Content
It is currently March 19th, 2019, 11:17 pm

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 26 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: January 28th, 2009, 1:26 pm 
Offline
Senior User
Senior User

Joined: May 1st, 2008, 8:24 pm
Posts: 151
I wonder if this is possible to accomplish with SAM...

Can someone create a playlist on their computer running SAM, and send it to me to play on my computer running SAM?

I've experimented with this, creating a playlist with a bunch of music tracks and transferring it all from one computer to another to see if the receiving computer can pick it up and run with it. No luck. I'm sure it has to do with the fact that if the files aren't in the exact same place as the m3u says it is, SAM will not be able to find the track and it'll just skip it. After the "C:/..." there is the computer name, etc, and if there's anything in that file name that's different, that'll be enough to confuse SAM, I'm sure.

What I'm ultimately trying to accomplish is to have the DJ's at our station do their shows live at their own locations, but make a playlist out of it. Then, they send it to me (I'm the ROBO DJ admin) and my computer will run that playlist as a sort of "rebroadcast" at a later date.

Right now we are having them just record their shows using SAM's stream recorder function and ftp it up to the station's server. I've worked out a system of downloading and loading into SAM, and it works automatically. The problem is when we play the rebroadcasts, the metadata of the show remains the same for the entire 2-3 hour period of the particular DJ's show. Since the metadata does not change, we see our audience numbers drop significantly over the course of a rebroadcast show.

I dunno, is there a way to have the metadata change with the song within, or during, the big 2-3 hour rebroadcast files' playback? Or am I on the right track with this playlist transfer idea?


Top
 Profile  
Reply with quote  
PostPosted: January 28th, 2009, 2:10 pm 
Offline
Alumni
Alumni

Joined: March 11th, 2003, 1:34 pm
Posts: 9959
Location: Maui, HI
Quote:
I'm sure it has to do with the fact that if the files aren't in the exact same place as the m3u says it is, SAM will not be able to find the track and it'll just skip it.

The sites must have the same music structure to share playlists; a playlist contains information on where to locate files. If the location is not the same then the files cannot be located.

Quote:
The problem is when we play the rebroadcasts, the metadata of the show remains the same for the entire 2-3 hour period of the particular DJ's show.

I remember a topic awhile ago on this (was it you?) about this.
If the underlying source file is changed but the metadata not updated within SAM then SAM will use the old metadata.

A couple strategies to overcome this:
1) after updating the source file, go the info editor for the file then reload the metadata; I believe this is a manual solution only
2) after a show is done, remove the sources from SAM, which will/should remove the metadata, then for a rebroadcast add it and the new metadata will appear; this of course can be automated and suggest to use a custom category

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

Image
Image


Top
 Profile  
Reply with quote  
PostPosted: January 28th, 2009, 2:34 pm 
Offline
Senior User
Senior User

Joined: May 1st, 2008, 8:24 pm
Posts: 151
No, it wasn't me. This is the first time I'm asking about this.

Not quite sure I follow you here. Essentially, what I'm trying to do is to NOT have the rebroadcast file display "XYZ Show 01 28 2009" for the duration of the 2-3 hours. Is there a way to have it update with every new song that gets played?


Top
 Profile  
Reply with quote  
PostPosted: January 28th, 2009, 4:12 pm 
Offline
Alumni
Alumni

Joined: March 11th, 2003, 1:34 pm
Posts: 9959
Location: Maui, HI
Sorry, my bad, I have a good memory it is just short.

If the rebroadcast is a single source then you'll need something like a cue sheet for PAL that will wait, update the encoder with song information, wait, update the encoder with song information, ...

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

Image
Image


Top
 Profile  
Reply with quote  
PostPosted: January 30th, 2009, 3:49 pm 
Offline
Senior User
Senior User

Joined: May 1st, 2008, 8:24 pm
Posts: 151
I can get the DJ's to provide that along with their show files. Will a .csv file work? And then...what do I do with it?


Top
 Profile  
Reply with quote  
PostPosted: January 30th, 2009, 5:15 pm 
Offline
Alumni
Alumni

Joined: March 11th, 2003, 1:34 pm
Posts: 9959
Location: Maui, HI
A CSV could work but it'll have to be parsed by PAL using string manipulation to extract and use the data.

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

Image
Image


Top
 Profile  
Reply with quote  
PostPosted: January 30th, 2009, 5:46 pm 
Offline
Senior User
Senior User

Joined: May 1st, 2008, 8:24 pm
Posts: 151
Is there any way to program it all to happen automatically, or would someone have to manually do this for every show?


Top
 Profile  
Reply with quote  
PostPosted: January 30th, 2009, 6:06 pm 
Offline
Alumni
Alumni

Joined: March 11th, 2003, 1:34 pm
Posts: 9959
Location: Maui, HI
Given the CSV, it can be programmed to do it automatically.

However, to make it easier I would recommend not using a CSV but a LFSV (line-feed separated value) format, read into SAM via TStringList, then iterate through it.

LFSV format:
Code:
Artist
Album
Title
time (hh:mi:ss)


LSFV example:
Code:
Rush
Hold Your Fire
Time Stand Still
00:05:09
Rush
Snakes and Arrows
We Hold On
00:04:13


Once the LFSV file is read iterate though it with a counter set to 0 and:
use counter+1 to get the artist
use counter+2 to get the album
use counter+3 to get the title
use counter+4 to get the time

Update the encoders with a combination of artist, album, and title information

wait for the time

Note: I forget if the stringlist pointer is zero based index, adjust accordingly

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

Image
Image


Top
 Profile  
Reply with quote  
PostPosted: January 30th, 2009, 6:23 pm 
Offline
Alumni
Alumni

Joined: March 11th, 2003, 1:34 pm
Posts: 9959
Location: Maui, HI
I hacked this together from the TitleStreambanners.pal in SAMs PAL directory.

Code:
PAL.LockExecution;

var lfsv_file : String = 'C:\Program Files\SpacialAudio\SAMBC\PAL\lfsv.txt';

var song_info : TSongInfo = TSongInfo.Create;
var lfsv_info : TStringList = TStringList.Create;
var line_position : Integer = 0;

var artist, album, title, wait : String;

var can_run : Boolean = true;

if not FileExists( lfsv_file ) then
  begin
    WriteLn( 'LFSV file does not exist!' );
    can_run := false;
  end;

while ( can_run ) do
  begin
    lfsv_info.LoadFromFile( lfsv_file );
    line_position := 0;

    while ( line_position < lfsv_info.Count ) do
      begin
        artist := lfsv_info[ line_position ];
        WriteLn( 'artist = ' + artist );
        song_info[ 'artist' ] := artist;
        line_position := line_position + 1;

        album := lfsv_info[ line_position ];
        WriteLn( 'album = ' + album );
        song_info[ 'album' ] := album;
        line_position := line_position + 1;

        title := lfsv_info[ line_position ];
        WriteLn( 'title = ' + title );
        song_info[ 'title' ] := title;
        line_position := line_position + 1;

        //Encoders.SongChange( song_info );

        wait := lfsv_info[ line_position ];
        WriteLn( 'wait = ' + wait );
        PAL.WaitForTime( '+' + wait );
        line_position := line_position + 1;

        WriteLn( '' );
      end;
      can_run := false;
  end;

PAL.UnlockExecution;

lfsv_info.Free;
song_info.Free;


There is no comments, limited error checking and the encoders update is commented out.

This was my test case:
Code:
Rush
Hold Your Fire
Time Stand Still
00:00:09
Rush
Snakes and Arrows
We Hold On
00:00:13


It worked for me.
Enjoy.

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

Image
Image


Top
 Profile  
Reply with quote  
PostPosted: January 30th, 2009, 7:42 pm 
Offline
Senior User
Senior User

Joined: May 1st, 2008, 8:24 pm
Posts: 151
Thanks for hacking this together. I would be lost without you. Please forgive my ignorance here, this is stretching my understanding of SAM and PAL scripts, but I'm not understanding it fully, and I have what may seem to you some pretty stupid questions. I'm just trying to understand, so please bear with me as I think out loud.

I'm looking at this script and I can, more or less, follow what it's trying to do, line by line. But a LFSV? How is such a file even created in the first place? I see how to save as a .csv and a .m3u, but not a LFSV.

I do know how to automatically play each show's rebroadcast every week, and erase the old files, making it a hands-off operation once I get a show programmed, but this looks over my head. Yay! New territory!

I imagine that:

--I can use an automated ftp client to automatically download the LFSV to a particular place on my hard drive. (once I know how to create an LFSV, that is)

--SAM would treat it just like any other file on my HD, and I can point SAM to where it's supposed to look.

--I can use PAL scripting (like your example above) to get SAM to locate such a file in "such-and-such a place", load it up(to where, I don't know) and run it.

---I can use the ES to automatically run this PAL script concurrently with the show's rebroadcast file.


OK, I think I'm halfway there in understanding this. How do I create an LFSV file and what do I do with it once I have it?


Top
 Profile  
Reply with quote  
PostPosted: January 30th, 2009, 8:49 pm 
Offline
Alumni
Alumni

Joined: March 11th, 2003, 1:34 pm
Posts: 9959
Location: Maui, HI
Quote:
How do I create an LFSV file

I used Notepad, typed a line of text, hit the "enter" key, and repeated.
LFSV = line-feed separated values; this means each value is on a new line in the file; it is a text file; I happen to call the file lfsv.txt but it could be anything as long as the content values are separated by line-feeds (carriage returns, enters, returns, ...).

Quote:
what do I do with it once I have it?

Put into a place where SAM can read it; I happen to choose C:\Program Files\SpacialAudio\SAMBC\PAL\ but it can be anywhere; can even get it from a remote http server if needed.

Quote:
I imagine that:

Everything you image is what should happen.

This is an interesting problem because you're sending titles through the encoder for a item that does not have titles.
Normally I don't go into too much depth on a solution like this but the problem intrigued me enough to put together (in less than 20 minutes! :)) some code to validate the hypothesis.

Others will recall the white-paper I put together regarding relaying title streaming from another SHOUTcast DNAS; I validated the hypothesis and provided some sample code but I did not put together a complete solution.

You still need to coordinate retrieving and playing the show and LFSV file.
I just provided a sample on how to accomplish the dynamic title updates based on a set of metadata information.

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

Image
Image


Top
 Profile  
Reply with quote  
PostPosted: January 30th, 2009, 9:53 pm 
Offline
Senior User
Senior User

Joined: May 1st, 2008, 8:24 pm
Posts: 151
this is actually a pretty easy process now. we already have a system in place that automatically downloads those big show files and has SAM play them (pats self on back...) it looks like its now only a matter of plugging your suggested script and the lfsv file into an equation we already are used to working with.

now, to up the ante a little more: how do we create the lfsv file in an automatic way, so that someone with a Dj's intelligence can create one?

and here's a real good one: how do we account for the time when the dj is talking? we could do voice tracking, but i'm pretty sure none of the dj's would want to do that.

i'll work this into as workable formula/solution as I can as soon as I can and post my findings. if anyone can offer ideas on these two new wrinkles, please don,t hesitate.

thanks for all your help so far. this is fun!


Top
 Profile  
Reply with quote  
PostPosted: January 31st, 2009, 12:02 am 
Offline
Alumni
Alumni

Joined: March 11th, 2003, 1:34 pm
Posts: 9959
Location: Maui, HI
Quote:
how do we create the lfsv file in an automatic way, so that someone with a Dj's intelligence can create one?

This is the tough part and probably needs some form of quality control.

The basic idea is to have a section for each song title and tell it how long to wait until the next title should be transmitted.
If the time is messed up, say for example the song is set to last 00:04:19 but it really is 00:04:37 then the titles may be out of sync.
This is the coordination and attention to detail the person putting the show together would need to do.

I don't think there is anything I can recommend programmatic I can offer to automate this.

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

Image
Image


Top
 Profile  
Reply with quote  
PostPosted: January 31st, 2009, 10:57 am 
Offline
Senior User
Senior User

Joined: May 1st, 2008, 8:24 pm
Posts: 151
We don't care so much if its a bit out of sync by a few seconds here or there. It'll be really tough to make the timing perfect, we know.

Some thoughts after sleeping on it:

How do we get the title stream script to start at the same time as the rebroadcast file? Here's my idea. Put both scripts into one big PAL script, and have it tell SAM to "Queue.Clear;" load up the show file, and "Active Player.Fade To Next" the file currently in the player. Then the two functions we want would start within a few seconds of each other. I think so anyway.


But what about accounting for the times when the DJ is on mic? Is there any way that that occurrence can be shown in the history window? If so, then I can export that occurrence just like any other track, into a csv, or some other sort of file. I had thought of having the DJ use a silent music bed to talk over, as a sort of spacer, but it would show up in the history window with a duration of the entire silent track, not the amount of time the DJ was on mic, between the end of the last track and the beginning of the next. That would screw up the timing, and we're no better off.

I am also trying to think of a way to easily convert a csv file into lfsv format. I fiddled with it this morning with MS Excel, but had no luck, but then again, I'm a complete amateur when it comes to excel. I'll talk to my sister in law, who is a genius with excel, this weekend. Maybe she will have an idea.

Here's an example of the two scripts put together. Not tested, not compiled:

Code:
Cat['Reruns'].Clear;
Cat['Reruns'].AddDir('C:\Documents and Settings\Administrator\My Documents\My Music\Encores\SHOW XYZ', False, ipBottom);
Cat.Free;
 Queue.Clear;

{then add the rerun file}
Cat['Reruns'].QueueBottom(smWeighted, NoRules);

{fade the currently playing song to start the rebroadcast}
ActivePlayer.FadeToNext;

{start the title stream script}
PAL.LockExecution;

var lfsv_file : String = 'C:\ 'C:\Documents and Settings\Administrator\My Documents\My Music\TITLE STREAMS\SHOW XYZ'.txt';

var song_info : TSongInfo = TSongInfo.Create;
var lfsv_info : TStringList = TStringList.Create;
var line_position : Integer = 0;

var artist, album, title, wait : String;

var can_run : Boolean = true;

if not FileExists( lfsv_file ) then
  begin
    WriteLn( 'LFSV file does not exist!' );
    can_run := false;
  end;

while ( can_run ) do
  begin
    lfsv_info.LoadFromFile( lfsv_file );
    line_position := 0;

    while ( line_position < lfsv_info.Count ) do
      begin
        artist := lfsv_info[ line_position ];
        WriteLn( 'artist = ' + artist );
        song_info[ 'artist' ] := artist;
        line_position := line_position + 1;

        album := lfsv_info[ line_position ];
        WriteLn( 'album = ' + album );
        song_info[ 'album' ] := album;
        line_position := line_position + 1;

        title := lfsv_info[ line_position ];
        WriteLn( 'title = ' + title );
        song_info[ 'title' ] := title;
        line_position := line_position + 1;

        //Encoders.SongChange( song_info );

        wait := lfsv_info[ line_position ];
        WriteLn( 'wait = ' + wait );
        PAL.WaitForTime( '+' + wait );
        line_position := line_position + 1;

        WriteLn( '' );
      end;
      can_run := false;
  end;

PAL.UnlockExecution;

lfsv_info.Free;
song_info.Free;


Top
 Profile  
Reply with quote  
PostPosted: February 2nd, 2009, 1:47 am 
Offline
Senior User
Senior User

Joined: May 1st, 2008, 8:24 pm
Posts: 151
As of yet, no luck figuring out a way to convert .csv to lfsv without a great deal of manual labor. You mentioned that it could be done with .csv earlier. How would that be done?

I'm going to post a new thread that simply deals with the .csv to lfsv issue, maybe someone will see the thread title on the main forum page and come to my rescue... :lol:


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

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: Bing [Bot] 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:  
cron
Powered by phpBB® Forum Software © phpBB Group