#include <FilterNode.h>
Inherits cinder::audio::FilterBiquadNode.
|
enum | Mode {
Mode::LOWPASS,
Mode::HIGHPASS,
Mode::BANDPASS,
Mode::LOWSHELF,
Mode::HIGHSHELF,
Mode::PEAKING,
Mode::ALLPASS,
Mode::NOTCH,
Mode::CUSTOM
} |
|
enum | ChannelMode { ChannelMode::SPECIFIED,
ChannelMode::MATCHES_INPUT,
ChannelMode::MATCHES_OUTPUT
} |
|
A low-pass filtering Node. This is a subclass of FilterBiquadNode and manages its configuration appropriately.
The modes that are available as 'preset' coefficients, which set the frequency response to a common type of filter.
Enumerator |
---|
LOWPASS |
|
HIGHPASS |
|
BANDPASS |
|
LOWSHELF |
|
HIGHSHELF |
|
PEAKING |
|
ALLPASS |
|
NOTCH |
|
CUSTOM |
|
Used to specifiy how the corresponding channels are to be resolved between two connected Node's, based on either a Node's input (the default), it's output, or specified by user.
Enumerator |
---|
SPECIFIED |
Number of channels has been specified by user or is non-settable.
|
MATCHES_INPUT |
This Node matches it's channels with it's input.
|
MATCHES_OUTPUT |
This Node matches it's channels with it's output.
|
cinder::audio::FilterLowPassNode::FilterLowPassNode |
( |
const Format & |
format = Format() | ) |
|
virtual cinder::audio::FilterLowPassNode::~FilterLowPassNode |
( |
| ) |
|
|
virtual |
void cinder::audio::FilterLowPassNode::setCutoffFreq |
( |
float |
freq | ) |
|
Sets the cutoff frequency in hertz, above which frequencies are attenuated.
float cinder::audio::FilterLowPassNode::getCutoffFreq |
( |
| ) |
const |
Returns the cutoff frequency in hertz.
void cinder::audio::FilterLowPassNode::setResonance |
( |
float |
resonance | ) |
|
Sets the resonance of the filter in decibels.
float cinder::audio::FilterLowPassNode::getResonance |
( |
| ) |
const |
Returns the resonance of the filter in decibels.
void cinder::audio::FilterBiquadNode::setMode |
( |
Mode |
mode | ) |
|
|
inherited |
Sets the mode, which updates the coefficients so that the frequency response is that of a common type of filter.
- See also
- Mode.
Mode cinder::audio::FilterBiquadNode::getMode |
( |
| ) |
const |
|
inherited |
Returns the current mode.
void cinder::audio::FilterBiquadNode::setFreq |
( |
float |
freq | ) |
|
|
inherited |
Sets the frequency in hertz. This is interpreted differently depending on what the current Mode is.
float cinder::audio::FilterBiquadNode::getFreq |
( |
| ) |
const |
|
inherited |
Returns the current frequency in hertz.
void cinder::audio::FilterBiquadNode::setQ |
( |
float |
q | ) |
|
|
inherited |
Sets the q, or 'quality', parameter of the Biquad, which can be thought of as the sharpness of the filter.
float cinder::audio::FilterBiquadNode::getQ |
( |
| ) |
const |
|
inherited |
void cinder::audio::FilterBiquadNode::setGain |
( |
float |
gain | ) |
|
|
inherited |
Sets the gain of the filter in decibels. Not used in all Mode's.
float cinder::audio::FilterBiquadNode::getGain |
( |
| ) |
const |
|
inherited |
Returns the gain of the filter in decibels.
void cinder::audio::FilterBiquadNode::initialize |
( |
| ) |
|
|
overrideprotectedvirtualinherited |
Called before audio buffers need to be used. There is always a valid Context at this point.
Reimplemented from cinder::audio::Node.
void cinder::audio::FilterBiquadNode::uninitialize |
( |
| ) |
|
|
overrideprotectedvirtualinherited |
Called once the contents of initialize are no longer relevant, i.e. connections have changed.
- Note
- Not guaranteed to be called at Node destruction.
Reimplemented from cinder::audio::Node.
void cinder::audio::FilterBiquadNode::process |
( |
Buffer * |
buffer | ) |
|
|
overrideprotectedvirtualinherited |
void cinder::audio::FilterBiquadNode::updateBiquadParams |
( |
| ) |
|
|
protectedinherited |
void cinder::audio::Node::enable |
( |
| ) |
|
|
inherited |
Enables this Node for processing. Same as setEnabled( true )
.
void cinder::audio::Node::enable |
( |
double |
when | ) |
|
|
inherited |
void cinder::audio::Node::disable |
( |
| ) |
|
|
inherited |
Disables this Node for processing. Same as setEnabled( false )
.
void cinder::audio::Node::disable |
( |
double |
when | ) |
|
|
inherited |
void cinder::audio::Node::setEnabled |
( |
bool |
b | ) |
|
|
inherited |
Sets whether this Node is enabled for processing or not.
void cinder::audio::Node::setEnabled |
( |
bool |
b, |
|
|
double |
when |
|
) |
| |
|
inherited |
bool cinder::audio::Node::isEnabled |
( |
| ) |
const |
|
inherited |
Returns whether this Node is enabled for processing or not.
void cinder::audio::Node::connect |
( |
const NodeRef & |
output | ) |
|
|
virtualinherited |
void cinder::audio::Node::disconnect |
( |
const NodeRef & |
output | ) |
|
|
virtualinherited |
Disconnects this Node from output.
void cinder::audio::Node::disconnectAll |
( |
| ) |
|
|
virtualinherited |
Disconnects this Node from all inputs and outputs.
void cinder::audio::Node::disconnectAllOutputs |
( |
| ) |
|
|
virtualinherited |
void cinder::audio::Node::disconnectAllInputs |
( |
| ) |
|
|
virtualinherited |
size_t cinder::audio::Node::getNumConnectedInputs |
( |
| ) |
const |
|
inherited |
Returns the number of inputs connected to this Node.
size_t cinder::audio::Node::getNumConnectedOutputs |
( |
| ) |
const |
|
inherited |
Returns the number of outputs this Node is connected to.
bool cinder::audio::Node::isConnectedToInput |
( |
const NodeRef & |
input | ) |
const |
|
inherited |
Returns true if input is connected to this Node as an input, false otherwise.
bool cinder::audio::Node::isConnectedToOutput |
( |
const NodeRef & |
output | ) |
const |
|
inherited |
Returns true if output is connected to this Node as an output, false otherwise.
ContextRef cinder::audio::Node::getContext |
( |
| ) |
const |
|
inherited |
Returns the Context associated with this Node.
- Note
- Cannot be called from within a Node's constructor. Use initialize instead.
size_t cinder::audio::Node::getNumChannels |
( |
| ) |
const |
|
inherited |
Returns the number of channels this Node will process.
ChannelMode cinder::audio::Node::getChannelMode |
( |
| ) |
const |
|
inherited |
size_t cinder::audio::Node::getMaxNumInputChannels |
( |
| ) |
const |
|
inherited |
Returns the maximum number of channels any input has.
size_t cinder::audio::Node::getSampleRate |
( |
| ) |
const |
|
inherited |
size_t cinder::audio::Node::getFramesPerBlock |
( |
| ) |
const |
|
inherited |
Returns the number of frames processed in one block by this Node, which is governed by the Context's OutputNode.
bool cinder::audio::Node::isAutoEnabled |
( |
| ) |
const |
|
inherited |
Returns whether this Node is automatically enabled / disabled when connected.
void cinder::audio::Node::setAutoEnabled |
( |
bool |
b = true | ) |
|
|
inherited |
Sets whether this Node is automatically enabled / disabled when connected.
bool cinder::audio::Node::isInitialized |
( |
| ) |
const |
|
inherited |
Returns whether this Node is in an initialized state and is capable of processing audio.
bool cinder::audio::Node::getProcessesInPlace |
( |
| ) |
const |
|
inherited |
Returns whether this Node will process audio with an in-place Buffer.
bool cinder::audio::Node::canConnectToInput |
( |
const NodeRef & |
input | ) |
|
|
inherited |
Returns whether it is possible to connect to input, example reasons of failure would be this == Node, or Node is already an input.
bool cinder::audio::Node::checkCycle |
( |
const NodeRef & |
sourceNode, |
|
|
const NodeRef & |
destNode |
|
) |
| const |
|
inherited |
Returns true if there is an unmanageable cycle betweeen sourceNode and destNode. If any Node's in the traversal returns true for supportsCycles(), this method will return false.
const std::set<NodeRef>& cinder::audio::Node::getInputs |
( |
| ) |
const |
|
inherited |
Returns an immutable reference to the inputs container.
vector< NodeRef > cinder::audio::Node::getOutputs |
( |
| ) |
const |
|
inherited |
Returns a copy of the NodeRef's referenced by the this Node as outputs. The copy is necessary because outputs are stored internally with weak_ptr's.
std::string cinder::audio::Node::getName |
( |
| ) |
|
|
virtualinherited |
Returns a string representing the name of this Node type. Default returns a demangled, compiler-specific class name.
void cinder::audio::Node::setName |
( |
const std::string & |
name | ) |
|
|
inherited |
Sets this Node's name to a user-specified string.
Buffer* cinder::audio::Node::getInternalBuffer |
( |
| ) |
|
|
inherited |
Usually used internally by a Node subclass, returns a pointer to the internal buffer storage.
const Buffer* cinder::audio::Node::getInternalBuffer |
( |
| ) |
const |
|
inherited |
Usually used internally by a Node subclass, returns a pointer to the internal buffer storage.
void cinder::audio::Node::pullInputs |
( |
Buffer * |
inPlaceBuffer | ) |
|
|
inherited |
Usually called internally by the Node, in special cases sub-classes may need to call this on other Node's.
virtual void cinder::audio::Node::enableProcessing |
( |
| ) |
|
|
protectedvirtualinherited |
virtual void cinder::audio::Node::disableProcessing |
( |
| ) |
|
|
protectedvirtualinherited |
void cinder::audio::Node::sumInputs |
( |
| ) |
|
|
protectedvirtualinherited |
virtual bool cinder::audio::Node::supportsInputNumChannels |
( |
size_t |
numChannels | ) |
const |
|
protectedvirtualinherited |
virtual bool cinder::audio::Node::supportsCycles |
( |
| ) |
const |
|
protectedvirtualinherited |
Default implementation returns false, return true if it makes sense for the Node to be processed in a cycle (eg. Delay).
Reimplemented in cinder::audio::DelayNode.
virtual bool cinder::audio::Node::supportsProcessInPlace |
( |
| ) |
const |
|
protectedvirtualinherited |
void cinder::audio::Node::connectInput |
( |
const NodeRef & |
input | ) |
|
|
protectedvirtualinherited |
void cinder::audio::Node::disconnectInput |
( |
const NodeRef & |
input | ) |
|
|
protectedvirtualinherited |
void cinder::audio::Node::disconnectOutput |
( |
const NodeRef & |
output | ) |
|
|
protectedvirtualinherited |
void cinder::audio::Node::configureConnections |
( |
| ) |
|
|
protectedvirtualinherited |
void cinder::audio::Node::setupProcessWithSumming |
( |
| ) |
|
|
protectedinherited |
void cinder::audio::Node::notifyConnectionsDidChange |
( |
| ) |
|
|
protectedinherited |
bool cinder::audio::Node::inputChannelsAreUnequal |
( |
| ) |
const |
|
protectedinherited |
void cinder::audio::Node::setNumChannels |
( |
size_t |
numChannels | ) |
|
|
protectedinherited |
Only Node subclasses can specify num channels directly - users specify via Format at construction time.
void cinder::audio::Node::setChannelMode |
( |
ChannelMode |
mode | ) |
|
|
protectedinherited |
Only Node subclasses can specify channel mode directly - users specify via Format at construction time.
const std::pair<size_t, size_t>& cinder::audio::Node::getProcessFramesRange |
( |
| ) |
const |
|
protectedinherited |
Returns a pair of frame indices for Nodes that wish to support sample accurate enable and disable.
The first index is where processing should start, the second is where it should end. Should only be called on the audio thread from within a Node's process() method. Unless scheduled (with Context::schedule()), this will be [0, getFramesPerBlock()]
void cinder::audio::Node::initializeImpl |
( |
| ) |
|
|
protectedinherited |
void cinder::audio::Node::uninitializeImpl |
( |
| ) |
|
|
protectedinherited |
const BufferDynamic* cinder::audio::Node::getSummingBuffer |
( |
| ) |
const |
|
protectedinherited |
std::vector<dsp::Biquad> cinder::audio::FilterBiquadNode::mBiquads |
|
protectedinherited |
std::atomic<bool> cinder::audio::FilterBiquadNode::mCoeffsDirty |
|
protectedinherited |
BufferT<double> cinder::audio::FilterBiquadNode::mBufferd |
|
protectedinherited |
size_t cinder::audio::FilterBiquadNode::mNiquist |
|
protectedinherited |
Mode cinder::audio::FilterBiquadNode::mMode |
|
protectedinherited |
float cinder::audio::FilterBiquadNode::mFreq |
|
protectedinherited |
float cinder::audio::FilterBiquadNode::mQ |
|
protectedinherited |
float cinder::audio::FilterBiquadNode::mGain |
|
protectedinherited |
The documentation for this class was generated from the following file: