Proc. of the 15th International Symposium on CMMR, Online, Nov. 15-19, 2021

Continuous Parameter Control Using an On/Off Sensor
in the Augmented Handheld Triangle
Marcio Albano H. Ferreira, Tiago F. Tavares
School of Electric and Computer Engineering - University of Campinas (UNICAMP) - Brazil
marcio.ahf@gmail.com, tiagoft@gmail.com

Abstract. We present Triaume, a handheld augmented non-pitched percussive
musical instrument based on the triangle. Our proposal relies on a capacitive
thumb sensor, which allows controlling digital musical devices while preserving
the possibility of playing the instrument’s traditional techniques. We reduce theaugmentation invasiveness by using an external smartphone to emulate faders related to the instrument’s configurations. Triaume’s interaction proposals are built
from idiomatic techniques used in regional Brazilian music genres. We can use
the sensor as an on/off button that can, either on touch or release, trigger preprogrammed percussive sounds that can be played together with the triangle’s
acoustic sound. Also, we use a low-pass filter to convert the digital sensor’s acquisitions to a continuous value, allowing expressive synthesis control. Triaume
can be used in avant-garde music, and its interaction design favors its use in variations of traditional music.
Keywords: Triangle, Capacitive sensor,Pulse Width Modulation (PWM),Augmented
instrument, Brazilian music

1

Introduction

Traditional music instruments can be augmented with electronic sensors, which can acquire signals to control devices like synthesizers and effect processors. These sensors
usually exploit the so-called spare bandwidth [1] , that is, movements or limbs that are
not used in the traditional playing techniques and, therefore, can be used for other purposes. Augmented instruments can provide new expressive possibilities when comparedto their traditional counterparts.
This work presents an augmentation proposal for the triangle, a handheld nonpitched percussion instrument traditionally used in several regional Brazilian music
genres such as Forró, Xote, and Baião [2] . The acoustic triangle is usually held with
one hand using the index finger and played with the other hand using a metal mallet.
The instrument’s sound can be damped by closing the holding hand’s palm around thetriangle’s side.
Our augmentation proposal uses a single capacitive sensor [3], [4], [5], [6], [7], [8]placed on the instrument’s upper corner. The sensor is isolated from the instrument’s
body and is activated with the holding hand’s thumb independently of the damping
or mallet striking actions. This placement allows an interplay between the traditional
techniques and the augmented possibilities.

11Proc. of the 15th International Symposium on CMMR, Online, Nov. 15-19, 2021

This minimalistic augmentation barely impacts the use of the traditional techniques
but brings other challenges of its own. The first one is to allow the musician to configure
the instrument’s parameters during performance without bringing a computer to thestage. We mitigate this problem using a smartphone, which provides all necessary faders
for this configuration. The second challenge is to provide a diversity of interactions thatcan be creatively explored.
To tackle this challenge, we use mapping strategies inspired in the common (even
if not traditional) technique of playing other instruments, such as hi-hats (triggeredwith a pedal), or sets of cowbells or carillons [9], [10], together with the triangle inBrazilian regional music. In our proposal, we investigate the possibilities of triggering
events on sensor touch or on sensor release, inspired by the damp (close hand) andrelease (open hand) gestures typically used in Forró music. They can be used to playvirtual instruments, in special percussive sounds, allowing the musician to play withmore instrumental layers.
Additional control possibilities can arise from encoding the sensor information
through time [11] . In our proposal, we use a low-pass filtering technique to convert
a sequence of on/off acquisitions to a continuous control signal, similarly to a Pulse
Width Modulation motor control [12], [13] . This allows using the capacitive sensor as
an interactive fader that can be controlled using rhythm.

2Instrument Design

The triangle augmentation consists of three blocks, as shown in Figure 1. The first is
Triaume itself, which is a regular acoustic triangle with an attached capacitive sensor
and an ESP32 microcontroller [14]. The second is a smartphone that runs a MobMuPlat [15] patch and controls the digital configurations. Both of these blocks send OpenSound Control (OSC) [16] packets to the third one, a computer that executes soundsynthesis and control in a Pure data (Pd) patch [17]. Each of these blocks is discussed
next.
2.1

Triaume Body

