Functors as generalized methods of construction in

advertisement
SOUND FUNCTORS APPLICATIONS
Jônatas Manzolli2, Adolfo Maia Jr.1,2
Mathematics Department1
Interdisciplinary Nucleus for Sound Communications (NICS)2
University of Campinas (UNICAMP) - Brazil
ABSTRACT
In this work we show that the concept of mathematical structures called Functors can
be useful to search and develop a large number of procedures and compositional
algorithms in Computer Music. We start introducing Functors, Categories and some
generalisations. It follows two applications: a functor between plane curves and
sound generating structures based on MIDI events, and a functor between C(x)
defined in a finite interval I   and the class  of Fourier Spectra A().
INTRODUCTION
It is well known that music composition is plenty of rules that could be related to
mathematical
symmetries.
An
interesting
discussion
about
it
is
presented
in
(HOFSTADTER, 1989), a study relating music, design and mathematical structures. Music
symmetries could be better understood if we study the underlined or hidden mathematical
structure, which generates them. In this work we show that, for the most cases, the intuitive
use of symmetry and associations in music can be studied and explored through the
mathematical concept of Functor.
This way of thinking is interesting, not only because it allows us to classify sound
objects mathematically but also, and perhaps more importantly, it furnishes new relations
and associations that point out to an enormous variety of sounds and composition devices. In
short, we claim that Functor, in the same way it was firstly devised in mathematics (Maclane
& Birkohoff, 1953, 1979), can be a kind of universal tool to construct mathematical models
for music composition and sound synthesis.
On the direction of applying mathematics to build sound structures there has been a
series of approaches such the use of 1/f noise fractal distribution (Voss & Clark, 1978;
Bolognesi, 1983), non-linear dynamical systems and iterated function systems
(Pressing
1988; Scipio, 1990; Gogins, 1991) and there is a study about these systems in (Manzolli,
1993a).
2
In line with these concepts, our group has worked on Computer Music and our focus is
driven to: new methods for Sound Synthesis using non-linear dynamics (Manzolli, 1993b),
algorithm composition using Markov Chain and Boundary Function (Manzolli & Maia,
1995), and development of interactive desktop and gesture interface for composition in real
time (Manzolli & Ohtsuki, 1996).
In this paper, we discuss Functors as generalised Algorithmic Compositional tools for
sound construction. It follows a section in which we introduce categories and functors,
followed by applications and the computer implementation.
CATEGORIES AND FUNCTORS
As its own name suggests, a Functor is a kind of function, but not an ordinary one.
The difference to the usual ones is that a Functor carries the underlined structures of the sets,
which is applied. These sets are called Categories. More precisely, a Category  is defined
with three kinds of data
a) A class of objects A, B, C…
b) For each pair of objects A, B   we have a set of applications (morphisms) M(A,B)
from A to B.
c) For each triple of objects A, B, C   we have a composition law for the morphisms
M(A,B)  M(B,C)  M(A,C)
(f,g)  g O f
Now, for these data we have the following axioms, which are the primary properties of these
categories:
A1) The sets of morphisms M(A,B) and M(C,D) are mutually disjoints unless A = C and
B = D.
A2) Associative Law: h(gf) = (hg)f .
A3)
Existence
of
Identity:
For
each
object
A
there
identitysuch that for any f: A and
f of and g = g.
exists
a
morphism
g: C we have
3
Usually, the theory of categories and functors are mathematically involved. Here we
use only the consequences of the above general definition and properties in order to show that
we can map underlined structures from categories of mathematical objects to structures in
categories of sound objects which undertake some formal properties from their mathematical
counterparts. There are too many examples of mathematical categories and functors. Since we
are most interested in music, in the next section we give two simple applications of the
concept of functor to be applied to sound categories.
Given two categories  and , a functor F between  and  is a map which
associates each object A   to an object F(A)  
F:   
A  F(A)
and for each morphism f  M(A,B) associates a morphism F(f)  M(F(A), F(B)) with the
properties
F(gf) = F(g) F(f)
F(1A) = 1F(A)
Observe that the functor F operates on the morphysms as well as on the elements of a
category. The properties above simply mean that a structure of the product (or composition)
between two morphisms in category  is transported for the morphisms in category  via
functor.
There are too many examples of mathematical functors. Since we are most interested
in music, in the next section we give two simple applications of the concept of functor to
sound categories.
APPLICATIONS
EXAMPLE 1 - Sequence of MIDI Events
We begin with the mathematical category  = continuous finite curves in a bounded
region U  R2. Given two curves C1, C2   we define a morphism in  as an application
f: C1  C2
x  f(x)
which means to deform C1 to C2. In other words f  M(C1 ,C2). The product gf is defined as
the composition gf = gof
4
f
g
C2
C1
C3
Figure 1. Composition of Plane Curves
Also we define  as the category of functions which control sound parameters. We use
MIDI (Music Instrument Digital Interface) parameters to define the category . So F(f) 
M(F(C1 ),F(C2)) and F(f) deforms F(C1) to F(C2). Given a curve C in , the function F(C)
  can be defined in several different ways. In this example we define F(C) as the distance
