96 double sampleRate = 1.0;
102 enum { ChebyT2, ChebyT3, ChebyT4, ChebyT5 };
104 inline double doChebyWaveshaper(
double xn, uint32_t order)
106 double xSquared = xn*xn;
107 double xCubed = xn*xSquared;
108 double x4th = xn*xCubed;
109 double x5th = xn*x4th;
111 if (order == ChebyT2)
112 return (2.0 * xSquared) - 1.0;
113 else if (order == ChebyT3)
114 return (4.0 * xCubed) - (3.0 * xn);
115 else if (order == ChebyT4)
116 return (8.0 * x4th) - (8.0 * xSquared) + 1.0;
117 else if (order == ChebyT5)
118 return (16.0 * x5th) - (20.0 * xCubed) + (5.0 * xn);
virtual bool reset(CoreProcData &processInfo) override
Resets object to initialized state.
Definition: addosccore.cpp:52
Compact modulo counter with wrapping used as the timebase for all oscillators.
Definition: synthbase.h:137
AddOscCore()
Construction: Cores follow the same construction pattern.
Definition: addosccore.cpp:19
virtual bool render(CoreProcData &processInfo) override
Renders the output of the module.
Definition: addosccore.cpp:137
Definition: addosccore.cpp:4
virtual bool update(CoreProcData &processInfo) override
Updates the object for the next block of audio processing.
Definition: addosccore.cpp:77
This is the "blank" core template for compiling your own Cores as dynamic modules.
Definition: addosccore.h:82
virtual bool doNoteOff(CoreProcData &processInfo) override
Note-off handler for the ModuleCore.
Definition: addosccore.cpp:221
virtual bool doNoteOn(CoreProcData &processInfo) override
Note-on handler for the ModuleCore.
Definition: addosccore.cpp:199
double midiPitch
the midi pitch
Definition: addosccore.h:97
hard-coded arrays of FIR filter coefficients for the sample rate conversion objects (Interpolator and...
This structure holds all of the information needed to call functions on a ModuleCore object...
Definition: synthbase.h:1071
Abstract base class that encapsulates functionality of a module core; used with the Module-Core parad...
Definition: synthbase.h:1516
See also Designing Software Synthesizers in C++ 2nd Ed. by Will Pirkle.