The augmented triangle has one single sensor, which is a capacitive sensor attachedto the triangle’s upper corner. As shown in Figure 2 , the sensor is isolated from the
instrument’s body using insulating tape. A distance was kept between the insulated
tape covered area and the region that is normally stroke by the triangle mallet when
applying techniques used in the context of Brazilian music. Mounting the sensor close
to the triangle’s tip reduces the sensor’s impact on the sound’s quality.
We used the Capacitive Sensor library created by Paul Badger [18], [19], whichallows to build high sensitivity sensors using only a resistor, a microcontroller, and anelectrode, which can be made of any conductive material. Our electrode was made using
copper tape and it was connected to a 1MΩ resistor, linked to one of the ESP32 pins.
The library continually yields capacitance readings, which are disturbed by touching
the copper tape.

12

Proc. of the 15th International Symposium on CMMR, Online, Nov. 15-19, 2021

Fig. 1. System overview. The computer receives OSC packets both from the Triaume and from asmartphone.

Both the sensor type and microcontroller model are chosen based on the idea ofdeveloping a low-cost instrument since the acquisition of imported products in Brazil
is expensive due to taxes. In some cases, the final cost of imported products can reacheven twice the value of the original cost. [20]. Therefore, using low-cost components isdesirable for allowing easy access to the instrument.
The microcontroller is attached to the musician’s body, reducing its impact on the
instrument’s sound and playability. It sends the measured capacitance values to thecomputer using OSC packets, which can use a RS-232 connection with serial line internet protocol (SLIP) [21] or UDP packages over a Wi-Fi connection. The RS-232
connection provides a lower delay, but requires a connection cable; conversely, the WiFi connection allows a greater mobility for the musician, but tends to have longer andmore unstable delays [22]. This simple setup is barely invasive to the instrument but
requires an additional device to provide configuration faders for performance usage, as
described next.
2.2

Smartphone

It is often desirable that control-to-sound mapping proposals allow on-site adjustments,
either during soundcheck or to change sonorities in different parts of a performance.
Our system provides this functionality using a smartphone application, shown in Figure 3. The application is based on MobMuPlat and sends the computer configuration
parameters using OSC over WiFi. Similarly to the knobs in a guitar effects pedal, theapplication can be used intermittently on stage.
The advantage of using a software application is that it can be easily configured andexpanded as to match different sound processing proposals that might be built using
Pd. Moreover, because it is external to the triangle, it can be left in a safe place during performance. Henceforth, this design option contributes to reduce the invasivenessand flexibility of Triaume’s setup when compared to the idea of having physical knobs
attached to the triangle.

13

Proc. of the 15th International Symposium on CMMR, Online, Nov. 15-19, 2021

Fig. 2. The capacitive sensor is attached to the triangle’s tip and isolated from the instrument’s
body using insulating tape.

2.3

Computer

The final block in the augmentation system is a computer, which executes a Pd patch
responsible both for converting the capacitive sensor’s continuous values to on/off information and for synthesizing audio to be played in a loudspeaker.
It is important to note that the conversion from continuous to on/off values could
be performed in the microcontroller. However, this conversion depends on a thresholdthat changes depending on the sensor’s materials, electric noise, the instrument’s shape,
and the size of the musician’s hands. Therefore, this conversion is performed in thecomputer, and the threshold is configured using the smartphone, as described in theprevious section.
The on/off sensor information is used to control sound synthesis using two different
strategies, as shown in Figure 4. For the first strategy, the sensor touch and releasegestures are immediately mapped into on/off information for sound activation. In thesecond one, the on/off information is low-pass filtered, thus providing a continuous
sound parameter control. Each of these strategies is discussed next.
Using On/Off Information for Sound Activation A simple, immediate control strategy is to map the on/off sensor to a synthesizer’s ADSR envelope controller. This allows
using the sensors as a key that triggers and sustains a particular sound. The sensor (and,consequently, the related sound) can be played independently of the triangle’s damping
because it uses the thumb while the damping process uses the hand palm.
Although the sensor can provide the musician with another sound layer, it can be
hard to physically combine it with muting the triangle with the hand palm. For somerhythmic patterns, it can be easier to play sounds when the sensor is released. It is possible to reach a myriad of rhythmic possibilities by combining the different activations(on touch/on release) with sound synthesis configurations.

14Proc. of the 15th International Symposium on CMMR, Online, Nov. 15-19, 2021

Fig. 3. Smartphone app graphical user interface