function between a fixed point in the plane to the points of the curve C. It is easy to see that
the functor property is satisfied, namely
F(g(f(C))) = F((gf)(C)) = F(g)F(f)(F(C))
C2
C1
f
F
g
F
F
F(f)
F(C1)
C3
F(g)
F(C2)
F(C3)
Figure 2. Diagram of the Functor operation
EXAMPLE 2 - Sound Synthesis
Derived from the traditional Sound Synthesis method called Waveshaping (LEBRUN, 1979),
we show an application of a functor, but in this case a kind of Transfer Function is used to
build Spectral Envelops. We take as mathematical category, a class  of smooth functions
C(x) defined in a finite interval I   and as sound category, the class  of Fourier Spectra
A() of a finite set of sounds. The function C(x) acts as a shaper of the Set of Spectra.
Starting from a fixed spectrum, which we call Input Spectrum, we use deformation of curves
as morphisms between both classes of functions. We construct the following Functor:
5
F:   
C  F(C) = C(A())
Where the parameter x = A(), with 0  x  Amax, and Amax is the maximal amplitude
considered .
The morphisms in  are deformations of smooth functions and the morphism in  can be
chosen as F(f)=f. This means that the morphisms in  can also be used as deformations on
the Set of Spectra. By the above definition of our example of functor it is easy to see that
they satisfy the property F(g) F(f) = gf = F(gf).
1
C(x)
0
Amax
Input Spectrum
A
x

0
Output Spectrum
A
F
0

Figure 3. Spectrum Functor Diagram
It is an endless work to construct examples like the above ones. Other mathematical
structures like groups, lattices, algebras, several different geometrical and topological
structures can be used as generating categories (see MACLANE 1971) for sound outputs
through a suitable choice of functors. In this sense Functors allows to construct a virtually
infinite number of sound outputs, with the additional advantage of reflecting the structure (or
symmetry in several cases) of the external mathematical category used to generate the sound
material. Musicians who work on Computer Music, aware of the properties of functors, can
expand their sound tools in a way, certainly, not yet explored by the authors of this paper,
depending on their mathematical skills which, in order to produce good results, are not
required to be too much sophisticated, added to music capability and their own aesthetic
view.
6
CONCLUSION
The use of mathematical tools in composition brings new possibilities for composers envision
the construction and development of Compositional Systems. Research in Computer Music
provides powered tools for constructing these systems. This union of artistic and
mathematical knowledge creates a framework for investigation and music production, a
environment for applying mathematics to sound structures manipulation.
Mathematical models presented here could be expanded using graphic interfaces similar
to the computational implementation we discussed. These will create new musical
performance situations making mathematical design to produce computer music instruments.
REFERENCES
Bolognesi, T. (1983). "Automatic Composition: Experiments with Self-Similar Music."
Computer
Music
Journal 7(1):25-36.
Gogins, M (1991). "Iterated Functions Systems Music." Computer Music Journal 15(1):40-48.
Hofstadter, D. R. (1989). Gödel, Escher, Bach: an eternal golden braid. Vintage Books, New York, ISBN 0394-75682-7.
LeBrun, M. (1979). "Digital Waveshaping Synthesis." Journal of the Audio Engineering Society, 27(4):250266.
MacLane, S. (1971). Categorias for the working mathematician, New York, Springer-Verlag.
MacLane, S. & G. Birkhoff (1953). A Brief Survey of Modern Algebra, New York, the MacMillan Company.
MacLane, S. & G. Birkhoff (1979). Algebra, New Yok, Macmillan Company.
Manzolli, J. (1993a). Non-linear Dynamics and Fractals as a Model for Sound Synthesis and Real Time
Composition. PhD Thesis at the University of Nottingham, England.
Manzolli, J. (1993b). "Musical Applications Derived From FracWave Sound Synthesis Method". Proceedings of
the 94th Audio Engineering Society Convention, Berlin.
Manzolli, J. & A. Maia Jr (1995). “Interactive Composition Using Markov Chain and Boundary Functions”.
Procedings of the XV Congress of the Computer Brazilian Society, II Symposium on Computer Music, Canela,
Brazil.
Manzolli, J. & W. Ohtsuki (1996). “INTERASOM: a desktop for Algorithmic Composition”. Procedings of the
XVI Congress of the Computer Brazilian Society, III Symposium on Computer Music, Recife, Brazil.
Manzolli, J. (1994). "FracWave: Non-linear Dynamics as Timbral Constructs". Anais do XIV Congresso da
Sociedade Brasileira de Computação, I Simpósio Brasileiro de Computação e Música, Caxambú - Brasil.
Pressing, J. (1988). "Non-linear Maps as Generators of Musical Design." Computer Music Journal 12(2):35-45.
Rowe, R. (1993). Interactive Music Systems. MIT Press, Cambridge, Massachussetts, ISBN 0-262-18149-5.
Scipio, A. (1990). "Composition by Exploring of Non-linear Dynamic Systems" Proceedings of the 1991
International Computer Music Conference.
Voss, R. F. & J. Clarke, (1978). "1/f noise music: Music from 1/f noise". Journal of the Acoustical Society of
America 63(1):258-263.
7
ACKNOWLEDGMENT
We thank Prof. Raul do Valle for fruitful discussions and the Foundation for Research
of State of São Paulo - FAPESP for supporting this work.
8
Download