All times are UTC+02:00




Post new topic  Reply to topic  [ 1 post ] 
Author Message
PostPosted: Thu Jun 12, 2008 1:58 pm 

Joined: Tue Apr 29, 2008 8:32 am
Posts: 25
Location: Rogers AR
Ok Here it is.
:ugeek: -----------------------------------------
What it does: auto loads a stereo tool or sam AGC preset at the start of a song.
PAL code to be used for files or url streams is included.

Shoutout: Thanks to Hanz for adding this feature to Ver 3.12 of Stereo Tool.

http://www.stereotool.com for the free dsp plugin.

WHY: every source is different. a lowbitrate mp3 needs less preamp and more high filters than a 320k mp3. some cd's

are so compressed from the studio that they need much less commpression than others.
url's, file's, and Live streams each are at different bitrates and need a different preset.
I do not want to live in front of the PC each show as we do not have full time engineers at this station. This is the result.

If you like it donations for caffine and pizza are needed
If you want help with this see above about donations needed :mrgreen:
paypal to jandebeur@starband.net

How to use: It uses the Ratings field in the songinfo to set the preset i want that song to use. 0-9
0 is the default given to all new songs so 0.sts will be your current preset you are using.
I create presets named 1.sts - 9.sts for the rest.
Same for SAM AGC 0.agc is default and 1-9.agc for others

SO just set the rating on a songs info and it loads a preset with the same number as name

THIS FEATURE IS A REGI$TERED FEATURE FOR STEREO TOOL. See the ST website about REGI$TRATION
-------------------------------------------

How it works:
ST looks at a file 4 times a sec. if the MODIFY date/time changes it opens the file and reads the preset info from it.

so ST is waiting for sam to change that file. this pal does that
Sam let you load a preset for deck a+b. this pal does that

1)we start an endless repeat loop, yea that bad thing but it works faster than anything else

2)it waits til a song plays it is NOT using cpu cycles here

3)it checks the duration of the song,if it is under 7 sec it does nothing.

Tec info if youwant to know:
if it is under 3.8 sec(critical value) it does some timing change, waiting long enough(4 sec) to catch the next song in the other deck at this point, then if it is under 7 sec it does nothing. This overcame a problem that if the song duration was the same as the time it takes the pal to loop it would not see the next song change. i tried all sorts of ways like looking at when a song queues up but there where always issues. this pal takes about 3 sec to loop so we end up at 3.8 sec for the max to delay for.
i.e. a 2 sec song waits and reads the next deck/song for the 7 sec test. songs under 7 sec play so fast it is not good to change preset as there are other timing issues here.

4)it gets the song info of the playing song(unlocked mode only command)

5)jumps into fast locked mode

6)it looks at the type S,N,I what ever you configure the PAL to look at. 'S' for music is all the default pal below looks at. you need to edit it for others.

6) if type is S it reads the rating. default is 0 range is 0-9

7)set the preset filenames based on the ratings and type

8)unlocks back to slow mode

9)copies the preset file you set, to the filename ST is watching, overwriting the old one

10)adds a blank to end end of the file, triggering a change to the modify date/time, ST sees the change and loads the preset.

11) loads the agcpreset on the playing deck

12)loops back and waits for next song change

------------------------------------------------------

My preset setup:

In sam agc I use the top 3 bands of the 5 band as limiter and expander only, turning off the lower 2 and all compresion. 3db@70hz bass shelf and 0db clipper work good here to. this is a very sensitive setting. you have to get this 3 band thing right or it kills the sound. but when it is correct i really helps the crappy lowbitrate mp3 and wma songs with the tinny and shhh sounds on the highs and esss.
i only use this as a "pre" prelimiter for the highs before is goes to ST DSP.
it is on except for the very best quality songs. It sounds like a very mild lowpassfilter but is active.
If you have a setup/preset you like better hey its your station.

my suggestion
0.agc default what you are using now if any
2-4 same as 0
5.agc- turns off my 5 band.
6-8 reserved what ever you want
9 crappy phone noise mono voice settings

If it is a low bitrate song. i change the rating to 1 for it, as it drops the preamp and ups the loudness.
2 is a little more preamp than 0,
3-5 is for high quality songs depending on how much compression the allready have.
5 is the best. it turns off the agc 5 band and pumps the ST preamp to 8.00. I use the loudness setting to set each preset to about the same loudness ie lower it so all the presets sound the same. most songs are 4.

so- 1, 0, 2, low bitrate songs
3, 4, 5, High bitrate somgs
6-9 i have reserved for specials

