ofxPDSP
VAOscillator.h
1 
2 // VAOscillator.h
3 // ofxPDSP
4 // Nicola Pisanti, MIT License, 2016
5 
6 #ifndef PDSP_MODULE_VAOSCILLATOR_H_INCLUDED
7 #define PDSP_MODULE_VAOSCILLATOR_H_INCLUDED
8 
9 #include "../../DSP/pdspCore.h"
10 #include "../../DSP/oscillators/antialiased/BLEPSaw.h"
11 #include "../../DSP/oscillators/antialiased/DPWTri.h"
12 #include "../../DSP/oscillators/cheap/CheapTri.h"
13 #include "../../DSP/oscillators/fm/SineFB.h"
14 #include "../../DSP/oscillators/phasors/PMPhasor.h"
15 #include "../../DSP/utility/PitchToFreq.h"
16 
17 #include "../../DSP/oscillators/phasors/PhasorShifter.h"
18 #include "../../DSP/filters/OnePole.h"
19 
20 
21 namespace pdsp{
22 
28 class VAOscillator : public Patchable {
29 
30 public:
31 
32  VAOscillator();
33  VAOscillator(const VAOscillator &Other);
34  VAOscillator& operator=(const VAOscillator &Other);
35 
40 
44  Patchable& in_pw();
45 
49  Patchable& in_sync();
50 
54  Patchable& out_saw();
55 
60 
65 
70 
75 
79  float meter_pitch() const;
80 
81 private:
82  void patch();
83 
84  BLEPSaw saw;
85  BLEPSaw saw2; //for making pulse
86 
87  DPWTri triangle;
88  SineFB sine;
89  PitchToFreq p2f;
90  PMPhasor phasor;
91  PatchNode inputShape;
92 
93  PhasorShifter shift;
94  OnePole leakDC;
95 
96 
97 
98 };
99 
100 } //END NAMESPACE
101 
102 
103 #endif // PDSP_MODULE_VAOSCILLATOR_H_INCLUDED
Shift a phazor output, wrapping it around if needed.
Definition: PhasorShifter.h:19
Antialiased Saw Oscillator.
Definition: BLEPSaw.h:20
Antialiased Triangle Oscillator.
Definition: DPWTri.h:19
Patchable & in_pitch()
Sets "pitch" as selected input and returns this module ready to be patched. This is the default input...
Definition: VAOscillator.cpp:52
Patchable & out_sine()
Sets "sine" as selected output and returns this module ready to be patched. This is the sine waveform...
Definition: VAOscillator.cpp:76
Patchable & out_sync()
Sets "sync" as selected output and returns this module ready to be patyhed. This is an output with va...
Definition: VAOscillator.cpp:80
Patchable & out_saw()
Sets "saw" as selected output and returns this module ready to be patched. This is the default output...
Definition: VAOscillator.cpp:64
float meter_pitch() const
meters the oscillator pitch. This method is thread-safe.
Definition: VAOscillator.cpp:47
Patchable & out_triangle()
Sets "triangle" as selected output and returns this module ready to be patched. This is the triangle ...
Definition: VAOscillator.cpp:72
Abstract class for implementing Units and Modules.
Definition: BasicNodes.h:82
Patchable & out_pulse()
Sets "pulse" as selected output and returns this module ready to be patched. This is the pulse wavefo...
Definition: VAOscillator.cpp:68
Converts pitch values to frequency values.
Definition: PitchToFreq.h:19
Thread-safe value control with smoothing.
Definition: SequencerBridge.h:11
Oscillator with antialiased waveforms, sync in/out and fm input.
Definition: VAOscillator.h:28
A Unit with no dsp inside, it just pass it's input to the output. Patching float to this Unit is thre...
Definition: PatchNode.h:41
Wavetable sine oscillator with self-fm.
Definition: SineFB.h:22
Patchable & in_pw()
Sets "pw" as selected input and returns this module ready to be patched. This is the pulse width for ...
Definition: VAOscillator.cpp:56
Patchable & in_sync()
Sets "sync" as selected input and returns this module ready to be patched. This is the sync input...
Definition: VAOscillator.cpp:60
1 pole high/low pass filter
Definition: OnePole.h:18
Fully featured phazor with phase modulation and sync inputs.
Definition: PMPhasor.h:22