...
Child pages (Children Display) | ||
---|---|---|
|
General Information
Modules for processing signals in the frequency domain are found in the Frequency Domain folder. Frequency domain processing yields novels solutions to audio processing problems and may also lead to more efficient implementations. This section describes the main concepts behind frequency domain processing, then Filterbank Processing describes more sophisticated processing using weighted-overlap short-term Fourier transform filterbanks.
Complex Data Support
Audio Weaver natively supports complex data within wire buffers. The data is stored in an interleaved fashion:
...
The system below essentially does nothing except convert two mono signals into complex and then back again. If view wire info is enabled, (“ViewàData type”) it will mark complex wires with a “C”.
...
Transform Modules
Audio Weaver provides 3 different transform modules for converting between the time and frequency domains.
...
The Ifft takes N/2+1 complex samples and returns a real N-point sequence. The Ifft ignores the imaginary component of the DC and Nyquist samples.
Windowing
Before an FFT is computed the signal is typically windowed to prevent edge effects from influencing the results. There are 3 modules which perform windowing.
...
The ZeroPad module inserts zeros at the end of a signal. Specify the length of the output buffer under module properties. If the output is longer than the input then the signal is zero padded. If the output is shorter than the input then the signal is truncated.
Complex Math
The frequency domain modules have a large number of modules which operate on complex data. The modules here are listed without detailed explanations because the underlying functions are basic and easily understood.
...
Module | Operation |
---|---|
BlockConcatenate | Combines blocks of complex data |
BlockDelay | Delays by multiples of the block size |
BlockExtract | Extracts a portion of the complex data |
BlockFlip | Frequency flips data |
Deinterleave | Pulls apart multichannel complex signals into individual mono complex signals |
Demultiplexor | Outputs complex data to one output pin; zeros the rest |
Interleave | Combines multiple mono complex signals into a single multichannel complex signal |
Multiplexor | Selects one of N complex signals |
ShiftSamples | Left or right shifts complex signals |
Adder | Adds two complex signals |
ClipAsym | Clips the real and imaginary components |
Invert | Multiplies by + or -1. Set smoothingTime = 0. |
Mixer | Mixers together complex signals |
MixerDense | -Mixers together complex signals |
MuteSmoothed | Multiplies by +1 or 0. Set smoothingTime = 0. |
ScaleOffset | Scale both the real and imaginary components and adds an offset |
ScalerDB | dB gain without smoothing |
Scaler | Linear gain without smoothing |
Subtract | Subtracts two complex signals |
SumDiff | Adds and subtracts complex signals |
WhiteNoise | Generates uncorrelated noise in both real and imaginary components |
ScalerDBControl | dB gain with gain value taken from a control pin. Set smoothingTime = |
ScalerControl | Linear gain with the gain value taken from a control pin. Set smoothingTime = 0 |
FilterBank Processing
Introduction
This Section describes the filterbank blocks. The blocks are based on a weighted overlap-add (WOLA) design and are applicable to a wide range of audio processing tasks. The document first describes how the blocks work from an end user’s point of view. It then describes the theory behind the filterbanks and how they lead to efficiency during runtime.
Using WOLA and sub-band Blocks
The WOLA filterbank blocks are part of the DSPC Concepts IP Folder. The Frequency Domain contains the key set of Audio Weaver modules which are used for performing frequency domain computations. There are blocks for FFTs, windowing, complex operations, etc. Frequency domain operations often involve filterbanks, and Audio Weaver also includes modules for implementing entire weighted overlap-add filterbanks. There are separate modules for the forward filterbank (the analysis bank) and the inverse filterbank (the synthesis bank).
...
The filterbanks also contain built in decimation. The outputs of the analysis bank represent the decimated outputs of bandpass filters. The decimation factor equals the block size, that is, K/2. Continuing the example from above, the sample rate of the system is 48 kHz and the block size is 32 samples. Thus, the sample rate of the frequency domain subbands is 1500 Hz. see this by showing the sample rate on the wires.
Theory
This section describes more of the mathematical theory behind the filterbanks. The design of the filterbanks was based primarily on chapter 7 of the book Multirate Digital Signal Processing by Crochiere and Rabiner. This is an excellent and very readable introduction to the subject of filterbanks. Our description follows the derivation found in this book.A classical filterbank uses a time domain window function followed by an FFT as shown below:
...
Recent theory of filterbanks has been focused on critically sampled filterbanks. These filterbanks find use in audio compression and since the goal in compression is to reduce the overall data rate, it is important not to oversample and introduce more data in the subband representation. However, the operations performed on subbands in audio codecs are very gentle compared to what is possible with our WOLA filterbanks. In audio compression, the goal is for the output to equal the input. In Audio Weaver processing systems, the focus is to be able to make gross changes to the subbands without introducing objectionable aliasing artifacts. This requires a fundamentally different approach. Furthermore, if the algo calls for a frame overlap add and overlap save convolution in a filterbank framework, oversampling is needed. In general, in order to perform subband modifications of audio signals without introducing objectionable aliasing distortion, some amount of oversampling is required.
Aliasing Performance of the WOLA Filterbanks
As noted above, the filters in the filterbanks are not ideal and introduce some amount of aliasing. The amount of aliasing depends upon the stopband attenuation used in the design of the filters. This section provides details on the amplitude of this aliasing noise. To test this, use the system shown below:
...
Keep in mind that the aliasing components are linearly related to the input signals. That is, reducing the level of the input signal by 20 dB results in the level of the aliasing components dropping by 20 dB. Thus, the aliasing level is more similar to a signal to noise ratio (SNR) rather than total harmonic distortion.
Subband Signal Manipulation
Part of the beauty of these filterbanks is that it is possible to manipulate the signals in the subband domain. For example, if scaling the subband signals as shown below, the result will be an equalizer with linearly spaced frequency bins.
...
SbAttackRelease | Attack and release envelope follower (real data only) | |
SbDerivative | Derivative (real data only) | |
SbComplexFIR | Complex FIR filter | |
SbNLMS | Normalized LMS adaptive filter | |
SbSmooth | Performs smoothing across subbands (real data only) | |
SbRMS | RMS with settable time constant (real data only) | |
SbSOF | Second order filter (real data only) | |
SbSplitter | Subdivides the spectrum into overlapping regions. Similar to a crossover |
Synthesis Filterbank
The synthesis filterbank takes the subband signals and reconstructs a time domain output. Error! Reference source not found.Remember that the analysis filterbank can be considered to be a parallel set of bandpass filters and decimators. The synthesis filterbank uses a the inverse of this with upsamplers, filters, and adders. The upsamplers take the decimated subband signals and return them to the original sampling rate by inserting M-1 zeros between each sample value. In the frequency domain, upsampling creates copies of the input spectrum at multiples of and the filters remove the high frequency copies.
...