<instrument id=’ins1’ synth=’add’ f0=’440’>
<overtones>
<overtone freq=’1’ phase=’0’ amp=’1’/>
<overtone freq=’2’ phase=’0’ amp=’0.2’/>
<overtone freq=’3’ phase=’0’ amp=’0.2’/>
<overtone freq=’4’ phase=’0’ amp=’0.2’/>
</overtones>
<envelope length=’200’ finite=’true’>
...
</envelope>
</instrument>
Figure 5: An instrument described by means of XML.
The example in Figure 3 corresponds to a fundamen-
tal frequency f
0
= 440 Hz introduced by pressing sen-
sor 2, and an amplitude of 0.2 for the Fourier coeffi-
cients b
k
= a
k
= 0.2, k = 1, 2, 3 (sensor 1). The am-
plitude of the composite signal is fixed by sensor 3 to
0.5.
The application provides two kinds of output: the
sound output of the synthesis algorithms and a text-
based descriptive model. The sound allows the stu-
dents test in real-time the effect that the Fourier Series
parameters have in the synthesised signal.
The text-based descriptive model consists in en-
riching alternative way of storing music information.
This has been done using XML. It seems a good so-
lution because XML documents can be parsed with-
out difficulty, thus simplifying a possible port to other
platforms. For our purpose, we have studied the
most widely supported format, called MusicXML. It
is mainly aimed at constructing staff notation repre-
sentations, that could be played back by any MIDI
enabled device. Due to the nature of MIDI, that rests
upon a finite number of sound banks, referred to as in-
struments, and there is no room for synthesis param-
eters. We have therefore opted for a different XML
format tailored to suit this project’s specifications, in-
cluding dynamic timbre changes, as well as pitch and
velocity.
Figure 5 shows part of the XML representation
of the additive synthesis parameters given in Figure
3. For the sake of simplicity, envelope configuration
has been omitted. When the performance starts, the
<instrument> tag will be generated. The instrument
description will be followed by a series of tags de-
scribing any change that takes place to the original
parameters, containing a timestamp.
4 AN EXPERIENCE
In the current academic year (2010-2011), we have
used electronic instruments to explain the applicabil-
ity of the Fourier Series. The experience has consisted
in explaining how to generate music using the additive
synthesis method described in subsection 2.3. Change
the sensors parameters, the student have tested the ef-
fect of varying the Foruier serie parameters: funda-
mental frequency, amplitude of harmonic and ampli-
tude of the final wave.
We have evaluated the interest of our students in
this experience by means of a survey containing three
questions:
• Question 1. Did you known that the Fourier Series
can be used to generate music?
• Question 2. Would like you create your own elec-
tronic instrument?
• Question 3. What do you think about the presen-
tation?
There were 12 students in the course. Figure 6
shows the results of the survey. It seems that the
students have positively evaluated the fact of using
an electronic instrument to illustrate the concept of
the Fourier Series. For this reason, in the following
academic years, we will propose a laboratory activ-
ity where students must design their own electronic
music instruments.
5 CONCLUSIONS AND FURTHER
WORK
In this paper, we have explained the steps followed
to build a sensor-based electronic instrument by inte-
grating the open-source Arduino tools and low cost
sensors. The system that has been implemented is
characterized by its modularity and its innovative fo-
cus towards dynamic timbre features. We hope that
its utilization in courses of signal processing can help
the students to understand some important concepts,
like the Fourier Series, because the students can ex-
periment directly with hardware and software which
is always more enriching that mere computer simula-
tions. Besides, no proprietary software is needed, and
the hardware used has a very low cost.
Some improvements on the work presented here
are possible. First, implementing synthesis tech-
niques other than additive synthesis is one of the goals
envisioned by the authors in the short-term. Second,
testing other kinds of sensors, such as gyroscopes or
artificial vision could be a source of much innovation
with regards to the user-system interaction. Besides,
using wireless technologies (such as Bluetooth) can
make the interaction more natural. Finally, we have
INTEGRATING A SIMPLE SENSOR-BASED TESTBED IN SIGNAL PROCESSING COURSES - A Recipe to Design
an Electronic Instrument
91