Fig. 4. Mapping strategies. The on/off sensor can be used either on touch or on release (left). Also,a low-pass filtering technique can convert the on/off information to a continuous signal (right).

Figures 5 and 6, respectively, illustrate both of these activation modes, showing theon/off sensor data (upper panel) and the corresponding synthesized waveform. In bothcases, the parameters for attack speed and sustain were adjusted for minimal values,
which highlights the synchrony between the input signal and the sound output.Next, we
present our proposal to generate continuous control with the sensor.
Continuous Parameter Control: a PWM-like Approach Continuous controls can beused in expressive sound control in important parameters that can not only be driven
directly by a binary event logic, like wet/dry levels, gains, and filter cut-off frequencies. These parameters are usually controlled using faders, knobs, or sensors such as
accelerometers. In this section, we describe how to use the on/off sensor to provide
continuous control values.
The technique employed obtains continuous values from digital inputs using lowpass filtering, similarly to using Pulse Width Modulation (PWM) [12], [13] control.
In PWM, the input signal is a square wave, which is filtered so that the output signal

15

Proc. of the 15th International Symposium on CMMR, Online, Nov. 15-19, 2021

Fig. 5. Sensor data and sound output using trigger on touch.

Fig. 6. Sensor data and sound output using trigger on release.

level is proportional to the fraction of time in which the input is high (that is, the duty
cycle). Equation 1 shows the relationship between the output signal level (Vout), thevalue corresponding to high level signal (A), and the duty cycle (d).
Vout = A × d(1)

In the on/off sensor, we can generate duty cycle variation by intermittently touching
and releasing the capacitive sensor. Low-pass filtering generates a smooth, continuous
signal, whose level is proportional to the duty cycle. Lower filter cut-off frequencies
lead to smoother signals but also to slower responses.
Figure 7 illustrates a demonstration of this technique. It shows an acquisition of theon/off signal and the corresponding output after using a low-pass filtering with cut-off
frequency of 0.1 Hz. It can be seen that the filtered output increases accordingly to the
duty-cycle and can generate intermediate values wth some ripple.
This technique allows controlling effect or synthesizer parameters using a rhythmic input generated by touching and releasing the sensor. This is especially desirable
because it allows using gestures that are close to those native to the Forró music repertoire, that is, playing rhythms with the hand. Moreover, touching and releasing parts of16

Proc. of the 15th International Symposium on CMMR, Online, Nov. 15-19, 2021

Fig. 7. Data acquired while playing the augmented instrument and low-pass filtered output.

the instrument is also part of the traditional repertoire of many percussion instruments;
hence this technique can be applied in other types of drums and other music genres.
Interestingly, both mapping techniques can be combined, generating a sound trigger
that is simultaneous to a timbre control. This one-to-many mapping can generate new
expression possibilities that do not necessarily fit the regional music genres Triaume
was inspired in. The next sections will present tests made for instrument evaluation,
followed by comments regarding the possibilities obtained by its use.

3

Instrument Evaluation

We qualitatively evaluated our instrument aiming to identify some of its musical possibilities. Triaume was evaluated from the author’s viewpoint, using their own musicalexperience, first focusing on the on/off sensor, then on the PWM-like control.
3.1

On/Off Sensor

As a first experiment, we programmed Triaume synthesizer to play a sample of a percussive sound triggered by sensor release. A short track was recorded, and a part ofits waveform can be seen in Figure 8. The higher magnitude pulses correspond to thesynthesized sound and the lower magnitude ones to the acoustic triangle.

Fig. 8. Triaume sound record triggering a synthesized sound sample..

17

Proc. of the 15th International Symposium on CMMR, Online, Nov. 15-19, 2021

In this test, the on/off trigger provided a quick response, which allowed playing
rhythms without a perceptible delay. The capacitive sensors have shown a high sensitivity and were able to detect even more subtle touches. At the same time, the sensitivity
control mechanism allowed rejecting false positives in this detection.
In order to illustrate another musical possibilities, an audio demo was recordedchoosing different percussion sounds, and also synthesized sine, square and triangle
waves. An interesting outcome was obtained when using an alternate toggle mechanism to play two different cowbell sounds1 2 .
3.2

PWM-like Control

