Matt Skarha

10 object(s)
 

Le Bâton: A Digital Musical Instrument Based on the Chaotic Triple Pendulum

During quarantine, I finally got around to continuing a project that has been on my mind for some four years. For a more complete overview (including references), check out the NIME 2021 paper.

Le Bâton: A Digital Musical Instrument Based on the Chaotic Triple Pendulum


Long exposure photo of Le Bâton.

Introduction

Chaotic systems, a type of nonlinear dynamic system characterized by a strong sensitivity to initial conditions, have inspired many approaches to computer music composition. Though this research primarily occurred during the late 1980s and early 1990s, there has been continued interest in using chaotic data to generate music. Approaches generally involve mapping the output of a chaotic equation to audio synthesis parameters such as MIDI data (i.e. pitch), time domain-based models (i.e. digital waveguides), and frequency domain-based models (i.e. granular synthesis).

The research into the application of chaos to computer music has primarily been focused on iterating over chaotic attractors or maps with computer programs. Typically, a composer inputs some number of equations (usually differential or recursive in nature) with initial parameters into a program which are then iterated using various numerical or discrete-time methods. The output data is then mapped to a sound synthesis. This is known as Functional Iteration Synthesis.

Because the chaotic data is being generated entirely with a computer, it can be confusing to audiences why this compositional approach is unique when compared with other algorithmic composition approaches. Canadian composer Barry Truax writes “from a more philosophical or aesthetic point of view, it is not clear that an arbitrary mapping of a nonlinear function [onto the pitch of successive notes] is inherently more musical than, for instance, a random or stochastic function. The musicality may reside in the musical knowledge of the mapper more than in the source function”. In this project, we seek to continue research into the application of chaotic systems to computer music by building a chaotic digital musical instrument with a visual feedback mechanism, allowing for a coherent audiovisual experience.


Le Bâton.

Le Bâton (pictured above) is a novel interface for musical expression based on the triple pendulum, a simple physical system that can undergo visible chaotic motion. Le Bâton provides embedded visualization and remote sonification of motion data in real-time through embedded wireless inertial measurement units (IMUs) and allows for user interaction through remotely setting its initial conditions.

Le Bâton

This section presents the design and implementation of Le Bâton’s architecture and components: pendulum arms, the control mechanism, data acquisition processes, embedded visualization, and user interaction. All Le Bâton-related source code and documentation are available at https://github.com/IDMIL/le-baton.

Pendulum Arms

We modeled three custom pendulum arms in CAD-based software and 3D-printed them using selective laser sintering with Polyamide-12 filament. The interior of each arm was appropriately hollowed to fit the embedded electronics. The arms were connected with competition-grade skateboard bearings fitted on a small axle to permit independent rotation.

Based on prototyping results, we determined that the swivel point of arm \(n\) should be located at half the length of that arm, which is connected to the end of arm \(n − 1\). This configuration allowed for more favorable motion than simply attaching the end of arm \(n\) at the end of arm \(n − 1\). Additionally, we observed this favorable motion when the mass of the arm was concentrated at one end, as opposed to distributed evenly along its length. To achieve this, we embedded the battery compartment towards one end while hollowing the other end to achieve an asymmetric mass distribution, as shown in the image below.


Photo of electronics embedded inside each pendulum arm.

Control Mechanism

To allow a user to have control over the initial angle and angular velocity of the top pendulum arm, we designed a control mechanism based around the fixed swivel point of the top arm. The mechanism required the ability to “lock” a motor to this point, swing the top arm to some angle, then “unlock,” letting gravity take over.

Our control mechanism consists of a 150:1 12V brushed DC gearmotor coupled to a 24 V DC Ogura AMC 10-29 electromagnetic clutch as shown in the image below. Electromagnetic clutches are electromechanical devices that are commonly found in automated manufacturing machines. Their purpose is to transmit torque from an input shaft to an output hub. When an electromagnetic clutch is powered, electromagnets cause an armature plate to cross a tiny air gap, allowing the input shaft to lock to the output hub via a strong frictional force. Thus, when the input shaft is coupled to a rotating motor, the hub and top pendulum arm will rotate as well. When the clutch is unpowered, the hub is allowed to rotate freely on a bearing, meaning gravity will take over and the pendulum will begin its motion. The output hub of the Ogura clutch we used originally included a shaft that had to be removed to not get in the way of the pendulum.


