Released 0.9.0. Besides a couple of bug fixes, it has Automation (scripting) support. Tested with JSP3, but hopefully it works with other interpreters. I kept the exact interfaces as the original component and I've tried to implement all the functions. However, at this point the behavior of these calls is not 1:1 and my usage testing has been simple. It also assumes that there is an instance of the component running to get valid values for the properties, as in the snippet below.
function get_text() {
var VUMeter = null;
var Left = 0;
var Count = 0;
if (fb.CheckComponent("foo_vis_vumeter")) {
VUMeter = new ActiveXObject("VUMeter");
Left = VUMeter.LeftLevel; // returns the left channel level for the first VUMeter instance (this is affected by the mode selected)
//VUMeter.RegisterWindow(window.ID); // nop
var VUWindow = VUMeter.CreateWindow(window.ID); // returns a reference to the first VUMeter instance's UI element
Count = VUWindow.GroupCount; // returns the current number of folders (groups) in the "vumeter" folder
VUWindow.LoadNextSkin(""); // causes the first VUMeter instance's panel (skin) to change to the next one in the group (in ASCII order) -- similar to how the hidden menu option works
}
var text = "VUMeter test " Left + " " + Count + "\n";
return text;
}
Here is the work in progress documentation for the functionality.
IVUMeter
========
Properties
----------
LeftLevel number read - current left channel level in dB.
LeftPeak number read - current left channel peak level in dB.
RightLevel number read - current right channel level in dB.
RightPeak number read - current right channel peak level in dB.
Offset number read, write - preamplifier gain setting in dB.
UpdatePeriod number read - current sample window setting in milliseconds.
Functions
---------
RegisterWindow(ID) --> will not function as the original due to architectural differences
Arguments
ID number
No return value.
RegisterRect(ID, Left, Top, Width, Height) --> will not function as the original due to architectural differences
Arguments
ID number
Left number pixels
Top number pixels
Width number pixels
Height number pixels
No return value.
CreateWindow(ID) --> will not function as the original due to architectural differences
Arguments
ID number
Returns an `IVUMeterWindow` instance.
var Layout = {
BothH : 0,
BothV : 4,
Left : 1,
Right : 2,
Mono : 3,
};
IVUMeterWindow
==============
Properties
----------
Visible boolean read, write
Enabled boolean read, write
Layout Layout read, write
LockAspectRatio boolean read, write
SkinName string read, write
GroupName string read, write
SkinCount number read
GroupCount number read
Functions
---------
SetBounds(Left, Top, Width, Height) --> will not function as the original due to architectural differences
Arguments
Left number pixels
Top number pixels
Width number pixels
Height number pixels
No return value.
SetConfig(GroupName, SkinName, Layout) --> will not function as the original due to architectural differences
Arguments
GroupName string
SkinName string
Layout Layout
No return value.
Groups(Index)
Arguments
Index number
Returns a string containing the group name that corresponds to the index.
Skins(Index)
Arguments
Index number
Returns a string containing the skin name that corresponds to the index.
LoadSkin(GroupName, SkinName)
Arguments
GroupName string
SkinName string
No return value.
LoadPrevSkin(GroupName)
Arguments
GroupName string
No return value.
LoadNextSkin(GroupName)
Arguments
GroupName string
No return value.
In addition, for @p.h., I've attached a version (0.9.0.1) with the texture and lighting code completely removed--and only x86 and x64 versions. Feel free to try it and report back.