Voice Tracking (again..)

Yes, it will be in v3.0.

Current status: It’s working already, but only internally, that is, there’s no fancy GUI to edit the envelope points. Actually no GUI at all. But you can set them from a script.

Oh, and by the way, here’s the current status of mAirList 3.0: I have started to clean up the code and introduce multi-threading. Now it’s crashing. Will need some more work :wink:

Sounds promising.

Will there eventually be GUI envolope editing or will it be via script?

Thanks, Ryan.

There will be a GUI, but probably not in the initial release.

Good, I dont get scripting ???

I didn’t at first, Tom - But if you look at a few, read the comments for them (Cad’s scripts are very well commented) then you’ll fathom out how they work and perhaps be able to modify them to your needs. My “bulk set item attributes” script is a good one to start with as this is quite a common task in a production environment. I’d say the most basic of scripts is the AutomationOnStartup or one of the Load Next Hour scripts…

About scripting Charlie, is it possible to access to “Attribute” in Script ?

I created a property called “Type” with range values = “Jingle;Song;ETM”.
I would like to initialise this property with script, while I set the color and the icon for song item (for example)… I searched in the scripting documentation, but if I found a GetAttributes method to read them, I didn’t find a SetAttributes method to write them.

GetAttributes returns an IStrings interface. You can add new values like this:

GetAttributes.Add('Type=Jingle');

Perfect Torben !! Great !!

Thanks a lot.

Torben, it works but it’s strange.

In “Configuration”, I defined an attribute called “Type”, with values range “Jingle;Song;ETM”.
I tried your code and it works but, instead of updating the attribute “Type” I defined previously, the script created a new Attribute.

At least, on the item, I see :
TYPE : " "
TYPE : “Jingle”

It’s strange …

There seems to be a bug which causes the MMD file to contain an empty entry for all attributes defined in the config, even if you did not select a value:

    <Item>
      <Name>Type</Name>
      <Value></Value>
    </Item>

In this case, calling

GetAttributes.Add('Type=Jingle')

adds another Type value (which is intended - remember that there might be attributes you would want to assign more than one value to). You should rather use

GetAttributes.Values['Type']='Jingle'

instead. For items which are already broken after being processed by my original script, you should use

GetAttributes.Clear

first (note that this will also erase any other attributes you might have set).

Searching about Tstrings in Delphi, I found the “Values” methods to access to data…
But, I didn’t have enough time yesterday for testing it.

Okay, I wil adapt my scripts for it. Thanks Torben.

PS : For my scheduling program project, I will try to inter-operate with mAirList. I mean that item values, contained in the MMD file, will be, for example, able to be imported in my program for storing data (Fade, Title, Cueout, Ramp, Type…). Export will be possible too (inserting an item in my program and export it for creating MMD files…).
I’d also like to implement an export playlist function to generate mAirList playlist. I will study the structure of the XML for that. It will be quite long to design, but it could be cool I hope.

Thanks.

All the mAirList data files use very ‘simple’ but well-designed XML structures.

The main things to remember are:

  1. ALL time values in mAirList data files use units of one ten-millionth of a second (1 / 10.000.000). Usually, this means that even a ‘long’ integer is not large enough to store them in: you need to use a 64-bit integer OR you can use a Single or Double-precision floating point variable.

  2. When writing anything that contains a & character, you need to write it into the mAirList file as & and if you have any single quote ’ characters, you need to write those to file as (there may be other characters you need to translate, but I haven’t discovered any yet!).

    BFN
    CAD

By the way… This ten-millionth second thing (actually a DirectX measure) is a leftover from the old days when I was using a different audio library (which was based on DirectX interfaces - unlike BASS.DLL which provides its own interfaces).

BASS.DLL changed its internal time format to floating point recently. I consider chaning the internal units to floating point as well from mAirList 3.0, which would be much easier to handle. Of course I would make mAirList recognize “old-style” MMD and playlist files.

What do you think about this?

Great idea Torben.
I don’t know when mAirList 3.0 will be available, but I think I would use the new format in my program because it will take time to design it…

Thanks Cad for those elements :slight_smile:

The first version of mAirList v3.0 will be available in fall - but remember that it’s the new development release, so it will be full of bugs first, then, over time, I will introduce many new features, remove the bugs, and eventually we have the new stable release v3.1.

[quote=“Torben, post:33, topic:4098”]I consider chaning the internal units to floating point as well from mAirList 3.0, which would be much easier to handle.
What do you think about this?[/quote]
I think I would need to rewrite ALL my scripts, since almost all of them reference ‘times.’ :’(

With my Chartered IT Professional hat on ;), I would not change from integer to floating point if it was my choice to make.

‘Equal’ integer values always compare correctly for equality, but ‘equal’ floating point values very rarely compare as equal (as in: If value1 == value2), because there is almost always a tiny difference between the values (for example, 2 is NOT equal to 2,00000001 in floating point).

BFN
CAD

But 20000000 is also not equal to 20000001 - so what?

You are probably referring to the fact that it can happen that you assign a number to a floating point variable, and when you read it again, it has changed slightly, due to rounding. But this does only happen with “long” numbers (in terms of the number of digits when you write them down). And I can’t imagine any situation in a script in which this would be a problem. If you can, please tell me.

Here’s what I will do:

I will introduce a new type named “TTimeValue” which is used all over mAirList whenever a duration or a position is referenced. At the time being, this type is equal to int64:

type
  TTimeValue = int64;

But you don’t need to know this. All you have to know is that it is “some sort” of number which you can add, subtract or multiply - apart from that, it’s a “black box” to you.

Moreover, I will introduce a number of functions to convert a TTimeValue to or from other well known types, for example “number of seconds given as a floating point number” or “TDateTime to be used with FormatDateTime”. As long as you rely on these functions, you don’t have to care about what’s really the internal representation, and your code will also become much easier to read.

Example for old code:

item.SetDuration(1300000000);
SystemLog('The duration is now ' + FormatDateTime('h:nn:ss', item.GetDuration/10000000/24/60/60));

New code:

item.SetDuration(SecondsToTimeValue(130));
SystemLog('The duration is now ' + FormatDateTime('h:nn:ss', TimeValueToDateTime(item.GetDuration));

Admittedly, it takes some time to convert your code (I did this yesterday night for mAirList), and the word “TimeValue” will appear in your dreams for a few nights, but it’s really easier to read later, and after all it’s future-proof. If I ever decide to finally change the internal representation to floating point or quantum numbers at some time in the future, I will just adjust the functions accordingly, and you’ll be on the safe side.

This must be “modern programming”: Throw away all well-known generic types and use custom types with pre-defined interfaces instead. We’re just one step away from Java :wink:

Excellent solution, Herr Doktor, as always!

Java … let’s not go there! :o

Right, I’m off to try out my new-to-me BUZZ! controllers with some allegedly nice freeware keystroke emulator software for game controllers. Then I can use them with VBA as well [FX: evil ;D].
(The confusingly-named JoystickCursorTool at http://www.deinmeister.de/jct_e.htm)

BFN
CAD