Polybench® Reference
Plays a beep sound on every trigger.

Beep

Overview

This operator lets the computer play a beep of a certain frequency and duration. The beep has a pre-set frequency, or the frequency that is indicated by the input signal.

Note that not all computers have a speaker, and not all operating systems support a hardware beep sound.

Operator ports

Input S: Floating point values

Properties

Find more information about changing properties here: link

Frequency
type: Undefined
Frequency of the beep in Hz. This must be a value between 32 and 32767.


Duration
type: Undefined
Duration of the beep in milliseconds. This must be a value between 1 and 10000.


Caption
type: Word or phrase
The name of the object in the project. This name must not contain '.' or '$' characters.

Every object has the Caption property. This property is very important, because it is the name by which Polybench recognizes this object.
It is allowed to give multiple objects the same name, as long as the objects are of the same type. In that case, a reference to this caption includes all the objects with the same caption.
In Polybench, every object can be addressed by an Address specifier, which starts with the dollar sign, for example: $My Page.My Object. 'My Page' would be the Caption of a page, and 'My Object' the Caption of an object on that page.

Documentation
type: See description
Optional documentation of this object.

It is good practice to write in short notes why you have used this object, and why its properties are set the way they are set. If this object is an operator, the Documentation text is displayed below the operator symbol.

Variable Parameters

Find more information about Variable Parameters here: link

Frequency
type: See description
Frequency of the beep in Hz. This must be a value between 32 and 32767.


Duration
type: See description
Duration of the beep in milliseconds. This must be a value between 1 and 10000.

Details

The input expects a trigger, which is a transition from 0 to 1. The input is expected to be a pseudo-boolean signal. It is not exactly defined on what value the trigger is detected.

However, if the input trigger value is between 32 and 32767, this value is taken as the frequency of the next beep. This allows you to determine the frequency in the signal. If the trigger value is outside this range, but greater or equal to 1, then the frequency as set in the properties or variable parameters is taken.

It is not guaranteed that on every trigger at the input a beep is played. If the duration of the beep is longer than the trigger time interval, then there is no time to play all beeps, and therefore some will be left out.