Another sub-control-based prefab, it’s flexible very as an indicator, in that its Hue, Saturation, and Brightness plugs let you adjust any colour dynamically with a small modification to it’s structure.
What’s inside the LED control, and how it works:
An animated Bitmap Image provides the lens, and a Tinted Bitmap Image supplies
the colour. When a voltage greater than 5 V arrives at the Signal In plug, this causes the Bitmap image to display the lens image’s second frame. The second image is more transparent than the first, allowing more of the colour from the Tinted Bitmap Image be visible when the LED is in it’s “on” state.
For this to work, the Tinted Bitmap Image needs to be behind the Bitmap Image in
the z-order by using the “To Back” command on the module’s right-click
context menu.
The Tinted Bitmap:
The Tinted Bitmap Image uses a single-frame bmp image file.
The Bitmap:
The Bitmap Image uses a two-frame bmp image with a mask.
How it works:
A Volts to Float and Patch Memory Float Out 3 convert the
voltage input to a Float Point value.
DC Volts (Fast) is selected for the Volt to Float Responses, and the Update Rate is set to 20 Hz.
The value at the Signal In plug drives the lens Bitmap Image’s
Animation Position. The Tinted Bitmap Image’s Hue, Saturation, and
Brightness inputs require values ranging from 0.0 to 1.0, so we use the Animation Position output to scale them down from SynthEdit’s 0-to-10 volt range.
With a simple modification (below) we can make it easier to adjust the colour of the LED by linking the Hue, Saturation, and Brightness plugs to plugs on the IO Module.
Note: These value are all 0 to1.
Leave a Reply