WaveWarp 2.0 Component
      

Spectral Transformers:
Functional Description
Spectral shaping
based on weighting of FFT spectra
according to an arbitrary profile imported from a "template" file.
IMPORTANT: this spectral shaping is crude but computationally efficient.
It can introduce significant distortion,
depending on the spectral and temporal nature of the audio material being processed.
This can lead to interesting audio effects,
but may be unacceptable for a given application. If accurate filtering is required,
refer to the
Digital Filters
category of the Component Library.
The attributes of the spectral shaper are adjustable via the Parameter Window, as summarised in the
following table.
| Parameter | Purpose |
| "Load shaping profile as wavetable from file" dialog |
The shaping profile is imported in wavetable format
from an ASCII file containing an arbitrary
user-defined profile, and interpolated (to the appropriate length) via the
selected "Interpolation" method. The shaping profile is
displayed, versus frequency, in the plot window.
The ASCII file format is
described in the
WaveWarp Users' Guide.
This simple file structure
enables
files to be written by hand (e.g. via a text editor).
For
MATLAB®
users, the process of creating shaping profiles
is particularly straightforward.
The "wwmatlab" sub-directory of the WaveWarp root directory contains
the necessary function m-files (plus example scripts) for exporting
wavetables from MATLAB, thereby providing ready access to
MATLAB's powerful mathematical tools for creating
elaborate waveforms.
(Refer to the
WaveWarp Users' Guide
for
a summary of all bundled m-files for working with MATLAB
in a variety of areas in addition to waveform design).
|
| "Depth" slider |
Only activated when "Enable depth modulation" is selected, whereby
the spectral weighting gains are confined to the range from 0 to 1.
The "Depth" determines the fraction of this range over which the
shaping profile is
mapped. Maximum "Depth" (a value of 1) implies that the shaping profile will be
mapped on to the entire range from 0 to 1, thereby maximising the spectral modifications.
Minimum "Depth" (a value of 0) implies no mapping, thereby suppressing the
spectral modifications. An intermediate value, say 0.2, implies that the
shaping profile will be
mapped on to the upper 20% of the output range, and so forth. The plot is
automatically adjusted to
reflect the selected "Depth".
When "Enable depth modulation" is not selected, the shaping profile is
used "as is" from the file (also reflected in the plot).
|
| "Buffer length" slider |
Adjusts the length of the input data buffer,
which also defines the "Latency" (overall delay) of the
process.
The FFT buffer size is computed from the "Buffer length"
rounded up to the nearest power of 2
(for efficient FFT computation). If "double zero-padding" is selected, the FFT buffer size is
doubled (after the rounding) to improve the smoothness of the spectrum between successive
FFT bins (but without increasing the underlying frequency resolution).
The input data buffer
is windowed (using a selected profile), then
extended to the length of the FFT buffer by
padding with zeros (on either side). Successive input data buffers are overlapped by a factor
of 2, and the ouputs of the overlapped
inverse transformed buffers are summed, in order
to avoid discontinuities at the window boundaries.
|
| "Window type" selection |
Selects the profile of the windowing function applied to the input data.
|
| "Output gain" slider |
Adjusts the overall gain of the output signal, after the spectral manipulations have been applied.
|
| "Save shaping profile as wavetable to file" dialog |
Exports the current shaping profile to an ASCII file (in wavetable format)
for future import or off-line analysis.
|
Algorithm
Each successive input buffer
is tranformed
to the frequency domain using the windowed-FFT with double overlapping.
The spectrum is multiplied point-by-point by the
selected shaping profile.
The modified spectrum is then
re-converted to the time domain (using the inverse FFT), and
the overlapped output buffers are summed to yield the output signal.
For an introduction to the Discrete Fourier Transform and the FFT,
see, for example,
[St] sections 4.1 and 4.2.
For further introductory information (with emphasis on audio applications), and
for discussions on spectral measurements, zero-padding,
windowing, the overlap-add re-synthesis method,
and the Short Time Fourier Transform (STFT) for audio applications,
see
[Roa] p. 1084-1112
and
[Moore] p. 61-111.
Signal Implementations
| Audio signals | Control signals | Description |
| Single input single output mono-mono | n/a |
Spectral shaping applied to mono input, sent to mono output
|
| Single input single output mono-stereo | n/a |
Spectral shaping applied to mono input, sent (in duplicate) to stereo output channels
|
| Single input single output stereo-mono | n/a |
Spectral shaping applied separately to stereo inputs (the same profile for both channels), then averaged and sent to mono output
|
| Single input single output stereo-stereo | n/a |
Spectral shaping applied separately to stereo inputs (the same profile for both channels), then sent to the respective stereo output channels
|
Related components:
Example DrawingBoards illustrating usage:

      
|