Control mechanism for Le Bâton. A DC motor is coupled to an electromagnetic clutch. Once users swing the primary pendulum arm to some angle and release, gravity takes over.

The motor is controlled with a motor driver interfaced with an Arduino Uno and the electromagnetic clutch is controlled with a relay module interfaced with the same Arduino Uno. A custom enclosure was modeled and 3D-printed to fit all components.

Data Acquisition

We acquire and process motion data for all three pendulum arms in real-time via embedded wireless inertial measurement units (IMUs). An Adafruit BNO055 9DOF Absolute Orientation Sensor is interfaced with an Arduino Nano 33 IoT in each arm, which sends motion data over WiFi to a Macbook Pro laptop running Max/MSP. This data includes absolute orientation, angular velocity, acceleration, magnetic field strength, and gravitational acceleration measurements at around 15 Hz, whereas the fastest oscillations observed were around 6 Hz, thus satisfying the Nyquist criterion.

To achieve consistent data corresponding to the angle θ of each arm at any given moment, we compute a simple polar angle on the gravitational acceleration vectors:

\[\theta = \arctan(\frac{g_{y}}{g_{x}})\]

where \(g_y\) and \(g_x\) are measurements of the acceleration due to gravity along the \(y\)- and \(x\)-axes, respectively. All data is readily accessible to users for mapping in a Max patch.

Embedded Visualization

To enhance the audiovisual feedback mechanism, 12 individually addressable RGBW WS2812 LEDs (NeoPixels) were attached to each arm. The goal of these LEDs is to highlight interesting aspects of the motion or sound in real-time while not taking away from the focus of the project. That is, we are not interested in creating unnecessarily complex color patterns that draw attention away from the motion and sound. Rather, they should complement each other. The LEDs are controlled using the Arduino Nano 33 IoT receiving WiFi messages from Max/MSP. Because NeoPixels operate at 5 V, a boost converter (Adafruit PowerBoost 1000C) and 3.3 V to 5 V logic level converter (SparkFun Bi-Directional Logic Level Converter) were embedded alongside the Arduino and IMU. The Adafruit PowerBoost 1000C also features a LiPo battery charging circuit along with constant 5V output. The entire hardware setup is shown below.


Block diagram of Le Bâton hardware platform.

User Interaction

DMIs built around mechanical systems with inherent behavior often focus the user interaction on the initial excitation of the system. Additionally, chaotic systems are very sensitive to their initial conditions. In the case of Le Bâton, this involves providing the pendulum with some potential energy (dropping it from rest), kinetic energy (pushing it into motion), or both. We implemented the aforementioned control mechanism allowing users to remotely interact with the direction and speed of its motor. The addition of the fine-tuned control over the initial angle and angular velocity was motivated by a desire for a more meaningful interaction experience, especially in a performance context. The high sensitivity of this system can be demonstrated as the motion differs even when dropped from the same initial angle.

Because of the variety and quality of its embedded inputs, we selected a Sony DualShock 4 wireless gaming controller as a control interface for prototyping with Le Bâton. The controller sends its data via Bluetooth to a computer running Max/MSP and for further filtering and mapping.

Depending on the context of interaction, some other controls, including but not limited to audio synthesis parameters and LED mappings, are also available to users, to help them gain a better understanding of the various aspects of the chaotic motion.


Long exposure photo of Le Bâton.


Example of angle data for Le Bâton to be processed and mapped to sound. Rest position is defined as 180°. Note the transition from the chaotic to non-chaotic regimes at around t = 80s.

Demos

To see Le Bâton in action, check out the NIME 2021 demo video or my presentation at the 3rd CIRMMT-OICRM-BRAMS Student Colloquium.

Acknowledgments

I would like to thank Sean Ferguson, Valérian Fraisse, Pia Baltazar, and Samuel Waranch for fruitful discussions and input. Thanks also to John Sullivan and Yves Méthot for assistance with early prototyping and to the Centre for Interdisciplinary Research in Music Media and Technology for funding this project.