ofxPDSP
ClockedLFO.h
1 
2 // ClockedLFO.h
3 // ofxPDSP
4 // Nicola Pisanti, MIT License, 2016
5 
6 #ifndef PDSP_MODULE_CLOCKEDLFO_H_INCLUDED
7 #define PDSP_MODULE_CLOCKEDLFO_H_INCLUDED
8 
9 #include "../../DSP/pdspCore.h"
10 #include "../../DSP/oscillators/cheap/CheapSaw.h"
11 #include "../../DSP/oscillators/cheap/CheapSine.h"
12 #include "../../DSP/oscillators/cheap/CheapTri.h"
13 #include "../../DSP/oscillators/cheap/CheapPulse.h"
14 #include "../../DSP/oscillators/phasors/LFOPhasor.h"
15 #include "../../DSP/oscillators/phasors/ClockedPhasor.h"
16 #include "../../DSP/filters/OnePole.h"
17 #include "../../DSP/random/TriggeredRandom.h"
18 
19 namespace pdsp{
20 
21 
27 class ClockedLFO : public Patchable {
28 
29 public:
30 
31  ClockedLFO();
32  ClockedLFO(const ClockedLFO &Other);
33  ClockedLFO& operator=(const ClockedLFO &Other);
34 
40  Patchable& set(float division, float phaseOffset);
41 
46 
51 
56 
61 
66 
70  Patchable& out_saw();
71 
76 
81 
82 
83 private:
84  void patch();
85 
86  ClockedPhasor phasorClocked;
87 
88  CheapSaw saw;
89  CheapPulse square;
90  CheapSine sine;
91  CheapTri triangle;
92  TriggeredRandom rnd;
93 
94  OnePole randomSnHSlew;
95  OnePole squareSlew;
96  OnePole sawSlew;
97 
98 
99 };
100 
101 } //END NAMESPACE
102 
103 
104 #endif // PDSP_MODULE_CLOCKEDLFO_H_INCLUDED
Economic saw oscillator.
Definition: CheapSaw.h:19
Patchable & in_retrig()
Sets "retrig" as selected input and returns this module ready to be patched. Connect a "trig" output ...
Definition: ClockedLFO.cpp:48
Patchable & in_division()
Sets "division" as selected input and returns this module ready to be patched. This is the default in...
Definition: ClockedLFO.cpp:40
Random values clocked by an external trigger.
Definition: TriggeredRandom.h:20
Patchable & out_saw()
Sets "sine" as selected output and returns this module ready to be patched. This is the saw waveform ...
Definition: ClockedLFO.cpp:60
LFO clocked to global tempo and synchronized to transport.
Definition: ClockedLFO.h:27
Patchable & out_sine()
Sets "sine" as selected output and returns this module ready to be patched. This is the sine waveform...
Definition: ClockedLFO.cpp:56
Patchable & out_square()
Sets "square" as selected output and returns this module ready to be patched. This is the square wave...
Definition: ClockedLFO.cpp:64
Phazor clocked to tempo values and syncronized to transport.
Definition: ClockedPhasor.h:22
Economic triangle oscillator.
Definition: CheapTri.h:19
Patchable & out_triangle()
Sets "triangle" as selected output and returns this module ready to be patched. This is the default o...
Definition: ClockedLFO.cpp:52
Economic pulse oscillator.
Definition: CheapPulse.h:20
Abstract class for implementing Units and Modules.
Definition: BasicNodes.h:82
Economic sine oscillator.
Definition: CheapSine.h:22
Thread-safe value control with smoothing.
Definition: SequencerBridge.h:11
Patchable & in_phase_offset()
Sets "phase_offset" as selected input and returns this module ready to be patched. This is the offset of the phasor at retrigger or in relation to the given division. It is updated only at control-rate.
Definition: ClockedLFO.cpp:44
Patchable & out_sample_and_hold()
Sets "sample_and_hold" as selected output and returns this module ready to be patched. This is the sample & hold waveform output.
Definition: ClockedLFO.cpp:68
1 pole high/low pass filter
Definition: OnePole.h:18