Envelopes: Exponential

For percussive, plucked or struck instrument sounds, the envelope needs to model an exponential decay. This is very useful for string-like sounds but most importantly for most electronic musicians, it is the very core of kick drum sounds.

In contrast to the ADSR envelope, the exponential one does not contain a sustain portion for holding a sound. The only parameter is the decay rate, allowing quick adjustment. Alternative to an actual exponential, a modified reciprocal function can be used for easier implementation. The factor $d$ controls the rate of the decay, respectively the decay time:

$$ e = \frac{1}{(1+(d t))} $$


The following example adds a short linear attack before the exponential decay. This minimizes clicks which otherwise occur through the rapid step from $0$ to $1$:

Your browser does not support the HTML5 canvas tag

Attack Time:

Decay Time:

Pure Data: Send-Receive & Throw-Catch

Send & Receive

Control Rate

Send and receive objects allow a wireless connection of both control and audio signals. The objects are created with send and receive or short s and r for control rate signals and get one argument - a string labeling the connection.

Local Sends

Prepending a $0- to a send label turns it into a local connection. These are only valid inside a patch and its subpatches but not across different abstractions. The example send-receive-help.pd shows the difference between local and global sends when used in both cases. It relies on the additional abstraction send-receive.pd which needs to be in the same directory:

/images/basics/pd-send-receive.png

Send and receive of control signals with subpatch and abstraction.


The inside of both the subpatch and the abstraction are identical:

/images/basics/pd-send-receive-sub.png

Inside of send-receive and the subpatch.


Audio Rate

Audio send and receives follow the same rules as control ones. They are created with an additional ~, as usual for audio objects. The example send-receive-audio.pd shows the use of these buses:

/images/basics/pd-send-receive-audio.png

Send and receive of audio signals with subpatch and abstraction.


Throw & Catch

Throw and catch are bus extensions of the above introduced send-receive method, only for audio signals. Unlike with s~ and r~, it is possible to send multiple signals to one catch~. This allows a flexible audio routing and grouping without a lot of lines. The example throw-catch.pd throws four sine waves to a common bus for a minimal additive synthesis:

/images/basics/pd-throw-catch.png

Using throw and catch to merge four signals.

Digital Waveguides: String with Losses

Introducing Losses

Real strings, however, introduce losses when reflecting the waves at either end. These losses are caused be the coupling between string and body, as well as the resonant behavior of the body itself. Thus, they contribute significantly to the individual sound of an instrument. In physical modeling, these losses can be implemented by inserting filters between the delay lines:


Plucked String Sound

The result of the waveguide synthesis has the characteristics of a plucked string with a crisp onset and a sinusoidal decay:


Smoothing

With an additional lowpass between the waveguides, the signal will get smoother with every iteration, resulting in a crisp onset with a sinusoidal decay. This example works with a basic moving average filter (FIR with boxcar frequency response) with a length of $N=20$. The slow version shows the smoothing of the excitation function for both delay lines even during the first iterations:



Once Loop Reflect