ASPiK SDK
Loading...
Searching...
No Matches
ImpulseConvolver Class Reference

The ImpulseConvolver object implements a linear conovlver. NOTE: compile in Release mode or you may experice stuttering, glitching or other sample-drop activity. More...

#include <fxobjects.h>

Inheritance diagram for ImpulseConvolver:
IAudioSignalProcessor

Public Member Functions

virtual bool reset (double _sampleRate)
 
virtual double processAudioSample (double xn)
 
virtual bool canProcessAudioFrame ()
 
void init (unsigned int lengthPowerOfTwo)
 
void setImpulseResponse (double *irArray, unsigned int lengthPowerOfTwo)
 
- Public Member Functions inherited from IAudioSignalProcessor
virtual bool reset (double _sampleRate)=0
 
virtual double processAudioSample (double xn)=0
 
virtual bool canProcessAudioFrame ()=0
 
virtual void setSampleRate (double _sampleRate)
 
virtual void enableAuxInput (bool enableAuxInput)
 
virtual double processAuxInputAudioSample (double xn)
 
virtual bool processAudioFrame (const float *inputFrame, float *outputFrame, uint32_t inputChannels, uint32_t outputChannels)
 

Protected Attributes

CircularBuffer< double > signalBuffer
 circulat buffer for the signal
 
LinearBuffer< double > irBuffer
 linear buffer for the IR
 
unsigned int length = 0
 length of convolution (buffer)
 

Detailed Description

The ImpulseConvolver object implements a linear conovlver. NOTE: compile in Release mode or you may experice stuttering, glitching or other sample-drop activity.

Audio I/O:

  • Processes mono input to mono output.

Control I/F:

  • none.
Author
Will Pirkle http://www.willpirkle.com
Remarks
This object is included in Designing Audio Effects Plugins in C++ 2nd Ed. by Will Pirkle
Version
Revision : 1.0
Date
Date : 2018 / 09 / 7

Member Function Documentation

◆ canProcessAudioFrame()

virtual bool ImpulseConvolver::canProcessAudioFrame ( )
inlinevirtual

return false: this object only processes samples

Implements IAudioSignalProcessor.

◆ init()

void ImpulseConvolver::init ( unsigned int  lengthPowerOfTwo)
inline

create the buffer based on the exact power of 2

◆ processAudioSample()

virtual double ImpulseConvolver::processAudioSample ( double  xn)
inlinevirtual

process one input - note this is CPU intensive as it performs simple linear convolution

Parameters
xninput
Returns
the processed sample

Implements IAudioSignalProcessor.

◆ reset()

virtual bool ImpulseConvolver::reset ( double  _sampleRate)
inlinevirtual

reset members to initialized state

Implements IAudioSignalProcessor.

◆ setImpulseResponse()

void ImpulseConvolver::setImpulseResponse ( double *  irArray,
unsigned int  lengthPowerOfTwo 
)
inline

set the impulse response


The documentation for this class was generated from the following file: