Mass-Spring-System model for real time expressive
behaviour synthesis
Why and how to use Physical Model in Pure Data (pmpd)
Cyrille Henry (ch@chnry.net)
Abstract
Mass-spring-system (MSS) physical model (PM) are vastly documented in literature and
on internet. They where developed to imitate natural behaviours, specially for audio
synthesis but they can also be used to create natural behavious or even “plausible”
behaviours. This “plausible” behaviours are comportment that does not imitate any
specific real life behaviours, but - since basic real life physic are respected - looks
“natural”. This is specially useful for real time user interactions. Even if this “plausible”
behaviour can be use for any human / computer interface this document will mostly
focuses on artistic application.
After a quick overview of the equation used for this kind of simulation, this document will
list different strategies use in MSS (implementation, creation of a simulated system,
strategies for interaction and using data from this system). Finally the pmpd library for pure
data will be presented.
Introduction
In this document, we discuss the use of mass-spring-system physical model to create
expressive movement for real time interaction.
We are dealing with the production and the control of data flow aiming at the control of any
kind of software parameter : Sound synthesis, images synthesis, lighting or motor actuator
by example can be driven thanks to a physical model. This parameters can usually benefit
from an expressive control. We are using physical model to synthesize data flow and
control their behaviours.
MSS model can be use to imitate natural behaviours, but they can also be used to create
lot's of different behaviours. We did not focuses on real behaviours, but on “plausible”
behaviours : a movement that look natural, even if it did not imitate a specific real life
physics. MSS model can easily generate this “plausible” behaviours since it respect basic
real life physics. Moreover this kind of physical models allow a wild range of user
interaction for real time control of the movement.
Using this models can lead to control of different media with data flow and to control
correlation between this data, thus having sound and images by example that does not
represent the same data, but express the same underling process.
This document aim is to give key to a deep understanding of process involved in MSS
model. After a quick overview of the equation used for this kind of simulation, we will
present different approach to create topologies of mass / link network. Then it will list
different strategies used to interact with this MSS simulation. Latter, we will list few
approach to use the generated data flow for both sound synthesis control and images
synthesis control. It should not be seen as exhaustive, but as a summarized of the author
experience in developing PM for many different artistic applications. Latter, we will have a
look at pmpd : a specific implementation of MSS system for the Pure Data software.
Index
Abstract.................................................................................................................................................1
Introduction..........................................................................................................................................1
Index.....................................................................................................................................................2
Motivations...........................................................................................................................................4
Real motion......................................................................................................................................4
Movement using a simple interpolation...........................................................................................5
Mass Spring System.........................................................................................................................5
Physical Model.....................................................................................................................................7
Basic equation..................................................................................................................................7
Implementation................................................................................................................................8
Units.................................................................................................................................................8
Basic oscillating system...................................................................................................................8
Topologies........................................................................................................................................9
Regular structures.......................................................................................................................9
Random structures.....................................................................................................................10
Collection of independent simple structures.............................................................................11
Shape morphing.........................................................................................................................11
Modal synthesis.........................................................................................................................12
Real time interaction strategies......................................................................................................12
Moving fixed masses................................................................................................................12
Sending force to masses............................................................................................................12
Changing physical parameter....................................................................................................13
Using data created by a MSS.........................................................................................................13
Sound synthesis.........................................................................................................................14
Direct audio simulation........................................................................................................14
Scanned synthesis.................................................................................................................14
“Many element synthesis”....................................................................................................15
Visual synthesis.........................................................................................................................15
Complex system.............................................................................................................................17
Non linearity.............................................................................................................................17
Space limitation of links.......................................................................................................17
Non linear rigidity................................................................................................................17
Non linear damping..............................................................................................................18
More interactions......................................................................................................................18
Motion damping...................................................................................................................18
Creep of a link......................................................................................................................18
Plastic link............................................................................................................................19
Breaking link........................................................................................................................19
Link elongation computation error...........................................................................................19
MSS simulation and emergent phenomena...............................................................................20
Instabilities................................................................................................................................21
Controlling instabilities.............................................................................................................21
Example : chdh – emergence....................................................................................................23
MSS and Pure Data: the pmpd library................................................................................................26
Installation.....................................................................................................................................26
Generality.......................................................................................................................................26
Masses............................................................................................................................................26
Link................................................................................................................................................26
Metronome.....................................................................................................................................27
Interactor........................................................................................................................................27
Test.................................................................................................................................................27
pmpd* objects................................................................................................................................27
System creation.........................................................................................................................28
Interacting with the system.......................................................................................................28
Getting data from a system.......................................................................................................28
Pmpd*~ objects..............................................................................................................................29
website...........................................................................................................................................29
Sources...........................................................................................................................................29
Installation.....................................................................................................................................29
Conclusion..........................................................................................................................................29
Annexes..............................................................................................................................................30
References......................................................................................................................................30
pmpd objects list............................................................................................................................31
Motivations
Real motion
Since a movement is initiated thanks to a force, looking at the speed and acceleration (that
are linked to force, as we will see latter), is a good way to analyses a movement, and gives
more details than only looking only at the position over time. Figure 1 represent position,
velocity and acceleration over time for 6 different recording of a hand motion moving a
cursor from 2 different points 10 cm approximatively apart.
Even for simple movement with relatively similar position vs. time curve, lot's of variety can
appears in real life motion. When looking at the acceleration curve : minimum and
maximum acceleration and position of this extreme can be relatively different. The human
brain have been trained to analyse and understand this differences. Being able to
reproduce such diversity is the first step toward generating expressive behaviours.
Figure 1: 6 recording of a simple hand movement, and there corresponding velocity and
acceleration over time.
Movement using a simple interpolation
Using Pure data to move a parameter is usually done with the [line] object. This object
perform a linear interpolation between two points (see figure 2). This is not a kind of
movement that can easily be find in the nature. Using this to move a fader result in a very
different movement than what would be performed by a human, mainly because it did not
respect the world physics. The linear interpolation imply a constant speed of the
parameter, and no velocity before and after the transition. This result in an infinite
acceleration at the beginning and at the end of the movement.
Such movement is easily identifiable as artificial.
Mass Spring System
Fdili Alaoui and Al explain motivation using a MSS in an article published in the IJPADM
revue (REF 1). Here is an extract :
MSS present various properties that make them attractive to use in the performing arts
(Hsieh 2007; Jacquemin 2008; Johnston 2009; Fdili Alaoui 2012). They have the ability to
produce physically plausible behaviours because they are governed by the laws of physics
and hence have an evocative representation of real-world dynamics. We describe the
behaviour of a physical model as physically plausible when it generates realistically
perceived dynamics that are created autonomously to evoke real-world dynamics, without
imitating real-world mechanics.
MSS provide a wide range of controllable parameters in real-time (such as the parameters
of the forces applied to the masses) that govern its behaviours, and thus offer rich
possibilities of interaction. The MSS can be controlled through the mapping between the
MSS physical parameters and the features of the analysed movement. The resulting
interaction would create a relationship between the performer’s movement and the
associated MSS behaviours. This relationship follows pre-defined rules or interaction
scenarios.
figure 2: movement generated by a linear interpolation