I have 9 as a mono voice preset with the ST channel delay on, heavy on the ST gate, and heavy on the expander in the agc.

this is great for a live talk show streamed in to me that has phone callers most of the show. real crappy sound for hours so i need all the help i can get.

but you can do what ever you can think off. just remember that 0.sts and 0.agc are what you use now and the rest are

what settings you want to save as. they load up the same rating # if you use both the agc and ST presets. i.e. 3.sts and 3.agc load together if the song is rated 3.


Things to know
--------------------------------------
NOTE: The AGC presets load on EACH player Not at the mixer. NO other pal way to do it. St should be run at the Mixer as a DSP.

Note:
In Stereo Tool I have 0.sts as the preset i use now. because 0 is the default rating for any song. most of you spent time to set it so it becomes our default. so until you set the ratings on your songs it will just load what you are preset at now. If you change a rating on a song chances are the whole album will want the same rating/preset. use the apply to album button to save just the rating to the other songs. its under the advanced tab, uncheck everything but the rating box. they will stay unchecked the next time you use that feature.

I am looking at a way to set ratings based on bitrate. but bitrate is in the song tag and rating is in the SAM DB. I have to find a VB command to read mp3 tags to create this program. til then you just have to set them one album at a time. If youknow how to do this in VB let me know and save me some time. HELP ME TO HELP YOU....

Note:
you have to change ratings BEFORE the song is queued to the deck. after it is queued to a deck sam only reads to DB info once. Even if you change it while waiting to play, this pal will not see the change till next time the song loads. Because Sam creats a result set from the read and PAL's read the result set not the DB. you have to use a SQL command to read the DB directly. They take time and are not needed here.

Note: I have tested this with AUX decks. if you are doing liners over the song intro this pal might screw up. the wait for play does NOT see the Aux deck start playing so it should work but i have not tested it with a liners pal running running. UAYOR

-----------------------------------------------------------
if you use the ratings (why?) field the pal may be modded to look at another db field but it would need to be the same name through out the script from field value to the presetname.
ok I can think of maybe new music getting feedback from a website. What are you a record company?
-----------------------------------------------------

Warnings:
1.every line has been tested for speed and timing. do not edit outside the listed lines or it will break it.

2.absolutly do not change the repeat and 2 lines after it. they are used for timing as sam process pals very strangely(for a reason) and very short songs will change faster than the pal runs and miss songs.

3.do not move the locks as some pal commands will not work. any changes slows the script i have not tested it with several song types but it should be ok for 3 or 4

4. if you want to play around do so at your own risk but be aware to is an endless loop and it will lock up your PC if it is done wrong.

5.the only place to edit is the case song to add other song types to the mix such as ads or promos ect. Just copy begin to end, set the paths to the preset and change the file type from 's' to what ever you want to test for.

--------------------------------------------
OK install directions

1.Copy and paste to correct pal to a new pal file. watch for the lines that wrapped here. Name it what ever you want.

2. configure the PAL
a. set the path to your presets for SAM and ST. I use the same dir for both. be careful not to change the file names at the end. there are 6 paths to set, and do not replace them with a path var and think you are smart. It slows down the script.
b. if you use both ST and part of sam agc as i do this is good to go. If you only use ST then comment out // the path lines that start with samagcname, the one before the case and the one in each case you copied too. Lastly // the last line above end that has the word in it too. If you only use the sam agc use that version I will post this pal at the sam site.
c. copy the case answer from >'S' begin< to >end< if you are setting for other types. Note: this does not work on URL's as they do not have a readable songinfo page, even though you can open one while it is in the queue.(you are adding them to play and delete cat right)
d. config the PAL to autorun by the checkbox

3. create your presets
To turn it on in ST you need to add The following code to the Bottom of the Preset Files with notepad.
================================
[Stereo Tool Dynamic Settings]
Poll STS Enabled=1
Poll STS File name=C:\Program Files\SpacialAudio\SAM436demo\AGCPresets\activepreset.sts << edit this
========================================
remember to edit path to same one you used in the script. Do not change the file name
so
A. save your current st and agc presets as 0.sts and 0.agc
B. go to the preset dir and open/edit the preset file with notepad
c. paste the above 3 lines to the bottem and edit the path
D. Save the file.
E. open ST and load the 0 preset. this turns the function on in ST. Note this is a pay function in ST!
F. make changes to ST for each preset and save them as 1-9 as you want.
G. do the same for sam agc presets. you should have ten 0-9.sts preset files and ten 0-9.agc files

run the pal
set your song rating while it is in the queue and watch ST and/or AGC change when the song plays.

