Skip to Content
It is currently July 6th, 2022, 7:36 am

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 11 posts ] 
Author Message
PostPosted: April 8th, 2015, 2:57 am 
Offline
Junior User
Junior User

Joined: January 29th, 2010, 3:32 pm
Posts: 43
Hello my frend
Seeking a pal script that during the intro of the song play sound mp3 aux 3. Each has a description IDtag3. There is a song production year. For example, the song has entered YEAR-1993 and the task of this script was to play sound from the HDD named 1993. To play a particular song, the particular sound for Intro song. Can someone help me?


Top
 Profile  
Reply with quote  
PostPosted: April 8th, 2015, 8:13 am 
Offline
Experienced User
Experienced User

Joined: March 26th, 2014, 7:47 pm
Posts: 291
Location: New Jersey
check out this post as it should give you a good place to start

viewtopic.php?f=23&t=48349

_________________
[INSERT]Signature Here[/INSERT]


Top
 Profile  
Reply with quote  
PostPosted: April 8th, 2015, 8:33 am 
Offline
Junior User
Junior User

Joined: January 29th, 2010, 3:32 pm
Posts: 43
thanks watcher407 for directing but ...
I would like the program to play the song, and IDtag has entered a year like 1999, it is at the time when it begins and the intro is selected, the program will play 1999.mp3 sweep the deck aux 3. then if it starts a song that has entered the year 2002, the program will issue again with AUX3 2002.mp3


Top
 Profile  
Reply with quote  
PostPosted: April 8th, 2015, 10:08 am 
Offline
Experienced User
Experienced User

Joined: March 26th, 2014, 7:47 pm
Posts: 291
Location: New Jersey
that pal script will load the year mp3 file based on the next file to be played in the queue. it doesn't load it to play on an aux deck but the base functionality that you need is there.... you might need to spend some time adding in the final function. post your work and we'll assist you

_________________
[INSERT]Signature Here[/INSERT]


Top
 Profile  
Reply with quote  
PostPosted: April 8th, 2015, 11:08 am 
Offline
Junior User
Junior User

Joined: January 29th, 2010, 3:32 pm
Posts: 43
ok first problem after start script
albumyear := LowerCase(SongQuery['albumyear']); - this line
syntax error, unknow name albumyear


Top
 Profile  
Reply with quote  
PostPosted: April 8th, 2015, 12:39 pm 
Offline
Experienced User
Experienced User

Joined: March 26th, 2014, 7:47 pm
Posts: 291
Location: New Jersey
was an easy fix I had forgot to declare the variable. Here is the corrected script:

Code:
         //
//===========================================================================
//  ORIGINAL:
//              Script :    track_announce.pal
//              Author :    newagecelticmusic
//                          New Age & Celtic Classics
//                          http://www.newagecelticmusic.com
//
//              Date   :    April 4, 2009
//
//
//  CURRENT:
//              Script :    year_announce.pal
//              Author :    watcher407
//                          SlamminTunes
//                          http://www.slammintunes.com
//
//              Date   :    July 15, 2014
//              Purpose:    Inserts the song year before the track
//
//              Notice :    Give credit where credit is due! Don't remove the
//                          header information from this script or extremely
//                          bad karma will result!
//
//============================================================================
//
// Declarations
//
  var     QueQuery  :  TDataSet;
  var     SongQuery :  TDataSet;
  var     recID     :  Integer;
  var     artist    :  String;
  var     albumyear :  String;
  var     filename  :  String;
  var     annpath   :  String;
//
// Setup
//
// All of your yearly announce tracks need to be in one directory, and must be
// formatted as yyyy.mp3 - EX 2009.mp3 2010.mp3! Change the directory below
// with your directory, and do not forget the trailing slash!
//
  annpath := 'C:\announce_year\';
//
  Pal.Loop := True;
//
//
  Pal.LockExecution;
//
  QueQuery := Query('SELECT * from samdb.queuelist order by id',[],True);
  If QueQuery.IsEmpty then
  begin
// Adjust Category name below as needed - creating a fail safe to keep SAM from crashing
    CAT['Music (All)'].QueueTop(smRandom, NoRules);
    Pal.UnLockExecution;
  end
  else
    QueQuery.First;
    recID := QueQuery['songid'];
    QueQuery.Free;
    SongQuery := Query('SELECT * from samdb.songlist where id = ' + IntToStr(recID),[],True);
    If SongQuery.IsEmpty then
    begin
// Adjust Category name below as needed - creating a fail safe to keep SAM from crashing
      CAT['Music (All)'].QueueTop(smRandom, NoRules);
      WriteLn('Track added, no track initially found!');
      Pal.UnLockExecution;
    end
    else
      albumyear := LowerCase(SongQuery['albumyear']);
      SongQuery.Free;
      filename := StringReplace(albumyear,' ','',True);
      filename := annpath + filename + '.mp3';
      If FileExists(filename) then
      begin
        WriteLn('Adding ' + filename + ' to queue');
        Queue.AddFile(filename,ipTop);
        Pal.UnLockExecution;
        PAL.WaitForPlayCount(2);
      end
      else
        begin
          WriteLn('Can not find ' + filename + ' ... waiting for next song');
          Pal.UnLockExecution;
          PAL.WaitForPlayCount(1);
        end

_________________
[INSERT]Signature Here[/INSERT]


Top
 Profile  
Reply with quote  
PostPosted: April 8th, 2015, 1:38 pm 
Offline
Junior User
Junior User

Joined: January 29th, 2010, 3:32 pm
Posts: 43
watcher407
thanks, now work fine

Please write me yet whether it is possible to load a file with a date only for the songs, which have the NORMAL SONG "S" apart from checking such Jingles "J" etc?


Top
 Profile  
Reply with quote  
PostPosted: April 8th, 2015, 2:33 pm 
Offline
Experienced User
Experienced User

Joined: March 26th, 2014, 7:47 pm
Posts: 291
Location: New Jersey
it is possible by loading songdata and checking if songtype = S

_________________
[INSERT]Signature Here[/INSERT]


Top
 Profile  
Reply with quote  
PostPosted: April 9th, 2015, 12:08 am 
Offline
Junior User
Junior User

Joined: January 29th, 2010, 3:32 pm
Posts: 43
and I ask you, you introduced this rule to this script?


Top
 Profile  
Reply with quote  
PostPosted: April 10th, 2015, 8:09 am 
Offline
Experienced User
Experienced User

Joined: March 26th, 2014, 7:47 pm
Posts: 291
Location: New Jersey
try to figure it out and we'll assist where we can

_________________
[INSERT]Signature Here[/INSERT]


Top
 Profile  
Reply with quote  
PostPosted: July 30th, 2021, 8:02 am 
Offline
New User
New User

Joined: July 13th, 2021, 5:49 am
Posts: 1
Hi,
Pal for year drops:
This Pal for auto sweep of years play works, however it does occasionally do a year drop twice in a row.
More so if there are more than 2 pal scripts at work.
Even though the queue has 1 item at all times, as recommended.
I would appreciate any help on this.


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

All times are UTC - 6 hours [ DST ]


Who is online

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