commit 0e5bbde098e88c7394b09e48f94374c6ffd03f9e
parent 47ed03db65cb2a8527822a495bef1baf6f53ac9a
Author: Johannes Lorenz <johannes89@mailueberfall.de>
Date: Sun, 21 Apr 2013 17:06:56 +0200
[Doc::Effects] Dynamic Filter added. Many small fixes.
Diffstat:
M | doc/effects.txt | | | 317 | ++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------- |
1 file changed, 219 insertions(+), 98 deletions(-)
diff --git a/doc/effects.txt b/doc/effects.txt
@@ -43,11 +43,10 @@ Equalizer
Introduction
^^^^^^^^^^^^
-An equalizer is a filter effect that applies different volume to
-different frequencies of the input signal. This can, for example, to "filter
-out" unwanted frequencies. For more information, click here:
-http://en.wikipedia.org/wiki/Filter_%28signal_processing%29[Wikipedia]. Also,
-most of ZynAddSubFX's implementations follow the
+An http://en.wikipedia.org/wiki/Filter_%28signal_processing%29[equalizer] is a
+filter effect that applies different volume to different frequencies of the
+input signal. This can, for example, to "filter out" unwanted frequencies.
+Note that ZynAddSubFX's implementations follow the
http://www.musicdsp.org/files/Audio-EQ-Cookbook.txt["Cookbook formulae for
audio EQ"] by Robert Bristow-Johnson.
@@ -59,9 +58,8 @@ happen at a given frequency. Mathematically, the filters are functions which
have poles that correspond to that frequency. Usually, two poles mean that the
function has more "steepness", and that you can set the exact value of the
function at the poles by defining the "resonance value". Filters with two poles
-are also often referenced as
-http://de.wikipedia.org/wiki/Butterworth-Filter[Butterworth
-Filters].
+are also often referenced
+as http://de.wikipedia.org/wiki/Butterworth-Filter[Butterworth Filters].
********************************************************************
For the interested, functions having poles means that we are given a quotient of
@@ -83,8 +81,8 @@ frequency
frequency
* Low Shelf and High shelf filters are special types of LP and HP with less
passband.
-* Band-Pass Filters - they let pass only the frequencies close to the cutoff
-frequency
+* Band-Pass Filters - they let pass only the frequencies of a frequency
+band close to the cutoff frequency
* Peak Filters are Band-Pass Filters with only a small amount of frequencies
("a peak") being passed
* Band-Reject Filters - they let pass only frequencies not close to the cutoff
@@ -105,8 +103,8 @@ explains the abbreviations.
* LS 2 Low Shelf, 2 poles.
* HS 2 High Shelf, 2 poles.
-Filter GUI
-^^^^^^^^^^
+Usage
+^^^^^
We describe all parts of the GUI here.
@@ -143,6 +141,9 @@ both the amplitude envelope and the frequency spectrum. Multiple sounds with
slightly different timbres make a sound more shimmering, or powerful. This is
called the chorus effect.
+Function
+^^^^^^^^
+
The chorus effect can be achieved by multiple people singing together. In
a concert, there are many instruments, resulting in the same effect. When making
electronic music, we only have an input wave and need to generate these
@@ -153,19 +154,17 @@ the input. This version is being pitched by an LFO. More detailled, this pitch
is generated by varying the reading speed of the delayed sound; the variation
amount is controlled by an LFO.
+image::./gen/chorus.png[width="700", title="The chorus effect. $z^{-n.m}$
+describes the delay. TODO: Add LFO pointing to delay?"]
+
Related effects to Chorus are Flangers. Flangers can be described as Chorus
with very short LFO delay and little LFO depth. You can imagine a flanger as two
copies of a sound playing at almost the same time. This leeds to interference,
which can be clearly heared. It is popular to apply flangers to guitars, giving
them more "character".
-
-Description
-^^^^^^^^^^^
-
-We explain the functionality in a diagram and list the components below.
-
-image::./gen/chorus.png[width="700"]
+Usage
+^^^^^
* First, crossover is applied. The *L/R* knob lets you set the amount. If
you set it to 0.0, you will always have a stereo input.
@@ -188,8 +187,8 @@ the amplitude is multiplied by -1.
* Finally, *Pan* lets you apply panning. Set it to 0.0 to only hear
output on the right side.
-Distort
-~~~~~~~
+Distortion
+~~~~~~~~~~
Introduction
^^^^^^^^^^^^
@@ -199,99 +198,79 @@ usually produce sine like waves. A wave is transformed in an unnatural way when
distortion is used. The most distorted waves are pulse waves. It is typical for
distortion to add overtones to a sound. Distortion often increases the power and
the http://en.wikipedia.org/wiki/Loudness[loudness] of a signal, while the db
-level is not increased.
+level is not increased. This is an important topic in the
+http://en.wikipedia.org/wiki/Loudness_war[Loudness War].
+
+NOTE: As distortion increases loudness, distorted music can cause ear damage
+at lower volume levels. Thus, you might want to use it a bit careful.
Distortion can happen in many situations when working with audio. Often, this is
not wanted. In classical music, for example, distortion does not occur
naturally. However, distortion can also be a wanted effect. It is typical for
Rock guitars, but also present in electronic music, mostly in Dubstep and
-DrumNBass. Distortion is an important topic in the
-http://en.wikipedia.org/wiki/Loudness_war[Loudness War].
+DrumNBass.
-NOTE: As distortion increases loudness, distorted music can cause ear damage
-at lower volume levels. Thus, you might want to use it a bit careful.
+The basic components of distortion are mainly
-Description
-^^^^^^^^^^^
-
-We explain the functionality in a diagram and list the components below.
+* a preamplifier
+* the waveshaping function
+* filters
image::./gen/distort.png[width="700"]
-* Negation is the first thing to happen. If the *Neg* Checkbox is activated, the
-amplitude is multiplied by -1.
-* Panning is applied. Note, however, that you have to activate the
-Stereo Checkbox, labeled *St*, before.
-* Pre amplification is done next. The amount can be changed using the
-*Drive* nob. Indeed, this is the amount of distortion. For example, if you clip
-a signal, the louder the input gets, the more distortion you will get. This can
-have different meanings for different types of distortion, as described below.
-* Before applying the waveshape, or afterwards, you can apply Highpass
-and Lowpass filters. The type is HPF2 or LPF2, meaning butterworth lowpasses.
-They are labeled *HPF* and *LPF*. Whether this is done before, or after the
-waveshape, depends on the checkbox labeled *PF*.
-* The next step is the wave shape. This defines how the wave is
-actuallymodified. The *Type* ComboBox lets you define how. We will discuss some
-types below.
-* After the wave shape, we scale the level again. This is called
-output amplification. You can change the value using the *Level* knob.
-* Crossover is the last step. This is controlled by the knob *LR Mix* and
-means that afterwards, a percentage of the left side is applied to the right
-side, and, synchronously, the other way round. It is a kind of interpolation
-between left and right. If you set the LR Mix to 0.0, you will always have a
-stereo output.
+Preamplification changes the volume before the wave is shaped, and is indeed the
+amount of distortion. For example, if you clip a signal, the louder the input
+gets, the more distortion you will get. This can have different meanings for
+different types of distortions, as described below.
********************************************************************
-One practical reason for using filters afterwards is that distortion can lead to
-waves with undesired high frequency parts. Those can be filtered out using the
-HPF.
-A reason for using filters before applying is to achieve multiband
-distortion. ZynAddSubFX has no "real" multiband distortion by now, however.
+The filters are practical. A reason for using them afterwards is that distortion
+can lead to waves with undesired high frequency parts. Those can be filtered out
+using the HPF. A reason for using filters before applying is to achieve
+multiband distortion. ZynAddSubFX has no "real" multiband distortion by now,
+however.
********************************************************************
-For a few types of distortion we will make a description below. Please note that
-you can get a very good impression for this using the *Wsh* ComboBox in the
-Oscillator editor.
+Types of Distortion
+^^^^^^^^^^^^^^^^^^^
+
+The type of distortion has much influence on how the overtones are being placed.
+Sometimes, you get a "fat" bass, and sometimes, high frequencies are added,
+makeing the sound "crystal clear". Please note that you can get a very good
+impression for this using the *Wsh* ComboBox in the Oscillator editor.
Atan & Sigmoid
-^^^^^^^^^^^^^^
+++++++++++++++
This is the default setting. It is an easy way to apply loudness to a
-wave without getting undesired effects. Thus, it can be used both for making
-instruments that sound like "real" ones, but also for electronic music. The
-transformation turns, roughly said, every amplitude into a square amplitude.
+wave without getting undesired high overtones. Thus, it can be used both for
+making instruments that sound like "real" ones, but also for electronic music.
+The transformation turns, roughly said, every amplitude into a square amplitude.
Thus, sine, power, pulse and triangle turn into a usual square wave, while a saw
turns into a phased square wave. A chirp wave turns into a kind of phase
modulated square wave.
Quants
-^^^^^^
+++++++
-Quantization can be seen as an unnatural effect, which is often used
-for electronic music. The transformation is a bit similar to building the
-http://en.wikipedia.org/wiki/Riemann_sum[lower sum] of a wave, mathematically
-said. This means that the transformation effect turns your "endless high"
-sampled wave into only a few samples. For more information, read
-http://en.wikipedia.org/wiki/Quantization_%28sound_processing%29[Wikipedia's
-article].
+http://en.wikipedia.org/wiki/Quantization_%28sound_processing%29[Quantization]
+adds high overtones early. It can be seen as an unnatural effect, which is often
+used for electronic music.
-The more distortion you will apply, the less samples will be used. Indeed,
-this is equivalent to say that more input amplification is used. To see this,
-here is a small sample of code, where "ws" is the (correctly scaled amount of
-input amplification, and "n" the number of original samples.
+The transformation is a bit similar to building
+the http://en.wikipedia.org/wiki/Riemann_sum[lower sum] of a wave,
+mathematically said. This means that the transformation effect turns your
+"endless high" sampled wave into only a few samples. The more distortion you
+will apply, the less samples will be used. Indeed, this is equivalent to say
+that more input amplification is used. To see this, here is a small sample of
+code, where "ws" is the (correctly scaled amount of input amplification, and "n"
+the number of original samples.
---------------------------------
for(i = 0; i < n; ++i)
smps[i] = floor(smps[i] / ws + 0.5f) * ws;
---------------------------------
-********************************************************************
-This kind of distortion might remind you of gaming console sound. Let's say
-we have a computer which is not able to play sounds with many samples.
-Therefore, it can only play sounds with a low sample rate. This leads to exactly
-this effect.
-********************************************************************
-
NOTE: If you turn on quantisation very high, you might be confused
that, especially high notes, make no sound. The reason is simple: High
frequencies are "forgotten" if you sample with only few samples. Also, the sign
@@ -300,34 +279,176 @@ bit unexpected.
Limiting & Clipping
-^^^^^^^^^^^^^^^^^^^
++++++++++++++++++++
-Limiting usually means that for a signal, the amplitude is modified because
-it exceeds its maximum value. Overdrive, as often used for guitars, is often
-achieved by limiting: It happens because an amplifier "overdrives" the maximum
-amplitude it can deliver. For more general information, you can try
-http://en.wikipedia.org/wiki/Limiting[Wikipedia].
+http://en.wikipedia.org/wiki/Limiting[Limiting] usually means that for a signal,
+the amplitude is modified because it exceeds its maximum value. Overdrive, as
+often used for guitars, is often achieved by limiting: It happens because an
+amplifier "overdrives" the maximum amplitude it can deliver.
ZynAddSubFX has two types of limiting. Soft limiting, here as *Lmt*, means
that the sound may not exceed a certain value. If the amplitude does so, it will
-simply be reduced to the limiting value. Hard limiting, is also called clipping
-and abbreviated *Clip*. This means that if the maximum is exceeded, instead of
-being constant at the limiting value, the original signal still has some
-influence on the output signal. Still, it does not exceed the limiting value.
-For ZynAddSubFX, a signal exceeding the limiting value will continue to grow "in
-the negative".
+simply be reduced to the limiting value. The overtones are generated in the
+lower frequencies first.
+
+Hard limiting, is also called clipping and abbreviated *Clip*. This means that
+if the maximum is exceeded, instead of being constant at the limiting value, the
+original signal still has some influence on the output signal. Still, it does
+not exceed the limiting value. For ZynAddSubFX, a signal exceeding the limiting
+value will continue to grow "in the negative". This leads to overtones being
+generated on the full frequency band.
+
+Function
+^^^^^^^^
+
+We explain the functionality in a diagram and list the components below.
+
+image::./gen/distort.png[width="700", title="The components of a distortion
+function."]
+
+* Negation is the first thing to happen. If the *Neg* Checkbox is activated, the
+amplitude is multiplied by -1.
+* Panning is applied. Note, however, that you have to activate the
+Stereo Checkbox, labeled *St*, before.
+* Pre amplification is done next. The amount can be changed using the
+*Drive* nob. Indeed, this is the amount of distortion. For example, if you clip
+a signal, the louder the input gets, the more distortion you will get. This can
+have different meanings for different types of distortion, as described below.
+* *HPF* and *LPF* are lowpasses with 2 poles. Whether they are used before or
+after the waveshape, depends on the checkbox labeled *PF*.
+* The next step is the wave shape. This defines how the wave is
+actuallymodified. The *Type* ComboBox lets you define how. We will discuss some
+types below.
+* After the wave shape, we scale the level again. This is called
+output amplification. You can change the value using the *Level* knob.
+* Crossover is the last step. This is controlled by the knob *LR Mix* and
+means that afterwards, a percentage of the left side is applied to the right
+side, and, synchronously, the other way round. It is a kind of interpolation
+between left and right. If you set the LR Mix to 0.0, you will always have a
+stereo output.
Dynamic Filter
~~~~~~~~~~~~~
-image::./gen/dynamic.png[width="700"]
+Introduction
+^^^^^^^^^^^^
+
+A dynamic filter is, as the name says, a filter which changes its parameters
+dynamically, dependent on the input and current time. In ZynAddSubFX,
+frequency is the only variable parameter. It can be used as an "envelope
+following filter" (sometimes referenced "Auto Wah" or simply "envelope filter").
+
+Function
+^^^^^^^^
+
+Though this filter might look a bit complicated, it is actually easy. We divide
+the parameters into two classes:
+
+* *Filter Parameters* are the ones you get when you click on *Filter*. They
+give the filter its basic settings.
+* *Effect Parameters* are the other ones that control how the filter changes.
+
+The filter basically works like this. The input signal is passed through a
+filter which dynamically changes its frequency. The frequency is an additive of:
+
+* the filter's bass frequency
+* an LFO from the effect parameters
+* the "amplitude" of the input wave
+
+image::./gen/dynamic.png[width="700", title="The components of a dynamical
+filter"]
+
+The amplitude of the input wave is not the current amplitude, but the so called
+https://en.wikipedia.org/wiki/Root_mean_square["Root Mean Square (RMS)"] value.
+This means that we build a mean on the current amplitude and the past values.
+How much the new amplitude takes influence is determined by the *Amplitude
+Smoothness*.
+
+********************************************************************
+RMS value plays an important role in the term loudness. A fully distorted
+signal can sound 20 db louder due to its higher RMS value. This filter takes
+this into account, depending on the smoothness.
+********************************************************************
+
+Usage
+^^^^^
+
+* The following 4 knobs control the LFO.
+** *Freq* determines the LFO's frequency
+** *Rnd* is the LFO amplitude's randomness
+** *LFO Type* determines the shape of the LFO
+** *St.df* lets you determine how much left and right LFO are phase shifted.
+64.0f means stereo, higher values increase the right lfo relatively to the left
+one.
+* These knobs let you control the way how the RMS value of the amplitudes is
+measured.
+** *A.M* sets the Amplitude Smoothness.
+** *A.Inv.*, if being set, negates the (absolute) RMS value. This will lower
+the filter frequency instead of increasing it.
+* The following controls defined the Mix of the LFO and the amplitude.
+** *A.S* sets the Amplitude Sensing
+** *LfoD* sets the LFO depth
+* The filter button lets you choose the filter type.
+* After the input signal has passed through the filter, *Pan* can apply
+panning. Set it to 0.0 to only hear output on the right side.
Echo
~~~~
-image::./gen/echo.png[width="700"]
+Introduction
+^^^^^^^^^^^^
+
+The echo effect, also known as
+http://en.wikipedia.org/wiki/Delay_%28audio_effect%29[delay effect], simulates
+the natural reflection of a sound. The listener can hear the sound multiple
+times, usually decreasing in volume.
+
+In ZynAddSubFX, the echo is basically implemented as the addition of the
+current sound and a delayed version of it. TODO: Talk about dampening and LPFs.
+
+image::./gen/echo.png[width="700", title="The echo effect includes a feedback
+line, labeled as $z^{-n}$, and a delay."]
+
+Description
+^^^^^^^^^^^
+
+* First, *Pan* lets you apply panning of the input. Set it to 0.0 to only pan
+the input to the right side.
+* In the next step, the delayed buffer is added. We will discuss how it is
+generated soon.
+* Next, a Lowpass filter is applied. This shall simulate
+
+
+* First, Crossover is applied. Set the *LRc.* to 1.0 to completely switch left
+and right input, to 0.5 to mix both as stereo, or to 0.0 to have no crossing
+effect.
+
+
Reverb
~~~~~~
-image::./gen/reverb.png[width="700"]
+Introduction
+^^^^^^^^^^^^
+
+A http://en.wikipedia.org/wiki/Reverberation[Reverberation] actually expresses
+the effect of many echoes being played at the same time. This can happen in an
+enclosed room, where the sound can be reflected in different angles. Also, in
+nature, thunders approximate reverbs, because the sound is reflected in many
+different ways, arriving at the listener at different times.
+
+In music, reverbs are popular in many ways. Reverbs with large room size can be
+used to emulate sounds like in live concerts. This is useful for voices, pads,
+and especially hand claps. A small room size can simulate the sound board of
+string instruments, like guitars or pianos.
+
+While the initial delay for an echo is given by, the echo delay, for the
+reverb, we need a seperate controller for that. TODO: Talk about dampening.
+
+image::./gen/reverb.png[width="700", "The reverb, being similar to the echo."]
+
+Description
+^^^^^^^^^^^
+
+(TODO)
+