Skip to Content
It is currently July 6th, 2022, 8:56 am

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: November 19th, 2012, 12:38 pm 
Offline
New User
New User

Joined: August 12th, 2012, 11:35 am
Posts: 17
:?: This should be a relatively easy thing to do, I just don't know how? My tracks run into one another without any space in between. Any advise as to how to insert a few seconds between tracks.
I'm not knowledgeable about FX, fade in or fade out.
Thanks in advance.


Top
 Profile  
Reply with quote  
PostPosted: November 19th, 2012, 7:45 pm 
Offline
Alumni
Alumni

Joined: October 14th, 2006, 9:38 am
Posts: 5986
Location: Deep in the heart of the PRNJ
You need to either insert a silent track between songs or add silence of the appropriate length to each of your files.

_________________
- Stan Olochwoszcz
A proud licensed SAM user since 2002

Raritan Bay Radio


Top
 Profile  
Reply with quote  
PostPosted: November 21st, 2012, 4:36 pm 
Offline
Senior User
Senior User

Joined: February 22nd, 2012, 10:22 am
Posts: 160
I had the same issue, and Stan answered the same way. I created a 3 second silent .wav audio track in adobe audition or you can use any other audio editing software and used this PAL script to insert the audio in top of queue when a track has been played.

Code:
PAL.Loop := True;
Queue.AddFile('E:\silence_track\silence_track.wav',ipTop);
PAL.WaitForPlayCount(1);


change the location of your silence track and start the PAL script. Works great.

Post back if you need any assistance.

