You are on page 1of 5

Granular synthesis and spatialisation in the Pure Data environment

OSCAR PABLO DI LISCIA


Programa de Investigación “Sistemas Temporales y Síntesis Espacial en el Arte Sonoro”, Escuela
Universitaria de Artes, Universidad Nacional de Quilmes
Roque Saenz Peña 352
Bernal, Argentina, B1876BXD
odiliscia@unq.edu.ar

Abstract GS can be refined in many different ways and


allows the production of very complex and rich
This paper describes the design and some particular
applications in granular synthesis and spatialisation of a sonic events. Among the many interesting
Pure Data external developed by the author. It was features of GS, it is worth mentioning its
developed with the collaboration of Damián Anache and capability to produce smooth transformations of
Esteban Calcagno as a part of the research program individual sonic event sequences into swarms
“Sistemas Temporales y Síntesis Espacial en el Arte of sounds (sonic objects) and textures or vice
Sonoro” (UNQ, 2015-2019). The external offers all the versa. The use of GS on electro acoustic and
capabilities of GS synthesis with full 3D control of the audio visual creation is very well known and
location of each grain through the Ambisonic technique. widely documented (see, among others, Roads,
The general approach of its design is to use audio signals 2004 [13], Batty et al, 2013 [1], Del Campo,
stored on a “pool” of tables as sources for both the grains 2011 [5]), as well as electronic works by many
and the amplitude envelopes, allowing several shuffling composers. The works by Barry Truax and
effects and synthesis/sequencing by concatenation. Horacio Vaggione are referred to in Roads’s
Microsound ([13] pp.235) as those which
Keywords explore extensively many of the possibilities of
Sound Synthesis, Sound Spatialisation, Ambisonics, GS synthesis since approximately 1970. Many
Granular Synthesis. works by the composer Juan Pampin combine
GS and sound concatenation using high
resolution spectral analysis, audio descriptors,
1 Introduction
and sound spatialisation most effectively, to
Generally speaking, Granular Synthesis (from here mention just one of the many recent
on abbreviated as GS) is a technique based on the applications of this technique in sonic creation
juxtaposition of small portions (called grains) of a (See, for example, a line (2015, [12]) ).
source audio signal. In a typical GS application, the
user is allowed to set (and eventually change over 2 The my_grainer~ external
time) several parameters of a grain sequence, the most
common of which are: duration, temporal gap, source The my_grainer~ external1 offers all the
audio signal, amplitude function, peak amplitude, and capabilities of GS synthesis with full 3D control
pitch shifting. of the location of each grain through the
There are many excellent GS computer applications, Ambisonic spatialisation technique (see below).
either as standalone programs or as dedicated It was developed by Pablo Di Liscia with the
modules, some of the most important being the GS collaboration of Damián Anache and Esteban
Opcodes for Csound (Specially Granule and Calcagno as a part of the research program
Partikkel, [2], [7], [16]), the GS units for “Sistemas Temporales y Síntesis Espacial en el
SuperCollider ([15], see also Del Campo 2011 [5]) Arte Sonoro” (Universidad Nacional de
and several external and abstractions for Pure Data Quilmes, 2015).
([11]). Of the latter, the most complete and powerful is The general approach of my_grainer~ is to use
disis_munger~ ([3]), which is based on Dan audio signals stored on a “pool” of tables
Trueman's munger~. Of the many GS standalone (maximal, 24 of them, at present) as source for
programs available, one of the most powerful and both the grains and their amplitude envelopes.
versatile is HourGlass ([17]). There are also many GS The user is responsible for the creation of the
software units in the form of Plug-ins (such as VST, tables, which can be done by either reading
JSFX, or any other format) to be used on Digital
1 http://puredata.info/Members/pdiliscia/grainer/gr
Audio Workstations.
ainer.zip/view (Last access: 09/2016)
preexistent sound files, or using signals created “on- sequences of individual sonic events with
the-fly” by synthesis methods or obtained from real- statistically controlled time gaps on textures or
time audio input. The strategy of using tables instead granulated sounds.
of a signal input as the audio grain sources was e-A combination of the b and d possibilities is
selected in order to allow shuffling effects using also possible, allowing random deviations of
several different audio sources. The user is allowed to the discrete gap values.
set the audio source and the amplitude envelope tables A comprehensive Tutorial on GS using
for the next grain to be synthesized by means of a my_grainer~ is being developed by Damian
message. A new message may either force the same Anache2 and a Pure Data patch called
table to be overwritten with a different audio content GRAINER_DINAMICS was developed by
or to set a different table for the next audio grain to be Esteban Calcagno3 in order to allow the
synthesized. There is also the possibility of alternating automation of the parameters of my_grainer~
different audio tables as audio sources and/or through editable functions stored in tables, so
amplitude envelopes out of the set of different table that the users may store and retrieve very
names given to the external. complex simultaneous sequences of parameter
The choices for the grain duration, temporal gap, peak changes.
amplitude, audio starting and ending read point on the Finally, it should be noted that some features of
table, pitch transposing and/or warping, and spatial the external were also designed taking in
location (azimuth angle, elevation angle and distance) account its possible use on concatenative
are handled by methods that allow the setting of a synthesis. As noted by Diemo Schwarz
base value and a random deviation. There is also the (Schwarz, 2005 [14]): GS can be seen as
possibility of setting the grain duration, temporal gap, rudimentarily datadriven, but there is no
source audio table, starting read point and pitch analysis, the unit size is determined arbitrarily,
transposition by means of a random selection out of a and the selection is limited to choosing the
set of discrete numeric values stored in lists. The position in one sound file. However, its concept
probability distribution function of the random of exploring a sound interactively could be
selection is uniform, but non uniform biases may be combined with a pre-analysis of the data and
achieved including several repeated values in the list, thus enriched by a targeted selection and the
increasing the likelihood of their occurrence. If the resulting control over the output sound
grain duration exceeds the time span determined by characteristics, i.e. where to pick the grains
the read and end points of the audio table, the user that satisfy the wanted sound characteristics.
may choose to use three types of loops (no loop, As my_grainer~ can also receive and use a list
forward loop or forward-backward loop). of pairs of starting times (in the audio table in
The parameters for each grain (with the exception of use) and durations for the grains, it may be
pitch warping) are invariant over its duration, which useful to achieve a sort of concatenative
means that any change will be taken into account for synthesis as well. Each start/duration pair is
the next grains to be synthesized. Most parameters chosen at random out of the list, which could be
may be changed with a precise control for each one of made up of data coming from a pre-analysis
the grains. As an example of this, the time gap and may even be updated by data coming from
between the grains can be set in five different ways: real time audio input being analyzed.
a-Simply setting a base value in seconds without
any random deviation. This is usually referred to as 3 Granular synthesis and spatialisation
synchronous GS (in GS terminology). using my_grainer~
b-Simply setting the range of a random deviation in
my_grainer~ was specially developed to
seconds and setting the base value to zero. This is
experiment on GS spatialisation. This poses
usually referred to as asynchronous GS (in GS
some issues that should be taken into account.
terminology).
If a non overlapping sequence of grains is
c-A combination of the b and c possibilities will
produced by a GS synthesis unit, each of the
produce a more controllable asynchronous GS.
grains could be individually processed by
d-Setting a list of discrete gap times which will be
spatialisation units that are independent of the
chosen at random for each grain, to produce
asynchronous GS and to explore the potential of “time
2 http://puredata.info/Members/pdiliscia/grainer/m
fields”. In this case, the value previously set on a (if y_grainer_Tutorial_by_Damian_Anache.zip/vie
any) will be disregarded. As this list can be changed w (Last access: 09/2016)
by successive messages, this can also prove useful in
3 http://www.mediafire.com/GRAINER_DINAMI
order to produce gradual transformations from
CS.zip (Last access: 09/2016)
GS unit (still, there is the problem of accurate Pablo Cetta for Pure Data may be an excellent
synchronization of each grain with a time-dependent choice for that purpose (see Cetta [4]).
spatial location). However, if the grains overlaps, an If an individual spatial treatment of the grains is
individual spatial location of each one is clearly not desired, the Ambisonic output of my_grainer~
feasible unless it is achieved from inside the GS unit. may be very effectively used, but it must be
This has the drawback that the spatialisation technique noted that both Intensity Panning and
used may not be freely chosen by the user. It is Ambisonic are angular location techniques. It is
feasible to produce a GS unit capable of performing also important to stress the fact that, as intensity
internally several individual spatialisation techniques panning uses the IID cue (Interaural Intensity
(such as Intensity Panning, VBAP, Ambisonics, WFS, Difference), it may be used to produce gradual
etc.), but some tradeoff between capabilities and changes in the azimuth angle, but not in the
efficiency must be taken in account. That is the reason elevation angle of the spatial position of a
for which my_grainer~ was developed to produce virtual sound source, while Ambisonics may be
mono, stereo (intensity panning), quad (Ambisonic B used for both, azimuth and elevation location.
Format First Order), nine channel (Ambisonic B The distance simulation of my_grainer~ is
Format Second Order) or sixteen channel (Ambisonic achieved by scaling the amplitude of each grain
B Format Third Order) outputs. Ambisonics is a by the inverse of a distance value that may also
technique that provides robust, versatile, and have a random deviation. Each grain may also
standarized 3D spatialisation. It is widely used and be delayed by a duration computed taking into
documented (See Gerzon [6] and Malham [10]). account the virtual source distance and a sound
Despite its perceptual effectiveness (which may speed value provided by the user. Within closed
improved using high order encoding), perhaps the environments, the ratio between the direct and
most valuable of its features is that it provides a way reverberated signals and the time alignment
of keeping and transmitting both the audio signals and between the direct and the reverberated signals
their spatial characteristics in such a way that the are both simple, but perceptually effective
composer can think of spatial features independently distance cues. These may be easily obtained by
of the number of channels that will be available on a feeding the input of a reverberation unit with an
particular performing situation. Another interesting output signal of my_grainer~ with neither of
feature of Ambisonics is the set of operations of field the amplitude/time cues aforementioned
manipulation (which includes rotation, tilt, tumble, (which is always provided in the rightmost
dominance and mirroring) that can be performed on outlet).
its standard formats with relatively simple equations. Curtis Roads ([13], pp. 221) deals with the
my_grainer~ may produce mono, stereo (intensity spatialisation of sound particles through two
panning), quad, nine channel or sixteen channel approaches: one consisting of the simulation of
outputs. The quad, nine channel and sixteen channel virtual spaces and sources, and the other
outputs consist respectively of the four (W, X, Y, Z) or consisting of several particle modulations. In
the nine (W, X, Y, Z, R, S, T, U, V) or the sixteen (W, what follows the latest will not be commented
X, Y, Z, R, S, T, U, V, K, L, M, N, L, O, P, Q) encoded because it exceeds the scope of this paper. The
signals of an Ambisonic B first, second or third order former includes what Roads calls: “scattering
format, which must be further decoded by the user for particles in virtual spaces” and “per grain
the available number of channels/loudspeakers of the reverberation”. The capacities of my_grainer~
system using appropriate externals or abstractions. For already described show clearly that it allows
the Pure Data environment, an excellent choice would both full 3D spatial movement of virtual
be the HOA Library (see Hum [8]). An extra sources, as well as morphing of the dimensions
(rightmost) signal outlet is always created to deliver a of sound clouds formed by small quanta of
reverberation send signal which can be used in spatially spread sound.
distance cues simulation (see below). From the wide number of relations that may be
The user may spatialise a complete stream of grains drawn between sound structure and sound
by feeding the input of ad hoc externals or spatial quality, another interesting possibility
abstractions already available for that purpose using for which my_grainer~ was initially designed is
the mono output of my_grainer~. Some externals to work on the disruption of the spatial image of
and/or abstractions that generate 3D trajectories based virtual or acoustic sources, as described by
on equations of specially relevant curves (such as Gary Kendall (2009 [9]). Essentially, Kendall
Lissajous, Spirals, Hypothrochoids, Epithrochoids, states that the spatial treatment of sound in
etc.) may be used to drive the spatial location of a electro acoustic music makes possible an
stream of grains. The set of abstractions developed by interplay with -among other features- the
perceptual grouping of the sonic events. This may be [4] Pablo Cetta: “Trayectorias espaciales a
achieved through the gradual modification of a GS partir de curvas notables”. Ideas Sónicas,
stream in order to produce the sensation of listening CMMAS (Centro Mexicano para la Música y
either to a single sound source with a variable spatial las Artes Sonoras), Morelia, México.
width, a spatially granulated texture or a group of http://sonicideas.org/info.php?vol=8&num=
individual sound sources with or without coherent 16&secc=notes (Last access: 09/2016)
sound images. In summary, the use of the GS
[5] Alberto Del Campo: “Microsound”, In Scott
Techniques (time-domain decomposition and
Wilson, David Cottle, and Nick Collins: The
recomposition) combined with the spatialisation
SuperCollider Book, The MIT Press, London,
techniques may allow the production of sound images
UK. pp. 463-504, 2011.
which have not only interesting timbral qualities but
also surprising and even paradoxical spatial features. [6] M. A. Gerzon: “Periphony: With-height
Sound Reproduction”, Journal of the Audio
4 Conclusions Engineering Society, vol. 21, N° 1, pp. 2-10,
my_grainer~ is an external that extends the 1973.
possibilities of GS offering features that are not [7] Joaquim Heintz et al: Csound FLOSS
present in other existing abstractions/externals in the Manual.
Pure Data programming environment, specially in the http://write.flossmanuals.net/csound/f-granul
spatial treatment of sound. Since the external is in ar-synthesis/ (Last access: 09/2016)
continuous development, its code may be further
improved in order to speed up its performance. The [8] Dionys Hum: HOA Library.
external was tested in several performance situations http://www.mshparisnord.fr/hoalibrary/en/do
showing robustness and efficiency and will allow wnloads/puredata/ (Last access: 09/2016)
composers to explore and experiment with spatial GS [9] Gary Kendall: "La interpretación de la
extensively. Some features of the external were also espacialización electroacústica: atributos
designed taking into account its possible use on espaciales y esquemas auditivos”. Gustavo
concatenative synthesis, also combined with Basso, Oscar Pablo Di Liscia y Juan Pampin
spatialisation, which may be one of the future lines of (Eds.). Música y espacio: ciencia, tecnología
development. y estética. Bernal: Editorial de la Universidad
Nacional de Quilmes, pp.241-259, 2009.
5 Acknowledgements
[10] Dave Malham: “El espacio acústico
Our thanks go to the Universidad Nacional de tridimensional y su simulación por medio de
Quilmes, Buenos Aires, Argentina for supporting the Ambisonics”. Gustavo Basso, Oscar Pablo
Research Program in which this development is being Di Liscia y Juan Pampin (Eds.). Música y
accomplished. espacio: ciencia, tecnología y estética.
Bernal: Editorial de la Universidad Nacional
References de Quilmes. pp 161-201, 2009.
[1] J. Batty, K. Horn and S. Greuter : Audiovisual [11] Nick Mariette: Some Granular Synthesis
granular synthesis: micro relationships between Implementations In Pd.
sound and image. Proceedings of The 9th https://puredata.info/Members/nmariette/gran
Australasian Conference on Interactive ular-implementations/?searchterm=Syncgrain
Entertainment: Matters of Life and Death, (p. 8), ~%20Synchronous%20Granular%20Synthes
ACM, Australia, 2013. is (Last access: 09/2016)
[2] Oeyvind Brandtsegg: Applications using the [12] Juan Pampin: A line.
partikkel opcode. https://dxarts.washington.edu/creative-work/
http://oeyvind.teks.no/results/applications/partikkela line (Last access: 09/2016)
pplications.htm (Last access: 09/2016) [13]C. Roads: Microsound, The MIT Press,
[3] Ivica Ico Bukvic et al: disis_munger~ (a.k.a. England, 2004.
munger1~) source code, binaries and
[14] Diemo Schwarz: "Current research in
documentation.
concatenative sound synthesis". Proceedings
https://github.com/gilbertohasnofb/pd-abstractions-
of the International Computer Music
and-libraries/tree/master/disis_munger~ (Last
Conference (ICMC), Barcelona, Spain,
access: 09/2016)
September 5-9, 2005.
[15] SuperCollider 3.8dev Documentation: [17] Xenakios: HourGlass granulator
http://doc.sccode.org/Classes/GrainBuf.html download
http://doc.sccode.org/Classes/GrainFM.html page.https://xenakios.wordpress.com/2012/0
http://doc.sccode.org/Classes/GrainIn.html 4/29/hourglass-1-0-1-released/ (Last access:
http://doc.sccode.org/Classes/GrainSin.html 09/2016)
(Last access: 09/2016)
[16] Barry Vercoe et al: The Canonnical Csound
Reference Manual.
http://www.csounds.com/manual/html/SiggenGranu
lar.html (Last access: 09/2016)

You might also like