The iir_processor is a infinite impulse response filter implementation in a GPU AUDIO processor.
You can apply the processing on a file with up to 8 channels. Please note that the input channel count will match the output channel count of the audio file.
It allows you to apply a band-pass filtering to an arbitrary signal.
Adjusting the settings of the filter is done through the initialization options from BG::Dsp::ProcessorSpecification.
preOne can:
- change the sample rate used in the filter creation (a default of 96kHz will be assumed if none is passed)
- change the band-pass frequency
- change the quality factor
You should ensure that your CUDA_VERSION and CUDA_COMPUTE_CAPABILITY variables are correctly set up in
CMakeLists.txt
device: 0
processor: iir
options:
sample_rate: 96000
band_pass_freq: 4000
band_pass_q: 0.5
input: test-signal.wav
output: output.wav-
sample_rate (
float) : Sample rate of filter (Please note that you should match your signal's sample_rate in order to properly perform the processing) -
band_pass_freq (
float) : Center frequency of the IIR filter -
band_pass_q (
float) : Quality factor of the IIR filter
The sample_rate, band_pass_freq and band_pass_q can be manipulated through the ProcessorSpecification::options structure.
It is a key and value map passed during the processor's creation.
BG::Dsp::ProcessorSpecification spec;
spec.options = {{ "sample_rate", 96000 }, { "band_pass_freq", 4000 }, {"band_pass_q", 0.5}};
...
// the module interface is used to create a processor
BG::Dsp::Processor* processor = module->CreateProcessor(spec);Implements the interface for the engine to create and destroy the processor.
Provides the engine access to the device binary, which is embedded in the processor binary.
Implements the interfaces to query properties of the processor like name, id, version and supported GPU platforms. Also provides the engines with the names of the processor device functions.
Defines the module export functions to create and destroy the IirModule, IirDeviceCodeProvider and IirModuleInfoProvider.
Implements the input to the processor. Provides functionality to connect, disconnect or update inputs tot the processor.
This is the host-side of the processor and implements the processor interface. Configures the execution of the processor and provides parameters for the GPU tasks.
Defines the names for device function substitution to avoid name conflicts between processors. Also contains user-defined parameter structs, which are passed to the processor functions during processing.
The device side implementation of the processor. Defines the GPU processor and its tasks, i.e., the processing functions.
Declares the GPU tasks and the GPU processor using pre-defined macros.