{'fraction_non_alphanumeric': 0.029069767441860465, 'fraction_numerical': 0.043056773062445215, 'mean_word_length': 4.802453437055876, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Hebbian learning with elasticity explains how the spontaneous motor tempo affects music performance synchronization

A musician’s spontaneous rate of movement, called spontaneous motor tempo (SMT), can be measured when the musician spontaneously plays a simple melody. Data shows that SMT systematically influences tempo and synchronization among musicians. In this study we present a model that captures these phenomena. To develop our model, we review the results from three musical performance settings that have been previously published: (1) solo musical performance with a pacing metronome tempo that is different from the SMT, (2) solo musical performance without a metronome at a tempo that is faster or slower than the SMT, and (3) duet musical performance between musician pairs with matching or mismatching SMTs. In the first, the asynchrony between the pacing metronome and the musician’s tempo grew as a function of the difference between the metronome tempo and the musician’s SMT. In the second, musicians drifted away from the initial spontaneous tempo toward the SMT. And in the third, the absolute asynchronies between performing musicians were smaller if their SMTs matched compared to when they did not. We hypothesize that, while musicians can perform musical actions at a tempo different from their SMT, the SMT constantly acts as a pulling force. We developed a model to test our hypothesis. The model is an oscillatory dynamical system with Hebbian tempo learning and elasticity that simulates synchronization in music performance. The dynamical system’s natural frequency models SMT and Hebbian learning lets the system’s frequency adapt to match the stimulus frequency. The pulling force is modeled as an elasticity term that pulls the learned frequency toward the system’s natural frequency. To test our hypothesis, we chose model parameters based on the results of the first experiment, and asked whether they could predict the results of the next two experiments using the same set of parameters. The model fit the results of the first experiment closely, and accurately predicted the two additional data sets. Thus, our theory offers a dynamical explanation of how an individual’s SMT affects synchronization in realistic music performance settings, and the model also enables predictions about performance settings not yet tested. Author summary Individuals can keep a musical tempo on their own or timed by another individual or a metronome. Experiments show that individuals show a specific spontaneous rate of periodic action, for example walking, blinking, or singing. Moreover, in a simple metronome synchronization task, an individual’s spontaneous rate determines that the individual will tend to anticipate a metronome that is slower, and lag a metronome that is faster. Researchers have hypothesized the mechanisms explaining how spontaneous rates affect synchronization, but no hypothesis can account for all observations yet. Our hypothesis is that individuals rely on elastic Hebbian frequency learning during synchronization tasks to adapt the rate of their movements and match another individual’s actions or metronome tempo. Elastic Hebbian frequency learning also explains why an individual’s spontaneous rate persists after carrying out a musical synchronization task. We define a new model with elastic Hebbian frequency learning and use it to simulate existing empirical data. Not only can our model explain the empirical data, but it can also make testable predictions. Our results support the theory that the brain’s endogenous rhythms give rise to spontaneous rates of movement, and that learning dynamics interact with such brain rhythms to allow for flexible synchronization.

Humans can effortlessly sing a song in the shower or walk down an empty street. In 2 such a solo setting, individuals show a spontaneous singing tempo or walking pace. In 3 everyday life, however, humans often have to synchronize with external signals. For 4 example, singing with a pre-recorded song or marching in a parade with other 5 individuals. In the specific case of musical performances, musicians change the tempo of 6 their actions to match a musical tempo that is kept by other performing musicians. 7 This requires perception-action coordination, and involves coordinated communication 8 between the brain's sensory and motor systems [1]. However, most musical performances 9 do not match a musician's spontaneous tempo. How a musician's spontaneous tempo 10 affects a musical performance is still an open question [2]. To tackle this question, one 11 must first study the spontaneous tempo of periodic action, like finger tapping. 12 Before reviewing previous research, we wish to clarify some terminology. In the 13 literature on rhythmic synchronization, stimulus timing is historically described in 14 terms of inter-onset-intervals (IOIs), measured in (milli)seconds. For a metronome, 15 timing can be described as the length (in units of seconds) of one metronome cycle, or 16 its period. Similarly musical tempo is sometimes described as the time between beats, 17 or the inter-beat interval (IBI), which again, is the length of a cycle (a period). The 18 problem is that the term "tempo" in music is a frequency (beats per minute, bpm) not 19 a period. When period is measured in seconds, and frequency in cycles per second (ie, 20 Hertz) the relationship is f (Hz) = 1 / T (sec) = 1000 / T (ms). Because we will discuss 21 physics-based models in which frequency is the relevant variable, this distinction is 22 critical. For this reason, when we use SMT (spontaneous motor tempo), we will 23 consider it a frequency, and measurements in terms of milliseconds will be called SMP 24 (spontaneous motor period). Similarly, we will use SPR (spontaneous performance rate) 25 to refer to a frequency, and use spontaneous performance period (SPP) to refer to 26 measurements in units of time. We hope that by acknowledging these historical 27 misnomers we can avoid confusion when trying to understand our physics-based 28 dynamical models. Table 1 shows a summary of the terms, abbreviations, and the 29 correct corresponding units 30 SMTs vary within individuals, tending to be faster in early childhood compared to 31 [3], and between individuals, tending to be slower in adult musicians (∼ 2.5 32 Hz on average) compared to non-musicians (∼ 3.3 Hz on average) [5,6]. After studying 33 the SMT, one can study synchronization of simple movements, like finger-tapping, with 34 a metronome. The asynchrony between an individual's taps and metronome clicks can 35 be measured, and the mean asynchrony (MA) can be calculated [7,8]. For both 36 musicians and non-musicians the MA tends to be negative (taps precede the metronome 37 click) when synchronizing with a metronome with an IOI between 300ms and 2000ms [9]. 38 However, the MA becomes smaller as the metronome IOI approaches 300ms and for an 39 IOI smaller than 300ms the MA is absent or even slightly positive [10,11]. Interestingly, 40 the 300ms IOI, around where the negative MA disappears, coincides with the mean 41 SMT observed in humans (∼ 2.85 Hz), indicating a possible connection between SMT 42 and MA dynamics. However, musical expertise does affect the MA, with musicians 43 showing overall smaller MAs compared to non-musicians [12]. Additionally, the MA is 44 also positive (taps lag the metronome clicks) when synchronizing with a very slow 45 metronome with IOIs greater than 5000ms [13]. Synchronization with a slow metronome 46 is a difficult task, so the positive MA in this case may be the result of human actions 47 reacting to the metronome clicks, rather than a direct relationship between the MA and 48 the SMT [12]. When synchronizing with a metronome with an IOI between 2000ms and 49 5000ms, human actions form a bimodal distribution (i.e., some taps precede and some 50 lag the metronome clicks) [14]. Together, the SMT and the MA are behavioral 51 measurements we are interested in. While the SMT is a measurement of spontaneous, 52 non-paced action, the MA is a measurement of paced action. Studying both the SMT 53 and the MA lets us better understand how the spontaneous tempo of periodic action 54 affects an individual's synchronization with an external periodic stimulus. 55 Previous studies have looked at musical performance in solo and group settings to 56 investigate how the SMT and the MA are related to each other. In one study, musicians 57 performed a melody in a solo setting synchronizing with a metronome tempo that was 58 faster or slower than the musician's SMT. Results showed that the MA grew as a 59 function of the difference between the metronome tempo and the musician's SMT. 60 When the metronome was faster than the SMT, the MA had a tendency to be positive 61 (the musician's beat lagged the metronome clicks), and when the metronome was slower 62 than the SMT, the MA had a tendency to be negative (the musician's beat preceded the 63 metronome clicks). The smallest MA was observed when the metronome tempo 64 matched the individual's SMT [15]. In another study, musicians performed a melody in 65 a solo setting without a metronome, starting at spontaneous tempo that was slower or 66 faster than the SMT. Results showed that the musician's tempo had a tendency to drift 67 back to the SMT [2]. This tendency to drift back to the SMT has also been observed in 68 other similar studies [3,16]. One study has also investigated the relationship between 69 the SMT and the MA in duet musical performances. Musicians were split into two 70 groups: one group consisted of musician pairs with matching SMT (difference in period 71 duration smaller than 10ms) and the other group consisted of musician pairs with 72 October 17, 2022 3/29 mismatching SMT (difference in period duration greater than 110ms). Next, pairs of 73 musicians were asked to perform a melody with each other. Musician duets with 74 matching SMTs showed a smaller mean absolute asynchrony compared to synchronizing 75 pairs with mismatching SMTs. Additionally, after the duet performance each musician's 76 SMT was remeasured, and results showed that each musician's SMT did not change 77 compared to the SMT measured before the duet performance [4]. This study analyzing 78 musical performance in a duet setting revealed that the SMT affects the MA in social 79 tasks requiring periodic synchronization (i.e., rowing or playing music), but the task did 80 not affect each musician's SMT [4]. The evidence from all these studies in both solo and 81 duet settings highlights the effect that the SMT has on both the MA and the musical 82 tempo.

83
Theoretical models have previously proposed mechanisms for the SMT and the MA, 84 but independently. Potential mechanisms of the SMT include motor resonance governed 85 by body weight and limb length [17] and central pattern generators in the brain that are 86 essential for motor control [18,19]. Mechanisms that have been proposed to explain the 87 MA include delayed recurrent feedback in central-peripheral communication between the 88 auditory and motor systems [20][21][22] and under-or over-estimation of IOI lengths [23]. 89 Currently, a complete explanation of how the SMT and the MA relate to each other is 90 missing, but the synchronization dynamics of non-linear oscillators can capture some of 91 these relationships. Non-linear oscillator models capture the SMT using an oscillator's 92 natural frequency [3,24,25]. Additionally, non-linear oscillators can synchronize 93 in-phase with a periodic stimulus with a frequency that is different but close to the 94 natural frequency. In such a scenario, a MA is observed between the oscillator and the 95 stimulus. Similar to observations made in humans [15], the MA shrinks as the difference 96 between the stimulus frequency and the oscillator natural frequency is reduced [26,27]. 97 As a result, a non-linear oscillator can capture how a musician's MA grows as a function 98 of the difference between the stimulus tempo and the musician's SMT. Moreover, after a 99 non-linear oscillator is phase-locked to the stimulus frequency, if the stimulus disappears 100 the oscillator will continue oscillating but will return to its natural frequency [26,27].

101
This behavior is similar to some extent to musicians' tendency to return to their SMT 102 in the absence of a pacing stimulus [2] or after a musical performance [4]. However, 103 these observations in nonlinear oscillators require the natural frequency and the 104 stimulus frequency to be relatively close to each other, and if the difference exceeds a 105 certain threshold, in-phase synchronization will not be possible and unsynchronized 106 behavior may be observed [26,27]. This is distinct from the synchronization abilities of 107 humans, who can synchronize with stimuli tempi that are relatively far away from their 108 SMT. Hence, a model consisting purely of non-linear oscillators has a limited potential 109 to fully capture the relationship between the SMT and the MA in humans. 110 Righetti and colleagues described Hebbian dynamics for frequency learning, which 111 allow an oscillator to adaptively change its frequency to match an external periodic 112 stimulus frequency [28]. A limitation of the model by Rigetti and colleagues is that, 113 unlike humans, the oscillators with frequency learning capabilities do not return to their 114 original natural frequency after stimulation ceases. In contrast, an individual's SMT is 115 recovered after synchronizing with a periodic stimulus with an arbitrary tempo [15].

116
This phenomenon could be explained by the SMT having an elastic force. This 117 hypothesis proposes that the SMT is an attractor state pulling the system's tempo 118 towards optimal energy usage [3,15,29]. Lambert and colleagues added a linear 119 elasticity force governed by Hooke's law to the frequency learning rule described by 120 Righetti and colleagues [30]. This elasticity term pulls the oscillator's frequency to its 121 natural frequency. Hence, the oscillator can match its frequency with an external 122 stimulus frequency using Hebbian learning, but a force is constantly pulling the 123 oscillator's frequency to its natural frequency. Additionally, if the stimulus ceases, the 124 October 17, 2022 4/29 oscillators frequency will return to the natural frequency.

125
Behavioral studies have proposed an elastic tempo learning hypothesis to explain the 126 relationship between the SMT and the MA in humans [15]. However, no study so far 127 has quantified how well a dynamical systems model with elastic frequency learning 128 could capture dynamics observed in human data. In this study we test this hypothesis 129 using an oscillatory dynamical systems model with Hebbian learning for frequency 130 adaptation and an elastic force constantly pulling to the natural frequency. More 131 specifically, we use the canonical neural oscillator model described by Large and 132 colleagues [31], and add elastic frequency learning dynamics [28,30]. The goal is to 133 validate the model using real human data from previous studies of musical performance 134 that analyzed the relationships between the SMT and the MA. If we can achieve either 135 goal, we will show how an individual's SMT affects the MA during coordination with a 136 metronome or another individual. Our modeling approach is appropriate because 137 oscillators have a fixed natural frequency observed spontaneously in the absence of an 138 external stimulus. This natural frequency models the SMT. Because our model has an 139 elastic frequency learning rule, it can adapt its frequency to synchronize with a periodic 140 stimulus of any frequency, but displaying the MA due to the elastic force constantly 141 pulling the oscillator's frequency to its natural frequency. This elastic frequency 142 learning rule simulates two human features. First, the ability to synchronize with a 143 broad range of periodic stimulus tempi. And second, the consistent SMT displayed by 144 humans, even after synchronization with a stimulus of a different tempo.

145
Given all of its features, we refer to our model as the Adaptive Synchronization with 146 Hebbian Learning and Elasticity (ASHLE). methods section gives the complete definition of ASHLE, but here we describe its main 150 properties. ASHLE consists of two oscillators. Both oscillators share the parameters α 151 and β, which lead to spontaneous oscillatory activity. The first oscillator simulates 152 auditory neural entrainment with the stimulus frequency [32][33][34][35][36]. It incorporates a 153 Hebbian rule that learns the frequency of the external stimulus. The second oscillator is 154 coupled to the first oscillator, and simulates entrainment of motor activity to control the 155 action (i.e., fingers playing a piano). This second oscillator includes an elastic Hebbian 156 rule to learn the stimulus frequency (from the first oscillator), while constantly being 157 pulled to its natural frequency. In ASHLE, the timescales of the Hebbian frequency 158 learning rule and the elasticity rule are relatively fast (see the parameter analysis in the 159 methods section). The parameters λ 1 and λ 2 are the stimulus frequency learning rate 160 and the elastic force pulling to the natural frequency, respectively, and act as opposing 161 forces. Additionally, the first oscillator is weakly connected (with strength γ) to the 162 elastic Hebbian rule of the second oscillator, forcing the first oscillator to return to the 163 natural frequency, but at a very slow timescale and only in the absence of a stimulus. γ 164 is very small, and has a negligible effect when a stimulus drives ASHLE. However, in 165 the absence of a stimulus, γ makes ASHLE slowly return to its natural frequency.

166
ASHLE only simulates the musical beat in a musical performance and not any other 167 spectral features like pitch, harmony or melody content. However, because our goal is to 168 simulate the dynamics of the MA and the SMT at the level of the musical beat, ASHLE 169 is an adequate minimal model. Below we describe three experiments (see Fig 1) we 170 carried out with ASHLE to simulate musician data from three previously published 171 behavioral studies of musical performance.

172
In our first experiment, we optimized ASHLE to simulate solo musician performance 173 of a simple melody paced by a metronome. This task and data were published by  1. Illustration of the musical tasks and corresponding simulation experiments (A) The task simulated in experiment 1, in which a musician plays a simple melody with a metronome (top). In the musician experiment, the metronome tempo was different from the musician's SMT, and we simulate the same experimental conditions. Illustration of our simulation, in which ASHLE synchronizes with a sinusoidal stimulus (bottom). (B) The task simulated in experiment 2, in which a musician plays a simple melody, without a metronome (top). In the musician experiment, musicians started at a tempo that was different from their SMT. This specific example shows a performance that started with a tempo that was faster than the SMT, and the tempo periodically became slower due to the musician's tendency to return to the SMT. Illustration of our simulation, in which ASHLE oscillates, without a sinusoidal stimulus and returns to its natural frequency (bottom). (C) The task stimulated in experiment 3, in which pairs of musicians played a simple melody together after hearing four pacing metronome clicks (top). In the musician experiment, pairs of musicians had matching or mismatching SMTs. Illustration of our simulation, in which two ASHLE models synchronize with four cycles of a pacing sinusoidal stimulus (greyed-out blue and red lines), and then stimulate each other without the sinusoidal stimulus (solid blue and red lines) (bottom).
data showed that the MA grew as a function of the difference between a musician's 177 SMP and the metronome IOI. We simulated this task using ASHLE. We hypothesized 178 that ASHLE's elastic frequency learning will allow for synchronization with stimuli at 179 any frequency. Additionally, we hypothesized that the elastic force pulling towards 180 ASHLE's natural frequency will cause the MA between ASHLE and the stimulus to 181 grow as the difference between the stimulus frequency and ASHLE's natural frequency. 182 In our second experiment, we tested whether the same model, with the same 183 parameters, can simulate solo musician performance of a simple melody without a 184 metronome (unpaced). This task and data were published by Zamm and colleagues [2]. 185 In this task solo musicians played a melody, without a metronome, starting at five 186 different spontaneous tempi ( Fig 1B). First, at each musician's SMT, then at 187 spontaneous tempi faster and slower than the SMT, and finally at spontaneous tempi 188 that were even faster and even slower than the SMT. Their data showed that musicians 189 have a tendency to return to their SMT after starting a performance at a tempo faster 190 or slower than their SMT. We hypothesize that our model can simulate the same 191 progressive return to the SMT because of the elastic force constantly pulling ASHLE to 192 its natural frequency.

193
In our third experiment, we tested whether the same model and parameters can 194 simulate duet performance of a simple melody. This task and data were published in 195 another study by Zamm and colleagues [4]. In this task, pairs of musicians played a 196 melody in synchrony after listening to a metronome that established the tempo and 197 stopped. Musician duets were assigned to either of two experimental groups: matching 198 or mismatching SMTs. The data by Zamm and colleagues [4] showed that the mean 199 absolute asynchrony was larger between musicians with mismatching SMTs than 200 musicians with matching SMTs. We hypothesize that ASHLE's elastic frequency 201 learning will allow two of our models to synchronize with each other independent of 202 whether their natural frequencies are close to each other, but that the asynchrony 203 between two different ASHLE models will grow as a function of the difference between 204 their natural frequencies.

205
These three musical tasks and results capture relationships between the SMT and 206 the MA. Our goal is to test whether ASHLE's elastic frequency learning can capture 207 these relationships by simulating real musician data. If we are successful, we will shed 208 light on potential mechanisms that give rise to the SMT and the MA. Our model is the 209 first attempt at a dynamical model capturing the relationship between the SMT and the 210 MA that is validated by human data, while also making musician data predictions that 211 can be tested empirically in future experiments. Moreover, due to its dynamical systems 212 nature, ASHLE hypothesizes that the SMT and the MA are related to each other 213 through homeostatic mechanisms at play during PAC.

215
Experiment 1: Solo music performance with a metronome tempo 216 different than the SMT 217 We used ASHLE to simulate the solo task by Scheurich and colleagues [15] consisting of 218 performance of a simple melody paced by a metronome (Fig 1A). Their experiment had 219 four different experimental conditions: metronome period 30% shorter, 15% shorter, 220 15% longer, and 30% longer than the musician's SMP. Fig 2A shows the data with the 221 mean adjusted asynchrony between the musician beats and the metronome beats across 222 the four different experimental conditions. Scheurich and colleagues [15] reported the 223 mean adjusted asynchrony in their results. The mean adjusted asynchrony is equal to 224 the mean asynchrony during performance with a metronome period different from the 225 SMP, minus the mean synchrony during performance with a metronome period 226 matching the SMP. The musician data shows that the mean adjusted asynchrony was 227 positive (negative) when the metronome period was shorter (longer) than the musician's 228 SMP, and that the asynchrony grows as a function of the difference between SMP and 229 metronome period (see Fig 2A). 230 We can use ASHLE to simulate the beat during this music performance task. We 231 hypothesized that ASHLE's frequency learning features will allow it to synchronize with 232 a stimulus period shorter or longer than the period associated with its natural 233 frequency, but an asynchrony between ASHLE and the stimulus will be observed due to 234 the elastic force constantly pulling ASHLE's to its natural frequency. This first 235 experiment uses a sinusoidal stimulus to simulate the metronome. 236 We simulated this task using 20 different ASHLE models that differed in their 237 natural frequencies, which were computed to match each of the 20 musician SMTs 238 measured by Scheurich and colleagues [15]   Simulation of the MA between a musician's beat and a metronome beat with a period shorter or longer than the musician's SMP during solo musical performance. (A) The mean adjusted asynchrony (and standard error; N=20) between the musician beat and metronome beat during performance of a simple melody in four conditions: metronome period 30% shorter (F30), 15% shorter (F15), 15% longer (S15), and 30% longer (S30) compared to the musician SMP. The F30, F15, S15, and S30 names for the x axis were used by Scheurich and colleagues [15] to describe the "faster" and "slower" tempo compared to the SMT. Their use is incorrect, however, as a ratio (or percent) of the SMP determines the experimental metronome period, and not a ratio of the speed or rate (implied by the use of 'F' and 'S' for "faster" and "slower", respectively). Here we have pointed out their mistake to clarify the error, but we use their same original labels for the x axis in order to compare our simulation results with their original data. (B) Our simulation results showing the mean adjusted asynchrony (and standard error; N=20) between ASHLE and a sinusoidal stimulus in six conditions: stimulus period 45% shorter (F45), 30% shorter (F30), 15% shorter (F15), 15% longer (S15), 30% longer (S30), and 45% longer (S45) than the period of ASHLE's natural frequency. The shaded bars represent predicted measurements for data that has not been collected yet from musicians. (C) Mean adjusted asynchrony predictions when different ASHLE models (with different natural frequencies) synchronize with a stimulus period that is 45% shorter (F45), 30% shorter (F30), 15% shorter (F15), 15% longer (S15), 30% longer (S30), or 45% longer (S45) than the period of their natural frequecy. The values in (C) are predictions for musician data that has not been collected yet.
in learning of the stimulus tempo (due to λ 1 ) but with an asynchrony between ASHLE 247 and the stimulus (due to λ 2 ). In this experiment the parameter γ has a negligible effect 248 because of its small value compared to λ 1 , which dominates ASHLE's frequency 249 learning from an external stimulus (see parameter analysis in the methods section for an 250 examination of how different ASHLE parameters values affect its synchronization 251 behavior). Our results show that we have identified the optimal set of parameters that 252 allow ASHLE to capture the mean adjusted asynchrony values observed in the 253 behavioral data by Scheurich and colleagues [15].

254
For each ASHLE model we simulated the task in four experimental conditions where 255 the stimulus period was 15% or 30% shorter or longer than the period of the natural 256 frequency. We measured the asynchrony between ASHLE and the stimulus (see the 257 methods section for details about our simulation setup, procedure, and measurements). 258 We optimized ASHLE's parameters to approximate the musician data shown in Fig  prediction for what the mean adjusted asynchrony would look like if the same group of 264 musicians was to perform with metronome periods 45% shorter or longer than their 265 individual SMP. Our model predicts that the mean adjusted asynchrony in this 266 condition will be even larger compared to when performing with a metronome period 267 15% or 30% shorter or longer than the musician SMP. Fig 2C shows different ASHLE 268 models (with different natural frequencies) carrying out the same melody performance 269 task with a metronome period that is 45%, 30%, and 15% shorter or longer than their 270 natural period. Individual ASHLE models in Fig [15] observed when musicians individually performed a simple melody paced 280 by a metronome faster or slower than their SMT. In this second experiment, we used 281 ASHLE to simulate the data by Zamm and colleagues [2], who studied what happens 282 when musicians perform a simple melody unpaced, but starting at a tempo different 283 than the SMT (Fig 1B). Their experiment had four experimental conditions: starting 284 performance tempo fast, faster, slow, and slower than the SMT. Fig 3A shows their   285 results, which consisted of the adjusted slope (mean across musicians) in each of the 286 four different experimental conditions. The adjusted slope is equal to the slope that 287 best fit consecutive IBIs during a melody performance starting at a tempo different 288 than the SMT, minus the slope that best fit the consecutive IBIs during a melody 289 performance that starts at the SMT. The data shows that when musicians started at a 290 tempo faster than the SMT the mean adjusted slope was positive (musicians slowed 291 down; consecutive IBIs became longer), and when musicians started at a tempo slower 292 than the SMT the mean adjusted slope was negative (musicians sped up; consecutive 293 IBIs became smaller; see Fig 3A). Their results show that musicians had a tendency to 294 return to their SMT during a simple melody performance that started at a tempo 295 different than their SMT [2]. Simulation of the slope between consecutive IBIs when an unpaced musician performs a melody starting at a tempo that is different than the SMT. (A) The mean adjusted slope of consecutive IBIs (and standard error; N=24) when solo musicians perform a simple melody starting a tempo that is fast, faster, slow, or slower compared to the musicians SMTs. (B) Our simulation results showing the mean adjusted slope of consecutive IBIs (and standard error; N=23) when ASHLE oscillates, without a stimulus, starting at a frequency that is fast, faster, slow, or slower compared to the natural frequency. (C) Adjusted slope predictions when different ASHLE models (with different periods of natural frequency) oscillate without stimulation, starting with a period that is 45% shorter (F45), 30% shorter (F30), 15% shorter (F15), 15% longer (S15), 30% longer (S30), or 45% longer (S45) compared to the period of ASHLE's natural frequency. For consistency with experiment 1 results, here we also use the F30, F15, S15, and S30 names for the x axis that Scheurich and colleagues [15] use to describe the "faster" and "slower" tempo conditions. The values in C are predictions for musician data that has not been collected yet.
In this second experiment we used the same set of parameter values as in experiment 297 1. The only values that differed for this experiment were F = 0 (due to the lack of 298 stimulus), and the natural frequency and initial frequency values, which were dictated 299 by human data. In this experiment, the Hebbian frequency learning parameter λ 1 has 300 no effect because there is no stimulus. The elastic pull to the natural frequency, λ 2 , is in 301 action, as well as the weak pull to the nautral frequency in perception, γ = 0.02. λ 2 and 302 γ act as additive forces that control the size of consecutive period lengths in ASHLE's 303 behavior when a stimulus is not present. However, while λ 2 dictates how strongly 304 ASHLE pulls its frequency toward its natural frequency, γ dictates how quickly ASHLE 305 forgets its frequency in favor of the natural frequency. Here, γ is a small value, keeping 306 ASHLE close to its frequency and only letting ASHLE slowly return to its natural  how different ASHLE parameters values affect its behavior). 310 We used ASHLE to simulate the beats during this music performance task. We 311 hypothesized that ASHLE's pulling force will make it return to the natural frequency, 312 but at a very slow rate due to the weak pull to the natural frequency (small γ 313 parameter; see the methods section for a complete mathematical description of ASHLE 314 and parameter analysis). In contrast with experiment 1, in this second experiment 315 ASHLE was never stimulated by a sinusoid. We simulated this task using 23 ASHLE 316 models that differed in their natural frequency, computed from the 23 musician SMP 317 values measured by Zamm and colleagues [2] (320ms, 350ms, 355ms, 359ms, 382ms, 318 390ms, 390ms, 415ms, 418ms, 430ms, 435ms, 438ms, 439ms, 439ms, 443ms, 445ms, 319 455ms, 457ms, 462ms, 470ms, 475ms, 525ms, and 572ms; we excluded the data from the 320 participant with the SMP of 665ms due to the large difference between this ASHLE models (with different nautral periods) that perform the same melody task with 333 an initial period that is 45%, 30%, and 15% shorter or longer than the natural period. 334 Individual ASHLE models in Fig 3C predict that the slope grows as a function of the 335 difference between initial period and the natural period. Additionally, a slower natural 336 frequency predicts larger slope values compared to a faster one. The results in Fig 3C 337 are predictions that ASHLE makes for musician data that has not been collected yet. Experiments 1 and 2 showed that the same ASHLE model parameters can simulate two 341 different behavioral measurements collected in two independent experiments: the MA in 342 paced musical performance and the slope of consecutive IBIs in unpaced musical 343 performance. In this third experiment, we used ASHLE to simulate another task by 344 Zamm and colleagues [4] showing how musician duets perform a simple melody four 345 consecutive times (Fig 1C). Musician duets were separated into two experimental 346 groups: pairs with matching SMTs and pairs with mismatching SMTs. 347 We used the same ASHLE parameters as in experiments 1 and 2., In addition, 348 F z = 0.01, the coupling strength between ASHLE models stimulating each other, and 349 the addition of gaussian noise to ASHLE's action oscillator to simulate noise, leading to 350 the absolute asynchrony magnitudes observed in the behavioral data (see model 351 optimization in the methods section). Without the gaussian noise, ASHLE showed the 352 same relative difference in the mean absolute asynchrony between experimental groups 353 (match or mismatch SMT), but the values were considerably smaller (see model 354 optimization in the methods section). We simulated this task using 20 pairs of ASHLE 355 models that differed in their natural frequencies, computed from the 40 musician SMTs 356 measured by Zamm and colleagues [4]. We paired ASHLE models replicating Zamm 357 and colleagues' [4] pairing of musicians with matching or mismatching SMTs. For each 358 pair we simulated the duet melody performance task, where musician duets performed 359 the same simple melody four consecutive times (see the methods section for details 360 about our simulation setup and procedure). Fig 4B shows the mean absolute 361 asynchrony that we observed in our simulations for the experimental groups and melody 362 repetitions tested by Zamm and colleagues [4]. Our simulations show similar results to 363 the human data observed in Fig 4A. Additionally, Fig 4C shows musician data 364 predictions by simulating different ASHLE models performing the same duet melody 365 task with another ASHLE model that has an period of natural frequency 220ms shorter, 366 110ms shorter, 10ms shorter, 10ms longer, 110ms longer, and 220ms longer than the 367 other ASHLE model in the duet. The results in Fig 4C predict that the mean absolute 368 asynchrony between musician pairs grows as a function of the difference between their 369 natural frequency values. between the beats of the two performing musicians in each of the two experimental 372 groups, separately for each of the four melody repetitions (see the methods section for a 373 detailed description of the task by Zamm and colleagues [4]). This data shows that the 374 mean absolute asynchrony was smaller between musician duets with matching SMTs 375 compared musician duets with mismatching SMTs. We used ASHLE to simulate the 376 beats during this musical performance task. We hypothesized that two ASHLE models 377 will be able to synchronize with each other due to their frequency learning mechanism. 378 However, the elasticity pulling to their respective natural frequency will result in 379 asynchrony between them, and the asynchrony will be smaller between two 380 synchronizing ASHLE models with similar natural frequency values compared to two 381 ASHLE models with dissimilar natural frequency values. In this third experiment pairs 382 of ASHLE models are stimulated first by a sinusoid that establishes a common 383 frequency and then the two ASHLE models stimulate each other. As a result, 384 stimulation in this third experiment is slightly more complex than the constant 385 sinusoidal stimulation in experiment 1 and the lack of stimulation in experiment 2. The mean absolute asynchrony (and standard error; in each experimental group N=10) between two musicians with matching or mismatching SMTs during performance of a simple melody four consecutive times. (B) Our simulation results showing the mean absolute asynchrony between two synchronizing ASHLE models with natural frequency values that are close or far from each other. (C) Mean absolute asynchrony predictions when different ASHLE models (with different periods of natural frequency) synchronize with another ASHLE model with a period of natural frequency that is 220ms shorter, 110ms shorter, 10ms shorter, 10ms longer, 110ms longer, and 220ms longer. The values in C are predictions for data that has not been collected yet from musicians.

387
The interaction of Hebbian learning and elasticity mechanisms 388 during beat tracking can capture various coupling dynamics 389 In experiments 1 and 3, the asynchrony between ASHLE and a periodic stimulus was 390 affected by the elastic Hebbian frequency learning rule. Similarly, experiment 2 showed 391 that, in the absence of a stimulus, the elastic Hebbian frequency learning also affected 392 the frequency of ASHLE's spontaneous activity, especially if ASHLE's frequency was 393 different than its natural frequency. The rate of ASHLE's oscillatory behavior is the 394 result of elastic frequency learning, with Hebbian frequency learning and the elasticity 395 acting as opposing forces. While Hebbian frequency learning lets ASHLE change its 396 frequency to match any stimulus frequency, the elastic force pulls ASHLE toward its 397 natural frequency. ASHLE's behavior is consistent with theoretical accounts 398 highlighting that a dynamical system's natural frequency is the optimal state for 399 synchronization, even if the system can synchronize at other frequencies [15,[37][38][39]. An 400 interesting question is where in the musician brain these mechanisms of frequency 401 learning and frequency elasticity occur. As far as frequency learning, previous research 402 shows that cortical and subcortical networks in motor brain areas synchronize neural 403 activity that reflects the rhythms of a periodic stimulus [32,35,40,41]. The origins of 404 the SMT in humans (simuated by ASHLE's natural frequency) involve both the central 405 and the peripheral nervous system [18] including anatomical and biomechanical 406 factors [17]. Currently no consensus exists about the origins of the SMT and its 407 influence during PAC. ASHLE is the first model validated by real human data that 408 captures how motor actions entrain to the tempo of a periodic stimulus and are 409 influenced by the dynamic principles of elastic Hebbian frequency learning. By using a 410 dynamical systems model, we rule in a family of possible biomechanical principles [42] 411 that could underlie the origins of the SMT.

412
Experiment 1: Solo music performance with a metronome tempo 413 different than the SMT 414 Our model was able to reproduce the mean adjusted asynchrony between musician 415 beats and metronome beats when the metronome tempo is faster or slower than the 416 musician's SMT, in a simple musical performance task (Fig 2A and Fig 2B). Taking a 417 closer look at the behavioral data in Fig 2A we see that the magnitude of the mean 418 adjusted asynchrony values is slightly asymmetric between faster and slower stimuli 419 with respect to the SMT. Faster metronomes resulted in slightly larger mean adjusted 420 asynchrony magnitudes than slower ones. This human behavior implies 421 frequency-scaling of the elastic Hebbian learning rule in Eqs (5b) and (5d) (see [26,31] 422 for more theory about frequency-scaled dynamical systems similar to ASHLE). other. ASHLE's mechanisms and behavior are validated by its ability to simulate the 431 data by Scheurich and colleagues [15] (Fig 2A and Fig 2B).

432
ASHLE's mechanisms of frequency learning and elastic force pulling to the natural 433 frequency are also conceived in neuroscientific terms. ASHLE's frequency learning rate 434 parameter, λ 1 , simulates the brain's ability to entrain perceptual networks when 435 processing a periodic stimulus like a musical beat or a metronome tempo [32]. In 436 contrast, ASHLE's elasticity parameter, λ 2 , reflects the neural and biomechanical 437 properties that give rise to the SMT [17] 438 While ASHLE was able to simulate the musician data by Scheurich and 439 colleagues [15], the model used in experiment 1 does not show variability in its 440 dynamics. Once ASHLE phase-locks with the sinusoidal stimulus, the asynchrony 441 between ASHLE and the stimulus reaches a steady state with zero variability. This is a 442 limitation of ASHLE's ability to simulate musician's beat tracking behavior, reflected by 443 a degree of variability across musician IBIs. In experiment 1, this lack of variability was 444 a limitation to perfectly simulate the results by Scheurich and colleagues [15]. Using 445 ASHLE models with different natural frequency values allowed us to simulate the 446 variability between musicians (hence the standard error in Fig 2B). However, our 447 standard errors were overall smaller compared to the musician standard errors that 448 Scheurich and colleagues [15] reported. The standard error in musicians has two sources: 449 (1) variability within each musician's beat tracking behavior and (2) variability between 450 the behavior of different musicians. While we were able to simulate the variability 451 between musicians using ASHLE models with different natural frequency values, the 452 lack of noise in ASHLE's activity is the likely cause of the difference between our 453 simulation results and the musician results. Adding gaussian noise to ASHLE's activity 454 could better approximate the musician results. However, we considered the addition of 455 noise to be beyond the scope of this first experiment because our goal was to optimize 456 ASHLE to simulate the magnitude of the mean adjusted asynchrony (see model 457 optimization in the methods section).

458
ASHLE also made testable predictions of paced musician performance in a solo 459 setting (Fig 2B and Fig 2C). First, it predicted mean adjusted asynchrony values that 460 we could expect if the same group of musicians were to carry out the task synchronizing 461 with a metronome period 45% shorter or longer than the SMP (Fig 2B shaded bars).  These simulations sho that ASHLE can be used to make predictions about a musician's 466 behavior with any SMT, and such predictions can be empirically tested to further 467 validate ASHLE's behavior or better tune its parameters. 468 Experiment 2: Unpaced solo music performance with a starting 469 tempo different than the SMT 470 Our model was also able to simulate the mean adjusted slope between consecutive IBIs 471 that Zamm and colleagues [2] observed when musicians performed a melody without a 472 metronome, starting at a tempo faster or slower than the SMT (Fig 3A and Fig 3B).

473
ASHLE's approximation of the data is not perfect, but it is close. This is because the 474 parameters λ 1 and λ 2 were optimized to simulate the data in experiment 1 and the same 475 values were used in experiment 2. Hence, our results in this second experiment show 476 that the values for λ 1 and λ 2 can generalize to simulate data across different datasets. 477 There was only one ASHLE parameter that we optimized based on the musician data 478 from experiment 2. This was the γ parameter (see model optimization of experiment 2, 479 in the methods section). In experiment 2 there is no sinusoidal stimulus (F = 0) and γ 480 in Eq (5a) controls how quickly ASHLE's frequency returns to the natural frequency. 481 γ = 0.02 was the value that resulted in the best fit between ASHLE's simulation results 482 and the musician data results. The small γ = 0.02 value can be explained by looking at 483 the musician data in Fig 3A. Musician's mean adjusted slope values are relatively small 484 for all experimental conditions. These small values result from musicians showing a 485 tendency to very slowly return to their SMT throughout the musical performance. That 486 is why the value of γ is very small compared to λ 1 = 4 and λ 2 = 2. Hence, γ is the 487 ASHLE parameter that represents a musician's tendency to return to their SMT in the 488 absence of stimulation. It is relatively small because part of musical training consists in 489 being able to maintain an arbitrary tempo throughout a musical performance [43,44]. 490 Theoretical models of musical tempo suggest entrainment of periodic neural activity 491 with periodic actions [45], but the mean adjusted slope results by Zamm and 492 colleagues [2] also suggests that the motor system, while maintaining the musical tempo, 493 October 17, 2022 13/29 is constantly influenced by biomechanical and neural constraints that could give rise to 494 the SMT [17]. Evidence from synchronization-continuation tasks suggest the existence 495 of a physical and likely anatomical force pulling human periodic actions to the SMT in 496 the absence of an external stimulus [3,16]. Our simulations reflect that the same 497 mechanisms to maintain a tempo are at play in experiment 1 and 2. However, the 498 presence of a stimulus in experiment 1 resulted in maintaining the tempo and the 499 observation of an MA between the musician and the metronome. In contrast, the lack of 500 stimulus in experiment 2 results in the musician slowly returning to the SMT.

501
As in experiment 1, the ASHLE model from experiment 2 was deterministic. The 502 standard errors in our simulation results (Fig 3B) are different from the standard errors 503 in the musician results ( Fig 3A). As we discussed in experiment 1, the results have two 504 sources of activity: variability in each individual musician's actions and variability 505 between musicians. Our simulations only capture the variability between musicians by 506 using different natural frequency values to simulate different musician's SMTs.

507
ASHLE's lack of variability in its activity suggest that the variability in each individual 508 musician's actions also contributes to the standard error observed in Fig 3. Our 509 simulations of experiment 2 show that ASHLE is a good model to approximate the 510 slope between consecurive IBIs, but not the variability observed when musicians try to 511 maintain the tempo in a solo setting without a pacing metronome.

512
ASHLE also made testable predictions of unpaced musician performance in a solo 513 setting. Fig 3C shows  with matching or mismatching SMTs 520 ASHLE was able to simulate the mean absolute asynchrony between the beat of 521 musician duets (with matching or mismatching SMTs) that performed a simple melody 522 (Fig 4A and Fig 4B). With the exception of the type of stimulation (which was different 523 between all three experiments) we used the same ASHLE model parameters in 524 experiments 1, 2, and 3. By carrying out experiment 3, our goal was to show that 525 ASHLE can capture musical performance behavior not just in solo settings, but also in 526 a duet setting. To capture the data of experiment 3, it was necessary to add noise to 527 ASHLE's action oscillator (see model optimization in the methods section). Without 528 the gaussian noise, ASHLE showed the same qualitative pattern of results, but with a 529 noticeable difference in magnitude between the musician mean absolute asynchrony and 530 ASHLE's (see Fig 5). Adding noise to ASHLE's effector significantly improved 531 ASHLE's approximation of the human data ( Fig 4A and Fig 4B). More specifically, the 532 added noise results in ASHLE a better approximation of the magnitude of the mean 533 absolute asynchrony in the musician duets. Across all simulations, the standard error in 534 ASHLE's results is very similar to the standard error displayed by the human data.

535
While we could have changed parameter values to achieve a perfect match between 536 ASHLE's simulations and the musician activity for all experimental conditions, our goal 537 was to identify the best set of parameter values that could capture the activity across 538 different musician experiments.

539
ASHLE was able to simulate the solo performance results in experiments 1 and 2 540 with a deterministic model. However, noise was necessary to simulate the duet 541 performance results in experiment 3. This makes sense as the musical performance task 542 in experiment 3 involves more sources of variability than the tasks in experiments 1 and 543 Fig 5. Simulation without noise of the mean absolute asynchrony between two musicians with matching or mismatching SMTs during duet musical performance. Our simulation results showing the mean absolute asynchrony between two synchronizing ASHLE models with matching or mismatching natural frequency, but no noise added to Eq (5c). The resulting mean absolute asynchronies in this simulation without noise are much smaller compared to the musician data results in Fig 4A. The added noise in Eq (6) improves the model's results, which are shown in Fig 4B. 2. While only one musician performs in experiments 1 and 2, in experiment 3 there are 544 two performing musicians receiving feedback from each other. The variability in 545 musician behavior noticeably influences the absolute asynchrony between two musicians 546 performing as a duet. ASHLE's need for noise in its action oscillator reveals that the 547 variability in musician behavior at the individual level is a significant contributor to the 548 mean absolute asynchrony in experiment 3. Without noise, ASHLE simulated a mean 549 absolute asynchrony around 2ms and 18ms for the duets with matching and 550 mismatching SMTs, respectively. When noise was added, ASHLE showed a mean 551 absolute asynchrony around 10ms and 20ms for the duets with matching and 552 mismatching SMTs, respectively. Hence, the presence of noise is needed to capture 553 musical duet behavior, especially when the two musicians have matching SMTs.

554
To simulate this musical duet task, we also needed a significantly smaller connection 555 strength (see model optimization in the methods section) between the two ASHLE 556 models stimulating each other. This difference in stimulus strength between experiment 557 1 and experiment 3 is due to the nature of the stimulus. With unidirectional forcing, a 558 large forcing strength helps achieve phase-locked synchronization between a dynamical 559 system and a stimulus [26]. This is very different when two or more dynamical systems 560 stimulate each other, like the two ASHLE models stimulating each other in experiment 3. 561 Previous studies of stability between dynamical systems have revealed that small forcing 562 strengths between dynamical systems ensure the stability of their periodic behavior [26]. 563 ASHLE also made testable predictions about how musician duets would perform in 564 new experimental manipulations. Fig 4C shows predictions for the mean absolute 565 asynchrony that one would observe between two musicians, one with a specific SMT, 566 and the other with an SMT that differs by a specific value from the other musician's 567 SMT. These predictions show that the mean absolute asynchrony between the two 568 musicians will generally vary as a function of the difference between the musician's 569 SMTs, and also as a function of the specific SMT value in either of the two musicians. 570 ASHLE can be used to make predictions about musician duets with any SMTs, and 571 such predictions can be empirically tested to further validate ASHLE's behavior.

572
General discussion 573 We have presented the ASHLE model, which captures how the musical tempo is 574 maintained during various simple performance tasks. In experiment 1, ASHLE captured 575 the MA between a musician's beats and metronome beats during a simple melody 576 performance task (Fig 2). In experiment 2, ASHLE captured the rate of beat change 577 when a solo musician performed a simple melody without a metronome (Fig 3). And in 578 experiment 3, ASHLE captured the mean absolute asynchrony between the beat of two 579 musicians performing a simple melody as a duet (Fig 4). ASHLE was able to capture 580 these three different tasks using the same set of parameters for its intrinsic dynamics 581 (see parameter analysis and model optimization in the methods section). Our 582 simulations validate ASHLE's ability to simulate real musician data. Hence, ASHLE is 583 a model with a mechanisms of elastic Hebbian frequency learning that generalizes across 584 different tasks and different datasets. We also used ASHLE to make testable predictions 585 October 17, 2022 15/29 of musician performance data not yet collected (Fig 2B, Fig 2C, Fig 3C, and Fig 4C).

586
Future behavioral studies can collect this data to validate ASHLE as a model able to 587 capture musician performance. More data collected could also help to better fine tune 588 ASHLE's parameters in case ASHLE, in its current state, cannot sufficiently predict 589 new musician data.

590
ASHLE is the first model with the interacting forces of Hebbian frequency learning 591 and elasticity pulling toward a systems natural frequency to be applied to asynchrony 592 data. Previous models have focused on explaining the origin of the negative mean 593 asynchrony (NMA), which is a specific type of asynchrony when the synchronizing 594 agent's actions anticipate the pacing signal (i.e., a metronome). The first kind of these 595 models propose that the NMA is the result of adaptive synchronization by means of 596 phase and period correction rules at phenomenological [46] and neuromechanistic 597 levels [42]. Another kind of model, called strong anticipation models, propose that the 598 NMA is the result of delayed feedback [20] and, in the case of humans, the NMA has 599 been theorized to emerge from delayed neural communication in the sensorimotor 600 system [21]. ASHLE can capture both the NMA and the positive MA using the same 601 fundamental principles of adaptive frequency learning and elastic force. In humans, the 602 NMA is observed when synchronizing with a metronome tempo with an IOI larger than 603 350ms [9]. Interestingly, the average human SMP is around 400ms. As a result, the 604 human NMA in ASHLE emerges from a force pulling the human tempo to the SMT 605 during adaptive synchronization with a slower stimulus. However, there are similarities 606 between ASHLE and models of strong anticipation to explain the NMA as resulting 607 from delayed feedback [20,21]. Both ASHLE and strong anticipation models are based 608 on physical principles. Future work should try to combine ASHLE and the strong 609 anticipation model of human anticipation to achieve a comprehensive model of adaptive 610 and anticipatory activity in human behavior. 611 We have presented a versatile, neuroscientifically-inspired, and ecologically valid 612 model of adaptive musical beat performance for solo and duet settings. ASHLE is a 613 model that can capture adaptive human synchronization based on dynamical principles. 614 ASHLE could be used not just to simulate human data and predict human behavior, 615 but also as a tool with which humans can interact in experimental, musical, and therapy 616 settings. ASHLE is the first model of its kind, and provides us with a better 617 understanding about how Hebbian frequency learning in the motor cortex interacts with 618 the elastic and dynamical constraints that give rise to the SMT. parameters is outside the oscillator's phase-locking regime, synchronization will fail [47]. 627 To overcome the limitation of fixed parameters, studies have shown that oscillator 628 parameters can be defined dynamically by a differential equation [45,[47][48][49][50][51][52][53]. Because 629 the natural frequency is critical to determine an oscillator's phase-locking regime, 630 Righetti and colleagues [47] defined an equation that allows a limit-cycle oscillator to 631 dynamically adapt its frequency to match the rate of periodic activity of an arbitrary 632 stimulus and phase-lock.
In Eq (1), f is an oscillator's natural frequency in hertz, λ is the learning rate (or 634 the adaptation timescale for f ), x(t) is an arbitrary stimulus, and ϕ is the oscillator's 635 phase [47]. Because f is a real-valued term, the stimulus x(t) is assumed to be a real 636 signal, but if it were complex-valued, only the real part of x(t) would be needed to 637 observe the adaptive frequency behavior (the imaginary part can also be used. See the 638 ASHLE model definition for this equation). Hence, to process a complex-valued 639 stimulus, Eq (1) would have the following form: Eq (2) allows a non-linear oscillator to dynamically adapt its frequency to phase-lock 641 with a periodic stimulus (by synchronizing only with its real part) of an arbitrary 642 frequency [47]. However, Eq (2) does not have memory of its initial conditions for the 643 frequency term, so after stimulation the oscillator's frequency f will remain in its 644 learned state and will not return to the oscillator's original natural frequency. Lambert 645 and colleagues [30] envisioned an oscillator able to adapt its frequency elastically so that 646 the oscillator would return to its natural frequency in the absence of stimulation. Eq (3) 647 describes this elastic frequency learning rule: In Eq (3), λ 1 is the frequency learning rate from Eq (2) and λ 2 is the elastic force 649 pulling the oscillator's f back to f 0 , which is a fixed value representing the oscillator's 650 natural frequency. λ 2 multiplies the difference between f and f 0 . Thus, the new term is equivalent to Hooke's law, which states that the force needed to extend a 652 spring is linearly scaled by the distance resulting from such extension [30]. As f and f 0 653 differ in value due to a stimulus x(t) that changes the adaptive frequency term

658
This network allowed them to dynamically find pulse and meter in musical signals [30]. 659 To use Eq (3) we need to combine it with an oscillatory dynamical system. Because 660 we want to simulate periodic synchronization, we use the canonical Hopf oscillator 661 described by Large and colleagues that can synchronize with an external periodic 662 stimulus [26,31]. The oscillator that we will use has the following general form: In Eq (4) z is the state of the oscillator, and α, β 1 and β 2 are fixed parameters that 664 control the dynamics of the oscillator. f determines the rate of oscillation and ϵ is a 665 parameter that controls the degree of higher-order nonlinear activity in the oscillator. 666 x(t) is an arbitrary stimulus. This oscillator is derived from a biological model of neural 667 oscillation and can capture neural synchronization observed in real neurons and sensory 668 processing [54,55]. Moreover, a single oscillator can show stable oscillatory activity, 669 even after it is no longer being stimulated, hence showing "memory" [26]. We want to 670 simulate a musician's SMT, so we only need one oscillator with a fixed f 0 value. This 671 contrasts with the models described by Large and colleagues [31], who used a network of 672 oscillators with different natural frequency values.

698
This model is inspired by neuroscientific hypotheses about processes involved during 699 perception-action coordination [32]. Eqs (5a) and (5b) simulate entrainment in 700 cortico-subcortical motor brain areas when processing a periodic stimulus of an 701 arbitrary frequency [34][35][36]. That is why Eq (5a) shows sustained oscillatory activity 702 even after a stimulus is no longer present, simulating neural entrainment to the musical 703 beat [32]. Eqs (5c) and (5d) simulate the motor system processing the entrained beat 704 information to control peripheral effectors (i.e., a finger playing a piano) during a 705 musical performance task. Eqs (5b) and (5d) simulate the frequency learning rules of 706 central and peripheral motor function. Because of how ASHLE processes a stimulus, 707 Eqs (5a) and (5b) simulate how the neurons entrain to a periodic stimulus, while Eqs 708 (5c) and (5d) captures how the motor system converts this encoded information into a 709 motor command to effectors.

710
While Eq (5a) is driven by an external stimulus F x(t), Eq (5c) is driven by a 711 unit-magnitude complex sinusoid with the angle of Eq (5a). The input x(t) to ASHLE 712 in Eq (5a) will be a complex sinusoid to simulate musical performance paced by a 713 metronome, zero to simulate spontaneous musical performance, or the state of another 714 October 17, 2022 18/29 ASHLE's z a term to simulate duet musical performance using two synchronizing 715 ASHLE models.

722
Throughout this chapter, we fixed parameters α = 1 and β = −1. This choice of 723 parameter values causes Eqs (5a) and (5c) to show spontaneous unit-magnitude 724 limit-cycle behavior [26]. In our first and second analysis we use values of F = 1 (like in 725 Experiment 1) and in our third analysis F = 0 (like in Experiment 2). The specific 726 value of F z = 0.01 that we used in Experiment 3 is described in the model optimization 727 section specific to the Experiment 3 methods section. In the first and second analysis, 728 the external stimulus x(t) was always a unit magnitude complex sinusoid, so (f 0 = 1000ms 400ms = 2.5Hz) [2,4,15]. 733 We first analyzed how λ 1 and λ 2 affect the phase-locked asynchrony between the 734 stimulus x(t) and ASHLE's z a (which simulates control of peripheral effectors) when the 735 stimulus period is 45% shorter (f s = 1000ms 0.55×400ms ) and 45% longer (f s = 1000ms 1.45×400ms ) than 736 ASHLE's period of natural frequency. We ran different simulations, each with a unique 737 value for λ 1 and λ 2 . In all simulations, ASHLE and x(t) interacted for 50 seconds with 738 initial conditions z p (0) = z a (0) = 0.001 + i0. In Eq (5b), the parameter γ = 0 because 739 we do not want to study the effect of this small parameter in this first analysis (see our 740 third parameter analysis below to understand how gamma affects ASHLE's behavior). 741 After each simulation finished, we found the location (in milliseconds) of local maxima 742 (i.e., peaks) in the real part of the oscillatory activity of x(t) and z a (Fig 6A). Then, we 743 subtracted the location of the peaks of x(t) from the location of the peaks of z a and 744 averaged the result to obtain the mean asynchrony in milliseconds. If x(t) and z a 745 showed a different number of peaks, that indicated that phase-locked synchronization 746 did not occur between the two. Fig 6B and  frequency. This analysis revealed that phase-locked synchronization does not occur for 750 certain combinations of λ 1 and λ 2 values (black cells in Fig 6B and Fig 6C).

751
Interestingly, when λ 1 = 0, phase-locked synchronization is never possible. This makes 752 sense, since λ 1 is the frequency learning rate that allows ASHLE to change its frequency 753 to match the frequency of x(t). When λ 1 = 0, phase-locked synchronization can only 754 occur between ASHLE and a stimulus with a frequency that is close to ASHLE's natural 755 frequncy (see the study by Kim and Large [26] for a detailed analysis of this kind of 756 synchronization in the absence of a frequency learning rule). This analysis also revealed 757 that as the value of λ 2 becomes larger, phase-locked synchronization may not be 758 observed (depending on the value of λ 1 ) because ASHLE's frequency terms f p and f a 759 are pulled strongly to the natural frequency f 0 . The values of λ 1 and λ 2 modulate the 760 size of the asynchrony. As λ 1 becomes larger, the magnitude of the asynchrony between 761 z a and x(t) tends to decrease and is sometimes close to zero when λ 2 = 0. The opposite 762 occurs when λ 2 grows. This observation reveals that λ 1 and λ 2 work in opposing 763 directions. While λ 1 changes the model's frequency to match the stimulus frequency, λ 2 764 pulls ASHLE's to f 0 . Moreover, as ASHLE's frequency deviates from f 0 , λ 2 acts with 765 more strength, while the strength of λ 1 is not directly affected by the difference between 766 f 0 and ASHLE's frequency. Additionally, when synchronization is observed between 767 ASHLE and the stimulus x(t), the sign of the asynchrony between z a and x(t) is affected 768 by whether x(t) is faster or slower than ASHLE's natural frequency, with a tendency be 769 positive (lagging behavior) and negative (anticipatory behavior), respectively. 770 Fig 6. The asynchrony between ASHLE and a sinusoid with period 45% shorter or longer than ASHLE's period of natural frequency, as a function of frequency learning and elasticity parameters. (A) Illustration of the asynchrony between ASHLE's z a and the external sinusoidal stimulus, and how it is measured. (B) The asynchrony in milliseconds between ASHLE and a sinusoidal stimulus with a period 45% shorter than ASHLE's period of natural frequency, and its change as a function of λ 1 and λ 2 , which are ASHLE's parameters for frequency learning and elasticity, respectively. (C) The asynchrony in milliseconds between ASHLE and a sinusoidal stimulus with a period 45% shorter than ASHLE's period of natural frequency, and its change as a function of λ 1 and λ 2 values. Black cells indicate λ 1 and λ 2 value pairs for simulations where ASHLE and the sinusoidal stimulus could not synchronize.
Our second analysis focused on narrowing down our search for parameter values for 771 λ 1 and λ 2 that result in asynchronies in the range observed in human data. In the 772 experiment by Scheurich and colleagues [15], musicians synchronized with a stimulus 773 period that is 15% or 30% shorter or longer than their SMP to measure the mean 774 adjusted asynchrony (which is equal to the MA observed during performance with a 775 metronome tempo different from the musician SMT, minus the MA measured during 776 performance with an metronome matching the musician SMT). Musicians showed mean 777 adjusted asynchrony values in the range of -10ms and 10ms (see Fig 2A). In this 778 analysis we ran simulations where ASHLE was stimulated by a different stimulus 779 frequency to measure the MA between an ASHLE model with an f 0 = 2.5 (same as our 780 first analysis) and a sinusoidal stimulus x(t) = exp(i2πf s t) with six potential period 781 lengths: 45% shorter (f s = 1000ms 0.55×400ms ), 30% shorter (f s = 1000ms 0.70×400ms ), 15% shorter 782 (f s = 1000ms 0.85×400ms ), 15% longer (f s = 1000ms 1.15×400ms ), 30% longer (f s = 1000ms 1.30×400ms ), and 45% 783 longer (f s = 1000ms 1.45×400ms ) than ASHLE's period of natural frequency. In our first 784 parameter analysis, we noticed that values for λ 1 between 3 and 5, and λ 2 between 1 785 and 3 could result in MA values in the range of the mean adjusted asynchrony observed 786 in humans (Fig 6B and Fig 6C). In this analysis we refine our search for λ 1 and λ 2 in 787 this range of values. We ran simulations in a similar fashion to our first analysis. in humans. This analysis, however, focused on finding parameter values so that ASHLE 800 can capture paced musician synchronization. We also want ASHLE to be able to 801 capture musician behavior during unpaced musical performance, so carried out a third 802 parameter analysis to understand ASHLE's behavior in the absence of a stimulus.

803
In our third parameter analysis we observed how, in the absence of an external 804 Fig 7. The asynchrony between ASHLE and a sinusoid faster or slower than ASHLE's natural frequency as a function of a narrower range of values for the frequency learning and elasticity parameters. Each cell shows the MA between ASHLE and a sinusoidal stimulus with a period 45% shorter, 30% shorter, 15% shorter, 15% longer, 30% longer, and 45% longer than ASHLE's period of natural frequency, for a pair of values for λ 1 and λ 2 , which are ASHLE parameters for frequency learning and elasticity, respectively. The pair of λ 1 = 4 and λ 2 = 2 yield MA values similar to the ones that Scheurich and colleagues [15] observed in musicians synchronizing with a metronome period 30% shorter, 15% shorter, 15% longer, and 30% longer than the musician's SMP.
stimulus (i.e., F = 0), the parameter γ affects the return of ASHLE to f 0 when the 805 initial values of f p and f a are different than f 0 . This situation would occur in 806 simulations where ASHLE learned a frequency different than its f 0 from a stimulus and 807 then stimulus stops, or if f p (0) and f a (0) are set to initial conditions different than f 0 808 in the absence of a stimulus. In the experiment by Zamm and colleagues [2], musicians 809 spontaneously started performing at a tempo faster or slower than their SMTs. A linear 810 regression of the consecutive IBI lengths resulted in a slope that revealed that musicians 811 progressively shrank or widened consecutive IBIs, indicating a tendency to return to ASHLE slope values as a function of γ and initial frequency in the absence of a stimulus. The effect of the γ parameter on the slope values between consecutive period lengths when ASHLE oscillates without a pacing stimulus, starting at a frequency that has a period 45% shorter (f s = 1000ms 0.55×400ms ), 30% shorter (f s = 1000ms 0.70×400ms ), 15% shorter (f s = 1000ms 0.85×400ms ), 15% longer (f s = 1000ms 1.15×400ms ), 30% longer (f s = 1000ms 1.30×400ms ), and 45% longer (f s = 1000ms 1.45×400ms ) than ASHLE's period of natural frequency. Experiment 1: Solo music performance with a metronome tempo 832 different than the SMT 833 Behavioral data for simulation 834 In the task by Scheurich and colleagues [15], 20 musicians individually performed a 835 simple melody while synchronizing with a metronome in four experimental conditions: 836 metronome period 30% shorter, 15% shorter, 15% longer, and 30% longer than their 837 SMP. For each metronome rate, participants performed the melody ("Mary had a little 838 lamb") four consecutive times (32 beats per repetition, 128 beats total). Experimenters 839 measured the mean adjusted asynchrony between the participant beats and the 840 metronome clicks during the middle two melody repetitions (64 beats total). The mean 841 adjusted asynchrony is the MA observed when the musician performs with a metronome 842 tempo different than the musician's SMT, minus the MA observed when the musician 843 performs with a metronome that matches the SMT. Scheurich and colleagues [15] used 844 the mean adjusted asynchrony instead of the MA to assume in their analysis that no 845 MA exists between the musician and the metronome that matches the SMT. Fig 2A   846 shows the behavioral data with the mean adjusted asynchrony (average and standard 847 error) observed across all 20 musicians for each experimental metronome tempo 848 condition. Their results showed that the mean adjusted asynchrony had a tendency to 849 be positive when synchronizing with a metronome faster than the SMT (musician 850 actions lagging the metronome), and negative when synchronizing with a metronome 851 slower than the SMT (musicians actions anticipating the metronome). Additionally, the 852 mean adjusted asynchrony grew as a function of the difference between musician SMT 853 and experimental metronome tempo. 854 Setup, procedures and measurements 855 To obtain the musicians SMPs, we overlaid a grid over figure 4 from the paper by 856 Scheurich and colleagues [15], which showed each musician's measured SMP (in their 857 original paper, the authors mistakenly call the SMP as the 'SPR'). Using this grid over 858 the original figure allowed us to precisely digitize each musician's SMP from the original 859 publication. Using the musician SMP values, we simulated 20 different ASHLE models, 860 all with the same parameter values (see model optimization below) except for the 861 natural frequency, which has a periof that matched the SMP of a different musician.

862
ASHLE does not generate pitch, so it only simulates the beats of the melody that 863 musicians performed, not the melody or harmony content. This is not a problem, 864 however, since Scheurich and colleagues only analyzed each musician's beat performance. 865 In all simulations, initial conditions were z p (0) = z a (0) = 0.001 + i0 (indicating that  Our goal was to use ASHLE to simulate the results in the musician data by Scheurich 897 and colleagues [15]. In all our simulations in this experiment, some ASHLE parameters 898 were always the same: α = 1, β = −1, and γ = 0.02 (see model optimization for 899 experiment 2 to understand how we came to this exact value for γ). The other two 900 parameters that were always the same across simulations were λ 1 = 4 and λ 2 = 2, which 901 we found in our parameter analysis to result in a good approximation of the musician 902 data results by Scheurich and colleagues [15]. When we carried out the simulations in 903 this experiment, we confirmed that the values of λ 1 = 4 and λ 2 = 2 resulted in a good 904 fit between our simulations and the musician data by Scheurich et al. [15].

905
Experiment 2: Unpaced solo music performance with a starting 906 tempo different than the SMT

907
Behavioral data for simulation 908 In the task by Zamm et al. [2], 24 musicians individually performed a simple melody 909 without listening to a metronome. In one control condition they performed the melody 910 at their SMT, and in four other experimental conditions they performed starting at four 911 other spontaneous tempi: fast and slow with respect to SMT, and even faster and slower 912 with respect to the SMT. For each spontaneous initial tempo, musicians performed the 913 melody ("Frere Jaques") four consecutive times (32 beats per repetition, 128 beats 914 total). For each tempo, experimenters measured the IBI across each musician's entire 915 performance and carried out a linear regression to obtain a slope, which indicates the 916 rate of change across IOIs over the entire performance. Fig 3A shows the behavioral 917 data with the average slope across participants in each initial tempo condition. Results 918 showed that the slope had a tendency to be positive when performances started a 919 spontaneous tempo faster than the SMT (IBIs becoming longer as the performances 920 progressed), and negative when performances started at a spontaneous tempo slower 921 than the SMT (IBIs becoming shorter as the performance progressed).

922
Setup, procedures and measurements 923 To obtain the musicians' SMP, we overlaid a grid over figure 1 from the paper by Zamm 924 and colleagues [2], which showed each musician's measured SMP (in their original paper, 925 the authors mistakenly call the SMP as the 'SPR'). We also overlaid a grid over figure 2 926 (right top panel) from the same paper by Zamm and colleagues to obtain each 927 musician's initial rates of performance that were fast, slow, faster, and slower with 928 respect to their SMT. Using these grids over original musician data figures allowed us to 929 precisely recover each musician's rates of performances reported in the original study. Our goal was to use the ASHLE model to simulate the results in the musician data by 961 Zamm and colleagues [2]. With the exception of F = 0 (due to the lack of stimulus), in 962 this second experiment we used the same parameters used in experiment 1. We wanted 963 to use the same parameter values in order to validate our model's behavior across two 964 different sets of behavioral results. Hence, in all simulations in this second experiment 965 α = 1, β = −1, and γ = 0.02. Similarly, initial conditions for Eqs (5a) and (5c) were the 966 same between experiment 1 and experiment 2. The only set of parameters that varied 967 between simulations were the initial conditions for f p (0) = f a (0) and the oscillator's 968 natural frequency (f 0 ). In another experiment, Zamm and colleagues [4] measured the SMP of 40 musicians and 973 formed duets of musicians in two experimental groups: duets with matching SMPs 974