Stel je hebt een intro van 19 seconde en een voicetrack van 4 seconde, dan moet het middels een PAL script toch mogelijk zijn deze voicetrack op 15 seconde te laten starten??
Verzin er eens iets op Kees
Als je tijd hebt!
Code: Selecteer alles
{ 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_INTRO = 5*1000; //5 seconds
const MIN_WAIT = '+00:10:00'; //Wait 15 minutes between liners
const LINERS_CATEGORY = 'Station IDs (All)';
{ IMPLEMENTATION }
{--------------------------------------------------}
function ExtractIntro(Song : TSongInfo):Integer; forward;
var Song, Liner : TSongInfo;
var Waiting : Boolean = True;
var Intro : Integer = 5;
Aux1.Eject;
{Step1: Queue up the deck, ready for play}
Liner := CAT[LINERS_CATEGORY].ChooseSong(smRandom,NoRules);
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') and (Intro>=MIN_INTRO) 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;
{--------------------------------------------------}En wie zou dat nu ingesproken hebben?????Kees schreef:Laat me raden hoe dat script heet !
luisternaardjruudoppeellandfm.PAL
Als ik tijd heb zal ik het eens testen..ik ben ook wel eens benieuwd wat het script doet.
In het kort komt het er op neer dat 't script kijkt naar de introtijd van een song.Kees schreef:Laat me raden hoe dat script heet !
luisternaardjruudoppeellandfm.PAL
Als ik tijd heb zal ik het eens testen..ik ben ook wel eens benieuwd wat het script doet.
peellandfm schreef:In het kort komt het er op neer dat 't script kijkt naar de introtijd van een song.Kees schreef:Laat me raden hoe dat script heet !
luisternaardjruudoppeellandfm.PAL
Als ik tijd heb zal ik het eens testen..ik ben ook wel eens benieuwd wat het script doet.
Is deze groter dan 5 sec (in dit voorbeeld) speelt hij een liner af die hij al geladen heeft in AUX1.. Als dit gebeurt is wacht 't script 15 minuten en dan weer.
Als er geen intro ingesteld staat in de song blijft hij wachten totdat er een song voorbij komt die aan die voorwaarde voldoet. Daarna is het weer 15minuten wachten. Dus voorlopig draait 't bij mij in elk geval nog niet om de 15 minuten
Ja zoals gezegd. Het is iets, maar nog lang niet zoals het hoort!ojee66 schreef:
draait bij mij al een aantal maanden, denk zals al meer dan een jaar... alleen dat vette heb ik eruit gesloopt, heb nml geen intro's ingesteld. Overigens heb ik er wel naar gekeken maar snap niet dat je 10 custem presets van que points in kan stellen![]()
(misschien voor de jingle overliner op zachte (instrumentale) stukjes of zo???)