Content uploaded by Regis Rossi Alves Faria
Author content
All content in this area was uploaded by Regis Rossi Alves Faria on Oct 22, 2019
Content may be subject to copyright.
Digital Design of Audio Signal Processing Using Time Delay
Mauricio Perez1, Rodolfo Coelho de Souza1,2*, Regis Rossi Alves Faria1,3*
1 Escola de Comunicações e Artes, Universidade de São Paulo
Av. Prof. Lúcio Martins Rodrigues, 443 – 05508-020, São Paulo, SP
2 Departamento de Música da FFCLRP, Universidade de São Paulo
Rua Maria M. C. Teles, s/n – 14040-900, Ribeirão Preto, SP
3 Escola de Artes, Ciências e Humanidades, Universidade de São Paulo
Rua Arlindo Bettio, 1000 – 03828-000, São Paulo, SP
mperez@usp.br, rcoelho@usp.br, regis@usp.br
Abstract
This poster describes the design in PureData of some audio
signals processes in real time like delay, echo, reverb,
chorus, flanger e phaser. We analyze the technical
characteristics of each process and the psychoacoustic
effects produced by them in human perception and audio
applications. A deeper comprehension of the
consequences of sound processes based on delay lines
helps the decision-making in professional audio
applications such as the audio recording, mixing, besides
music composition that employs sound effects in pre-
processed or real-time.*
1. Introduction
The technique of time delay is simple and versatile.
It is often used in audio signal processing for fixing a large
set of technical problems, e.g. problems of sound diffusion
in concert halls, or it is applied to audio effects that expand
the capabilities of acoustic instruments, modifying and
creating new timbres for the purpose of music
composition.
In this poster, we chose to explore this second trend.
Notice that, from the psychoacoustic standpoint, effects
based of time delay are related to how the human hearing
apparatus receives and interprets the delayed signals. We
may understand them as repetitions, some feature of the
acoustic space or as the timbre that results from
transformations in the spectral dominium.
The first uses in music of sound effects based on
time delay goes back to the 1940’s. They were delay
effects and short echoes that used tape loops in magnetic
sound recorders. The procedure was called tape delays.
The amount of the time delay was ruled by the distance
between the reading and recording heads of the devices.
This loop arrangement might generate an echo effect that
could apply one or many repetitions of the signal to be
added to the original signal on another recording device.
Until the decade of 1970’s this was the basic configuration
for an echo system.
As only the digital domain concerns us here, time
delay effects can be implemented using a function called
* Supported by CNPq
digital delay line. According to Roads (1996, p.433), this
delay type consists in “a data structure called a circular
queue” in which a list of memory locations, disposed
sequentially in the computer’s memory, stores the
numerical representation of audio samples.
2. Implementation of delay lines in PureData
The design of delay lines using the software
PureData (Pd) (Puckette, 2006) can be implemented using
the objects [delwrite~] and [delread~]. The first object is
responsible for creating the circular buffer, as cited above,
containing the audio samples, whereas the second object
reads and reproduces them. Both objects receive two
arguments on the right side. The first argument of
[delwrite~] is the location that stores the buffer and the
second stores the time of the buffer.
Roads (1996) remind us about the difference
between two types of delay lines: those that use a fixed
time of delay and those that use a variable time of delay.
The difference is that unities of fixed delay time do not
change their time of delay while they process the sound.
However, in a unity of variable time of delay, this time can
be changed at any moment by varying the reading pointers
at each sample period. These two types of delay are also
inherent to specific temporal processes. The first case, of
unities of fixed time of delay, we can find in the most
common processes of delay, as delay properly, echo and
reverb when generated by delay lines. The second case is
used in processes like chorus, flanger and phaser.
Therefore, we will start demonstrating the implementation
that uses lines of fixed delay time, followed by those that
use variable delay lines.
3. Efects with fixed delay lines: delay, echo and
reverb
According to Roads (1996, p.435) fixed delay lines
can be arranged in three categories with specific interval
times which correspond to three categories of perceptual
effects to the human hearing. These three interval times
are: short interval times (up to 10 ms), medium interval
times (from 10 ms to 50 ms) and large interval times
(larger than 50 ms). Short interval times are perceived
mainly in the frequency domain as artifacts added to the
original signal. When a delay line operates between 0,1
and 10 ms, it generates a comb filter effect that can
reinforce frequencies of the original signal. Medium
interval times are perceived as an ambience created around
the original sound. This means that the signal is amplified
by the sum of the original signal with other signals
generated by the delay line. Therefore, the loudness of the
original signal seems to increase. Finally, delay lines with
large delay times generate a perception of sequential
repetitions of the original signal. They correspond to larger
spaces with more and distinct reflections.
We will deal now with the design of many delay
lines to create the effects of echo and reverb. These effects
can be created with an algorithm that generates a
mechanism of feedback of the original signal into the unity
of delay processing.
This way, with specific combinations between
delay times and feedback gains we may implement
different time processes based on fixed delay lines, as
those described above, and as shown on Table 1.
Effect
delay time
feedback gain
comb filter
1-10 ms
0,9
loudness boost
10 - 50 ms
0,5 - 0,3
short echo
50 ms
0,7
large echo
100 ms
0,7 - 0,95
short reverb
100 ms
0,3
large reverb
150 ms
0,5
Table 1: Effects based on delay time and feedback gain
The sonograms of Figures 1A to 1C, produced with
the software Spek with audio samples in ‘.wav’ format,
mono/44100/32 bits, represent the spectral analysis of
different processes applied to a sound sample according to
the parameters of Table 1. They allow us to visualize the
differences between these processes.
Figure 1A: Original sound
Figure 1B: Comb filter
Figure 1C: Large echo
4. Effects with variable delay lines: chorus, flanger
and phaser
As mentioned earlier, variable delay lines allow the
change of the delay time while the audio signal is
processed by the delay unity. This allows the creation of
other effects based in delay lines: chorus, flanger and
phaser. When we say that a delay line is variable, we are
describing a unity of signal processing that has some
element that varies constantly. In this case, what varies is
the duration of the delay time. It can oscillate between a
maximum and a minimum value. A low frequency
oscillator (LFO) can implement this kind of effect. The
LFO is used to control the delay time. Figure 2 shows an
implementation of this model in Pure Data.
Figure 2: Model of variable delay with feedback
Based in this model of variable delay we can
implement some kinds of effects. These effects have in
common that same variable delay unity. However, each of
them has some special features. One of these features is
related to the variation of the delay time. In the case of
chorus, for instance, this variation has to be set between 10
and 30 ms. In the case of flanger, the variation can occur
between 1 and 20 ms, and in the case of phaser the LFO
may vary from 1 to 10 ms.
In the sonograms in Figures 3A and 3B, we may
visualize – mainly looking at the spectral content – the
different patterns produced in the resulting sound signal by
each of these different processes of time delay using
variable delay lines. A clear distinction between these
processes and the processes with fixed delay lines is that
their main characteristic concerns changes in the
temporal/morphological domain of the sound signal,
except maybe in relation to the comb filter effect.
Figure 3A: Phaser
Figure 3B: Flanger
5. Conclusions
The understanding of the different types of signal
processing, generated by fixed or variable delay lines,
enhances the decision making process in situations when
we face professional audio problems, from technical or
aesthetical points of view. This can happen in a simple
sound recording session, in an audio mixing station, or
during the composition of an electroacoustic music that
employs pre-processed or real-time sound effects.
It can be quite useful being able to differentiate
between the results of processes such as comb filter,
phaser and chorus. These effects result from delays that
generate time displacement between their repetitions. This
causes changes in the harmonic spectrum. The awareness
of time elements can be useful in many situations, for
instance in room reverberation, identification of obstacles
in sound trajectory or recognizing phase cancelation in a
recorded sound.
Therefore, in these cases, acknowledging the time
prevalence in the situation can help the decision making to
avoid attention only to the frequency domain, what can
lead the sound engineer to use, for instance, a frequency
filter to change the spectrum involuntarily. Indeed, we may
create desirable effects with other strategies, like setting a
short time displacement between similar tracks, as we use
to do in voice or instrumental unison doubling. The result
is an enlarged sound ambience and reinforcement of
harmonic partials produced by constructive interference.
Similarly, we must be aware of changes in the
spectrum domain generated by basic effects as reverbs and
simple delays, as generated by delay lines, because they
may be desirable or not. The superposition of repeated
sound materials usually produces reinforcement of certain
frequencies, generating an effect aesthetically desirable or
just distortion. Our experience tells that this situation can
happen when recording in a room with large reverberation.
For the performer the sound seems nice but the signal for
microphone caption can already be saturated at the source.
These experiments also demonstrate that the
human perception of delays shows a double standard.
Delays larger than 50 ms are interpreted by our brain as
isolated repetitions while shorter delays just change certain
frequency components of a single sound event.
What has been presented in this paper was a
reasoning for the implementation of many types of signal
processing with time delays. The kind of reasoning used
was based in the creation of delay lines by digital means.
This way we emphasize that there is not a single way to
implement these processes, even digitally or using
individual delay lines without feedback. The
implementation with delay lines, in a digital environment,
helped didactically the understanding of how are produced
and how we perceive the effects based on time delays and
that use less resources of digital processing.
References
Mauricio di Berardino. Muselectron: Tutorial su
PureData, Max/MSP e Axoloti. Available at:
https://muselectron.blogspot.com.br/p/pure-data.html
Accessed in April of 2019.
Miller S. Puckette. The Theory and Technique of
Electronic Music. World Scientific Publishing. 2006.
Jean-Michel Réveillac. Musical Sound Effects: Analog
and Digital Sound Processing. Iste Editions, 2018.
Curtis Roads. The Computer Music Tutorial. The MIT
Press, 1996.