Conference PaperPDF Available

Large-scale real-time modular physical modeling sound synthesis

Authors:

Abstract and Figures

Due to recent increases in computational power, physical modeling synthesis is now possible in real time even for relatively complex models. We present here a modular physical modeling instrument design, intended as a construction framework for string-and bar-based instruments, alongside a mechanical network allowing for arbitrary nonlinear interconnection. When multiple nonlinearities are present in a feedback setting, there are two major concerns. One is ensuring numerical stability, which can be approached using an energy-based framework. The other is coping with the computational cost associated with nonlinear solvers-standard iterative methods, such as Newton-Raphson, quickly become a computational bottleneck. Here, such iterative methods are sidestepped using an alternative energy conserving method, allowing for great reduction in computational expense or, alternatively, to real-time performance for very large-scale nonlinear physical modeling synthesis. Simulation and benchmarking results are presented.
Content may be subject to copyright.
Proceedings of the 22nd International Conference on Digital Audio Effects (DAFx-19), Birmingham, UK, September 2–6, 2019
LARGE-SCALE REAL-TIME MODULAR PHYSICAL MODELING SOUND SYNTHESIS
Stefan Bilbao
Acoustics and Audio Group
University of Edinburgh, Edinburgh, UK
sbilbao@ed.ac.uk
Michele Ducceschi
Acoustics and Audio Group
University of Edinburgh, Edinburgh, UK
michele.ducceschi@ed.ac.uk
Craig J. Webb
Physical Audio Ltd.,
London, UK
craig@physicalaudio.co.uk
ABSTRACT
Due to recent increases in computational power, physical modeling
synthesis is now possible in real time even for relatively complex
models. We present here a modular physical modeling instrument
design, intended as a construction framework for string- and bar-
based instruments, alongside a mechanical network allowing for
arbitrary nonlinear interconnection. When multiple nonlinearities
are present in a feedback setting, there are two major concerns.
One is ensuring numerical stability, which can be approached us-
ing an energy-based framework. The other is coping with the com-
putational cost associated with nonlinear solvers—standard itera-
tive methods, such as Newton-Raphson, quickly become a compu-
tational bottleneck. Here, such iterative methods are sidestepped
using an alternative energy conserving method, allowing for great
reduction in computational expense or, alternatively, to real-time
performance for very large-scale nonlinear physical modeling syn-
thesis. Simulation and benchmarking results are presented.
1. INTRODUCTION
One goal of physical modeling synthesis is the emulation of exist-
ing musical instruments, perhaps with extensions in terms of de-
sign and functionality not easily realisable in the real world. An-
other is the design of new instruments, without a real-world ref-
erent. The hope is that through adherence to the laws of physics,
synthetic sound of a natural acoustic character can be produced. In
this setting, modularity is an important concept—the idea is to give
the user control over instrument design through the interconnec-
tion of semi-independent modules. In this contribution, a modular
network, consisting of a set of string- or bar-like elements coupled
through an auxiliary nonlinear connection network is presented.
Modularity in physical modeling synthesis is not new. The ear-
liest attempt at a complete synthesis system, due to Cadoz [1], had
such a modularity principle explicitly built in—the basic elements
were masses and springs, through the interconnection of which
more elaborate instruments could be constructed. The MOSAIC
(later Modalys) system [2] uses the same notion, now employing
modal synthesis [3]. Modular networks have also been proposed
using wave-based methods [4] and time-stepping schemes—see,
e.g., [5, 6]. The main difficulty is in simulating a network con-
nected in a feedback configuration—a problem compounded when
nonlinearities, essential for any musically-interesting sound out-
put, are present. The complications are similar to those which oc-
M. Ducceschi was supported by an Early Career Fellowship from the
Leverhulme Trust.
Copyright: c
2018 Stefan Bilbao et al. This is an open-access article distributed
under the terms of the Creative Commons Attribution 3.0 Unported License, which
permits unrestricted use, distribution, and reproduction in any medium, provided the
original author and source are credited.
cur in virtual analog modeling, but now in a mechanical setting,
where individual elements have a distributed character.
Two main technical concerns emerge: one is ensuring numeri-
cal stability, as numerical methods for nonlinear systems are prone
to explosive unstable solution growth. Another is computational
efficiency; iterative methods (such as, e.g., Newton-Raphson [7])
commonly used in nonlinear ODE/PDE solvers, can lead to large
increases in computational cost. For the problem of numerical
stability, energy techniques are probably the only known method.
Such methods, in different guises, have been popular in virtual
analog applications (port-Hamiltonian approaches [8], wave dig-
ital filtering [9, 10], and used in PDE solvers [11]). For general
nonlinearities, however, including those involving collision or in-
termittent contact, energy methods are available, but usually re-
quire the use of iterative methods. See, e.g., [12, 13, 14].
Recently, a new class of methods mas been proposed in the
context of virtual analog modeling, relying on energy quadratisa-
tion [15], leading to numerical methods which are resolvable with-
out recourse to iterative methods, and which maintain the notion
of an energy balance leading to a numerical stability guarantee—
see [16, 17], as well as [18] in the context of audio systems. Such
an approach reduces computational costs by as much as an order
of magnitude, and allows for the simulation of relatively complex
nonlinear systems in real time on standard hardware.
In Section 2, a modular physical modeling synthesis system
is presented, consisting of an interconnection of string- or bar-
like primitives, and with nonlinear connections which allow in-
termittent contact. A numerical discretisation scheme is presented
in Section 3, allowing for energy-stable non-iterative simulation.
Simulation results, illustrating characteristic behaviour of such a
modular synthesis system appear in Section 4. Performance re-
sults for a C implementation are presented in Section 5, demon-
strating the possibility of real-time operation of relatively complex
instrument designs. Some perspectives appear in Section 6.
2. A MODULAR INSTRUMENT MODEL
The canonical building block here is the linear bar or string (re-
ferred to henceforth here as a stiff string), of circular cross section,
assumed to vibrate transversely in a single polarisation. The basic
equation of motion (see, e.g., [11], as well as other closely-related
forms [19, 20]), under unforced conditions, is of the form
Lu= 0 (1)
where the linear partial differential operator Lis defined as
L=ρA∂2
tT ∂2
x+EI 4
x+ 2ρAσ0t2ρAσ1t2
x(2)
Here, u(x, t)is the transverse displacement of the stiff string, in
m, as a function of time t0, in s, and spatial coordinate x
DAFX-1
Proceedings of the 22nd International Conference on Digital Audio Effects (DAFx-19), Birmingham, UK, September 2–6, 2019
D= [0, L], for some string length Lin m. tand xrepresent
partial differentiation with respect to tand x, respectively.
The various parameters which define the stiff string are the
material density ρ, in kg·m3, Young’s modulus Ein Pa, tension
Tin N, and string radius rin m, from which follow the cross-
sectional area A=πr2and moment of inertia I=1
4πr4.σ0and
σ1are loss parameters, allowing for a simple frequency-dependent
loss characteristic (though much more realistic loss models are
available [21]). The symbol γis used here to represent the set
of parameters defining a particular string; its minimal form is:
γ={ρ, E, r, T , σ0, σ1, L}(3)
Two boundary conditions must be supplied at each end of the
string; many choices are possible (see [11]), but in this work, sim-
ply supported conditions will be enforced, so that
u=2
xu= 0 at x= 0, L (4)
The equation (1) requires two initial conditions: u(x, 0) and tu(x, 0).
In a synthesis setting, initial conditions are usually set to zero, but
will be maintained here in order to examine energetic behaviour
under unforced conditions.
System (1) satisfies an energy balance. Multiplying (1) by
tu, and integrating over Dgives
ZD
tuLu dx = 0 (5)
Defining the L2norm of a function f(x)over the domain Das
kfkD=sZD
f2dx (6)
and using integration by parts, as well as the boundary conditions
(4) leads to the energy balance
dHs/dt +Qs= 0 (7)
where
Hs=ρA
2ktuk2
D+T
2kxuk2
D+EI
2k2
xuk2
D(8a)
Qs= 2ρAσ0ktuk2
D+ 2ρAσ1kxtuk2
D(8b)
Hsis the total stored energy for the string, and Qsis the power
loss. Given that Hs0and Qs0, under unforced conditions,
this implies that dHs/dt 0, and thus energy is monotonically
non-increasing, and may be used to bound the growth of the state u
itself—such a balance may be employed in discrete time to arrive
at energy-based numerical stability conditions. See Section 3.
2.1. Excitation
For system (1), an excitation may be added as
Lu=δ(xxe)fe(t)(9)
where here, fe(t)is an externally-supplied force signal (in N), and
δ(xxe), is a spatial Dirac delta function selecting the excitation
location xe[0, L]. The pointwise character of the excitation can
be easily extended to the case of distributed contact (as in, e.g.,
the case of a piano hammer [19] or bow [22]). Simple choices of
the excitation function, if intended to model a strike or pluck, are
raised cosine distributions of the form
fe(t) = (1
2fe,max 1cos (tte)
Te, tette+Te
0,otherwise .
(10)
where teis the starting time of the excitation, Teis the duration,
fe,max is the maximum force, in N, and where q= 1 for a pluck
and q= 2 for a strike. See Figure 1.
Figure 1: Excitation functions fe(t)for a pluck (left) and strike
(right), as per the form given in (10).
From an energetic standpoint, one may again multiply (9) by
tu, and then integrate over Dto obtain the energy balance:
d
dt Hs+Qs=tu(xe)fe
| {z }
,P
(11)
where Hsand Qsare as in (8), and where Pis the instantaneous
input power due to the excitation. Thus the rate of growth of en-
ergy in the system may be bounded in terms of supplied power.
2.2. Connection to a Lumped Object
Consider now a coupled system of a string under excitation, and
in pointwise contact, at location x=xc, with a lumped object
of mass Mwhich is constrained to travel parallel to the plane of
polarisation of the string, and with displacement w=w(t):
Lu=δ(xxc)fc+δ(xxe)feMd2w
dt2=fc(12)
Here, fc=fc(η)is the connection force, assumed dependent on
η=u(xc, t)w(t)(13)
the relative displacement between the lumped object and the string
at the connection point. See Figure 2.
Figure 2: Stiff string, under an excitation force and coupled to a
lumped object, as per (12).
Many choices for the interaction force fcare possible. A basic
linear/cubic restoring force served as a basis for the modular net-
work presented in [5]. A more general choice, allowing for inter-
mittent loss of contact (or collisions), and considerably widening
DAFX-2
Proceedings of the 22nd International Conference on Digital Audio Effects (DAFx-19), Birmingham, UK, September 2–6, 2019
the range of possible sound output, is the following choice:
fc(η) = K[|η| − ]α
+sgn (η)(14)
Such a force law is parameterised by K0, a stiffness constant,
α1, a nonlinearity exponent inspired by models in contact dy-
namics [23, 19], and 0, an effective length of the lumped
object, which is now able to rattle, and which allows for a dead
zone where no force is exerted by the lumped object on the string
and vice versa. The notation [·]+indicates the “positive part of."
See Figure 3. Note that when = 0, so that the lumped mass and
string are always in contact, the force (14) reduces to a linear con-
nection when α= 1, and a cubic nonlinear force when α= 3. It is
also possible to go further here, and introduce a model of contact
loss, as per similar models in contact dynamics (see, e.g., [23]),
and employed in musical instrument modeling [13].
Figure 3: Nonlinear force characteristics of the form given in (14).
Left: with K= 106,α= 1 and = 0.001, and right: with
K= 1012,α= 3 and = 0.001. The dead zone, over which
there is no connection force, is shown as a blue shaded region.
At this point, we introduce the potential φ(η), such that
φ(η)0fc=dφ/dη (15)
and note that, through the chain rule,
dφ/dt =fcdη/dt (16)
Given the non-negativity of φ, it is also possible to define ψas
ψ=p2φ fc=ψdψ/dη (17)
This quadratisation of the potential energy has been employed in
the context of virtual analog modeling and musical acoustics in
[17, 24, 16], and also, recently, in much more general numerical
settings, where it is referred to as invariant energy quadratisation
see, e.g., [15]. In the case of the force characteristic given in (14),
the corresponding forms of φand ψare
φ(η) = K
α+ 1 [|η| − ]α+1
+ψ(η) = r2K
α+ 1 [|η| − ]
α+1
2
+
(18)
Though the forms in (15) and (17) are equivalent, in the nu-
merical context, they lead to distinct energy-conserving methods—
in particular, the form in (15) leads to a form requiring iterative
solution, and that in (17) to one which may be resolved explicitly.
For a direct comparison of this distinction in a simplified case, see
the companion paper [18].
From an energetic standpoint, multiplying the first of (12) by
tuand integrating over Dyields
dHs/dt +Qs=P − fctu(xc)(19)
Multiplying the second by dw/dt gives
d
dt M
2dw
dt 2!=dw
dt fc(20)
Adding (19) and (20) gives, then
d
dt Hs+Qs+d
dt M
2dw
dt 2!+fctu(xc)dw
dt =P
(21)
But, using
dη/dt =tu(xc)dw/dt (22)
as well as (16) leads to the energy balance
dH/dt +Qs=P(23)
where
H=Hs+Hc0Hc=M
2dw
dt 2
+φ0(24)
Thus the total energy Hof the system may be decomposed into the
energy of the stiff string Hsand that of the connection mechanism
Hc, and as before is non-negative—its rate of growth may again
be bounded in terms of the input power P. Such a connection
mechanism is passive (and furthermore lossless).
2.3. A Complete Modular Network
The step to constructing an arbitrary network is relatively straight-
forward, using the model above as a starting point.
Suppose a network is defined with Nsstiff string elements,
each characterised by a parameter set γ(q),q= 1,...,Ns, of the
form given in (3). For each element, the associated transverse dis-
placement is u(q)=u(q)x(q), t, for x(q)∈ D(q)= [0, L(q)],
and the associated partial differential operator is L(q). Suppose
also that there are Nmlumped objects, of mass M(j)kg, and of
displacement w(j)(t),j= 1,...,Nm. See Figure 4.
Figure 4: Modular network of stiff strings and lumped masses,
with connections indicated as yellow lines.
Now suppose that there are Ncindividual connections, each
associated with a force f(ν)
c,ν= 1,...,Nc. The νth connection
links the qνth stiff string, at location x(qν)=x(ν)
cwith the jνth
lumped object, where qν∈ {1,...,Ns}and jν∈ {1,...,Nm}.
The force f(ν)
cwill be of the form
f(ν)
c=f(ν)
cη(ν)η(ν)=u(qν)x(ν)
cw(jν)(25)
DAFX-3
Proceedings of the 22nd International Conference on Digital Audio Effects (DAFx-19), Birmingham, UK, September 2–6, 2019
The force f(ν)
cη(ν)is assumed to be related to an underlying
potential energy φ(ν)η(ν)0as
f(ν)
c=(ν)/dη(ν)(26)
In this case, φ(ν)will be chosen to be of the form (18), but any
non-negative form is possible. Furthermore, define the index sets
I(q)
c={ν∈ {1,...,Nc} | qν=q}(27a)
I(j)
c={ν∈ {1,...,Nc} | jν=j}(27b)
Finally, assume Neexcitation functions f(ξ)
e,ξ= 1,...,Ne,
acting on the stiff strings with index qξwhere qξ∈ {1,...,Ns}
at locations x(ξ)
e. Define also the index set
I(q)
e={ξ∈ {1,...,Ne} | qξ=q}(28)
The excitation functions f(ξ)
ecould be chosen as in (10).
The complete system is:
L(q)u(q)=X
νI(q)
c
f(ν)
cδx(q)x(ν)
c(29a)
+X
ξI(q)
e
f(ξ)
eδx(q)x(ξ)
e
M(j)d2w(j)
dt2=X
νI(j)
c
f(ν)
c(29b)
Energy analysis is an extension of the case of the single string.
Multiplying (29a) by tu(q), and integrating over D(q)gives
d
dt H(q)
s+Q(q)
s+X
νI(q)
c
f(ν)
ctu(q)x(ν)
c=P(q)(30)
where H(q)
sand Q(q)
sare stored energy and power loss for stiff
string q, as defined in (8), with parameter set γ(q), and where P(q)
is of the form given in (21). Summing over all strings gives
d
dt Hs+Qs+
Ns
X
q=1 X
νI(q)
c
f(ν)
ctu(q)x(ν)
c=P(31)
where
Hs=
Ns
X
q=1
H(q)
sQs=
Ns
X
q=1
Q(q)
sP=
Ns
X
q=1
P(q)(32)
are the total stored energy, dissipated power and supplied power
for the set of stiff strings. Recognising that the sets I(q)
cform a
partition of the set {1,...,Nc}, one has, simply,
d
dt Hs+Qs+
Nc
X
ν=1
f(ν)
ctu(qν)x(ν)
c=P(33)
Similarly, multiplying (29b) by dw(j)/dt, and summing over
j∈ {1,...,Nm}, again using the partitioning property of I(j)
c,
gives
d
dt
Nm
X
j=1 M(j)
2dw(j)
dt 2!
Nc
X
ν=1
f(ν)
c
d
dt w(jν)= 0 (34)
Adding (33) and (34) gives, using (25) and (26),
dH/dt +Qs=P(35)
where
H=Hs+Hc0Hc=
Nm
X
j=1
M
2dw(j)
dt 2
+
Nc
X
ν=1
φ(ν)0
(36)
3. DISCRETE-TIME SIMULATION
Finite difference schemes for the stiff string are covered in detail
in [11], and will be reviewed only briefly here.
Assume first a sample rate fs(and associated time step k=
1/fs), to be employed uniformly across all components in the net-
work. Consider now a single stiff string as defined by (1). The
grid function un
lrepresents an approximation to u(x, t)at t=nk
and x=lh, for integer nand l, and where his the grid spacing.
In particular, 0lN, where h=L/N, for integer N. The
discrete domains d,¯
dand ¯
dare defined as
d={0,...,N}¯
d={0,...,N 1}¯
d={1,...,N 1}
(37)
A discrete inner product and norm may be defined over a dis-
crete domain bZwith grid spacing h(such as d,¯
dor ¯
din (37)
above), for grid functions fn
l,gn
l, as
hfn, gnib=X
lb
hfn
lgn
lkfnkb=phfn, f nib(38)
3.1. Shift and Difference Operators
The forward and backward time-shift operators et+and etmay
be defined, with regard to the grid function un
l, as
et+un
l=un+1
letun
l=un1
l(39)
Forwards, backwards and centered approximations to a first time
derivative may be defined in terms of shifts as
δt+=et+1
kδt=1et
kδt=et+et
2k(40)
and averaging operators µt+and µtand an approximation δtt to
a second derivative may be written as
µt+=et++ 1
2µt=1 + et
2δtt =δt+δt(41)
Similarly, spatial shifts ex+and exmay be defined as
ex+un
l=un
l+1 exun
l=un
l1(42)
and approximations to the first and second spatial deriavtaives as
δx+=ex+1
hδx=1ex
hδxx =δx+δx(43)
DAFX-4
Proceedings of the 22nd International Conference on Digital Audio Effects (DAFx-19), Birmingham, UK, September 2–6, 2019
3.2. Basic Scheme
A basic explicit finite difference scheme for an uncoupled linear
stiff string, as in (1) may be written, for u=un
l,ldas
ρAδtt T δxx +EI δ2
xx + 2ρAσ0δt2ρAσ1δtδxx
| {z }
`
u= 0
(44)
Numerical boundary conditions corresponding to (4) are
un
l=δxxun
l= 0 l= 0, N (45)
and allow (44) to be well-defined even when applied at or adjacent
to the domain end points.
The scheme (44) satisfies an energy balance of the form
δt+hn1/2
s+qn
s= 0 (46)
where hn1/2
sand qn
sare the discrete-time energy storage function
and power loss, respectively, defined as
hn1
2
s=ρA
2kδtunk2
d+T
2hδx+un, etδx+uni¯
d(47a)
+EI
2hδxxun, etδxx uni¯
dρAσ1kkδtδx+uk2
¯
d
qn
s= 2ρAσ0kδtuk2
d+ 2ρAσ1kδtδx+uk2
¯
d(47b)
The power loss qn
sis non-negative, but the stored energy hsis only
non-negative under the condition
h21
2
T k2
ρA + 4σ1k+sT k2
ρA + 4σ1k2
+ 16 EI k2
ρA
(48)
which is a numerical stability condition for scheme (44) in isola-
tion. Under this condition, the state size may be bounded in terms
of supplied energy.
In implementation, scheme (44) is explicit—if the state un
lis
written as a column vector un= [un
0,...,un
N]T, (44) becomes
un+1 =Bun+Cun1(49)
where Band Care sparse (N+ 1) ×(N+ 1) matrices. See
[11] for the construction of these matrices in terms of the various
spatial difference operators.
3.3. String with Nonlinear Connection and Excitation
Consider now the simple case of a stiff string under an excitation
force and a nonlinear connection, as per (12). A discrete form is
`u =fc
1
hI(xc) + fe
1
hI(xe)Mδttw=fc(50)
Here, fc=fn
cis a time series representing an approximation to
fc(t), of a nature to be described shortly, and fe=fn
eis an
approximation to the externally-supplied function fe(t), perhaps
obtained through sampling. The grid functions Il(x0), selects a
given location x0. Many choices are possible, but the simplest,
and that which will be employed subsequently here, is certainly
Il(x0) = 1, l =l0= round (x0/h)
0,otherwise (51)
When multiplied by 1/h, as in (50) above, approximations to the
Dirac delta functions from (12) result, where x0=xc, xe.
The force fn
cwill be dependent on the relative displacement η
of the string and lumped mass at the connection grid index l=lc:
ηn=un
lcwn(52)
Consider now the inner product of the first of (50) with δtuover
d—this leads to the energy balance
δt+hn1/2
s+qn
s+fn
cδtun
lc=fn
eδtun
le
| {z }
pn
(53)
where hn1/2
sand qn
sare as defined in (47), and where pnis the
discrete input power due to the excitation.
Similarly, multiplying the second of (50) by δtwnleads to
δt+M
2(δtwn)2fcδtwn= 0 (54)
Adding (53) and (54), and using (52) leads to the balance
δt+hn1/2
s+M
2(δtwn)2+qn
s+fn
cδtηn=pn(55)
What is lacking is a definition of fn
c. Here are two:
fn
c=δt+φn1/2
δtηfn
c=µt+ψn1/2δt+ψn1/2
δtηn(56)
Here, φn1/2is an approximation to φat time t= (n1/2)k,
such as φn1/2=µtφ(ηn)0, and ψn1/2is an approxima-
tion to ψat time t= (n1/2)k. When inserted in (55) above,
either form in (56) leads to the energy balance
δt+hn1/2+qn
s=pnhn1/2=hn1/2
s+hn1/2
c(57)
where, for the two choices of the force fn
cfrom (56),
hn1/2
c=M
2(δtwn)2+(φn1/2
1
2ψn1/220(58)
Under the further condition (48), then hs0implying that h0,
and as before, the system as a whole will be numerically stable.
3.4. Implementation: Iterative vs. Non-iterative Methods
When written in vector/matrix form, the scheme (50) has the form
un+1 =Bun+Cun+1 θjcfn
c+θjefn
c(59a)
wn+1 = 2wnwn1+k2
Mfn
c(59b)
where θ=k2/(ρAh (1 + σ0k)), and where jeand jcare N+ 1
element column vectors, all zero except for a 1 in locations leand
lcrespectively.
Now, using the fact that
δtηn=1
2kjT
cun+1 un1wn+1 +wn1(60)
and the updates (59) leads to the affine relationship between δtηn
and fn
c:
δtηn+ζf n
c+ Ξn= 0 (61)
DAFX-5
Proceedings of the 22nd International Conference on Digital Audio Effects (DAFx-19), Birmingham, UK, September 2–6, 2019
where Ξnconsists of previously computed (known) values of u
and samples of the excitation fn
e, and ζis a constant.
Consider now the first energy-conserving definition of fn
c, from
(56). In combination with (61), this leads to the nonlinear equa-
tion:
r+ 2φr+ηn1φηn1
r+ 2kΞn
| {z }
F(r)
= 0 (62)
where r=ηn+1ηn1is the unknown. Such a form has appeared
in earlier works regarding energy-conserving collision simulation
[12, 13], and requires, in general, an iterative solution through,
e.g., Newton-Raphson; the number of iterations depends strongly
on the particular parameters defining the nonlinearity.
The second form of fcgiven in (56) leads to a distinct update.
Define
gn=δt+ψn1/2
δtηn
,
|t=nk (63)
The time series gncan be computed directly from known values
of ηnand the functional form of ψ. Given gn, the following pair
of updates results from (61) and (63):
δtηn+ζgnµt+ψn1/2+ Ξn= 0 δt+ψn1/2=gnδtηn
(64)
These can be consolidated into a single update yielding ηn+1 from
previously computed values of ηand ψ:
ηn+1 = Θ ηn, η n1, ψn1/2(65)
and, given ηn+1, the second of (64) may be updated to yield ψn+1/2,
at which point the simulation advances to the next time step. For
more details, see [18].
3.5. A Complete Discrete-time Modular Network
Returning to the complete modular system presented in Section
2.3, the numerical scheme corresponding to (29) is
`(q)u(q)=X
νI(q)
c
f(ν)
c
1
h(q)Ix(ν)
c+X
ξI(q)
e
f(ξ)
e
1
h(q)Ix(ξ)
e
δttw(j)=1
M(j)X
νI(j)
c
f(ν)
c(66)
Here, u(q)=u(q),n
lis the grid function corresponding to the qth
string, with grid spacing h(q), and defined over l∈ {0,...,N(q)}
and `(q)is the difference operator derived from L(q).w(j)=
w(j),n is the time series corresponding to the displacement of the
jth lumped object, j= 1,...,Nmand f(ν)
c,ν= 1,...,Ncto
the associated connection forces. In (3.5) above, the time step n
accompanying all dependent variables is suppressed for brevity.
Each of the Ncconnection forces f(ν)
c=f(ν),n
c,ν= 1....,Nc
is assumed dependent on a displacement
η(ν),n =u(qν),n
l(ν)
c
w(jν),n (67)
There is assumed an underlying discrete potential φ(ν),n1/2(and
accompanying function ψ(ν),n1/2), such that, for the non-iterative
algorithm,
f(ν),n
c=µt+ψ(ν),n1/2δt+ψ(ν),n1/2
δtη(ν),n (68)
Full details of the implementation and energy analysis will not
be presented here, because of space limitations, but follow in al-
most all respects from the analysis of the single string/connection
described in the previous section. A demonstration of energy con-
servation appears in Section 4.1, and of the benefit of a non-iterative
algorithm, in terms of computation time, in Section 5.
4. SIMULATION RESULTS
In this section, we present some numerical results illustrating nu-
merical and musical aspects of the modular system described here.
All simulations are run at 44.1 kHz.
4.1. Energy Conservation
Consider first the energy conservation property, for a full network
of 25 strings (ranging in pitch from C2 to C4), and using 24 two-
sided connections, where the non-iterative scheme is employed.
A worst case is assumed here, where the strings are lossless, and
the initial conditions of the strings and lumped elements are ran-
domised. In Figure 5, the energy partition as a function of time be-
tween strings and connections is shown, alongside the normalised
energy variation, illustrating energy conservation to machine ac-
curacy. The availability of such a measure allows for an excellent
approach to debugging modular synthesis codes.
Figure 5: Left: energy partition, showing energy in strings, con-
nections, and the total. Middle: normalised sample to sample en-
ergy variation, and right: a detail showing energy conservation to
machine accuracy.
4.2. Single String/Lumped Object
An illustration of the interaction between a single string and a
lumped object in intermittent contact is shown in Figure 6. Even
in this extremely simple case, a wide variety of timbres is possible.
In Figure 7, spectrograms of sound output are shown where string
parameters are chosen according to a high E string on a guitar.
4.3. Large network
Consider now a network of 25 strings with 24 double-sided con-
nections, representing approximately the largest possible in real
time at 44.1 kHz. Snapshots of the time evolution of this network
are shown in Figure 8.
5. COMPUTATIONAL ANALYSIS
This section details the computational costs of the element types
(stiff string and connection) from which the system is built. We
DAFX-6
Proceedings of the 22nd International Conference on Digital Audio Effects (DAFx-19), Birmingham, UK, September 2–6, 2019
Figure 6: Interaction of a single stiff string with a lumped colliding
object, at times as indicated.
Figure 7: Spectrograms of sound output for a high E guitar string
connected to a single lumped element. Top left: free vibration. Top
right, under a single connection, illustrating abrupt changes in tim-
bre over a long time scale. Bottom left: illustrating low-frequency
“warbling" effects. Bottom right: for a high mass lumped object,
leading to distinct bounces or temporal events.
start with a set of strings, and then compare an individual non-
linear connection solver in both iterative and non-iterative form.
Finally we assess a full system of strings and connecting elements,
as could be used in a real-time audio plug-in. All simulations are
written in C++, and timings are produced by running at a sam-
ple rate of 44.1 kHz (in double precision) over 441,000 time steps
and then dividing by 10 to give an average performance for 44,100
steps. The test CPU is a 6-core Intel Xeon E5-1650 v2, and the
LLVM compiler was used. Whilst we will not consider multi-
threading here (as this presents problems for real-time usage) we
do make use of vectorization, namely with Intel’s SSE and AVX
intrinsics [25].
The stiff string is simulated using the scheme (44), which is
explicit, and amenable to spatial parallelization. The state size and
computational cost can become large, but not unmanageably so:
for the case of 25 low-pitched strings tuned from C2 at 65Hz to
middle C4, the total state size required is 2,550 values. Table 1
shows results using various compiler optimisation levels, and also
using manually written vector intrinsics which lead ultimately to a
speedup by a factor of four. Performance is faster than real time.
Consider now a single nonlinear connection. Two forms of
code were tested: first a form which uses an iterative Newton-
Figure 8: Large modular network, at rest (top), under initial exci-
tations (middle) and later (bottom).
Table 1: Computation times for 25 strings, tuned from C2 to C4,
for 1 s output. Total state size: 2,550 grid points.
Optimisation Level Time (s)
-O0 0.59
-O3 SSE only enabled 0.18
Manual AVX 0.13
Raphson solver, and then a form which uses the new non-iterative
solver. For the purposes of this testing the Newton-Raphson solver
was run for 10 iterations at each time step, starting from a cached
solution. This is a usable “average" figure for the simulation, al-
though in practice could be larger, and also possibly reduced by
testing for a residual.
The algorithm for solving for each connection force consists of
some initial arithmetic operations and two calls to the power()
function with non-integer exponents (using std::pow() from
the cmath library). Then the Newton-Raphson solver is launched.
This requires a further two calls of the power() function at each
iteration. Finally there are some further arithmetic calculations
to compute the forces at each end of the connection. The non-
iterative form is considerably simpler, requiring just two power()
functions in total. Table 2 shows the resulting computation times.
The benefit of the non-iterative form is clear, giving a 11×speed
up over the iterative form. This is mostly due to the reduction in
the number of calls to the power() function, from 22 in the it-
erative form to just two in the latter. Further optimisation may be
DAFX-7
Proceedings of the 22nd International Conference on Digital Audio Effects (DAFx-19), Birmingham, UK, September 2–6, 2019
Table 2: Compute times for an individual connection for 1 s.
Optimisation Iterative (ms) Non-Iterative (ms) Speedup
-O0 79.2 7.1 11.2×
-O3 SSE 73.5 6.3 11.6×
achieved by implementing a manually vectorized power function
across groups of connection calculations.
The final test simulation involved two octaves of strings with
24 two-sided rattle connections, such that each string was con-
nected to another through a lumped element—a single strike to
any string will excite the entire network, as in Figure 8. At each
time step the strings are updated first, followed by a loop over the
connections which then adds back the calculated forces into the
strings at the connection points. Table 3 shows the results for the
full system.
Table 3: Computation times: 25 strings/24 connections for 1 s.
Optimisation Iterative (s) Non-Iterative (s) Speedup
-O0 2.53 0.81 3.1×
-O3 SSE 1.93 0.35 5.5×
Manual AVX 1.84 0.28 6.6×
The version computed using an iterative solver results in a best
time of 1.84 s for 1 s sound output, which is clearly well short
of the real time threshold. The non-iterative solver results in a
6.6×speedup, and the resulting time of 0.28 seconds is just within
the scope of usability for a real-time application. Note that per-
formance levels may vary according to other factors such as the
CPU-specific cache, and other compiler details.
6. CONCLUDING REMARKS
A form of this system available as a real-time plug-in is under de-
velopment through Physical Audio [26], called net2. It is rewritten
from a previous version (called net1), which ran offline in multi-
core using an iterative solver. The ability to sidestep such iterative
methods, and maintain a numerically-stable synthesis algorithm
has allowed this move to real time through the approximately 10×
speedup for the nonlinear part of the simulation. Though only stiff
strings have been shown here, the extension to systems includ-
ing multiple vibrating plates is immediate—see, e.g., [5]. Also,
only one type of nonlinearity has been presented here, but the non-
iterative algorithm presented here is fully general.
A major consideration, at the level of the user experience, is
in the UI design, particularly when there are potentially many stiff
string/connection elements to manage—this has been partly dealt
with during the design of the simpler Derailer system, also from
Physical Audio. A deeper issue is that of exploring the design
parameter space—for the system illustrated here with 25 strings
and 24 connections, for example, there are 319 parameters to set.
Some heuristics can be employed to make this more manageable
(by, say, restricting string tunings), but clearly some more general
strategy for finding interesting regions of the parameter space (per-
haps invoking methods from machine learning) is necessary.
7. REFERENCES
[1] C. Cadoz, A. Luciani, and J.-L. Florens, “Responsive input devices and sound
synthesis by simulation of instrumental mechanisms,” Comp. Music J., vol. 8,
no. 3, pp. 60–73, 1983.
[2] D. Morrison and J.-M. Adrien, “Mosaic: A framework for modal synthesis,”
Comp. Music J., vol. 17, no. 1, pp. 45–56, 1993.
[3] J.-M. Adrien, “The missing link: Modal synthesis,” in Representations of
Musical Signals, G. DePoli, A. Picialli, and C. Roads, Eds., pp. 269–297. MIT
Press, Cambridge, Massachusetts, 1991.
[4] R. Rabenstein, S. Petrausch, A. Sarti, G. De Sanctis, C. Erkut, and M. Kar-
jalainen, “Block-based physical modeling for digital sound synthesis,” IEEE
Sig. Proces. Mag., vol. 24, no. 2, pp. 42–54, 2007.
[5] S. Bilbao, A modular percussion synthesis environment,” in Proc. Int. Digital
Audio Effects Conf., Como, Italy, 2009, pp. 321–328.
[6] S. Bilbao, A. Torin, P. Graham, J. Perry, and G. Delap, “Modular physical
modeling synthesis on gpu,” in Proc. Int. Comp. Music Conf., Athens, Greece,
2014.
[7] W. Press, S. Teukolsky, W. Vetterling, and B. Flannery, Numerical Recipes in
C: The Art of Scientific Computing, Cambridge University Press, Cambridge,
UK, 1992.
[8] R. Müller and T. Hélie, “Power-balanced modelling of circuits as skew gradient
systems,” in Proc. Int. Conf. Digital Audio Effects, Aveiro, Portugal, 2018, pp.
1–8.
[9] K. Werner, V. Nangia, J. O. Smith, and J. Abel, “A general and explicit formu-
lation for wave digital filtres with multiple/multiport nonlinearities and com-
plicated topologies,” in Proc. Workshop Appl. Signal Proces. Audio Acoust.,
Mohonk, NY, 2015, pp. 1–5.
[10] A. Bernardini, K. Werner, A. Sarti, and J. O. Smith, “Modeling nonlinear wave
digital elements using the lambert function,” IEEE Trans. Circ. Syst. I, vol. 63,
no. 8, pp. 1231–1242, 2016.
[11] S. Bilbao, Numerical Sound Synthesis: Finite Difference Schemes and Simula-
tion in Musical Acoustics, John Wiley and Sons, Chichester, UK, 2009.
[12] V. Chatziioannou and M. van Walstijn, “An energy conserving finite differ-
ence scheme for simulation of collisions.,” in Proc. Stockholm Musical Acoust.
Conf., Stockholm, Sweden, 2013.
[13] S. Bilbao, A. Torin, and V. Chatziioannou, “Numerical modeling of collisions
in musical instruments,” Acta Acustica u. with Acustica, vol. 101, no. 1, pp.
155–173, 2015.
[14] M. Ducceschi and S. Bilbao, “Modelling collisions of nonlinear strings against
rigid barriers: Conservative finite difference schemes with application to sound
synthesis,” in Proc. Int. Conf. On Acoust. (ICA 2016), Buenos Aires, Argentina,
September 2016.
[15] X. Yang, “Linear and unconditionally energy stable schemes for the binary
fluid-surfactant phase field model,” Comp. Methods Appl. Mech. Eng., vol.
318, pp. 1005–1029, 2017.
[16] N. Lopes, T. Hélie, and A. Falaize, “Explicit second-order accurate method for
the passive guaranteed simulation of port-hamiltonian systems, in Proc. 5th
IFAC 2015, Lyon, France, July 2015.
[17] A. Falaize, Modélisation, simulation, génération de code et correction de sys-
tèmes multi-physiques audios: Approche par réseau de composants et formu-
lation Hamiltonienne À Ports, Ph.D. thesis, Université Pierre et Marie Curie,
Paris, July 2016.
[18] M. Ducceschi and S. Bilbao, “Non-iterative solvers for nonlinear problems:
The case of collisions,” 2019, Under review, 22nd Int. Conf. Digital Audio
Effects.
[19] A. Chaigne and A. Askenfelt, “Numerical simulations of struck strings. I. A
physical model for a struck string using finite difference methods,” J. Acoust.
Soc. Am., vol. 95, no. 2, pp. 1112–1118, 1994.
[20] P. Ruiz, “A technique for simulating the vibrations of strings with a digital
computer, M.S. thesis, University of Illinois, 1969.
[21] C. Vallette, “The mechanics of vibrating strings,” in Mechanics of Musical
Instruments, A. Hirschberg, J. Kergomard, and G. Weinreich, Eds., pp. 116–
183. Springer, New York, New York, 1995.
[22] C. Desvages and S. Bilbao, “Two-polarisation physical model of bowed strings
with nonlinear contact and friction forces, and application to gesture-based
sound synthesis,” Appl. Sci., vol. 6, pp. 135, 2016.
[23] K. Hunt and F. Crossley, “Coefficient of restitution interpreted as damping in
vibroimpact,” ASME J. Appl. Mech., pp. 440–5, June 1975.
[24] A. Falaize and T. Hélie, “Passive Guaranteed Simulation of Analog Audio
Circuits: A Port-Hamiltonian Approach,” Appl. Sci., vol. 6, pp. 273 – 273,
2016.
[25] N Firasta, M. Buxton, P. Jinbo, K. Nasri, and S. Kuo, “Intel AVX:New frontiers
in performance improvements and energy efficiency,” Intel White Paper, 2008.
[26] “Physical audio,” www.physicalaudio.co.uk, Accessed: 2019-03-26.
DAFX-8
... Due to recent increase in computational power, FDTD methods have gained popularity in real-time applications [18]. A real-time modular environment using strings and lumped objects is presented in [19], and Südholt et al. present a real-time implementation of connected strings and bars using the FAUST programming language in [20]. ...
... A commonly used 1D model (see e.g. [19,21]) is the damped stiff string (or string for short). With reference to Eq. (1), consider a string of length L (in m), its transverse displacement described by state variable q = u(χ, t) (in m), and spatial coordinate χ is defined over domain ...
... The mass used for the hammer and pluck (z in Eq. (18)), is visualised using a yellow circle and follows the mouse / cursor. The excitation distribution (e e in Eq. (19)) is visualised using a grey ellipse around the cursor; its width is determined by the value of e e . For the hammer, a mouse click sets τ = 0 in Eq. (18). ...
Conference Paper
Full-text available
Through recent advances in processing power, physical modelling using finite-difference time-domain (FDTD) methods has gained popularity. Many different musical instrument models based on these methods exist, and nearly all are based on the same underlying systems and interactions between them. This paper presents an application where individual resonator modules, such as strings, bars, membranes and plates, can be connected in a modular fashion and interacted with in real time. Various excitations, including the bow, hammer and pluck, are implemented as well, allowing for expressive control and a wide sonic palette. Existing and non-existing model configurations can easily be implemented, modified and experimented with, as well as the parameters describing them.
... This way of frequency-dependent damping first appeared in [63] and has been used extensively in the literature since (see e.g. [64,65]). A damped stiff string can be modelled as ...
... As done in [64,65], q alters the excitation to be a pluck when q = 1 and a strike when q = 2. Finally, f amp is the maximum force (in N). ...
... The introduction of an additional state variable, which is what Ducceschi's work is based on, was introduced in [106,107]. Papers [D] and [E] follow an earlier iteration of the non-iterative collision algorithm from [108,65] which exhibited spurious oscillations that Ducceschi et al. resolve in [103]. Paper [H] uses the corrected collision model for the collision between the lips exciting the trombone. ...
Thesis
Full-text available
Digital versions of musical instruments have been created for several decades, and for good reasons! They are more compact, more easy to maintain, and less difficult to play than their real-life counterparts. One way to digitise an instrument is to record it and play back the samples, but this does not capture the entire range of expression of the real instrument. Simulating an instrument based on its physics, including its geometry and material properties, is much more flexible to player control. Although it requires more computational power to generate the sound in real time, the simulation could possibly go beyond what is physically possible. A violin growing into a cello, bowing your trumpet, your imagination is the limit...
... However, it was observed that some spurious oscillations are obtained under such choice [27][28][29] . A better approximation, employed in the remainder of this work, is given by ...
... In the event of no collision at n + 1/2, then g imp reduces to (27b), since ψ n+1/2 = 0, and since u n+1 would be obtained as the solution of the system for zero collision force, as per (28). Notice as well that g in (27) is given entirely from previous values of the time series u, ψ, making the scheme fully explicit. ...
... Discrete realisations of both (28) and (31) are given here in terms of appropriate finite difference schemes. The temporal finite difference operators and notation are as given in Section II B. Here, because of the distributed character of the string, it is convenient to introduce a matrix-vector formalism for the spatial difference operators. ...
Article
Full-text available
The following article has been accepted for publication in the Journal of the Acoustical Society of America. After it is published, it will be found at http://asa.scitation.org/journal/jasa +++++++++++++++ Companion Webpage: https://mdphys.org/collisions.html +++++++++++++++ Collision modelling represents an active field of research in musical acoustics. Common examples of collisions include the hammer-string interaction in the piano, the interaction of strings with fretboards and fingers, the membrane-wire interaction in the snare drum, reed-beating effects in wind instruments, and others. At the modelling level, many current approaches make use of conservative potentials in the form of power-laws, and discretisations proposed for such models rely in all cases on iterative root-finding routines. Here, a method based on energy quadratisation of the nonlinear collision potential is proposed. It is shown that there exist a suitable discretisation of such model that may be resolved in a single iteration, whilst guaranteeing stability via energy conservation. Applications to the case of lumped as well as fully distributed systems will be given, using both finite-difference and modal methods.
... However, it was observed that some spurious oscillations are obtained under such choice [27][28][29] . A better approximation, employed in the remainder of this work, is given by ...
... In the event of no collision at n + 1/2, then g imp reduces to (27b), since ψ n+1/2 = 0, and since u n+1 would be obtained as the solution of the system for zero collision force, as per (28). Notice as well that g in (27) is given entirely from previous values of the time series u, ψ, making the scheme fully explicit. ...
... Discrete realisations of both (28) and (31) are given here in terms of appropriate finite difference schemes. The temporal finite difference operators and notation are as given in Section II B. Here, because of the distributed character of the string, it is convenient to introduce a matrix-vector formalism for the spatial difference operators. ...
Preprint
Full-text available
Here, we present a method to simulate collisions in musical acoustics using linearly-implicit schemes. These are schemes whose update requires a single iteration per time-step, in contrast to other established conservative methods in the literature employing iterative solvers such as e.g. Newton-Rapshon. Examples are given in the cases of the mass-barrier, the hammer-string, the string-fretboard collisions. More involved systems, such as the snare drum and the tromba marina, are also described. Companion page: https://mdphys.org/collisions.html
... These methods are therefore very general and allow for physical parameters to be directly modelled and controlled. FDTD methods were first used to model strings by Ruiz in [6] and Hiller and Ruiz in [7,8], and appear in many recent publications [9,10,11,12]. ...
... Using the operators defined in Section 3.1, the damped stiff string in Eq. (1) can be discretised to the following most commonly used FDTD scheme [5] (notice the division by ρA): δttu n l = c 2 δxxu n l −κ 2 δxxxxu n l −2σ0δt·u n l +2σ1δt−δxxu n l , (10) with wave speed c = T /ρA (in m/s), stiffness coefficient κ = EI/ρA (in m 2 /s). The operators approximating the first-order temporal derivatives are chosen to yield the highest accuracy while keeping the system explicit. ...
Conference Paper
Full-text available
Digital musical instruments based on physical modelling have gained increased popularity over the past years. This is partly due to recent advances in computational power, which allow for their real-time implementation. One of the great potentials for digital musical instruments based on physical models, is that one can go beyond what is physically possible and change properties of the instruments which are static in real life. This paper presents a real-time implementation of the dynamic stiff string using finite-difference time-domain (FDTD) methods. The defining parameters of the string can be varied in real time and change the underlying grid that these methods rely on based on the recently developed dynamic grid method. For most settings, parameter changes are nearly instantaneous and do not cause noticeable artefacts due to changes in the grid. A reliable way to prevent artefacts for all settings is under development.
... Lastly, a physical implementation of the the "fretting" and "plucking" would benefit the model by adding the expressiveness. It would be nice to model "fretting" as done by the authors of [28] and the "plucking" as described in [29][30][31]. Alternatively a less costly functional transformation method could be applied to model "fretting" [32]. ...
Conference Paper
Full-text available
The shamisen is a Japanese three-stringed lute. It is a chordophone that has the front of the body covered by a tensioned membrane which greatly contributes to the distinct sound of the instrument. Although the shamisen is a traditional Japanese instrument, it is a rare instrument in the rest of the world, making it mostly inaccessible by the majority of artists. To our knowledge, no physically modelled synthesizer of the shamisen is available, forcing producers and musicians to use samples. The objective of this paper is to make the shamisen's distinct sound more accessible to digital music artists. The real-time implementation of the shamisen physical model is presented along with the derivation of solution using the finite-difference time-domain (FDTD) methods. The digital instrument sounds mostly as intended, though lacking the shamisen's distinct buzzing sound requiring further development.
... Here, we formulate the modular connection mechanisms covered in detail in [8] in a way that can be easily integrated into the Faust FDS implementation. For this purpose, we define a coupling as a 4-tuple ( , , , ) for 1 ≤ , ≤ . ...
Conference Paper
Full-text available
Physical models using finite difference schemes (FDS) are typically implemented using mutable data structures. The FDS library of the Faust programming language, where such data structures are not available, is instead based on a cellular automaton approach. This paper proposes a mechanism by which multiple one-dimensional FDS based on the Faust FDS library approach can be coupled together. The coupling is achieved by composing the various FDS algorithms in parallel and modifying the Faust FDS library routing to calculate the connection forces. The mechanism is demonstrated by coupling multiple stiff string models to a bridge, modeled as an ideal damped bar.
... These tools allow for ground-up model design, and not just parametrisation and interconnection of existing macro-structures (cf. works such as [11,40]). 4. Moderate Computational Cost: MI models offer efficient computation, while allowing for arbitrary physical topologies and extensive real time control (topological changes, parameter modification, etc.), encouraging creative approaches to physically-based sound synthesis. While the choice of full modularity does circumvent possible omptimisations (e.g. for specific physical topologies), the resulting creative freedom separates it from most other physical modelling frameworks. ...
Article
The nature of human/instrument interaction is a long-standing area of study, drawing interest from fields as diverse as philosophy, cognitive sciences, anthropology, human–computer-interaction, and artistic creation. In particular, the case of the interaction between performer and musical instrument provides an enticing framework for studying the instrumental dynamics that allow for embodiment, skill acquisition and virtuosity with (electro-)acoustical instruments, and questioning how such notions may be transferred into the realm of digital music technologies and virtual instruments. This paper offers a study of concepts and technologies allowing for instrumental dynamics with Digital Musical Instruments, through an analysis of haptic-audio creation centred on (a) theoretical and conceptual frameworks, (b) technological components—namely physical modelling techniques for the design of virtual mechanical systems and force-feedback technologies allowing mechanical coupling with them, and (c) a corpus of artistic works based on this approach. Through this retrospective, we argue that artistic works created in this field over the last 20 years—and those yet to come—may be of significant importance to the haptics community as new objects that question physicality, tangibility, and creativity from a fresh and rather singular angle. Following which, we discuss the convergence of efforts in this field, challenges still ahead, and the possible emergence of a new transdisciplinary community focused on multisensory digital art forms.
... Even though the bridge-body interaction is perpendicular to the string-bridge interaction, we can model them as being parallel, assuming that a "horizontal" movement of the string causes a "vertical" movement of the rattling part of the bridge. We can use an alternative version of the potential in Equation (11) described in [20] to make the collision two-sided acting as a connection: ...
Conference Paper
Full-text available
The tromba marina is a medieval bowed monochord instrument. The string of the instrument rests on a rattling bridge that, due to the collision with the body, creates a trumpet-like sound. This paper presents a real-time implementation of a physical model of the tromba marina. The goal of the simulation is to make the instrument accessible to a larger audience. The physical model is implemented using finite-difference time-domain (FDTD) methods and non-iterative collision methods. A real-time implementation of the instrument is also presented. The simulation exhibits brass-like qualities and sounds similar to a real tromba marina, but requires further testing to validate the realism.
... See Figure 11. For more on the technical considerations of designing such modular synthesis systems, see the proceedings articles (Bilbao 2009a;Bilbao et al. 2019a). ...
Article
Full-text available
Physical modeling synthesis has a long history. As computational costs for physical modeling synthesis are often much greater than in conventional synthesis methods, most techniques currently rely on simplifying assumptions: these include digital waveguides, as well as modal synthesis methods. While such methods are efficient, it can be difficult to approach some of the more detailed behaviour of musical instruments in this way, including strongly nonlinear interactions. Mainstream time-stepping simulation methods, while computationally costly, allow for such detailed modeling. In this article, the results of a five year research project NESS (standing for {\em Next Generation Sound Synthesis}), are presented, with regard to algorithm design for a variety of sound-producing systems, including brass and bowed string instruments, guitars, and large-scale environments for physical modeling synthesis. In addition, 3D wave-based modeling of large acoustic spaces is discussed, as well as the embedding of percussion instruments within such spaces for full spatialisation. This article concludes with a discussion of some of the basics of such time stepping methods, as well as issues relevant to their use in audio synthesis applications.
Conference Paper
Full-text available
Nonlinearity is a key feature in musical instruments and electronic circuits alike, and thus in simulation, for the purposes of physics-based modeling and virtual analog emulation, the numerical solution of nonlinear differential equations is unavoidable. Ensuring numerical stability is thus a major consideration. In general, one may construct implicit schemes using well-known discretisa-tion methods such as the trapezoid rule, requiring computationally-costly iterative solvers at each time step. Here, a novel family of provably numerically stable time-stepping schemes is presented, avoiding the need for iterative solvers, and thus of greatly reduced computational cost. An application to the case of the collision interaction in musical instrument modeling is detailed.
Conference Paper
Full-text available
This article is concerned with the power-balanced simulation of analog audio circuits, governed by nonlinear differential algebraic equations (DAE). The proposed approach is to combine principles from the port-Hamiltonian and Brayton-Moser formalisms to yield a skew-symmetric gradient system. The practical interest is to provide a solver, using an average discrete gradient, that handles differential and algebraic relations in a unified way, and avoids having to pre-solve the algebraic part. This leads to a structure-preserving method that conserves the power balance and total energy. The proposed formulation is then applied on typical nonlinear audio circuits to study the effectiveness of the method.
Thesis
Full-text available
Les systèmes audios incluent les instruments de musique traditionnels (percussions, cordes, vents, voix) et les systèmes électro-acoustiques (amplificateurs de guitares, pédales d’effets, synthétiseurs analogiques). Ces systèmes multi-physiques possèdent une propriété commune : hors des sources d’excitation (les générateurs), ils sont tous passifs. Nous présentons dans cette thèse un ensemble de méthodes automatiques dédiées à leur modélisation, leur simulation et leur contrôle, qui garantissent explicitement et exploitent la passivité du système original. Nous utilisons dans ce travail le formalisme des systèmes hamiltoniens à ports (SHP), introduits en automatique et théorie des systèmes au début des années 1990. Pour la modélisation, on exploite le fait que la connexion de systèmes décrits dans ce formalisme préserve explicitement la dynamique de la puissance dissipée de l'ensemble, pour développer une méthode automatique de modélisation d'instruments complets à partir de modèles élémentaires rassemblés dans un dictionnaire. Pour la simulation, une méthode numérique qui préserve la structure passive des SHP à temps discret a été développée, garantissant ainsi la stabilité des simulations (pour lesquelles le code C++ est généré automatiquement). Concernant le contrôle, on exploite la structure d'interconnexion afin de déterminer automatiquement une forme découplée (sous-systèmes hiérarchisés) pour une certaine classe de SHP. Les systèmes de cette classe sont dits systèmes hamiltonien à ports plats, au sens de la propriété de platitude différentielle, à partir de laquelle une loi de commande en boucle ouverte exacte sur le modèle est générée.
Article
Full-text available
We present a method that generates passive-guaranteed stable simulations of analog audio circuits from electronic schematics for real-time issues. On one hand, this method is based on a continuous-time power-balanced state-space representation structured into its energy-storing parts, dissipative parts, and external sources. On the other hand, a numerical scheme is especially designed to preserve this structure and the power balance. These state-space structures define the class of port-Hamiltonian systems. The derivation of this structured system associated with the electronic circuit is achieved by an automated analysis of the interconnection network combined with a dictionary of models for each elementary component. The numerical scheme is based on the combination of finite differences applied on the state (with respect to the time variable) and on the total energy (with respect to the state). This combination provides a discrete-time version of the power balance. This set of algorithms is valid for both the linear and nonlinear case. Finally, three applications of increasing complexities are given: a diode clipper, a common-emitter bipolar-junction transistor amplifier, and a wah pedal. The results are compared to offline simulations obtained from a popular circuit simulator.
Conference Paper
Full-text available
Strings are common elements found in many musical instruments. Various models of string dynamics exist, describing cases of increasing complexity. For fine-grained simulation of string dynamics, either in the context of musical acoustics investigation or for sound synthesis, linear models such as the wave equation with stiffness are, however, insufficient. Recent work has focused on the coupling of a Kirchhoff-Carrier nonlinear string model with collisions against lumped or distributed barriers, showing promising results. The collisions are described by means of a penalty potential, relying on a fictitious interpenetration but allowing a description within an energy-balanced framework. In this work, the same collision model is used, but the nonlinear string model is further developed, in order to allow complex modal coupling rules, as well as amplitude-dependent pitch. In order to handle such complex system, appropriate finite difference schemes are developed, using energy-balanced methods. Results of simulations are presented, along with some applications to sound synthesis.
Article
Full-text available
A large class of transcendental equations involving exponentials can be made explicit using the Lambert W function. In the last fifteen years, this powerful mathematical tool has been extensively used to find closed-form expressions for currents or voltages in circuits containing diodes. Until now almost all the studies about the W function in circuit analysis concern the Kirchhoff (K) domain, while only few works in the literature describe explicit models for diode circuits in the Wave Digital (WD) domain. However explicit models of NonLinear Elements (NLEs) in the WD domain are particularly desirable, especially in order to avoid the use of iterative algorithms. This paper explores the range of action of the W function in the WD domain; it describes a procedure to search for explicit wave mappings, for both one-port and multi-port NLEs containing diodes. WD models, describing an arbitrary number of different parallel and anti-parallel diodes, a transformerless ring modulator and some BJT amplifier configurations, are derived. In particular, an extended version of the BJT Ebers-Moll model, suitable for implementing feedback between terminals, is introduced.
Article
Full-text available
Recent bowed string sound synthesis has relied on physical modelling techniques; the achievable realism and flexibility of gestural control are appealing, and the heavier computational cost becomes less significant as technology improves. A bowed string sound synthesis algorithm is designed, by simulating two-polarisation string motion, discretising the partial differential equations governing the string’s behaviour with the finite difference method. A globally energy balanced scheme is used, as a guarantee of numerical stability under highly nonlinear conditions. In one polarisation, a nonlinear contact model is used for the normal forces exerted by the dynamic bow hair, left hand fingers, and fingerboard. In the other polarisation, a force-velocity friction curve is used for the resulting tangential forces. The scheme update requires the solution of two nonlinear vector equations. The dynamic input parameters allow for simulating a wide range of gestures; some typical bow and left hand gestures are presented, along with synthetic sound and video demonstrations.
Article
Full-text available
This paper presents a method for the passive guaranteed simulation of a class of finite-dimensional nonlinear port-Hamiltonian systems. This method combines two processes to reach both the second order accuracy and explicit computations. First, we design a one-step two- stage implicit numerical method for Port-Hamiltonian systems that preserves passivity. Second, a change of state is proposed to yield an explicit computation. It requires assumptions on the Hamiltonian variations. The complete method is illustrated on two basic examples for which these assumptions are fulfilled.
Article
In this paper, we consider the numerical solution of a binary fluid-surfactant phase field model, in which the free energy contains a nonlinear coupling entropy, a Ginzburg-Landau double well potential, and a logarithmic Flory-Huggins potential. The resulting system consists of two coupled, nonlinear Cahn-Hilliard type equations. We develop a set of first and second order time marching schemes for this system using the "Invariant Energy Quadratization" approach, in particular, the system is transformed into an equivalent one by introducing appropriate auxiliary variables and all nonlinear terms are then treated semi-explicitly. Both schemes are linear and lead to symmetric positive definite systems at each time step, thus they can be efficiently solved. We further prove that these schemes are unconditionally energy stable in the discrete sense. Various 2D and 3D numerical experiments are performed to validate the accuracy and energy stability of the proposed schemes.