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