29 namespace cinder {
namespace audio {
112 std::atomic<float> mUpSlope, mDownSlope;
float getValue() const
Returns the current value of the Param.
Definition: Param.h:109
void setWaveform(WaveformType waveformType)
Sets the WaveformType of the internal wavetable. This can be a heavy operation and requires thread sy...
Definition: GenNode.cpp:245
void setFreq(float freq)
Sets the frequency in hertz to a constant value of freq.
Definition: GenNode.h:46
GenOscNode(const Format &format=Format())
Definition: GenNode.cpp:213
Base class for InputNode's that generate audio samples. Gen's are always mono channel.
Definition: GenNode.h:43
void process(Buffer *buffer) override
Override to perform audio processing on buffer.
Definition: GenNode.cpp:161
WaveformType getWaveForm() const
Returns the current WaveformType.
Definition: GenNode.h:148
WaveTable2dRef mWaveTable
Definition: GenNode.h:177
GenPulseNode(const Format &format=Format())
Definition: GenNode.cpp:272
GLenum GLsizei width
Definition: GLee.h:969
const WaveTable2dRef getWaveTable() const
Returns a reference to the current wavetable.
Definition: GenNode.h:145
GenNoiseNode(const Format &format=Format())
Constructs a GenNoiseNode with optional format.
Definition: GenNode.h:69
Phase generator, i.e. ramping waveform that runs from 0 to 1.
Definition: GenNode.h:76
Pulse waveform generator with variable pulse width. Based on wavetable lookup of two band-limited saw...
Definition: GenNode.h:161
void process(Buffer *buffer) override
Override to perform audio processing on buffer.
Definition: GenNode.cpp:111
float getFreq() const
Returns the current frequency in hertz.
Definition: GenNode.h:48
void initialize() override
Called before audio buffers need to be used. There is always a valid Context at this point...
Definition: GenNode.cpp:228
void initialize() override
Called before audio buffers need to be used. There is always a valid Context at this point...
Definition: GenNode.cpp:191
GenPhasorNode(float freq, const Format &format=Format())
Definition: GenNode.h:80
GenNode(const Format &format=Format())
Definition: GenNode.cpp:42
Noise generator.
Definition: GenNode.h:66
std::shared_ptr< class GenPulseNode > GenPulseNodeRef
Definition: GenNode.h:40
std::shared_ptr< class GenOscNode > GenOscNodeRef
Definition: GenNode.h:39
void setValue(float value)
Sets the value of the Param, blowing away any scheduled Event's or processing Node.
Definition: Param.cpp:73
Sine waveform generator.
Definition: GenNode.h:87
GLuint buffer
Definition: GLee.h:2065
Triangle waveform generator.
Definition: GenNode.h:97
BufferDynamic mBuffer2
Definition: GenNode.h:178
void setWaveTable(const WaveTable2dRef &waveTable)
Assigns waveTable as the internal wavetable. This allows one to share a WaveTable2d across multiple N...
Definition: GenNode.h:143
void process(Buffer *buffer) override
Override to perform audio processing on buffer.
Definition: GenNode.cpp:301
void setUpSlope(float up)
Definition: GenNode.h:102
float getUpSlope() const
Definition: GenNode.h:105
Param mWidth
Definition: GenNode.h:179
void setWaveTable(const WaveTableRef &waveTable)
Assigns waveTable as the internal wavetable. This allows one to share a WaveTable across multiple Nod...
Definition: GenNode.h:122
GenTriangleNode(const Format &format=Format())
Definition: GenNode.cpp:140
std::shared_ptr< class GenPhasorNode > GenPhasorNodeRef
Definition: GenNode.h:35
void initialize() override
Called before audio buffers need to be used. There is always a valid Context at this point...
Definition: GenNode.cpp:282
std::shared_ptr< class WaveTable2d > WaveTable2dRef
Definition: WaveTable.h:35
void setWidth(float width)
Set the pulse width (aka 'duty cycle'). Expected range is between 0:1.
Definition: GenNode.h:167
Basic table-lookup oscillator.
Definition: GenNode.h:116
std::shared_ptr< class GenSineNode > GenSineNodeRef
Definition: GenNode.h:36
Param * getParamWidth()
Returns the Param associated with the width (aka 'duty cycle'). Expected range is between [0:1]...
Definition: GenNode.h:171
GenPhasorNode(const Format &format=Format())
Constructs a GenPhasorNode with optional format.
Definition: GenNode.h:79
std::shared_ptr< class GenNoiseNode > GenNoiseNodeRef
Definition: GenNode.h:34
WaveformType
Identifiers for the classic waveform types.
Definition: WaveformType.h:29
GenTableNode(float freq, const Format &format=Format())
Definition: GenNode.h:119
float mSamplePeriod
Definition: GenNode.h:59
Param * getParamFreq()
Returns a pointer to the Param, which can be used to animate the frequency.
Definition: GenNode.h:50
std::shared_ptr< class WaveTable > WaveTableRef
Definition: WaveTable.h:34
void setDownSlope(float down)
Definition: GenNode.h:103
WaveTable2dRef mWaveTable
Definition: GenNode.h:156
void process(Buffer *buffer) override
Override to perform audio processing on buffer.
Definition: GenNode.cpp:69
void process(Buffer *buffer) override
Override to perform audio processing on buffer.
Definition: GenNode.cpp:201
GLenum GLsizei GLenum format
Definition: GLee.h:969
size_t getTableSize() const
Returns the size of the owned WaveTable2d.
Definition: GenNode.h:150
std::shared_ptr< class GenTableNode > GenTableNodeRef
Definition: GenNode.h:38
void process(Buffer *buffer) override
Override to perform audio processing on buffer.
Definition: GenNode.cpp:82
float getDownSlope() const
Definition: GenNode.h:106
void initialize() override
Called before audio buffers need to be used. There is always a valid Context at this point...
Definition: GenNode.cpp:60
General purpose, band-limited oscillator using wavetable lookup.
Definition: GenNode.h:134
float getWidth() const
Get the current pulse width.
Definition: GenNode.h:169
void initImpl()
Definition: GenNode.cpp:54
void process(Buffer *buffer) override
Override to perform audio processing on buffer.
Definition: GenNode.cpp:260
float mPhase
Definition: GenNode.h:62
std::shared_ptr< class GenNode > GenNodeRef
Typedef for the base GenNode. If all you need to set on the GenNode is the frequency, you can reference the Node with this.
Definition: GenNode.h:32
GenSineNode(float freq, const Format &format=Format())
Definition: GenNode.h:90
Allows an audio parameter to be controlled over time with sample accuracate curves.
Definition: Param.h:81
WaveformType mWaveformType
Definition: GenNode.h:157
Param mFreq
Definition: GenNode.h:61
WaveTableRef mWaveTable
Definition: GenNode.h:130
const WaveTableRef & getWaveTable()
Returns a reference to the current wavetable.
Definition: GenNode.h:124
GenTableNode(const Format &format=Format())
Definition: GenNode.h:118
std::shared_ptr< class GenTriangleNode > GenTriangleNodeRef
Definition: GenNode.h:37
GenSineNode(const Format &format=Format())
Definition: GenNode.h:89