This version (02 Aug 2012 21:01) was approved by Brett Gildersleeve.The Previously approved version (02 Aug 2012 17:28) is available.Diff

This is an old revision of the document!

Chime Freq-Gain

Click here to return to the Sources section.

To Do: This page currently shows information for the Chime Freq-Gain algorithm. It needs to be changed to show the Chime Frequency algorithm.
The Chime Freq-Gain algorithm plays back a chime sound with programmable, independent frequency and gain envelopes.chimefreq024.jpg

There are two versions of the algorithm available:

  • Chime Freq – Gain
  • Chime Freq – Gain Continuous Play

Input Pins

NameFormat [int/dec] - [control/audio]Function Description
Pin 0: Chime Activateint - controlSwitch used to activate chime

Output Pins

NameFormat [int/dec] - [control/audio]Function Description
Pin 0: Audio Outputdecimal - audioChime Audio Output

GUI Controls

GUI Control NameDefault ValueRangeFunction Description
Maximum Time (ms)100410 to 4400Determines the length of the x axis in the envelope control window
Envelope Controln/an/aAllows the frequency and gain curves to be manually adjusted. Double-clicking on the graph creates a new point. Right clicking on the graph allows points to be removed. The graph can be zoomed using the zoom icons in the upper left corner.
Frequency (Hz)n/a20 to 20000Controls the frequency coordinate of the corresponding point on the envelope
Time (ms)n/a0 to maxControls the time coordinate of the corresponding point on the envelope
Gain (dB)n/a-120 to +24Controls the gain coordinate of the corresponding point on the envelope

DSP Parameter Information

GUI NameCompiler NameFunction Description
Envelope ControlOptimized2ChimeAlgWGainGUI1numberofpointsNumber of points in the timing table
Envelope ControlOptimized2ChimeAlgWGainGUI1tableFirst point in the timing table
Envelope ControlOptimized2ChimeAlgWGainGUI1table_autoincrementedTiming table values (continued)
Envelope ControlOptimized2ChimeAlgWGainGUI1numberofgainpointsNumber of points in the gain table
Envelope ControlOptimized2ChimeAlgWGainGUI1gaintableFirst point in the gain table
Envelope ControlOptimized2ChimeAlgWGainGUI1gaintable_autoincrementedGain table values (continued)
Envelope ControlOptimized2ChimeAlgWGainGUI1freqincrementIncrement value for frequency table
Envelope ControlOptimized2ChimeAlgWGainGUI1freqincrement_autoincrementedFrequency table values (continued)
Envelope ControlOptimized2ChimeAlgWGainGUI1startfreqBeginning frequency of the chime
Envelope ControlOptimized2ChimeAlgWGainGUI1lowestfreqLowest frequency in the chime’s frequency envelope
Envelope ControlOptimized2ChimeAlgWGainGUI1gainincrementtableFirst point in the gain increment table
Envelope ControlOptimized2ChimeAlgWGainGUI1gainincrementtable_autoincrementedGain increment table values (continued)
Envelope ControlOptimized2ChimeAlgWGainGUI1startgainStarting gain value of the gain envelope
Envelope ControlOptimized2ChimeAlgWGainGUI1lowestgainLowest gain value in the gain envelope
Envelope ControlOptimized2ChimeAlgWGainGUI1maskMask

Algorithm Description

The chime algorithm has fully programmable frequency and gain envelopes. The envelopes are accessible by clicking the cell’s icon.

The length of the chime is controlled by the Maximum Time control, which is set in milliseconds.

The envelope control window has two tabs: Frequency and Gain. The Frequency envelope is displayed in blue, and the Gain envelope is displayed in red. Points on the curve can be moved by click-dragging. New points can be added by double-clicking. Points can be removed by right-clicking and selecting “remove point.” In this case, the point closest to the mouse cursor will be removed. Each envelope must have at least 3 points. Point values can be fine-tuned using the text input boxes on the right side of the envelope control window.

When the control input goes to 1, the chime begins. When the control input goes to 0, the chime output stops, regardless of whether the envelope has completed or not.

In the case of the Chime Freq – Gain Continuous Play algorithm, the envelope will loop continuously until the control input goes to 0.

The example below shows the chime algorithm’s input and output signals using the gain envelope shown above.

The example below has the input going to zero before the envelope has completed. The output will immediately go to zero.


The following schematic image shows the Chime Freq-Gain cell being used with a 28.0 switch and being output to a DAC. The schematic below uses the Switch, Chime Freq-Gain, and Output cells.

Algorithm Details

Toolbox PathSources – Chime – Modulated Frequency and Gain
Cores SupportedAD1940
“Grow Algorithm” Supportedno
“Add Algorithm” Supportedno
Subroutine/Loop Basedno
Program RAM96
Data RAM21
Parameter RAM31
/srv/ · Last modified: 03 Jan 2013 20:42 by