Skip to Content
It is currently July 16th, 2019, 12:10 pm

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: September 8th, 2018, 9:51 am 
Offline
New User
New User

Joined: September 8th, 2018, 9:26 am
Posts: 3
I have been beating my head for 2 days on this. If an intro for an artist is found it works great. The minute an artist plays that doesn't have an intro it stops working. Any ideas? The goal is to load in the queue an intro for the next song.

//The Purpose for this script is to load an intro for a song
//Categories for each artist are created with name "artist" + ' VO'
//The script is supposed to look at the next artist in the Queue,
// look for a category ex: "Alan Jackson OV" select the least played
// intro and load it in front of the song.
//All the intros have "I-" as the first 2 characters.
//The script checks to see if the current track playing has a "-" for the
// second character. If it does then it should skip attempting to load intro

var NxSong : TSongInfo;

var Announcement : TSongInfo;
var Player1 : TSongInfo;
var Player2 : TSongInfo;
var GetChar1 : String = '=';
var GetChar2 : String = '=';
var IsDash : String = 'N';

Pal.Loop := True;
Pal.LockExecution;
//Check what tracks are loaded into the players
Player1 := DeckA.GetSongInfo;
Player2 := DeckB.GetSongInfo;

//See what the second character in the track is. Checking for "-"
GetChar1 := CharAt(Player1['Artist'], 2);
GetChar2 := CharAt(Player2['Artist'], 2);

WriteLn(GetChar1);
WriteLn(GetChar2);
WriteLn(Player1['Artist']);
WriteLn(Player2['Artist']);

//Set Y or N for detection of "-"
If GetChar1 = '-' Then
Begin
IsDash := 'Y'
end;
If GetChar2 = '-' Then
Begin
IsDash := 'Y'
End;
WriteLn(IsDash);

//If there is not a dash then execute process of loading intro track
If IsDash = 'N' Then
Begin

NxSong := Queue.NextInQueue;
WriteLn(NxSong['Artist']);
Queue.Add(NxSong,ipTop);
Announcement := CAT[((NxSong['Artist'])+' VO')].ChooseSong(smLRP,NoRules);

WriteLn(Announcement['Artist']);
Queue.Add(Announcement,ipTop);

End;
Pal.unLockExecution;
NxSong.Free;
Announcement.Free;
Player1.Free;
Player2.Free;

Pal.WaitForPlayCount(1);


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 8 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