The PWM-like mechanism test consisted of linking the continuous control mechanism
to a FM synthesis control module implemented in Pd. Continuous values control themodulating wave magnitude in the FM synthesis. Adjusting the the low-pass filter cutoff frequency allows tuning continuous signal’s change rate speed.
Mapping these continuous values directly into synthesizer fundamental frequencies
would lead to an obvious one-to-one mapping strategy [23]. Using such a strategy canlead to results next to the ones obtained when playing the Theremin, but with an inevitable ripple (as suggested by Figure 7).
For demonstration purposes, a song was composed and recorded by the authors inorder to show the new instrument application context. This song, entitled ”Forró doOSC”, shows that the instrument can be used either inside the forró idiomatic, or foravant-garde music34 .

4Discussion

The results presented in this work demonstrate that Triaume can potentially bring new
expressive possibilities to the triangle. Its interactions were designed aiming at a low
invasiveness regarding the instrument’s traditional techniques. Even though one of theauthors plays Forró percussion, we could not perform any evaluation with external musicians due to the ongoing COVID19 crisis. However, the song composed by the authors shows an idiomatic Forró example, and at the same time, innovative possibilities
for other music genres.
The idea of using low-pass filtering to convert on/off signals to continuous values
is not novel per se, as it is a straight implementation of classic PWM control [24].
However, our proposal generates the input signal from a touch sensor placed so that it
1

Audio demo with percussive sound samples available at: https://soundcloud.com/
marcio-albano/triaume-test-samples/s-k7MKiggI4E2
2
Audio demo with synthesized waves available at: https://soundcloud.
com/marcio-albano/triaume-demo-sine-triangle-square-waves/s-kzXDBiI6izr
3Song available for listening at https://soundcloud.com/marcio-albano/forrodoosc/s-Qty5RREnsph
4”Forró do OSC” music score available at https://1drv.ms/b/s!AnEYggKX1_
PYkq4n8-k8xKsa44XXBA?e=Wc6mPG

18

Proc. of the 15th International Symposium on CMMR, Online, Nov. 15-19, 2021

captures rhythms in the context of a handheld percussion. Henceforth, this process canbe interpreted as a rhythm-to-control conversion, which can be applied in several other
instruments.

5

Conclusion

This work presents an augmentation for the triangle, a handheld non-pitched percussion
instrument used in several regional Brazilian music genres. The augmentation proposal
uses minimalistic and low-cost hardware, comprised of a single capacitive touch sensor
attached to the triangle’s upper tip, which reduces its impact on using the traditional
techniques to play the triangle. On-stage configuration possibilities are obtained by using an external mobile device to fine-tune all parameters.
We use two mapping strategies. The first one uses the capacitive sensor as a key,which can operate either on touch or on release, making it possible to add another instrumental layer to the acoustic one. The second one uses a low-pass filtering techniqueto convert the on/off information to a continuous control, which allows reconfiguring
synthesis or digital effect parameters by performing rhythms with the thumb.
Although the on/off to continuous signal conversion was inspired by the use of thetriangle inside the Forró music context, it can be used in other musical instruments
and genres, e.g., using the gestures related to touching a drum’s membrane or side tochange its resonance. The main idea of the sensor is to convert rhythmic interactions
to a continuous value, that is, it uses gestures that are native to playing percussions.
Hence, the proposed augmentation is not only useful for Forró music itself, but also a
potential path to augment other percussive instruments in other genres.
In future work, in addition to the ”Forró do OSC” song composed for this work
demonstration, we will seek to present the augmented instrument to contemporary music bands so that it can be explored and further improved. Currently, this process isstrongly harmed by the COVID-19 crisis, which brings forward the problem of developing musical hardware in collaboration with musicians without physical social contact.
Moreover, further sound exploration can be made using the ripple present on the
low-pass filtered output signal. This approach could give the instrument more expressiveness when used with adequate mapping strategies.

References
1. Perry R. Cook. Principles for designing computer music controllers. In Proceedings of theInternational Conference on New Interfaces for Musical Expression, pages 3–6, Seattle, WA,
2001.
2. Dominique Dreyfus. Vida do viajante: A saga de luiz gonzaga. Editora 34, 2012.
3. Max V. Mathews. The radio baton and conductor program, or: Pitch, the most important andleast expressive part of music. Computer Music Journal, 15(4):37–46, 1991.
4. Colin Honigman, Jordan Hochenbaum, and Ajay Kapur. Techniques in swept frequency
capacitive sensing: An open source approach. In Proceedings of the International Conference
on New Interfaces for Musical Expression, pages 74–77, London, United Kingdom, June
2014. Goldsmiths, University of London.