set the rating on ALL your songs for complete POWER OVER THE DARK SIDE. A DJ YOU WILL BECOME...

The Pal FOR BOTH st AND sAm PRESETS-looks simple huh...
======================================================================

Var Song : TSongInfo;
Var SAMagcName, STpresetName : string;
Var FailIfExists : Boolean;
Var Stat : Integer;
Repeat
PAL.WaitForPlayCount(1);
If (Activeplayer.Duration < 3800) then PAL.WaitForTime('+00:00:04');
If (Activeplayer.Duration > 7000) then
Begin
Song := Activeplayer.GetSongInfo;
PAL.LockExecution;
FailIfExists := False;
STpresetName := 'C:\Program Files\SpacialAudio\SAM436demo\AGCPresets\0.sts';
SAMagcName := 'C:\Program Files\SpacialAudio\SAM436demo\AGCPresets\0.agc';
CASE Song['songtype'] OF
'S' : Begin
STpresetname := 'C:\Program Files\SpacialAudio\SAM436demo\AGCPresets\' + Song['Rating'] + '.sts';
SAMagcName := 'C:\Program Files\SpacialAudio\SAM436demo\AGCPresets\' + Song['Rating'] + '.agc';
End;
End;
PAL.UnlockExecution;
copyfile(STpresetName,'C:\Program Files\SpacialAudio\SAM436demo\AGCPresets\activepreset.sts', FailIfExists);
AppendStringToFile('C:\Program Files\SpacialAudio\SAM436demo\AGCPresets\activepreset.sts',' ');
Activeplayer.AGCLoadpreset(SAMagcName);
End;
Until Stat = 2;
=================================================================


Pal for SAM AGC ONLY
==================================================================

Var Song : TSongInfo;
Var SAMagcName : string;
Var FailIfExists : Boolean;
Var Stat : Integer;
Repeat
PAL.WaitForPlayCount(1);
If (Activeplayer.Duration < 3800) then PAL.WaitForTime('+00:00:04');
If (Activeplayer.Duration > 7000) then
Begin
Song := Activeplayer.GetSongInfo;
PAL.LockExecution;
FailIfExists := False;
SAMagcName := 'C:\Program Files\SpacialAudio\SAM436demo\AGCPresets\0.agc';
CASE Song['songtype'] OF
'S' : Begin
SAMagcName := 'C:\Program Files\SpacialAudio\SAM436demo\AGCPresets\' + Song['Rating'] + '.agc';
End;
End;
PAL.UnlockExecution;
Activeplayer.AGCLoadpreset(SAMagcName);
End;
Until Stat = 2;

==============================================================
Streams and files ie not songs (so not type 'S' see above if you are not sure whati mean)

Ok here are the lines you need to do this for a pal the loads a stream or file
you can use any name for the preset just have it saved ready to copy or load

example i run cnn news at top of most day time hours. I download it to a file
then queue the file all from a cnn pal.
Event schedular runs the cnn pal when i want it to do this. I add this pal to the cnn pal

If you fade to next then put after >if ActivePlayer <> nil then ActivePlayer.FadeToNext;<

If you wait for the current song to end AND put it in the TOP of the queue then add
the PAL.WaitForPlayCount(1); command see below. uncomment it
If you add something like a station id above it set the PAL.WaitForPlayCount(2) to 2

just make sure no other pal loads anything above these or it will screw up

If you add them to bottem of queue it gets too tricky and i only have 1 life sorry

=======================================================
// add // to comment out a line if you do not use both st or agc

// copy these to the top of the pal
Var SAMagcName, STpresetName : string;
Var FailIfExists : Boolean;

//uncomment this if waiting at top of queue set to 2 if needed
//PAL.WaitForPlayCount(1);


//set this path and preset name for ST
STpresetName := 'C:\Program Files\SpacialAudio\SAM436demo\AGCPresets\0.sts';
FailIfExists := False;
copyfile(STpresetName,'C:\Program Files\SpacialAudio\SAM436demo\AGCPresets\activepreset.sts', FailIfExists);
AppendStringToFile('C:\Program Files\SpacialAudio\SAM436demo\AGCPresets\activepreset.sts',' ');

//Set this path and preset name for Sam
SAMagcName := 'C:\Program Files\SpacialAudio\SAM436demo\AGCPresets\0.agc';
Activeplayer.AGCLoadpreset(SAMagcName);


=====================================================================


Ok let the comments begin

If you like it donations for caffine and pizza are needed
If you want help with this see above about donations needed
paypal to jandebeur@starband.net


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

All times are UTC+02:00


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 Limited