Wavetable Synthesizer
Libraries:
Audio Toolbox /
Sources
Description
The Wavetable Synthesizer block generates a periodic signal with tunable parameters. The periodic signal is defined by a single-cycle waveform cached as the Single-cycle waveform parameter of your Wavetable Synthesizer block.
Examples
Model Engine Noise
In this model, the Wavetable Synthesizer block is used to synthesize realistic engine noise. Such a system may be found in a vehicle where artificial engine noise enhancement is desired. The wavetable sample is a real-world engine recorded at an unspecified RPM.
Ports
Input
WT — Single-cycle waveform
vector of real values
Dependencies
To enable this port, select Specify wavetable from input port for the Single-cycle waveform parameter.
Data Types: single
| double
F — Output wave frequency (Hz)
nonnegative scalar | vector of nonnegative values
Dependencies
To enable this port, select Specify frequency from input port for the Output wave frequency (Hz) parameter.
Data Types: single
| double
A — Output wave amplitude
nonnegative scalar
Dependencies
To enable this port, select Specify amplitude from input port for the Output wave amplitude parameter.
Data Types: single
| double
DC — Output wave DC offset
scalar
Dependencies
To enable this port, select Specify DC offset from input port for the Output wave DC offset parameter.
Data Types: single
| double
Output
Port_1 — Output signal
vector | matrix
The Wavetable Synthesizer block outputs a periodic signal defined by the parameters of the block.
Data Types: single
| double
Parameters
If a parameter is listed as tunable, then you can change its value during simulation.
Single-cycle waveform — Wavetable
sin(2*pi*(0:511)/512)
(default) | vector of real values
The Wavetable Synthesizer block indexes into the single-cycle waveform to synthesize a periodic wave.
To specify Single-cycle waveform from an input port, select Specify wavetable from input port for the parameter.
Tunable: Yes
Output wave frequency (Hz) — Frequency of generated signal
100
(default) | nonnegative scalar
The number of times the single-cycle waveform is repeated in one second.
To specify Output wave frequency (Hz) from an input port, select Specify frequency from input port for the parameter.
Tunable: Yes
Output wave amplitude — Amplitude of generated signal
1
(default) | nonnegative scalar
Amplitude scaling is applied before DC offset.
To specify Output wave amplitude from an input port, select Specify amplitude from input port for the parameter.
Tunable: Yes
Output wave phase offset — Normalized phase offset of generated signal
0
(default) | scalar in the range [0,1]
The phase offset range, [0,1]
, corresponds to a normalized 2π
radians interval.
Output wave DC offset — Value added to each element of generated signal
0
(default) | scalar
To specify Output wave DC offset from an input port, select Specify DC offset from input port for the parameter.
Tunable: Yes
Samples per frame — Number of samples per frame output from block
512
(default) | positive integer scalar
Number of samples per frame output from block, specified as a positive integer scalar.
Tunable: No
Sample rate (Hz) — Sample rate of generated signal
44100
(default) | positive scalar
Sample rate of generated signal, specified as a positive scalar.
Tunable: No
Output data type — Data type of generated signal
double
(default) | single
Data type of generated signal, specified as double
or
single
.
Tunable: No
Simulate using — Specify type of simulation to run
Code generation
(default) | Interpreted execution
Code generation
– Simulate the model using generated C code. The first time you run a simulation, Simulink® generates C code for the block. The C code is reused for subsequent simulations, as long as the model does not change. This option requires additional startup time, but the speed of the subsequent simulations is comparable toInterpreted execution
.Interpreted execution
– Simulate the model using the MATLAB® interpreter. This option reduces startup time and the simulation speed is comparable toCode generation
. In this mode, you can debug the source code of the block.
Block Characteristics
Data Types |
|
Direct Feedthrough |
|
Multidimensional Signals |
|
Variable-Size Signals |
|
Zero-Crossing Detection |
|
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.
Version History
Introduced in R2020a
See Also
Audio Device Writer | Audio Oscillator | wavetableSynthesizer
MATLAB-Befehl
Sie haben auf einen Link geklickt, der diesem MATLAB-Befehl entspricht:
Führen Sie den Befehl durch Eingabe in das MATLAB-Befehlsfenster aus. Webbrowser unterstützen keine MATLAB-Befehle.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)