Envelope in mairlist v3.0

Hi Torben,

Just a message to tell you that the envelope methods are great !!
I’ve just tried it tonight, and it’s powerful !!! You’ve done a great job ! Congratulations.

Tonight, I tried 2 scripts concepts : Cue positions and volume envelope. The first doesn’t work (see my report in mairlist v3 bugs forum), but the second is ok. I love it, I can do wonderful things with it ^^

Thanks Torben for all the work you do ! The results is excellent :slight_smile:

OK, I give up - where are the envelopes?

I’m not sure I understand very well your question…

I use Envelope in scripts (IEnvelope objects). Is that what you ask me ?

It’s only available from scripts at the moment. You cannot edit the envelopes from the GUI.

Yes, scripts only. It’s intuitive to use…

Have a nice day.

And an easy-to-use GUI is very hard to implement, so it will still take some time.

For the moment, this feature is for the voice tracking script hackers only.

As I’m developer, I know it’s not easy to implement an easy-to-use GUI…^^

I will use this feature in script, but not for voice tracking. I will use “liners” and I want them to be played over the intro (if exists) of the next song item… I will use envelope to reduce a little bit the volume of the intro part where the liners will be overlaid.
It’s a king of voice track, but without DJ voice. Only the voice of jingles :slight_smile:

Ah - that’s why I could not see anything on the GUI.

Can you post an example of a script that uses envelopes so I can see the format. I am sure it is intuitive but I always learn best from examples!
(Can you PM me if you don’t want to go public with your script)

Many thanks in advance

Ron.

It’s quite simple and I could give you example without giving you my script ^^

Here is a call :

[code]var env: IEnvelope;

env := playlist_item_var.GetVolumeEnvelope;
env.Add(0, -25);
env.Add(50000000, 0);[/code]

In this example, playlist_item_var is an item of the playlist.
Each point matches with a volume node (imagine the GUI). Here, volume of playlist_item_var will fade in between 0 (the begin of the item) and 5 seconds (50000000).
If you want to reduce sound for 5 seconds, and raise sound to 0 immediatly after, you could add another node :

env := playlist_item_var.GetVolumeEnvelope; env.Add(0, -25); env.Add(49000000, -25); env.Add(50000000, 0);
Here, sound will be reduce from 0 to 4.9 s. It will fade in quickly between 4.9 and 5.0.

Easy, isn’t it ? ;D

I am just finding my feet with the script language but that seems straight forward (!)

Thanks.

Here’s a short hint about time values:

Currently, all time values are 64-bit integer, in 1/10,000,000s units, that is, one second corresponds to 10000000. This is a unit I borrowed from DirectX before I started using BASS.DLL. Admittedly, it is not so easy to handle, but I never changed it because it was used all over the source code.

Starting with mAirList 3.0, I introduced a new custom type TTimeValue which is now used for durations, cue points etc. Currently, TTimeValue is internally defined as int64, so you nothing has changed, only the name. However, I consider switchting to floating point values, just like BASS 2.4.

To make this upcoming change transparent to the user, mAirList 3.0 will introduce a number of functions which make the conversion from and to TTimeValue easier and fail-safe:

function TimeValueToString(iValue: TTimeValue): string;
function StringToTimeValue(iString: string): TTimeValue;
function TimeValueToDateTime(iValue: TTimeValue): TDateTime;
function DateTimeToTimeValue(iDateTime: TDateTime): TTimeValue;
function SecondsToTimeValue(iSeconds: single): TTimeValue;
function TimeValueToSeconds(iValue: TTimeValue): single;

(“single” is the Delphi built-in type for floating point values.)

These functions are not yet available to scripts as of the current snapshot. But as soon as they are, you should start using them and write “SecondsToTimeValue(5)” instead of “50000000”. This is not only easier to read for you and other people, but your scripts will be independent of the actual internal representation of time values.

I will put a note into the change log once the functions are available.

It’s a good idea to encapsulate the way time are managed… Good (and it’s more readable, yes !)