Led Components

Some ways a LED can be simulated

Components are just slipped into Visual Studio to empower the visual properties of a form display. Usually available from the toolbox no installation is required. Usually there is a C#.cs file, a resource resx file and designer file. An add component walk through will provide the required information to do this. Here a simple LED is used to derive different components.

Rectangular LED

This is a basic multicolour led in a rectangular format. The shape is by design rather than from an image so any type of LED can be created on the fly either either directly as a bitmap or vectorially with post conversion to a bitmap. There is provision for 4 different LED, normally the same LED with different colours, though as the LED button component shows this can reflect the 4 possible states of a LED acting as a button.

LED Demonstration
Rectangular LED Control

Red LED

Green LED

Yellow LED

Grey LED

A Basic Rectangular LED

LED based Level Bar

Starting from the basic rectangular LED, these are combined in a group to create a tri-colour LED Bar. Commonly used to display a value visually, for example as a transmitter power level indicator. Based upon the traffic light philosophy, green is for normal operation, yellow as a warning of approaching the limits of normal operation and red for out of normal. The display is linear percentage that can easily be adapted to a specific scaling unit eg: KW.

BAR Demonstration

LED Bar Control

UP Level

Down Level

A Basic LED Level Indicator

VU meter using LED

A further expansion on the basic LED bar to create a simulation of the audio level VU meter. Two LED Bar are group for stereo operation, a non-linear scale is used display a wide dynamic range. The reference level for the '0' can be defined. This example is orientated to peak program level display when used in conjunction with a exciter. In this case the '0' reference would be set at +12dBm. The exciter would then be adjusted for full ∓ 75KHz deviation on the '0'. The overrange would be set to +6db on this (totally illegal).

This not intended to run at the full sample rate of the audio stream since running at the common 48KHz sample rate per stream would serve no usefull PC display purpose. Instead sub-sampling is used of a sliding window on the stream rate. For example: if a sliding 240 sample window on a 48KHz sample rate this is give an effected sample rate of 5mSec. The sliding window returns ther peak value in the window when sampled.

In addition the samples are filtered with a an attack and release algorithm to slow down the instantaneous display, without a slow release it would be difficult to visualise the peak modulation level. In the case given here a simple incremental algorithm is used, it it easy add alternative holding functions eg: quasi peak, true rms etc...