online approach to tempo estimation using the theory of coupled oscillators.
Edward W. Large, John F. Kolen Resonnance and the Perception of musical meter Connection Science, 6 (1) 177-208
principle: we assume states
- Initially
$\bar{x} = \Omega_0$ (expected initial tempo, fixed or estimated from first bar). - for every new performance event read at RTU time
$t$ , aligned with an event of MTU duration$q$ in score, evaluate a new$\bar{x}'$ (hence a new tempo value) using the difference between the onset time$t$ and the expected onset time$t'$ computed with$\bar{x}$ and the onset of previous (performance) event.
Large, E. W., & Jones, M. R.
The dynamics of attending: how people track time-varying events Psychological review, 106(1), 119–159, 1999 https://doi.org/10.1037/0033-295X.106.1.119
abstract
A theory of attentional dynamics is proposed and aimed at explaining how listeners respond to systematic change in everyday events while retaining a general sense of their rhythmic structure.
The approach describes attending as the behavior of internal oscillations, called attending rhythms, that are capable of entraining to external events and targeting attentional energy to expected points in time. A mathematical formulation of the theory describes internal oscillations that focus pulses of attending energy and interact in various ways to enable attentional tracking of events with complex rhythms.
This approach provides reliable predictions about the role of attending to event time structure in rhythmical events that modulate in rate, as demonstrated in 3 listening experiments.
equations
Extended Kalman Filter predictive/corrective oscillator for tempo adaptation
A formal model of the expectations of a music listener in term of rhythm / beat tracking
It is based on the notion of entrainment in coupled oscillators:
- 2 oscillators tend to synchronise when there is a possible energy transfer between both. (see image and movies below);
- In our case,
- one oscillator is the listener's beat expectation function (internal or attentional beat / rhythm)
- and the other oscillator is the musician (playing with temporal fluctuation) (external beat / rhythm).
First we consider the case of a listener expecting 1 event every beat.
Let
The phase
where
Hence the phase is negative when onset at
[TBC] about the definition interval
Expressing the eternal events as a sequence of onset times
where
In the next equation (called phase attractive circle map) , a coupling term is added in order to model the force exerted by the external rhythm to the attentional rhythm.
where the parameter
The period is also adjusted at each event:
Introduction of a new state variable
It is used in the following equation which models of a pulse of attentional energy, replacing the above parameter
An asymptotic development shows that for a large
The adaptation of
where
An incremental approximation of
where parameter
and the realtime adaptation of attentional focus is then described by:
there
The monotonic function
To summarise, we have altogether (
For a rhythm value inside-the-beat: when the onset of the next expected event is not 1 beat after the previous event but
Some parameter values (and approx.) taken from an implementation of the model:
$b = 0.94$ $\eta_s = 0.9$ $I_0(\kappa) \sim \exp(\kappa)$ - a table for
$A$ for$\kappa \in [1.0, 10.0 ]$ (step =$0.001$ ) - lookup with stllower_bound
.
In CFG model, the new values of tempo etc are estimated in leaves (terminal productions), using the MTU time interval
In order to discard meaningless parse trees, and reduce search space, we restrict this
When
Q: narrower window?
[Large 94], pages 14-15, defines a region of temporal expectancy, using an output pulse
where parameter
Q2: shall we consider the attentional focus
listening experiments
for validation of these equations and the coupled oscillators model of listener / player.
Jones, M.R., Moynihan, H., MacKenzie, N., Puente, J. Temporal aspects of stimulus-driven attending in dynamic arrays Psychol. Sci. 13 (4), 313–319. 2002. https://doi.org/10.1111/1467-9280.00458
Anna-Katharina R. Bauer, Manuela Jaeger, Jeremy D. Thorne, Alexandra Bendixen, Stefan Debener, The auditory dynamic attending theory revisited: A closer look at the pitch comparison task Brain Research, Volume 1626, 2015, Pages 198-210, ISSN 0006-8993 https://doi.org/10.1016/j.brainres.2015.04.032
appendix: coupled oscillators
see *e.g. http://www.math.pitt.edu/~bard/classes/mth3380/syncpapers/metronome.pdf
Synchronization of metronomes James Pantaleone Am. J. Phys 70(10), 992-1000. 2002.
There are many youtube videos presenting similar experiments.
*e.g. https://sciencedemonstrations.fas.harvard.edu/presentations/synchronization-metronomes
see also
Physics of Oscillations and Waves With use of Matlab and Python Arnt Inge Vistnes Springer, Undergraduate Texts in Physics, 2018. https://link.springer.com/book/10.1007%2F978-3-319-72314-3
recherche de pulsation / tempo
considére dans la séquence musicale la seule suite d’inter-onsets (durées séparant deux attaques successives).
considère un oscillateur isolé, ayant une période d’oscillation par défaut, qu’il couple à un autre oscillateur représentant le train d’impulsions de la séquence à analyser.
L’oscillateur corrige alors sa période selon la méthode du gradient descendant, de manière à minimiser l’écart entre sa pulsation et la période déduite de la nouvelle impulsion.
Si cet écart est trop important il ne tient pas compte de la dernière impulsion.
Plusieurs valeurs de couplage sont testées puis les résultats sont analysés par des "diagrammes régime" qui représentent la force de couplage des deux oscillateurs en fonction du rapport de couplage qui les unit
(nombre de périodes d’un oscillateur pour une période de l’autre oscillateur couplé).