19

Proc. of the 15th International Symposium on CMMR, Online, Nov. 15-19, 2021

5. Enric Guaus, Tan Ozaslan, Eric Palacios, and Josep L. Arcos. A left hand gesture caption
system for guitar based on capacitive sensors. In Proceedings of the International Conference
on New Interfaces for Musical Expression, pages 238–243, Sydney, Australia, 2010.
6. David Gerhard and Brett Park. Instant instrument anywhere: A self-contained capacitive
synthesizer. In Proceedings of the International Conference on New Interfaces for MusicalExpression, Ann Arbor, Michigan, 2012. University of Michigan.
7. Nan-Wei Gong, Nan Zhao, and Joseph Paradiso. A customizable sensate surface for music control. In Proceedings of the International Conference on New Interfaces for MusicalExpression, Ann Arbor, Michigan, 2012. University of Michigan.
8. Diana Young and Georg Essl. Hyperpuja: A tibetan singing bowl controller. In Proceedings of the International Conference on New Interfaces for Musical Expression, pages 9–14,
Montreal, Canada, 2003.
9. Banda Falamansa. Sete meninas / forró do bole bole - mtv ao vivo. https://www.
youtube.com/watch?v=BzwqMciFc-s. [Online; accessed on 14-June-2021].
10. Baião de Rua. Baião de rua no release showlivre. https://www.youtube.com/
watch?v=JLg-c0ov7sI. [Online; accessed on 14-June-2021].
11. Gabriel Lopes Rocha, João Teixera Araújo, and Flávio Luiz Schiavoni. Ha dou ken music:
Different mappings to play music with joysticks. In Marcelo Queiroz and Anna XambóSedó, editors, Proceedings of the International Conference on New Interfaces for MusicalExpression, pages 77–78, Porto Alegre, Brazil, June 2019. UFRGS.
12. Daniele Lacamera. Embedded Systems Architecture. Packt Publishing, 2018.
13. Jonathan W. Valvano. Embedded Systems: Real-Time Interfacing to Arm® Cortex™-M Microcontrollers. 2014.
14. Espressif esp32. https://www.espressif.com/en/products/devkits.
15. D. Iglesia. The mobility is the message : the development and uses of mobmuplat. 2016.
16. Adrian Freed and Andrew Schmeder. Features and future of open sound control version 1.1
for nime. In Proceedings of the International Conference on New Interfaces for MusicalExpression, pages 116–120, Pittsburgh, PA, United States, 2009.
17. Miller Puckette. Pure data. https://puredata.info/. [Online; accessed on 14-June-2021].
18. Paul Stoffregen. Arduino capacitivesensor library (repository). https://github.com/
PaulStoffregen/CapacitiveSensor. [Online; accessed on 14-June-2021].
19. Paul Badger. Arduino capacitivesensing library. https://playground.arduino.
cc/Main/CapacitiveSensor/. [Online; accessed on 14-June-2021].
20. Romulo A Vieira and Flávio Luiz Schiavoni. Fliperama: An affordable arduino based midi
controller. In Romain Michon and Franziska Schroeder, editors, Proceedings of the International Conference on New Interfaces for Musical Expression, pages 375–379, Birmingham,
UK, July 2020. Birmingham City University.
21. CNMAT. Osc: Arduino and teensy implementation of osc encoding. https://github.
com/CNMAT/OSC. [Online; accessed on 14-June-2021].
22. Geise Santos, Johnty Wang, Carolina Brum, Marcelo M. Wanderley, Tiago Tavares, and Anderson Rocha. Comparative latency analysis of optical and intertial motion capture systems
for gestural analysis and musical performance. [accepted for publication at NIME 2021].
23. Andy D. Hunt, Marcelo M. Wanderley, and Matthew Paradis. The importance of parameter
mapping in electronic instrument design. In Proceedings of the International Conference on
New Interfaces for Musical Expression, pages 88–93, Dublin, Ireland, 2002.
24. Bishop R. H. Dorf, R. C. Modern control systems. Upper Saddle River, NJ, Prentice Hall.,2014.

20