Stuck with a SynthEdit project?

Tag: DSP Timer

Elena Designs DSP Timer.

DSP TIMER

Multi-function DSP bool timer to avoid usage of audio lines when they are really not needed, as in a clock oscillator running at around 1 Hz.
The module has a Bool trigger input and a bool signal output.
The two time intervals can be set on the T1 and T2 Plugs. T1 and T2 times can be specified in milliseconds or samples.
Note: The Module is programmed as a DSP Control, not an Audio Module. It will run at Audio rates, but at a high CPU cost- Always use an Audio Oscillator module! Likewise it should not be used as a Frequency divider at audio rates.


There are various modes of operation, which can be selected via the properties panel (Not Accessible via a plug); On Delay, Off Delay, On Pulse, Off Pulse, Bistable, and Pulse Train.

DSP Timer Operating Modes.

It’s best to read these slowly and thoroughly as there’s a fair amount to absorb!
On Delay :- The output plug goes high when receiving a trigger pulse after the time set via the T1 delay plug. If the Trigger plug goes “low” before T1 has expired the output will immediately return to the “Low” state. The Output will be held “High for as long as the Trigger is held “High”.

Off Delay:- The output plug goes high when receiving a trigger pulse, and will return to the “Low” state after the time set via the T1 delay plug. If trigger plug receives another “High input” before T1 has expired Timer will immediately be reset.

On Pulse:- When a Trigger pulse is received a single pulse of duration T2 will be output after the delay time T1 has passed after the trigger was received. Any further change in trigger state will be ignored until T2 has expired.
Note: T2 will be clipped to one sample length if it results or is set to zero samples, since a pulse length equaling zero samples long does not make sense.

Off Pulse:- When a trigger is received a single pulse of duration T2 will be output after a delay of T1 once the trigger returns to “Low”; any further change in trigger state is ignored until T2 has expired
Note: T2 will be clipped to one sample length if it results or is set to zero samples, since a zero sample long pulse does not make sense.

Bistable:– The Output is toggled every time a Trigger pulse is received.
Note: T1 and T2 are not used in this mode of operation.

Pulse Train:- While the Trigger plug is “high”, an pulse train (T1 = On duration, T2 = Off duration) is generated. When the Trigger plug goes “Low” the pulse train stops immediately. Useful as a Clock Oscillator.
Note: T1 and T2 will be clipped to one sample length if they result or are set to zero samples, since a zero samples long pulse does not make sense.

Note: Because of the CPU overhead involved with setting and transmitting DSP control pins at audio rate compared to that of using Audio pins, it is advisable not to use the Timer module as an Audio Oscillator (in the Pulse Train mode) with high frequencies. It is a much better method CPU wise to use an Audio oscillator for Audio purposes.

Clock Oscillator with full rate and half rate outputs.

This design uses two DSP timers, one set in Pulse Train mode to generate the clock pulse train. The pulse train has a fixed time of 50 mS and variable times between pulses of 100 mS to 10 S. Set via the slider properties using a minimum value of 100, and a maximum of 10,000. If required the pulse duration could be changed, or made variable.
The second DSP Timer is set to Bistable Mode to give an output a half the original clock rate.
The Run Button sends a “High” or “Low” signal to the Trigger plug to turn the timer module on and off

Making a Frequency Divider in Synthedit.

Frequency dividers are useful for emulating hardware electronic organs, or string synthesizers that utilized the same approach for generating their sounds. There are two approaches that can be used here:
The first one uses a stock module, the Binary Counter 2, and the second method uses a third party module from Elena Designs, the ED DSP Timer. Both these methods work well in the audio frequency range as well as the lower frequency ranges used for sequencer clocks etc.

Note: When used as an audio frequency divider for String Synthesizers etc, the only audio waveform available is a square wave, because we are dealing with binary (on/off) operations no matter what waveform you feed into the DSP Timer or Binary Counter the output will always be a square wave.

Using the Binary Counter 2 as a Frequency Divider.

All that’s needed is to feed the input frequency (F) into the Clock plug, and take the relevant outputs from the Counter
Note: B0 = F/2, B1 = F/3 and so on.

Using the ED DSP Timer as a frequency divider.

It’s quite simple to set this up as a frequency divider. All that’s needed is to set the Mode to “Bistable” in the properties, and it will divide the input frequency by two. There’s no need to worry about the T1 and T2 plugs as they are unused in this mode, just feed the Audio (or clock) signal into the Trigger plug, and the Output will be a square wave at half the input frequency.

The ED DSP Timer module
Divide the input frequency by two

By chaining the timers we can get F/2, F/4, F/8, F/16 and so on.

Chaining the ED Timers