AUDIO ARCHITECTURE MASTERCLASS - Part 3: Understanding FDN Reverb & Flow Diagrams in Gen~ with fendoap
Added 2024-04-10 18:30:01 +0000 UTCAUDIO ARCHITECTURE MASTERCLASS
Part 3: Understanding FDN Reverb & Flow Diagrams in Gen~
with fendoap
In this Lux Cache article/tutorial series, we delve into the intricate world of ‘audio architecture’', exploring the complex interplay between digital audio creation and music technology. By examining the multifaceted systems and frameworks that shape the digital music landscape, this series illuminates the myriad ways in which music is composed, performed, and perceived in the digital age. In this chapter, Japanese music technologist & developer fendoap guides us through the enigmatic realm of Feedback Delay Networks (FDNs) and their pivotal role in creating expansive reverbs and sonic environments. With an eloquent blend of understanding theory and applied practice in Gen~, we demystify the crafting of FDNs, interpreting algebraic flow diagrams, and elucidating its principles with clarity and practical insights.
This tutorial is available as a Patreon text post and a preferred .pdf document format. We request you kindly to not share Lux Cache content outside of the Patreon. Our contributors rely on your donations.
~
CONTENTS
2 : FEEDBACK DELAY NETWORKS (FDN) REVERB 3
3 : FDN REVERB BLOCK DIAGRAM 4
4 : SIMPLE FDN REVERB DESIGN 5
5 : UNDERSTANDING FND DIAGRAM AND SIGNAL FLOW IN GEN~ 6
6 : MATRIX CALCULATIONS AND HADAMARD MATRICES 11
7 : DESIGNING THE FDN REVERB WITH PRIME NUMBERS 13
8 : CREATING ROOM SIZE AND STEREO IN FDN 16
MEAN FREE PATH + SABINE CALCULATION 16
DISTANCE, SPEED, AND TIME RELATIONSHIP 18
9: OPTIMIZATION: FAST HADAMARD TRANSFORM 20
1 : WHAT IS REVERB?
Reverb is an effect that replicates reverberation. Reverberation refers to the phenomenon where numerous reflections of sound accumulate and form a cohesive whole. It's akin to having a multitude of delays grouped together. This accumulation of sound reflections in an environment, such as a room or hall, adds depth and richness to audio, making it feel more alive and spatially complex.
There are various types of reverb. FDN reverb, or Feedback Delay Network reverb, is a type of reverb created by combining delays. It leverages a network of delay lines interconnected through a feedback system, enabling a denser and more diffuse reverberation effect than simple delay lines could achieve on their own.
2 : FEEDBACK DELAY NETWORKS (FDN) REVERB
This involves a diagram representing a feedback delay. By stacking multiple feedback delays, the amount of delay increases, leading to early reflections and tail components of reverb. Early reverbs were created using this method, mimicking the complex echo patterns found in physical spaces. FDN reverb creates a more uniform delay by mixing the delays at certain points, enhancing the naturalness and smoothness of the reverb effect.
COMPONENTS OF FDN REVERB:
Matrix calculation: The heart of FDN reverb, determines how delay lines interact and feed into each other to create the reverb effect.
Input/output management: Handles the routing of audio into the network and out of it, ensuring that the effect can be applied to audio signals efficiently.
Feedback loop: A critical component that recirculates the delayed signal, allowing for the continuous build-up of reverberation.
3 : FDN REVERB BLOCK DIAGRAM
A detailed representation can be found in resources like CCRMA's FDN Reverberation. These diagrams illustrate the intricate feedback and mixing processes that underpin FDN reverb, showing how individual delay lines are interconnected through a matrix to create the effect.
Input Signal (u(n)): This is the original audio signal being fed into the system. The signal is typically a time series where 'n' represents discrete time intervals.
Scaling Factors (b1, b2, b3): These triangles represent gain blocks that scale the input signal by a factor. Each path is multiplied by a different coefficient (b1 to b3), which determines how much of the signal will be sent to each corresponding delay line.
Summation Points: These circles with "+" signs combine multiple signals into one. Here, the scaled signals and feedback from the matrix are added together to create three separate signals x1(n), x2(n), and x3(n).
Delay Lines (z^−M1, z^−M2, z^−M3): These blocks delay the signals x1(n), x2(n), and x3(n) by a specified amount. M1, M2, and M3 represent the delay times, which determine how long each signal is delayed.
Matrix (q11 to q33): This is the heart of the Feedback Delay Network (FDN). It's a matrix that mixes the delayed signals. Each element (q11, q12, etc.) determines how the output of one delay line contributes to the feedback of others.
Gain Blocks (g1, g2, g3): These adjust the levels of the feedback signals before they are fed back into the summation points at the beginning of each delay line.
Summation Point (d): This sums the outputs of the delay lines after they have been processed by the matrix.
Scaling Factors (c1, c2, c3): These further scale the outputs of the delay lines, controlling the blend of the delayed signals.
Error Function (E(z)): This block might represent an error correction or manipulation feature in the feedback loop, possibly shaping the overall frequency response or dynamics of the system.
Final Summation Point: This adds the error-corrected signal to the original input signal (or a processed version of it).
Output Signal (y(n)): This is the final output signal after it has been processed by the entire system. The output signal will have the characteristics of the reverb or other effect that the FDN is designed to create, such as echoes and decay patterns.
We’re going to go into these later.
4 : SIMPLE FDN REVERB DESIGN
Parameters for a simple FDN Reverb:
Delay line: 8. The core of the reverb, where multiple delay lines are used to generate early reflections and the reverb tail.
Parameters: decay, size, d/w (dry/wet). These parameters control the reverb's characteristics, such as how long it lasts (decay), the perceived size of the space it emulates (size), and the balance between the original dry signal and the wet reverb signal (d/w).
5 : UNDERSTANDING FND DIAGRAM AND SIGNAL FLOW IN GEN~
Understanding block diagrams is important in visualising the signal flow within an FDN reverb setup, or many audio processing procedures. This includes components like input/output structures, which direct the sound into and out of the reverb system, mathematical operations that calculate the mixing and feedback of signals, delay implementations that simulate the echo effects, and feedback loops that ensure the reverb effect persists over time,
INPUT / OUTPUT
ARROWS
This multiples the input by another value.
CIRCLES
These add signals or values to the input.
BLOCKS
This is a delay. The exponent part represents the delay time.
FEEDBACK LOOP
BIQUAD FILTER
A block diagram is included in the MAX help patch. This is a Biquad filter:
Example of implementing biquad filter in Gen~:
6 : MATRIX CALCULATIONS AND HADAMARD MATRICES
Fig. 1: The matrix shown in the signal flow FDN diagram shown earlier.
FDN reverb uses matrices for calculations, including Hadamard matrices for efficiency. An 8x8 Hadamard matrix is often used as a coefficient in these calculations, which helps in achieving a uniform and dispersed reverb sound by carefully controlling the phase and amplitude relationships between the multiple feedback delay lines.
If you write it in Gen~, it will look like this.
So let’s review the FDN Reverb again, with the components we have made in Gen~ highlighted.
7 : DESIGNING THE FDN REVERB WITH PRIME NUMBERS
To ensure a diverse and uniform delay distribution, delay times are set to prime numbers. This approach helps in creating a more natural and spacious reverb sound by minimising cyclical patterns and resonances that could occur if non-prime numbers were used, thereby enhancing the diffusion and realism of the reverb.
Delay time:701 3187 2149 4129 1801 1601 2437 877
Feedback gain: 0.95
Fig. 2: The decay times are shown in the signal flow FDN diagram shown earlier.
The time it takes for the original volume to drop to -60dB is called T60.
Even if the volume is attenuated, it will never completely go to 0, so the T60 was designed to set the attenuation time to -60dB from the original volume.
Suppose that after repeating a delay loop several times, the volume becomes 1/1000th.
For example, suppose the decay time is 3 seconds and the delay time is 1 second. At this time, the loop will go around three times.
Intuitively, the number that becomes 1/1000 when multiplied three times is 1/10.
Multiplying by 3 times is the same as raising to the 3rd power. This number per time comes out by raising the target value to the 1/3 power. The number of loops can be found by dividing the decay time by the delay time.
The implementation in gen~ is as follows:
Put the previous contents into a subpatch and replace it with the feedback gain: 0.95 part.
8 : CREATING ROOM SIZE AND STEREO IN FDN
MEAN FREE PATH + SABINE CALCULATION
The mean free path is used to estimate the average distance sound travels before encountering an obstacle in a given space. This concept is essential for simulating how sound behaves in a virtual room environment when designing our FDN reverb.
Using the Sabine Equation for Mean Free Path:
The mean free path formula derived from Sabine's equation is:
DISTANCE, SPEED, AND TIME RELATIONSHIP
The basic physical relationship of distance, speed, and time is:
Distance = Speed × Time
In the context of FDN reverb, this translates to:
We can create stereo output by adjusting prime number parameters for left and right channels respectively, and ensuring they are disjoint for a wider stereo image. This method introduces slight variations between the two channels, enriching the stereo spread and giving a more immersive listening experience.
Room Size Calculation: The room size can be modelled as a sphere where d̄ = 4V / S. Given a room size, one can derive the sphere's radius R using the room size parameter Size, using the equation R = Size / 2. This radius helps determine the delay lengths that simulate the distance sound travels in a virtual space.
Room Size and Delay Line Relationship: If 2R = Size, then R = Size / 2. The prime numbers chosen for the delay times are proportionally adjusted to fit the size of the virtual room, which is now understood in terms of the sphere's radius.
Stereo Separation: To achieve a convincing stereo reverb, different sets of prime numbers are used for the left (L) and right (R) channels. This ensures that the reflections in each ear are unique, simulating the way sound behaves in a physical environment, resulting in a more natural and immersive stereo field.
Represented in Gen~:
It is now complete:
9: OPTIMIZATION: FAST HADAMARD TRANSFORM
To speed up matrix calculations, the fast Hadamard transformation is used. This method groups similar terms to reduce the size of calculations, making the process more efficient. The computational load is decreased by simplifying the matrix operations, allowing the FDN reverb to be implemented more effectively in real-time audio processing environments.
In essence, the FHT rearranges the Hadamard matrix calculation, capitalising on the symmetry and redundancy inherent in its structure. By grouping similar terms, the algorithm reduces the overall number of multiplications required. This not only streamlines the processing but also diminishes the potential for numerical errors that can accumulate over successive operations.
Furthermore, the FHT serves as a vital tool in the real-time application of reverb effects. In live audio processing, where milliseconds count, the reduction in computational demand means that the FDN reverb can be integrated into performances and recording sessions with minimal latency. This is a boon for artists and engineers who seek to employ sophisticated audio effects on the fly, ensuring that technical limitations never hamper creativity.
CONCLUSION
This tutorial delves into the intricacies of developing an FDN (Feedback Delay Network) reverb, illuminating each facet from its foundational theory to the nuanced strategies of its implementation. At the heart of this exploration is the application of primes in determining delay times. This choice is not arbitrary; prime numbers ensure a complex, non-repetitive pattern of echoes, crucial for a reverb that aspires to the echelons of realism.
Matrix calculations manipulate the interrelationships between multiple delay lines, creating a lush soundscape that can simulate environments from the intimacy of a small room to the expanse of a grand cathedral. The intelligent design of these matrices directly affects the diffusion and decay characteristics of the reverb, thereby shaping the auditory experience.
With the implementation of algorithms such as the Fast Hadamard Transform, computational loads are minimised without compromising the quality of the effect. This consideration is particularly important in real-time audio processing, where resources are finite and latency is a formidable foe.
The versatility and power of an FDN reverb are magnified when realised through Gen~ in Max/MSP or similar environments. Gen~ offers a playground for audio developers to manipulate signals. It allows for a hands-on approach to crafting the reverb’s character, from the texture and warmth to the stereo image and beyond. Moreover, the journey through FDN reverb design is not about the output – it is also about developing the skill to recognize patterns within graphs and to navigate complex flowcharts. Each block, each connection in a signal flow diagram, tells a part of the story. Learning to decipher these visual narratives is akin to learning a language, one that offers greater insight and control over the auditory arts. Through this analytical process, one can develop a keen intuition for signal processing, leading to innovations that push the boundaries of what is possible in audio effects design.
Hopefully, the ‘AUDIO ARCHITECTURE MASTERCLASS’ series presents a systematic and imaginative approach to sound design, where choices, from minute details to broad concepts, come together to form a tool that is both practical and expressive. It translates the abstract mathematical concepts of signal processing into tangible auditory experiences, enhancing our interactions with sound.
~
fendoap is a music technologist, developer and experimental artist based in Japan. You can listen to their music on their Bandcamp page and explore their Max For Live devices on their Gumroad store.
You can follow them on Instagram: @y.o.fendoap
2024 © Whiston Digital / Lux Media | luxcache.com