_________________
Slavic Christian Radio 24/7 Christian Music (http://www.slaviccenter.com/radio)
Download our Android Radio app: (https://play.google.com/store/apps/details?id=com.slaviccenter.radio)


Top
 Profile  
Reply with quote  
PostPosted: February 19th, 2018, 9:05 am 
Offline
Junior User
Junior User

Joined: September 2nd, 2015, 12:02 am
Posts: 25
Hate to resurrect an old thread, but I really need help with this....

I have tried the pal script above, but keep getting error "script source file does not exist"

And yet, I know it does exist. I even tried moving the file and changing the location in the script, but can not get it to recognize the file.

Can anyone help with this?


Top
 Profile  
Reply with quote  
PostPosted: February 19th, 2018, 9:10 am 
Offline
Junior User
Junior User

Joined: September 2nd, 2015, 12:02 am
Posts: 25
Here is a copy of my pal script.


PAL.Loop := True;
Queue.AddFile('C:\Users\Administrator\Documents\Radio\silence.wav',ipTop);
PAL.WaitForPlayCount(1);



.


Top
 Profile  
Reply with quote  
PostPosted: February 19th, 2018, 9:27 am 
Offline
Junior User
Junior User

Joined: September 2nd, 2015, 12:02 am
Posts: 25
Never mind.

Had to remove the script from the window and re add it....


Top
 Profile  
Reply with quote  
PostPosted: June 19th, 2021, 9:41 am 
Offline
Junior User
Junior User

Joined: October 12th, 2007, 10:57 pm
Posts: 40
Forgive me for resurrecting an old discussion, but this seemed to be the best place to post. We're experimenting with inserting a silent track in SAM as described in this thread to get additional separation between tracks.

Silence is being added as needed with a PAL script and working fine. Is there a way to disable sending metadata for only this silent track to keep it from being displayed in our now playing list?

Thanks in advance to anyone who can help.


Top
 Profile  
Reply with quote  
PostPosted: June 19th, 2021, 10:01 am 
Offline
SVS Member
SVS Member

Joined: December 6th, 2004, 9:00 am
Posts: 8306
Location: Cologne (Germany)
You can override what is sent to your streaming server using PAL.
The default setting is $combine$ which is a shortcut for artist - title from the song info of the currently playing track.
If you override that to not pick stuff automatically, but read something else, you can even make it the same text as the track before/after.

You just have to reset it afterwards.

An example for how to set the caption template via PAL, check the TitleStreaming PAL that comes with SAM.

_________________
Benedikt Bauer - SVS (Spacial Volunteer Support)

Shop for readymade PAL scripts by countrywesterndj - Or get a custom script made by me (or others)

My Project:
Send "Now Playing" from SAM to Twitter and/or Facebook | Sourcecode


Top
 Profile  
Reply with quote  
PostPosted: June 19th, 2021, 1:14 pm 
Offline
Junior User
Junior User

Joined: October 12th, 2007, 10:57 pm
Posts: 40
Benedikt,

Thanks so much for your reply and help to the community.

Can you please show me an example of how to modify this script, so that the song data sent to a web server is the same as the previously played track and not what's embedded in "silence.wav"? In this PAL, $combine$ will also need to be reset so that the next track plays as intended.

Code:
PAL.Loop := True;
Queue.AddFile('C:\Users\Administrator\Documents\Radio\silence.wav',ipTop);
PAL.WaitForPlayCount(1);


Thanks again for your help and assistance.


Top
 Profile  
Reply with quote  
PostPosted: June 19th, 2021, 1:34 pm 
Offline
SVS Member
SVS Member

Joined: December 6th, 2004, 9:00 am
Posts: 8306
Location: Cologne (Germany)
1. The PAL script you posted, doesn't that create an infinite loop of silence? At first there is a track playing, then you add silence track next up. Then you wait for the silence track to play and end the script. Then the script loops and will add a silence track next up right after the silence track and wait for the silence track to finish before starting over. In the end you have one actual track and an infinite loop of silence.

Your PAL.WaitForPlayCount(1) should actually be PAL.WaitForPlayCount(2); because you only want the script to start again after both the current track and the silence track have been played.


2.
Code:
var NextUp : TSongInfo;

PAL.Loop := True;

NextUp := TSongInfo.Create;
NextUp := ActivePlayer.GetSongInfo;
Queue.AddFile('C:\Users\Administrator\Documents\Radio\silence.wav',ipTop);
PAL.WaitForPlayCount(1); // wait for the current track to finish and the silence to play before changing the Encoder title
Encoders.SongChange(NextUp);
PAL.WaitForPlayCount(1); // Wait for the silence to finish before starting over
NextUp.Free;



I just found out this is actually even easier than what I described above.
The TitleStreamBanners.pal has pretty good description comments.

So this PAL above creates a new, empty TSongInfo object on every iteration, sets it's details to the same as the track currently playing, then adds your silence track and when the silence track starts playing it tells the encoder the just finished song's details instead.

As per 1. I added another PAL.WaitForPlayCount(1); here so you don't end up with an infinite loop of silence.

_________________
Benedikt Bauer - SVS (Spacial Volunteer Support)

Shop for readymade PAL scripts by countrywesterndj - Or get a custom script made by me (or others)

My Project:
Send "Now Playing" from SAM to Twitter and/or Facebook | Sourcecode


Top
 Profile  
Reply with quote  
PostPosted: June 19th, 2021, 2:13 pm 
Offline
Junior User
Junior User

Joined: October 12th, 2007, 10:57 pm
Posts: 40
Mastacheata wrote:
1. The PAL script you posted, doesn't that create an infinite loop of silence? At first there is a track playing, then you add silence track next up. Then you wait for the silence track to play and end the script. Then the script loops and will add a silence track next up right after the silence track and wait for the silence track to finish before starting over. In the end you have one actual track and an infinite loop of silence.


I tested the PAL script I posted above earlier today and it played fine inserting silence in between every other track. In our set up, songs are added from a Clockwheel one at a time when there are 0 tracks in the que. Only one song at a time is in the que. A jingle is added with another PAL script at specific time intervals. So at the most, there are two items in the que at a time, a song from a Clockwheel and a jingle that plays based on time.

I just now tested the PAL script you posted. "Silence.wav" is playing every two tracks instead of one. And "Silence" is still displaying in the metadata. So it's not yet working as intended.


Top
 Profile  
Reply with quote  
PostPosted: June 19th, 2021, 2:50 pm 
Offline
SVS Member
SVS Member

Joined: December 6th, 2004, 9:00 am
Posts: 8306
Location: Cologne (Germany)
How long/short is your silence.wav?
If it's really short, you might be better off just changing the song info for the silence.wav file every time you push that into the queue.

Code:
var Current, NextUp : TSongInfo;

PAL.Loop := True;

Current := TSongInfo.Create;

Queue.AddFile('C:\Users\Administrator\Documents\Radio\silence.wav',ipTop); // add file to queue
NextUp := Queue.NextInQueue; // remove file from queue and get song info
Current := ActivePlayer.GetSongInfo; // Get Curent Track's SongInfo - hopefully your silence track is done by now
NextUp['artist'] := Current['artist']; // change file's song info (artist) to match currently playing track
NextUp['title'] := Current['title']; // change file's song info (title) to match currently playing track
Queue.AddSong(NextUp, ipTop); // readd updated file to queue
PAL.WaitForPlayCount(1); // wait for the current track to finish and then start again


In this snippet instead of changing the Encoder Track Info in a separate command command after waiting for the song to change to the silence track which takes 2-3 seconds in total, we change the silence track's song info ahead of time and wait only once. Due to the arrangement of the commands it will take at least 3-4 seconds before the system tries to get the currently playing track's info again. If your silence track is shorter, this should be enough time for the next real track to start as well, making the wait actually 2 tracks, despite only waiting for one track to finish explicitly..

_________________
Benedikt Bauer - SVS (Spacial Volunteer Support)

Shop for readymade PAL scripts by countrywesterndj - Or get a custom script made by me (or others)

My Project:
Send "Now Playing" from SAM to Twitter and/or Facebook | Sourcecode


Top
 Profile  
Reply with quote  
PostPosted: June 19th, 2021, 3:14 pm 
Offline
Junior User
Junior User

Joined: October 12th, 2007, 10:57 pm
Posts: 40
Mastacheata wrote:
How long/short is your silence.wav?


Right now it's only 1 second. We may extend this or shorten it slightly as needed. We use an ad insertion service and we're trying to add additional silence in between tracks so that ads are always inserted cleanly in between tracks. Without the addition of silence, sometimes the next track plays for a fraction of a second before the inserted ad plays which doesn't sound professional. Crossfading is disabled.

Mastacheata wrote:
Code:
var Current, NextUp : TSongInfo;

PAL.Loop := True;

Current := TSongInfo.Create;

Queue.AddFile('C:\Users\Administrator\Documents\Radio\silence.wav',ipTop); // add file to queue
NextUp := Queue.NextInQueue; // remove file from queue and get song info
Current := ActivePlayer.GetSongInfo; // Get Curent Track's SongInfo - hopefully your silence track is done by now
NextUp['artist'] := Current['artist']; // change file's song info (artist) to match currently playing track
NextUp['title'] := Current['title']; // change file's song info (title) to match currently playing track
Queue.AddSong(NextUp, ipTop); // readd updated file to queue
PAL.WaitForPlayCount(1); // wait for the current track to finish and then start again



I added this code and SAM is responding with compile errors.


Top
 Profile  
Reply with quote  
PostPosted: June 19th, 2021, 3:35 pm 
Offline
SVS Member
SVS Member

Joined: December 6th, 2004, 9:00 am
Posts: 8306
Location: Cologne (Germany)
My bad. Queue.AddSong is actually called Queue.Add

Code:
var Current, NextUp : TSongInfo;

PAL.Loop := True;

Current := TSongInfo.Create;

Queue.AddFile('C:\Users\Administrator\Documents\Radio\silence.wav',ipTop); // add file to queue
NextUp := Queue.NextInQueue; // remove file from queue and get song info
Current := ActivePlayer.GetSongInfo; // Get Curent Track's SongInfo - hopefully your silence track is done by now
NextUp['artist'] := Current['artist']; // change file's song info (artist) to match currently playing track
NextUp['title'] := Current['title']; // change file's song info (title) to match currently playing track
Queue.Add(NextUp, ipTop); // readd updated file to queue
PAL.WaitForPlayCount(1); // wait for the current track to finish and then start again

_________________
Benedikt Bauer - SVS (Spacial Volunteer Support)

Shop for readymade PAL scripts by countrywesterndj - Or get a custom script made by me (or others)

My Project:
Send "Now Playing" from SAM to Twitter and/or Facebook | Sourcecode


Top
 Profile  
Reply with quote  
PostPosted: June 19th, 2021, 4:44 pm 
Offline
Junior User
Junior User

Joined: October 12th, 2007, 10:57 pm
Posts: 40
Ok, we're getting closer.

I added your script. "Silence.wav" is now playing every other track as desired. When "Silence.wav" is added to the queue, the artist and track name match the previously played track as desired. However, after "Silence.wav" plays, SAM changes the track name back to "Silence" and "Silence" is also sent to our now playing widgets as the track title.

Let me know if you have any further ideas.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 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 4 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