Ik kon het antwoord niet met de zoekfunctie vinden, dus mocht dit een dubbelpost zijn o.i.d attendeer me.
Van de week (proberend mijn database probleem op te lossen) ontdekte ik ineens de standaard PAL scripts die met SAM mee komen. (lijkt me dat dit verder bij jullie allen wel bekend is...)
In ieder geval...ik dol enthousiast, want dit volgende script stond ertussen:
Ik heb hem enigszins aangepast en de INTRO optie(s) weggehaald omdat ik nonstop House draai dus de Overlay Jingle kan altijd.{ About:
This script will play a liner in Aux1 as soon as a new track starts
The liner will only be played if
a) The song has an intro of specified minimem duration
b) The song is of type S, i.e. a normal song.
Then the script will wait the specified amount of time before
it tries to play another liner.
This script can help brand your station and make it sound like a true
commercial terrestrial station.
any source connected
Usage:
a) Make sure you use the song information editor to specify intro times for your tracks!
b) Make sure the AGC settings on Aux1 is to your liking. Also set the volume a bit louder
on Aux1 so you cna clearly hear the liner above the active Deck audio.
c) Edit the configuration details below.
Make sure to change the category to the one you use to store your liners.
}
{ CONFIGURATION }
{==================================================}
const MIN_WAIT = '+00:15:00'; //Wait 15 minutes between liners
const LINERS_CATEGORY = 'Liners';
{ IMPLEMENTATION }
{--------------------------------------------------}
function ExtractIntro(Song : TSongInfo):Integer; forward;
var Song, Liner : TSongInfo;
var Waiting : Boolean = True;
var Intro : Integer = 0;
Aux1.Eject;
{Step1: Queue up the deck, ready for play}
Liner := CAT[LINERS_CATEGORY].ChooseSong(smLemmingLogic, EnforceRules);
if (Liner=nil) then
WriteLn('No valid liner found')
else if (not Aux1.QueueSong(Liner)) then
WriteLn('Failed to queue song: '+Liner['filename']);
{Wait for a valid song with intro}
while Waiting do
begin
{Step2: Wait for the song to change}
PAL.WaitForPlayCount(1);
{Step3: Grab current song information}
Song := ActivePlayer.GetSongInfo;
if (Song=nil) then
WriteLn('The active player contained no song info??')
else
begin
{Extract the intro time - this is a bit tricky}
Intro := ExtractIntro(Song);
{Start playing the liner if the current song matches our rules}
if(Song['songtype']='S') then
begin
Aux1.Play;
Waiting := False;
end;
Song.Free; Song := nil;
end;
end;
{Wait 5 minutes before we do this all again}
PAL.WaitForTime(MIN_WAIT);
PAL.Loop := True;
{................................................}
function ExtractIntro(Song : TSongInfo):Integer;
var
P : Integer;
XFade : String;
begin
Result := -1;
XFade := Trim(Song['xfade']);
WriteLn('Decoding XFade string');
WriteLn('XFade: '+XFade);
if XFade = '' then
Result := -1
else
begin
P := Pos('&i=',XFade);
if (P > 0) then
begin
Delete(XFade,1,P+2);
P := Pos('&',XFade);
if (P>0) then
Delete(XFade,P,Length(XFade));
Result := StrToIntDef(XFade,-1);
WriteLn('Intro time detected: '+XFade);
end;
end;
end;
{--------------------------------------------------}
Ik heb dus een mapje met 'Liners' gemaakt (droge jingles) en hij werkt naar behoren! MAAR...ik heb een stuk of 7 verschillende, maar hij pakt steeds DEZELFDE jingle. Als ik die uit het mapje verwijdert, pakt hij een andere, maar dan ook steeds opnieuw dezelfde.
Enig idee wat ik kan doen om te zorgen dat hij steeds een andere pakt???