Procedural Audio Math 101

KevinDoran
AxelSpeller

In version 2020.1, GameSynth added five Mathematical control modules for patching in all sorts of complex and dynamic playback interactions.

Arithmetic allows us to add, subtract, multiply, or divide any signal by another. This module works functionally similar to the Scale Offset module, but with the ability to use any two arbitrary signals. So we can, for example, set Arithmetic to multiply and feed in two separate Oscillator modules set to different frequencies, to create a new harmonically rich waveform.

Constant is a familiar term in programming, which refers to some value that isn’t to be changed at runtime. In GameSynth, this module can be used in conjunction with the Arithmetic module to perform logical operations. For example, if we want to check whether a signal goes above 0.5, we can use a Constant set to 0.5 and compare with a Comparator set to “Greater.”

The Mapper works much like an Envelope, but it doesn’t generate its own signal. Instead, it maps incoming signals to a new envelope shape based on the Scale set in the dropdown. We can then create one “leader envelope” to control the duration of several “follower envelopes”, resulting in quicker iteration.

The Derivatives module is most useful in the context of animation and motion. It allows us to map incoming changes in signal as velocity or acceleration curves. If, for example, our animation was plotted as an arc, this raw data wouldn’t be useable if we wanted to map it to an appropriate whoosh effect. Instead, we can use Derivatives to determine how quickly the arc is read through over its animation cycle.

The Lerp module allows linear interpolation between two incoming signals, with the ability to control the ratio between them. This feature essentially allows us to mix control signals to come up with a new one that is somewhere in between the two. It is an especially handy feature for creating Envelope variations, as randomization can be applied to the ratio slider.

Tension Release

This patch features distinct attack and release components. On the right, several Mappers controlled by a lead Envelope are being used to shape a crescendo of Noise and Noise Bands. On the left, the same Envelope is being used with a Comparator, which then triggers when the signal has exceeded a specified Constant value. This trigger causes a Selector to fade the Noise out while playing a Modes source. Setting the value of Constant to 0.99 will cause this switching behavior to happen after 3 seconds, which is based on the duration of the Envelope. The reason for using a value lower than 1 is because we are setting the Comparator to check if the first input is “Greater.” The output of an Envelope is clamped between 0 and 1, so “greater than 1” will never trigger.

Derivatives Scratch Pad

Using some of the latest modules in GameSynth 2020.1, we can now create a performable record scratch. To create this effect, we need to convert our Meta Parameter input data to a change in velocity using the Derivatives module. Since Derivatives’ output can be quite harsh, we can lowpass the signal using Biquad Filters to smooth it out. The output can be further scaled and altered to a better range since negative values aren’t useful for control signals. Finally, when fed into the position input of the Wavetable, we get a scrubbing effect as the control signal seeks through the audio during playback. Using this Modular patch as sound source in the Whoosh model gives us a a very interactive record scratch.

Mathematician

With math modules at its core, this patch can generate some complex effects. As in the Tension Release example, one Automation Curve is used to control several Mappers. The signal from these Mappers is then either being altered using Arithmetic and Scale Offset modules or used as-is. On the left, a Lerp module is changing between two LFO shapes, the output of which is applied as amplitude modulation to the sum of two other Oscillators. A few other things are going on, but the key point to note is that the patch has many interrelated components. So, rather than working with several separate layers such as in traditional sound design, the setup of this patch can lead to emergent results. In the video above, changing the curve shape of the Automation Curve produces new content that is stylistically similar to the original.

GameSynth