Show/Hide hidden text
This chapter gives an overview of the events that are raised by a Phidgets Servo device and that can be used in the Event Listener.
Please read the chapters "Phidgets - Sound Phidget" and "Event Listener" if you would like to know how to add and use both. The available members that can be used in our scripting language are explained in the chapter "Phidgets - Sound Phidget Members".
Example:
BarGraph4.Value = db
This event is raised whenever the registered sound pressure level in dB changes.
The event returns one parameter to WD which is a double value with the name "db".
If you select this event and copy the example into the scripting field of the Event Listener, the Widget Designer BarGraph with ID 4 will be assigned with the same value as the level value from the Phidgets device and acts as a display for sound pressure.
|
Example:
BarGraph4.Value = dba
This event is raised whenever the registered sound pressure level in dBa changes. dBA is a weighted measurement, designed to respond similarly to the human ear.
The event returns one parameter to WD which is a double value with the name "dba".
If you select this event and copy the example into the scripting field of the Event Listener, the Widget Designer BarGraph with ID 4 will be assigned with the same value as the level value from the Phidgets device and acts as a display for sound pressure.
|
Example:
BarGraph4.Value = dbc
This event is raised whenever the registered sound pressure level in dBc changes. dBC is a weighted measurement, commonly used in sound engineering and testing.
The event returns one parameter to WD which is a double value with the name "dbc".
If you select this event and copy the example into the scripting field of the Event Listener, the Widget Designer BarGraph with ID 4 will be assigned with the same value as the level value from the Phidgets device and acts as a display for sound pressure.
|
Example:
Label1.Text = isConnected
This event is raised whenever the connection state changes from disconnected to connected or vice versa.
The event returns one parameter to WD which is a Boolean value with the name "isConnected" and holds either "True" or "False".
If you select this event and copy the example into the scripting field of the Event Listener, it will write "True" or "False" into the Label with ID 1 whenever the device dis-/connects.
|
Example:
Label1.Text = "1kHz: " + octaves[5] + "dB"
The Sound Phidget is capable of measuring the distribution of sound across the frequency spectrum, split in ten sub-bands.
If the intensity value within at least one of those frequency bands changes, this event is raised.
The event returns one parameter to WD which is a List with the name "octaves" and holds ten sound pressure levels corresponding to the ten sub-bands (32Hz, 63Hz, 125Hz, 250Hz, 500Hz, 1kHz, 2kHz, 4kHz, 8kHz, 16kHz).
If you select this event and copy the example into the scripting field of the Event Listener, it will write the current sound pressure level of the 1kHz frequency band into the Label with ID 1 whenever a change in any band is registered.
|