Dankzij dit geweldige forum heb ik in no time een mooie stream met SAM op weten te zetten.
Maar toch kom ik niet overal uit
Ik gebruik nu dit welbekende PAL script voor teksten in de titel:
Code: Selecteer alles
PAL.Loop := True;
var Song : TSongInfo;
PAL.WaitForTime('+00:00:20');
Song := TSongInfo.Create;
Song['title'] := 'eigen muziek uploaden? zie www.striem.nl';
Encoders.SongChange(Song);
Song.Free;
PAL.WaitForTime('+00:00:07');
if ActivePlayer <> nil then
Encoders.SongChange(ActivePlayer.GetSongInfo);
PAL.WaitForTime('+00:00:20');
Song := TSongInfo.Create;
Song['title'] := 'striemende radio, om u geheel te vreden';
Encoders.SongChange(Song);
Song.Free;
PAL.WaitForTime('+00:00:07');
if ActivePlayer <> nil then
Encoders.SongChange(ActivePlayer.GetSongInfo);
PAL.WaitForTime('+00:00:20');
Song := TSongInfo.Create;
Song['title'] := 'hou je van langzaam wakker worden bij je croissantje?';
Encoders.SongChange(Song);
Song.Free;
PAL.WaitForTime('+00:00:07');
Song := TSongInfo.Create;
Song['title'] := 'luister dan elke zondag vanaf 12:00 naar Gloomy Sunday';
Encoders.SongChange(Song);
Song.Free;
PAL.WaitForTime('+00:00:07');Code: Selecteer alles
{
Insert Request Dedication information into encoded stream : script by Xgeek (aka Xgeek)
$Id: Inject Request Dedication.PAL,v 0.05 2004/11/12
* This script would not have been possible without the help from FesterHead. Thank You!!!
What this PAL does:
* On song change checks to see if the song was requested, and if it was:
* If no dedication information it will inject ~Requested~ in the title stream after Artist - Title
* If dedication information it will inject ~Requested by <Name> : Who had this to say:- <Message>~ in the title stream after Artist - Title
What is configurable:
* Nothing
PAL built to run continuously:
* Switch to a desktop with the 'PAL Scripts' window visible
* Click '+' (Add new PAL script)
* Check the 'Automatically start script' box
* Click the folder icon and navigate to this script
* Click 'OK'
* Highlight PAL and click 'Start selected PAL script' (VCR type play button)
* Save settings by clicking the 'File' menu item and selecting 'Save Configuration'
}
PAL.Loop := True;
WriteLn('New song started');
WriteLn('Waiting 5 Seconds before checking if it is a Request');
// Wait a few seconds just in case this song is a Jingle. If it is, and it is under 10 seconds the script will still get the correct info for the song after.
PAL.WaitForTime(T['+00:00:05']); //Wait 5 secs
PAL.LockExecution;
// Instantiate a Song Info object
var Song : TSongInfo;
Song := TSongInfo.Create;
WriteLn('Checking if song has been Requested......');
if ((ActivePlayer.GetSongInfo['requestID']) = 0) then WriteLn('Song is not a Request');
// Check if current song has a request ID
if ((ActivePlayer.GetSongInfo['requestID']) > 0) then
Begin
WriteLn('Song is a Request');
var reqInfo : TDataSet = Query('SELECT name, msg FROM requestlist WHERE id = ' + ActivePlayer.GetSongInfo['requestID'], [], true);
var Requested_by : String = reqInfo['name'];
var Dedication_Message : String = reqInfo['msg'];
reqInfo.Free;
If (Requested_by = '') then Requested_by := 'Anonymous';
If (Dedication_Message = '') then Dedication_Message := 'Nothing...';
If ((Requested_by = 'Anonymous') and (Dedication_Message = 'Nothing...')) then
Begin
WriteLn('Song is a Request without Dedication');
WriteLn(Requested_by); // This should aways echo Anonymous
WriteLn(Dedication_Message); // This should aways echo Nothing...
Song['artist'] := ActivePlayer.GetSongInfo['artist'] + ' - ' + ActivePlayer.GetSongInfo['title'];
Song['title'] := '~Verzoekje~';
Encoders.SongChange(Song);
End
else
Begin
WriteLn('Song is a Request with a Dedication');
WriteLn(Requested_by);
WriteLn(Dedication_Message);
Song['artist'] := ActivePlayer.GetSongInfo['artist'] + ' - ' + ActivePlayer.GetSongInfo['title'];
Song['title'] := 'Aangevraagd door ' + Requested_by + '"' + Dedication_Message + '"';
Encoders.SongChange(Song);
End;
End;
PAL.UnlockExecution;
WriteLn('Done....');
Song.Free;
WriteLn('Waiting for next song to start');
PAL.WaitForPlayCount(1); {Wait for 1 songs to play}