strongest ones for any small $\varepsilon,\widetilde{\varepsilon}>0$. Indeed,

$\Big{(}\frac{d-\sigma}{d-1}\Big{)}\Big{(}\frac{d+1}{2}-\sigma\Big{)}\geq\frac{d-\sigma}{2}-\frac{d-\sigma}{d-1}\frac{\sigma-1}{2}-\frac{\sigma-1}{2}$

and

$\Big{(}\frac{d-\sigma}{d-1}\Big{)}\Big{(}\frac{d+1}{2}-\sigma\Big{)}\geq\Big{(}\frac{d+1}{2}-\sigma\Big{)}-\frac{\sigma-1}{2}$

are equivalent after standard algebraic manipulations to $\sigma\geq 1$. Also,

$\frac{(d-\sigma)^{2}}{4(d-1)}\begin{array}[t]{*{50}{>{\displaystyle}l}}=\frac{3}{4}\frac{d-\sigma}{6}+\frac{1}{4}\Big{(}\Big{(}\frac{d-\sigma}{d-1}\Big{)}\Big{(}\frac{d+1}{2}-\sigma\Big{)}\Big{)}\\\
\leq\max\Big{\\{}\frac{d-\sigma}{6},\Big{(}\frac{d-\sigma}{d-1}\Big{)}\Big{(}\frac{d+1}{2}-\sigma\Big{)}\Big{\\}}\,,\end{array}$

as claimed.

To compare the two largest bounds, we note that
$\frac{d-\sigma}{6}\geq\Big{(}\frac{d-\sigma}{d-1}\Big{)}\Big{(}\frac{(d+1)}{2}-\sigma\Big{)}$
if and only if $\sigma\geq\frac{d+2}{3}$ and the assertion follows.

##  6\. Almost sure local well-posedness of cubic NLS

This section is devoted to the proof of Theorem 1.2, that is, to the local
almost sure well-posedness of the cubic NLS. Theorem 1.2 is an immediate
consequence of the local well-posedness for a forced cubic equation and the
bound on $\|e^{-itP}f^{\omega}\|_{Y^{S,\varepsilon}(I)}$, established in
Proposition 4.1. Specifically, we consider the problem

(6.1) $\begin{cases}(i\partial_{t}-\mathop{\kern
0.0pt\mathscr{L}}\mathopen{})v=\pm|F+v|^{2}(F+v),\\\ v(0)=0\end{cases}$

for some $F:\mathbb{R}\times\mathbb{R}^{d}\rightarrow\mathbb{C}$ such that
$\|F\|_{Y^{S,\varepsilon}(I)}<\infty$. We have the following local well-
posedness result.

######  Proposition 6.1.

Let $I$ be an open time interval containing $0$ such that $|I|<T_{0}$ for some
small fixed $T_{0}>0$ depending only on $\mathop{\kern
0.0pt\mathscr{L}}\mathopen{}$ and $d$ defined in Lemma 2.2. Fix
$S,\varepsilon>0$. Then, there exists $0<\delta\ll 1$ such that if $F\in
Y^{S,\varepsilon}(I)$ satisfies

$\|F\|_{Y^{S,\varepsilon}(I)}\leq\delta,$

then there exists a unique solution

$v\in C\big{(}I;H^{\frac{d-\sigma}{2}}(\mathbb{R}^{d})\big{)}\cap
X^{\mathfrak{s},\varepsilon}(I)$

to (6.1) on $I\times\mathbb{R}^{d}$.

###### Proof.

Fix small $\delta>0$ determined below, and use a fixed point argument to
construct our solution. We define

$\mathcal{B}_{\delta}=\Big{\\{}v\in
X(I):\|v\|_{X^{\mathfrak{s},\varepsilon}(I)}\leq 2\delta\Big{\\}}$

and the map

$\Phi(v)(t)=\mp\int_{0}^{t}e^{-i(t-s)\mathop{\kern
0.0pt\mathscr{L}}\mathopen{}}|F+v|^{2}(F+v)(s)\mathop{\kern
0.0pt\mathrm{d}}\mathopen{}s,$

which, by Duhamel’s formula, is a solution of (6.1). Next, Proposition 3.1 and
Corollary 5.1 imply for any sufficiently small
$\varepsilon,\widetilde{\varepsilon},\delta>0$ and any
$v\in\mathcal{B}_{\delta}$,

$\|\Phi(v)\|_{X^{\mathfrak{s},\varepsilon}(I)}\lesssim\||F+v|^{2}(F+v)\|_{X^{\mathfrak{s}+\widetilde{\varepsilon},\varepsilon}(I)^{*}}\lesssim\|v\|_{X^{\mathfrak{s},\varepsilon}(I)}^{3}+\|F\|_{Y^{S,\varepsilon}(I)}^{3}\leq
2\delta\,,$

and in addition, for any $v_{1},v_{2}\in\mathcal{B}$,

$\begin{array}[t]{*{50}{>{\displaystyle}l}}\|\Phi(v_{1})-\Phi(v_{2})\|_{X^{\mathfrak{s},\varepsilon}(I)}\\\
\qquad\begin{array}[t]{*{50}{>{\displaystyle}l}}\lesssim\Big{\|}|F+v_{1}|^{2}(F+v_{1})-|F+v_{2}|^{2}(F+v_{2})\Big{\|}_{X^{\mathfrak{s}+\widetilde{\varepsilon},\varepsilon}(I)^{*}}\\\
\lesssim\|v_{1}-v_{2}\|_{X^{\mathfrak{s},\varepsilon}(I)}\Big{(}\|v_{1}\|^{2}_{X^{\mathfrak{s},\varepsilon}(I)}+\|v_{2}\|_{X^{\mathfrak{s},\varepsilon}(I)}^{2}+\|F\|_{Y^{S,\varepsilon}(I)}^{2}\Big{)}\\\
\lesssim\dfrac{\|v_{1}-v_{2}\|_{X^{\mathfrak{s},\varepsilon}(I)}}{2}.\end{array}\end{array}$

So $\Phi:\mathcal{B}_{\delta}\rightarrow\mathcal{B}_{\delta}$ is a contraction
with respect to the $X^{\mathfrak{s},\varepsilon}(I)$ norm for sufficiently
small $\varepsilon>0$. Thus, there exists a unique solution to (6.1). ∎

Next, we state a continuity property for the norms
$X^{\mathfrak{s},\varepsilon}(I)$ and $Y^{S,\varepsilon}(I)$ with respect to
the interval which follows from the dominated convergence theorem.

######  Lemma 6.2.

Let $I\subset\mathbb{R}$ be a closed interval. Fix $S,\varepsilon>0$. Assume
that $\|v\|_{X^{\mathfrak{s},\varepsilon}(I)}<\infty$ and
$\|F\|_{Y^{S,\varepsilon}(I)}<\infty$. Then the mappings

$t\in I\rightarrow\|v\|_{X^{\mathfrak{s},\varepsilon}\big{(}[\inf
I,t]\big{)}},\qquad t\in I\rightarrow\|F\|_{Y^{S,\varepsilon}\big{(}[\inf
I,t]\big{)}}$

and

$t\in I\rightarrow\|v\|_{X^{\mathfrak{s},\varepsilon}\big{(}[t,\sup
I]\big{)}},\qquad t\in I\rightarrow\|F\|_{Y^{S,\varepsilon}\big{(}[t,\sup
I]\big{)}}$

are continuous. We can also allow half-open and open intervals $I$.

We are now in position to prove Theorem (1.2).

###### Proof of Theorem 1.2.

We are looking for a solution to (1.9) of the form

$u(t)=e^{-it\mathop{\kern 0.0pt\mathscr{L}}\mathopen{}}f^{\omega}+v(t),$

where $v$ is a solution to

(6.2) $\begin{cases}(i\partial_{t}-\mathop{\kern
0.0pt\mathscr{L}}\mathopen{})v=\pm\big{|}e^{it\mathop{\kern
0.0pt\mathscr{L}}\mathopen{}}f^{\omega}+v\big{|}^{2}(e^{-it\mathop{\kern
0.0pt\mathscr{L}}\mathopen{}}f^{\omega}+v)&\text{ on
}I\times\mathbb{R}^{d},\\\ v(0)=0.\end{cases}$

Since by Proposition 4.1 one has $\big{\|}e^{it\mathop{\kern
0.0pt\mathscr{L}}\mathopen{}}f^{\omega}\big{\|}_{Y^{S,\varepsilon}(\mathbb{R})}<\infty$,
for a.e. $\omega\in\Omega$, then by Lemma 6.2, we can find an interval
$I^{\omega}\subset\mathbb{R}$ with $0\in I^{\omega}$ such that

$\|e^{-it\mathop{\kern
0.0pt\mathscr{L}}\mathopen{}}f^{\omega}\|_{Y^{S,\varepsilon}(I^{\omega})}\leq\delta,$

where $0<\delta\ll 1$ is the constant given in Proposition 6.1, and
consequently there exists a unique solution $v\in
C\big{(}I^{\omega};\dot{H}_{x}^{\alpha}(\mathbb{R}^{d})\big{)}\cap
X^{\mathfrak{s},\varepsilon}(I^{\omega})$ to (6.2) for a.e. $\omega\in\Omega$.
To show global uniqueness, assume that $w$ is a solution of (6.2) belonging to
$v\in C\big{(}I;H^{\frac{d-\sigma}{2}}(\mathbb{R}^{d})\big{)}\cap
X^{\mathfrak{s},\varepsilon}(I)$. Then, from the continuity and $w(0)=0$
follows that $w$ is small for short times, and therefore by the uniqueness of
small solutions, $wy=v$. Iterating this procedure, we obtain uniqueness on
$I^{\omega}$. ∎

## References

  * [BBFGI18] Jonathan Bennett et al.  “A sharp k-plane Strichartz inequality for the Schrödinger equation”  In _Trans. Amer. Math. Soc._ 370.8, 2018, pp. 5617–5633  DOI: 10.1090/tran/7309
  * [BOP15] Árpád Bényi, Tadahiro Oh and Oana Pocovnicu  “On the probabilistic Cauchy theory of the cubic nonlinear Schrödinger equation on $\mathbb{R}^{d}$, $d\geq 3$”  In _Trans. Amer. Math. Soc. Ser. B_ 2.1, 2015, pp. 1–50  DOI: 10.1090/btran/6
  * [BOP19] Árpád Bényi, Tadahiro Oh and Oana Pocovnicu  “Higher order expansions for the probabilistic local Cauchy theory of the cubic nonlinear Schrödinger equation on $\mathbb{R}$3”  In _Trans. Amer. Math. Soc. Ser. B_ 6.4, 2019, pp. 114–160  DOI: 10.1090/btran/29
  * [Bou94] J. Bourgain  “Periodic nonlinear Schrödinger equation and invariant measures”  In _Comm. Math. Phys._ 166.1 Springer, 1994, pp. 1–26  DOI: 10.1007/bf02099299
  * [Bou96] Jean Bourgain  “Invariant measures for the $2$D-defocusing nonlinear Schrödinger equation”  In _Communications in Mathematical Physics_ 176.2 Springer, 1996, pp. 421–445  DOI: 10.1007/bf02099556
  * [Bou98] J. Bourgain  “Refinements of Strichartz’ inequality and applications to $2$D-NLS with critical nonlinearity”  In _Internat. Math. Res. Notices_ 1998.5, 1998, pp. 253  DOI: 10.1155/S1073792898000191
  * [Bre18] Justin Brereton  “Almost sure local well-posedness for the supercritical quintic NLS”  In _Tunisian Journal of Mathematics_ 1.3 Mathematical Sciences Publishers, 2018, pp. 427–453  DOI: 10.2140/tunis.2019.1.427
  * [BT08] Nicolas Burq and Nikolay Tzvetkov  “Random data Cauchy theory for supercritical wave equations I: local theory”  In _Invent. Math._ 173.3, 2008, pp. 449–475  DOI: 10.1007/s00222-008-0124-z
  * [BT08a] Nicolas Burq and Nikolay Tzvetkov  “Random data Cauchy theory for supercritical wave equations II: a global existence result”  In _Invent. math._ 173.3, 2008, pp. 477–496  DOI: 10.1007/s00222-008-0123-0
  * [BTT13] Nicolas Burq, Laurent Thomann and Nikolay Tzvetkov  “Long time dynamics for the one dimensional non linear Schrödinger equation”  In _Annales de l’Institut Fourier_ 63.6, 2013, pp. 2137–2198  DOI: 10.5802/aif.2825
  * [Caz03] Thierry Cazenave  “Semilinear Schrödinger equations”, Courant lecture notes in mathematics 10  New York, NY: Courant Institute of Mathematical Sciences, 2003
  * [CCT03] Michael Christ, James Colliander and Terence Tao  “Ill-posedness for nonlinear Schrodinger and wave equations”  arXiv, 2003  DOI: 10.48550/arxiv.math/0311048
  * [CK01] Michael Christ and Alexander Kiselev  “Maximal Functions Associated to Filtrations”  In _Journal of Functional Analysis_ 179.2, 2001, pp. 409–425  DOI: 10.1006/jfan.2000.3687
  * [CKSTT08] James Colliander et al.  “Global well-posedness and scattering for the energy-critical Schrödinger equation in $\mathbb{R}$ 3”  In _Ann. Math._ 167.3 Annals of Mathematics, 2008, pp. 767–865  DOI: 10.4007/annals.2008.167.767
  * [COX11] Yonggeun Cho, Tohru Ozawa and Suxia Xia  “Remarks on some dispersive estimates”  In _CPAA_ 10.4, 2011, pp. 1121–1128  DOI: 10.3934/cpaa.2011.10.1121
  * [CW90] Thierry Cazenave and Fred B. Weissler  “The cauchy problem for the critical nonlinear Schrödinger equation in $H^{s}$”  In _Nonlinear Anal._ 14.10, 1990, pp. 807–836  DOI: 10.1016/0362-546x(90)90023-a
  * [DD21] Van Duong Dinh  “Random data theory for the cubic fourth-order nonlinear Schrödinger equation”  In _Commun. Pure Appl. Anal._ 20.2, 2021, pp. 651–680  DOI: 10.3934/cpaa.2020284
  * [Den12] Yu Deng  “Two-dimensional nonlinear Schrödinger equation with random radial data”  In _Anal. PDE_ 5.5 Mathematical Sciences Publishers, 2012, pp. 913–960  DOI: 10.2140/apde.2012.5.913
  * [Din18] Van Duong Dinh  “On well-posedness, regularity and ill-posedness for the nonlinear fourth-order Schrödinger equation”  In _Bull. Belg. Math. Soc. Simon Stevin_ 25.3 The Belgian Mathematical Society, 2018, pp. 415–437  DOI: 10.36045/bbms/1536631236
  * [DLM19] Benjamin Dodson, Jonas Lührmann and Dana Mendelson  “Almost sure local well-posedness and scattering for the 4D cubic nonlinear Schrödinger equation”  In _Advances in Mathematics_ 347, 2019, pp. 619–676  DOI: 10.1016/j.aim.2019.02.001
  * [DNY21] Yu Deng, Andrea R. Nahmod and Haitian Yue  “Invariant Gibbs measure and global strong solutions for the Hartree NLS equation in dimension three”  In _J. Math. Phys._ 62.3 American Institute of Physics, 2021, pp. 031514  DOI: 10.1063/5.0045062
  * [GV92] J. Ginibre and G. Velo  “Smoothing properties and retarded estimates for some dispersive evolution equations”  In _Comm. Math. Phys._ 144.1 Springer, 1992, pp. 163–188  DOI: 10.1007/bf02099195
  * [HHK09] Martin Hadac, Sebastian Herr and Herbert Koch  “Well-posedness and scattering for the KP-II equation in a critical space”  In _Annales de l’Institut Henri Poincaré C_ 26.3, 2009, pp. 917–941  DOI: 10.1016/j.anihpc.2008.04.002
  * [HHZ17] Tianxiao Huang, Shanlin Huang and Quan Zheng  “Inhomogeneous oscillatory integrals and global smoothing effects for dispersive equations”  In _J. Differential Equations_ 263.12, 2017, pp. 8606–8629  DOI: 10.1016/j.jde.2017.08.053
  * [HTT11] Sebastian Herr, Daniel Tataru and Nikolay Tzvetkov  “Global well-posedness of the energy-critical nonlinear Schrödinger equation with small initial data in H1(T3)”  In _Duke Mathematical Journal_ 159.2 Duke University Press, 2011, pp. 329–349  DOI: 10.1215/00127094-1415889
  * [IK06] Alexandru D. Ionescu and Carlos E. Kenig  “Low-regularity Schrödinger maps”  In _Differential and Integral Equations_ 19.11 Khayyam Publishing, Inc., 2006, pp. 1271–1300
  * [IK07] Alexandru D. Ionescu and Carlos E. Kenig  “Low-regularity Schrödinger maps, II: global well-posedness in dimensions $d\geq 3$”  In _Commun. Math. Phys._ 271.2, 2007, pp. 523–559  DOI: 10.1007/s00220-006-0180-4
  * [JBJG] Casteras J.-B., Fm̈issing J. and Uraltsev G.  “Higher order expansions for the probabilistic local well-posedness of a cubic nonlinear Schrödinger equation”
  * [Kar96] V. I. Karpman  “Stabilization of soliton instabilities by higher-order dispersion: Fourth-order nonlinear Schrödinger-type equations”  In _Phys. Rev. E_ 53.2, 1996, pp. R1336–R1339  DOI: 10.1103/physrevE.53.R1336
  * [KS00] V.I Karpman and A.G Shagalov  “Stability of solitons described by nonlinear Schrödinger-type equations with higher-order dispersion”  In _Physica D: Nonlinear Phenomena_ 144.1-2, 2000, pp. 194–210  DOI: 10.1016/s0167-2789(00)00078-6
  * [KT98] Markus Keel and Terence Tao  “Endpoint Strichartz estimates”  In _Amer. J. Math._ 120.5 Johns Hopkins University Press, 1998, pp. 955–980  DOI: 10.1353/ajm.1998.0039
  * [KTV14] Herbert Koch, Daniel Tataru and Monica Vişan  “Dispersive equations and nonlinear waves: generalized Korteweg-de Vries, nonlinear Schrödinger, wave and Schrödinger maps”, Oberwolfach seminars 45  Basel: Birkhäuser, 2014
  * [LRS88] Joel L. Lebowitz, Harvey A. Rose and Eugene R. Speer  “Statistical mechanics of the nonlinear Schrödinger equation”  In _J Stat Phys_ 50.3-4, 1988, pp. 657–687  DOI: 10.1007/bf01026495
  * [McK95] H. P. McKean  “Statistical mechanics of nonlinear wave equations. IV. Cubic Schrödinger”  In _Communications in Mathematical Physics_ 168.3 Springer, 1995, pp. 479–491  DOI: 10.1007/BF02101840
  * [Nah15] Andrea R. Nahmod  “The nonlinear Schrödinger equation on tori: Integrating harmonic analysis, geometry, and probability”  In _Bull. Amer. Math. Soc._ 53.1, 2015, pp. 57–91  DOI: 10.1090/bull/1516
  * [OT98] T. Ozawa and Y. Tsutsumi  “Space-time estimates for null gauge forms and nonlinear Schrödinger equations”  In _Differential Integral Equations_ 11.2, 1998  DOI: 10.57262/die/1367341068
  * [Pau07] Benoit Pausader  “Global well-posedness for energy critical fourth-order Schrödinger equations in the radial case”  In _Dyn. Partial Differ. Equ._ 4.3, 2007, pp. 197–225  DOI: 10.4310/dpde.2007.v4.n3.a1
  * [PS10] Benoit Pausader and Shuanglin Shao  “The mass-critical fourth-order Schrödinger equation in high dimensions”  In _J. Hyper. Differential Equations_ 07.04, 2010, pp. 651–705  DOI: 10.1142/s0219891610002256
  * [RV07] E Ryckman and M Visan  “Global well-posedness and scattering for the defocusing energy-critical nonlinear Schrödinger equation in R 1+4”  In _American Journal of Mathematics_ 129.1, 2007, pp. 1–60  DOI: 10.1353/ajm.2007.0004
  * [Spi23] Martin Spitz  “Almost sure local wellposedness and scattering for the energy-critical cubic nonlinear Schrödinger equation with supercritical data”  In _Nonlinear Analysis_ 229, 2023, pp. 113204  DOI: 10.1016/j.na.2022.113204
  * [SSW23] Jia Shen, Avy Soffer and Yifei Wu  “Almost Sure Well-Posedness and Scattering of the 3D Cubic Nonlinear Schrödinger Equation”  In _Commun. Math. Phys._ 397.2, 2023, pp. 547–605  DOI: 10.1007/s00220-022-04500-z
  * [Sy21] Mouhamadou Sy  “Almost sure global well-posedness for the energy supercritical Schrödinger equations”  In _Journal de Mathématiques Pures et Appliquées_ 154, 2021, pp. 108–145  DOI: 10.1016/j.matpur.2021.08.002
  * [Tho09] Laurent Thomann  “Random data Cauchy problem for supercritical Schrödinger equations”  In _Annales de l’Institut Henri Poincaré C_ 26.6, 2009, pp. 2385–2402  DOI: 10.1016/j.anihpc.2009.06.001
  * [Tzv09] N. Tzvetkov  “Construction of a Gibbs measure associated to the periodic Benjamin–Ono equation”  In _Probab. Theory Relat. Fields_ 146.3, 2009, pp. 481  DOI: 10.1007/s00440-008-0197-z
  * [ZF12] Ting Zhang and Daoyuan Fang  “Random Data Cauchy Theory for the Generalized Incompressible Navier–Stokes Equations”  In _J. Math. Fluid Mech._ 14.2, 2012, pp. 311–324  DOI: 10.1007/s00021-011-0069-7


* Kuster  _et al._ (2008) M. Kuster, G. Raffelt, and B. Beltran,  _Axions_ (Springer-Verlag Berlin Heidelberg, 2008).
  * Dimopoulos  _et al._ (1986b) S. Dimopoulos, G. Starkman, and B. Lynn, Mod. Phys. Lett. A 1, 491 (1986b).
  * Dimopoulos  _et al._ (1986c) S. Dimopoulos, G. Starkman, and B. Lynn, Phys. Lett. B 168, 145 (1986c).
  * Pospelov  _et al._ (2008) M. Pospelov, A. Ritz, and M. Voloshin, Phys. Rev. D 78, 115012 (2008).
  * Veigele (1973) W. Veigele, Atomic Data and Nuclear Data Tables 5, 51 (1973).
  * Dine  _et al._ (1981) M. Dine, W. Fischler, and M. Srednicki, Physics Letters B 104, 199 (1981).
  * Zhitnitskii (1980) A. Zhitnitskii, Sov. J. Nucl. Phys. 31, 260 (1980).
  * Kim (1979) J. E. Kim, Phys. Rev. Lett. 43, 103 (1979).
  * Shifman  _et al._ (1980) M. Shifman, A. Vainshtein, and V. Zakharov, Nuclear Physics B 166, 493 (1980).
  * Srednicki (1985) M. Srednicki, Nuclear Physics B 260, 689–700 (1985).
  * Tanabashi  _et al._ (2018) M. Tanabashi _et al._ (Particle Data Group), Phys. Rev. D98, 030001 (2018).
  * Kaplan (1985) D. B. Kaplan, Nuclear Physics B 260, 215–226 (1985).
  * di Cortona  _et al._ (2016) G. G. di Cortona, E. Hardy, J. P. Vega, and G. Villadoro, Journal of High Energy Physics 2016 (2016), 10.1007/jhep01(2016)034.
  * Chang and Choi (1993) S. Chang and K. Choi, Physics Letters B 316, 51–56 (1993).
  * Di Luzio  _et al._ (2017) L. Di Luzio, F. Mescia, and E. Nardi, Phys. Rev. D 96, 075003 (2017).
  * Fujikawa and Shrock (1980) K. Fujikawa and R. E. Shrock, Phys. Rev. Lett. 45, 963 (1980).
  * Kim (1976) J. E. Kim, Phys. Rev. D 14, 3000 (1976).
  * Kim (1978) J. E. Kim, Phys. Rev. Lett. 41, 360 (1978).
  * Bell  _et al._ (2006) N. F. Bell, M. Gorchtein, M. J. Ramsey-Musolf, P. Vogel, and P. Wang, Physics Letters, Section B: Nuclear, Elementary Particle and High-Energy Physics 642, 377–383 (2006).
  * Bell  _et al._ (2005) N. F. Bell, V. Cirigliano, M. J. Ramsey-Musolf, P. Vogel, and M. B. Wise, Physical Review Letters 95, 1–4 (2005).
  * Agostini  _et al._ (2017) M. Agostini _et al._ (Borexino collaboration), Phys. Rev. D 96, 091103 (2017).
  * Arceo-Díaz  _et al._ (2015) S. Arceo-Díaz, K. P. Schröder, K. Zuber, and D. Jack, Astroparticle Physics (2015), 10.1016/j.astropartphys.2015.03.006.
  * (44) S. A. Díaz, K.-P. Schröder, K. Zuber, D. Jack, and E. E. B. Barrios, arXiv:1910.10568 .
  * Vogel and Engel (1989) P. Vogel and J. Engel, Phys. Rev. D 39, 3378 (1989).
  * Bahcall and Peña-Garay (2004) J. N. Bahcall and C. Peña-Garay, New Journal of Physics 6, 63 (2004).
  * Hsieh  _et al._ (2019) C.-C. Hsieh, L. Singh, C.-P. Wu, J.-W. Chen, H.-C. Chi, C.-P. Liu, M. K. Pandey, and H. T. Wong, Phys. Rev. D 100, 073001 (2019).
  * Arias  _et al._ (2012) P. Arias, D. Cadamuro, M. Goodsell, J. Jaeckel, J. Redondo, and A. Ringwald, Journal of Cosmology and Astroparticle Physics 2012, 013 (2012).
  * de Salas  _et al._ (2019) P. de Salas, K. Malhan, K. Freese, K. Hattori, and M. Valluri, Journal of Cosmology and Astroparticle Physics 2019, 037 (2019).
  * Arisaka  _et al._ (2013) K. Arisaka, P. Beltrame, C. Ghag, J. Kaidi, K. Lung, A. Lyashenko, R. Peccei, P. Smith, and K. Ye, Astroparticle Physics 44, 59 (2013).
  * Bloch  _et al._ (2017) I. M. Bloch, R. Essig, K. Tobioka, T. Volansky, and T.-T. Yu, JHEP 06, 087 (2017).
  * Galison and Manohar (1984) P. Galison and A. Manohar, Physics Letters B 136, 279 (1984).
  * An  _et al._ (2015) H. An, M. Pospelov, J. Pradler, and A. Ritz, Physics Letters B 747, 331 (2015).
  * Aprile  _et al._ (2019a) E. Aprile _et al._ (XENON Collaboration), Phys. Rev. D 99, 112009 (2019a).
  * Aprile  _et al._ (2019b) E. Aprile _et al._ (XENON Collaboration), Phys. Rev. D 100, 052014 (2019b).
  * Aprile  _et al._ (2017b) E. Aprile _et al._ (XENON Collaboration), Phys. Rev. Lett. 119, 181301 (2017b).
  * Aprile  _et al._ (2017c) E. Aprile _et al._ (XENON Collaboration), The European Physical Journal C 77, 275 (2017c).
  * Murra (2019) M. Murra,  _Intrinsic background reduction by cryogenic distillation for the XENON1T dark matter experiment_ , Ph.D. thesis, Westfälische Wilhelms-Universität Münster (2019).
  * Bhat (1992) M. R. Bhat,  _Evaluated Nuclear Structure Data File (ENSDF)_ , edited by S. M. Qaim, Nucl. Data Sci. Tech. (Springer-Verlag, Berlin, Germany, 1992) p. 817, Data extracted using the NNDC On-Line Data Service from the ENSDF database, files revised as of October, 2019.
  * Harston and Pyper (1992) M. R. Harston and N. C. Pyper, Phys. Rev. A 45, 6282 (1992).
  * Verpelli and Vrapcenjak (2020) M. Verpelli and L. Vrapcenjak,  _LiveChart of Nuclides_ , https://www-nds.iaea.org/livechart/ (IAEA, Nuclear Data Section, 2020).
  * Mougeot (2015) X. Mougeot, Phys. Rev. C 91, 055504 (2015).
  * Agostinelli  _et al._ (2003) S. Agostinelli _et al._ (GEANT4), Nucl. Instrum. Meth. A506, 250 (2003).
  * Hauf  _et al._ (2013) S. Hauf _et al._ , IEEE Trans. Nucl. Sci. 60, 2966 (2013).
  * Wu (2009) S.-C. Wu, Nuclear Data Sheets 110, 681 (2009).
  * Lindemann and Simgen (2014) S. Lindemann and H. Simgen, The European Physical Journal C 74, 2746 (2014).
  * Aprile  _et al._ (2017d) E. Aprile _et al._ (XENON Collaboration), The European Physical Journal C 77, 890 (2017d).
  * Aprile  _et al._ (2016) E. Aprile _et al._ , Journal of Cosmology and Astroparticle Physics 2016, 027 (2016).
  * Fieguth (2018) A. Fieguth,  _First observation of double electron capture in Xe-124 and detection prospects for underlying nuclear interaction mechanisms in direct dark matter search_ , Ph.D. thesis, Westfälische Wilhelms-Universität Münster (2018).
  * Albert  _et al._ (2014) J. B. Albert _et al._ (EXO Collaboration), Phys. Rev. C 89, 015502 (2014).
  * Kotila and Iachello (2012) J. Kotila and F. Iachello, Phys. Rev. C 85, 034316 (2012).
  * (72) http://nucleartheory.yale.edu.
  * Aprile  _et al._ (2019c) E. Aprile _et al._ (XENON Collaboration), Nature 568, 532 (2019c).
  * Doi and Kotani (1992) M. Doi and T. Kotani, Progress of Theoretical Physics 87, 1207 (1992).
  * Wittweg  _et al._ (2020) C. Wittweg, B. Lenardo, A. Fieguth, and C. Weinheimer, “Detection prospects for the second-order weak decays of 124xe in multi-tonne xenon time projection chambers,” (2020), arXiv:2002.04239 [nucl-ex] .
  * Khazov  _et al._ (2006) Y. Khazov, I. Mitropolsky, and A. Rodionov, Nuclear Data Sheets 107, 2715 (2006).
  * Khazov  _et al._ (2011) Y. Khazov, A. Rodionov, and F. Kondev, Nuclear Data Sheets 112, 855 (2011).
  * Bé  _et al._ (2011) M.-M. Bé, V. Chisté, C. Dulieu, X. Mougeot, V. Chechev, N. Kuzmenko, F. Kondev, A. Luca, M. Galán, A. Nichols, A. Arinc, A. Pearce, X. Huang, and B. Wang,  _Table of Radionuclides_, Monographie BIPM-5, Vol. 6 (Bureau International des Poids et Mesures, Pavillon de Breteuil, F-92310 Sèvres, France, 2011).
  * Manalaysay  _et al._ (2010) A. Manalaysay, T. M. Undagoitia, A. Askin, L. Baudis, A. Behrens, A. D. Ferella, A. Kish, O. Lebeda, R. Santorelli, D. Vénos, and A. Vollhardt, Review of Scientific Instruments 81, 073303 (2010).
  * Haxton  _et al._ (2013) W. C. Haxton, R. G. Hamish Robertson, and A. M. Serenelli, Annual Review of Astronomy and Astrophysics 51, 21 (2013).
  * Chen  _et al._ (2017) J.-W. Chen, H.-C. Chi, C.-P. Liu, and C.-P. Wu, Physics Letters B 774, 656 (2017).
  * Simpson (1985) J. Simpson, Phys. Rev. Lett. 54, 1891 (1985).
  * Morå (2019) K. Morå, Journal of Instrumentation 14, P02003 (2019).
  * Akerib  _et al._ (2017) D. S. Akerib _et al._ (LUX Collaboration), Phys. Rev. Lett. 118, 261301 (2017).
  * Fu  _et al._ (2017) C. Fu _et al._ (PandaX-II Collaboration), Phys. Rev. Lett. 119, 181806 (2017).
  * Barsanov  _et al._ (2007) V. Barsanov _et al._ , Phys. Atom. Nucl. 70, 300 (2007).
  * Akerib  _et al._ (2016a) D. Akerib _et al._ (LUX), Phys. Rev. Lett. 116, 161301 (2016a), arXiv:1512.03506 [astro-ph.CO] .
  * Akerib  _et al._ (2018) D. Akerib _et al._ (LUX), Phys. Rev. D 98, 062005 (2018), arXiv:1807.07113 [astro-ph.CO] .
  * Saldanha  _et al._ (2019) R. Saldanha, H. O. Back, R. H. M. Tsang, T. Alexander, S. R. Elliott, S. Ferrara, E. Mace, C. Overman, and M. Zalavadia, Phys. Rev. C 100, 024608 (2019).
  * Hasterok (2017) C. Hasterok,  _Gas Purity Analytics, Calibration Studies, and Background Predictions towards the First Results of XENON1T._ , Ph.D. thesis, Ruprecht-Karls-Universität, Heidelberg (2017).
  * Aoki and Makide (2005) N. Aoki and Y. Makide, Chemistry Letters - CHEM LETT 34, 1396 (2005).
  * Aprile  _et al._ (a) E. Aprile _et al._ (XENON Collaboration), (a), in preparation.
  * Riedmann and Purtschert (2016) R. A. Riedmann and R. Purtschert, Separation and Purification Technology 170, 217 (2016).
  * Riedmann (2011) R. Riedmann,  _Separation of Argon from atmospheric air and Measurements of 37Ar for CTBT purposes._, Ph.D. thesis, University of Bern, Switzerland (2011).
  * Gäggeler (1995) H. W. Gäggeler, Radiochimica Acta 70-71, 345 (1995).
  * Riedmann and Purtschert (2011) R. A. Riedmann and R. Purtschert, Environmental science & technology 45, 8656 (2011).
  * Aprile  _et al._ (2018b) E. Aprile _et al._ (XENON Collaboration), Phys. Rev. D 97, 092007 (2018b).
  * Akerib  _et al._ (2016b) D. S. Akerib _et al._ (LUX Collaboration), Phys. Rev. D 93, 072009 (2016b).
  * Cui  _et al._ (2017) X. Cui _et al._ (PandaX-II Collaboration), Phys. Rev. Lett. 119, 181302 (2017).
  * Lucas and Unterweger (2000) L. L. Lucas and M. P. Unterweger, Journal of research of the National Institute of Standards and Technology 105, 541 (2000).
  * Zhang  _et al._ (2016) C. Zhang, D.-M. Mei, V. Kudryavtsev, and S. Fiorucci, Astroparticle Physics 84, 62 (2016).
  * Amare  _et al._ (2018) J. Amare _et al._ , Astropart. Phys. 97, 96 (2018), arXiv:1706.05818 [physics.ins-det] .
  * Ishida (2002) T. Ishida, Journal of Nuclear Science and Technology 39, 407 (2002).
  * Dobi  _et al._ (2010) A. Dobi, D. S. Leonard, C. Hall, L. Kaufman, T. Langford, S. Slutsky, and Y. R. Yen, Nucl. Instrum. Meth. A620, 594 (2010).
  * Plastino  _et al._ (2007) W. Plastino _et al._ , Radiat. Meas. 42, 68 (2007).
  * Plastino  _et al._ (2011) W. Plastino _et al._ , Journal of Radioanalytical and Nuclear Chemistry 288, 101 (2011).
  * IAEA/WMO (2015) IAEA/WMO, “Global Network of Isotopes in Precipitation. The GNIP Database.” https://nucleus.iaea.org/wiser (2015).
  * Happell  _et al._ (2004) J. Happell _et al._ , Tellus 56(3), 183 (2004).
  * Mishima and Steele (2002) J. Mishima and C. M. Steele,  _Oxidation of Tritium Gas Under Accident and Transport Conditions_ , Report LA-UR-02-3803 (U.S.. Department of Energy Los Alamos, NM, 2002).
  * Aprile and Doke (2010) E. Aprile and T. Doke, Rev. Mod. Phys. 82, 2053 (2010).
  * Aprile  _et al._ (1991) E. Aprile, R. Mukherjee, and M. Suzuki, Nucl. Instrum. Meth. A300, 343 (1991).
  * Barth  _et al._ (2013) K. Barth _et al._ (CAST Collaboration), Journal of Cosmology and Astroparticle Physics 2013, 010 (2013).
  * Gondolo and Raffelt (2009) P. Gondolo and G. G. Raffelt, Phys. Rev. D 79, 107301 (2009).
  * Bertolami  _et al._ (2014a) M. M. Bertolami, B. Melendez, L. Althaus, and J. Isern, Journal of Cosmology and Astroparticle Physics 2014, 069 (2014a).
  * Ayala  _et al._ (2014) A. Ayala, I. Domínguez, M. Giannotti, A. Mirizzi, and O. Straniero, Phys. Rev. Lett. 113, 191302 (2014).
  * Viaux  _et al._ (2013) N. Viaux, M. Catelan, P. B. Stetson, G. G. Raffelt, J. Redondo, A. A. R. Valcarce, and A. Weiss, Phys. Rev. Lett. 111, 231301 (2013).
  * Giannotti  _et al._ (2017) M. Giannotti, I. G. Irastorza, J. Redondo, A. Ringwald, and K. Saikawa, Journal of Cosmology and Astroparticle Physics 2017, 010–010 (2017).
  * Di Luzio  _et al._ (2020) L. Di Luzio, M. Giannotti, E. Nardi, and L. Visinelli, (2020), arXiv:2003.01100 [hep-ph] .
  * Córsico  _et al._ (2014) A. Córsico, L. Althaus, M. M. Bertolami, S. Kepler, and E. García-Berro, Journal of Cosmology and Astroparticle Physics 2014, 054 (2014).
  * Beda  _et al._ (2013) A. G. Beda, V. B. Brudanin, V. G. Egorov, D. V. Medvedev, V. S. Pogosov, E. A. Shevchik, M. V. Shirchenko, A. S. Starostin, and I. V. Zhitnikov, Physics of Particles and Nuclei Letters 10, 139–143 (2013).
  * Wang  _et al._ (2020) Y. Wang _et al._ (CDEX Collaboration), Phys. Rev. D 101, 052003 (2020).
  * Aralis  _et al._ (2020) T. Aralis _et al._ (SuperCDMS Collaboration), Phys. Rev. D 101, 052008 (2020).
  * Aprile  _et al._ (2019d) E. Aprile _et al._ (XENON Collaboration), Phys. Rev. Lett. 123, 251801 (2019d).
  * Abe  _et al._ (2018) K. Abe _et al._ (XMASS Collaboration), Physics Letters B 787, 153 (2018).
  * Armengaud  _et al._ (2018) E. Armengaud _et al._ (EDELWEISS Collaboration), Phys. Rev. D 98, 082004 (2018).
  * Aprile  _et al._ (2017e) E. Aprile _et al._ (XENON Collaboration), Phys. Rev. D 96, 122002 (2017e).
  * Agostini  _et al._ (2020) M. Agostini _et al._ (GERDA), (2020), arXiv:2005.14184 [hep-ex] .
  * Abgrall  _et al._ (2017) N. Abgrall _et al._ (Majorana Collaboration), Phys. Rev. Lett. 118, 161801 (2017).
  * Brown  _et al._ (2018) E. Brown _et al._ , The European Physical Journal C 78, 604 (2018).
  * Aprile  _et al._ (b) E. Aprile _et al._ (XENON Collaboration), “222rn emanation measurements for the xenon1t experiment,” (b), in preparation.
  * Corsico  _et al._ (2019) A. Corsico, L. Althaus, M. Bertolami, and S. Kepler, The Astronomy and Astrophysics Review 27 (2019), 10.1007/s00159-019-0118-4.
  * Bertolami  _et al._ (2014b) M. M. Bertolami, B. Melendez, L. Althaus, and J. Isern, Journal of Cosmology and Astroparticle Physics 2014, 069 (2014b).
  * Dent  _et al._ (2020) J. B. Dent, B. Dutta, J. L. Newstead, and A. Thompson, (2020), arXiv:2006.15118 [hep-ph] .
  * Gao  _et al._ (2020) C. Gao, J. Liu, L.-T. Wang, X.-P. Wang, W. Xue, and Y.-M. Zhong, (2020), arXiv:2006.14598 [hep-ph] .
  * Harnik  _et al._ (2012) R. Harnik, J. Kopp, and P. A. Machado, Journal of Cosmology and Astroparticle Physics 2012, 026 (2012).
  * Bernabei  _et al._ (2008) R. Bernabei _et al._ , The European Physical Journal C 56, 333 (2008).
  * Bernabei  _et al._ (2018) R. Bernabei _et al._ , Nucl. Phys. At. Energy 19, 116 (2018).
  * Kopp  _et al._ (2009) J. Kopp, V. Niro, T. Schwetz, and J. Zupan, Phys. Rev. D 80, 083502 (2009).
  * Aprile  _et al._ (2015) E. Aprile _et al._ (XENON Collaboration), Science 349, 851 (2015).
  * Zhong  _et al._ (2018) H. Zhong _et al._ (PandaX Collaboration), Science China Physics, Mechanics & Astronomy 62, 31011 (2018).
  * Akerib  _et al._ (2020) D. Akerib _et al._ , Nuclear Instruments and Methods in Physics Research Section A: Accelerators, Spectrometers, Detectors and Associated Equipment 953, 163047 (2020).
  * Aprile  _et al._ (c) E. Aprile _et al._ (XENON Collaboration), (c), arXiv:2007.08796 [physics.ins-det] .
  * Tuli (1996) J. Tuli, Nucl. Instr. Meth. A 369, 506 (1996).
  * Wilkinson (1970a) D. Wilkinson, Nucl. Instr. Meth. 82, 122 (1970a).
  * Konopinski (1966) E. Konopinski,  _The Theory of Beta Radioactivity_ (Clarendon, Oxford, 1966).
  * Rose (1936) M. E. Rose, Phys. Rev. 49, 727 (1936).
  * Wilkinson (1970b) D. Wilkinson, Nucl. Phys. A 150, 478 (1970b).
  * Mougeot (2017) X. Mougeot, EPJ Web Conf. 146, 12015 (2017).
  * Behrens and Bühring (1982) H. Behrens and W. Bühring,  _Electron Radial Wave Functions and Nuclear Beta Decay_ (Clarendon, Oxford, 1982).
  * Sirlin (1967) A. Sirlin, Phys. Rev. 164, 1767 (1967).
  * Jaus (1972) W. Jaus, Phys. Lett. B 40, 616 (1972).
  * Bühring (1984) W. Bühring, Nucl. Phys. A 430, 1 (1984).
  * Behrens and Jänecke (1969) H. Behrens and J. Jänecke, in  _Numerical Tables for Beta-Decay and Electron Capture_ , edited by H. Schopper, Landolt-Börnstein, New Series, Group I, Vol. 4 (Springer Verlag, Berlin, 1969).
  * Bühring (1983) W. Bühring, Z. Phys. A 312, 11 (1983).
  * F. Salvat and Parellada (1987) R. M. F. Salvat, J. D. Martínez and J. Parellada, Phys. Rev. A 36, 467 (1987).
  * Mougeot and Bisch (2014) X. Mougeot and C. Bisch, Phys. Rev. A 90, 012501 (2014).
  * Desclaux (1973) J. P. Desclaux, At. Data Nucl. Data Tables 12, 311 (1973).
  * Kotochigova  _et al._ (1997) S. Kotochigova, Z. H. Levine, E. L. Shirley, M. D. Stiles, and C. W. Clark, Phys. Rev. A 55, 191 (1997).
  * Pyper and Harston (1988) N. C. Pyper and M. R. Harston, Proc. Roy. Soc. Lond. A 420, 277 (1988).
  * Czarnecki  _et al._ (2004) A. Czarnecki, W. J. Marciano, and A. Sirlin, Phys. Rev. D 70, 093006 (2004).
  * Hayen  _et al._ (2018) L. Hayen, N. Severijns, K. Bodek, D. Rozpedzik, and X. Mougeot, Rev. Mod. Phys. 90, 015008 (2018).
  * Towner and Hardy (2008) I. S. Towner and J. C. Hardy, Phys. Rev. C 77, 025501 (2008).
  * Wang  _et al._ (2017) M. Wang, G. Audi, F. Kondev, W. Huang, S. Naimi, and X. Xu, Chin. Phys. C 41, 030003 (2017).
  * Mougeot (2016) X. Mougeot, Applied Radiation and Isotopes 109, 177 (2016).
  * Ejiri and Fujita (1978) H. Ejiri and J. Fujita, Physics Reports 38, 85 (1978).


# Periodic and non-periodic brainwaves emerging via random syncronization of
closed loops of firing neurons.

P. Mazzetti  A. Carbone  Politecnico di Torino, Italy

###### Abstract

Periodic and nonperiodic components of electrophysiological signals are
modelled in terms of syncronized sequences of closed loops of firing neurons
correlated in Markov chains. Single closed loops of firing neurons reproduce
fundamental and harmonic components, appearing as lines in the power spectra
at frequencies ranging about from $0.5Hz$ to $100Hz$. Further interesting
features of the brainwave signals emerge by considering multiple syncronized
sequences of closed loops. In particular, we show that the fluctuations of the
number of syncronized loops leads to the onset of broadband power spectral
components. By effect of the fluctuations of the number of synchronized loops
and the emergence of the related broadband component, highly distorted
waveform and nonstationarity of the signal are observed, consistently with
empirical EEG and MEG signals. The analytical relationships of the periodic
and aperiodic components are evaluated by using typical firing neuron pulse
amplitudes and durations.

##  1 Introduction

Periodic components of brain signals and their frequency bands (delta
($1-3\mathrm{Hz}$), theta ($4-8\mathrm{Hz})$, alpha ($9-12\mathrm{Hz})$, beta
$(12-30\mathrm{~{}Hz})$, gamma $(>30\mathrm{~{}Hz})$) are central to
neuroscience basic research and clinical protocols [2, 1, 3]. Aperiodic
components, initially disregarded in comparison to periodic ones as considered
just background noise, represent a significant part of signals. They manifest
with power spectral densities varying approximately as $1/f^{\beta}$ and have
been related to brain critical states [4, 5]. Recent studies have suggested
that simultaneous changes of aperiodic and periodic brainwave components can
underpin changes in functional and behavioural features, with the broadband
components modulated by task performance and correlated with neuronal spiking
activity. Synchronization between different neuronal groups may also manifest
within arrhythmic brain activity with no apparent periodicity [6, 7, 8, 10, 9,
11, 13, 12]. To keep pace with these findings, algorithms are being developed
to the purpose of breaking complex electrophysiological signals down and
transferring scientific findings into clinical practices [14, 15], an issue of
is increasingly relevant to the development of brain–machine interfaces [16].
Despite remarkable advances in the interpreting and quantifying neurological
signals, several problems mainly related to the dynamics of brain at various
scales still remain unsolved [17].

In this work, a unified framework to quantify periodic and aperiodic power
spectral components of electro- and magneto-encephalograms is developed based
on a Markov chain description. The power spectral density is estimated in
terms of time-sequences according to a statistical approach originally
pioneered in the communication and information theory context [18, 19, 20, 21,
22, 23, 24]. Line spectral components are generated by Markov matrices
corresponding to closed loop sequences of firing neurons characterized by a
set of heterogeneous states. The oscillatory frequencies, observed in the EEG
and MEG from 0.5 Hz to 100 Hz, can be reproduced by closed loops involving a
few hundred neurons down to few neurons with firing intervals of the order of
few milliseconds. The closed loop operates as an electric circuit where the
neuron behaves as a rectifying diode, producing unidirectional currents, the
synapses act as dissipative elements and the ionic currents as current
generators. The formation of closed loops dissipate the excess energy
accumulated in an active region of the brain by the local increase of
circulating blood. A realistic description of the neurological signals require
bunches of synchronized sequences of closed loops of firing neurons
spontaneously formed in regions of high density, where neurons are connected
to thousands other neurons nearby, that, if in a critical state, may be
simultaneously fired.

The impulse generated by the bunch of syncronized sequence is represented by a
Gaussian time function. The width of the Gaussian is related to the duration
of the impulse emitted by the bunch and, in turn, to the characteristic cut-
off filtering out the harmonic components of the power spectrum at high
frequency. The amplitude of the Gaussian depends on the number of syncronized
loops $N_{i}$. By taking into account the fluctuations of $N_{i}$ in the
Markov chain model, a mixed power spectrum is obtained where lines and
continuous spectral components co-exist. It is shown that the broadband
component causes the line amplitude to change, while their frequency keeps on
unchanged being only dependent on the reciprocal duration of the loops, and
the distortion of the signal consistently with what is observed in the
empirical EEG and MEG records. This distortion affects the lowest rather than
the highest frequency components: thus delta waves with harmonics at
frequencies lower than the cut-off are more distorted than gamma waves. In
general the waves reported in electrophysiological graphs are at least
distorted by second harmonic components, resulting in asymmetric triangular
form of the wave.

Tha manuscript is organized as follows. In Sect.2 the general expression of
the power spectral density of a sequence of Markov correlated events is
recalled. The conditions required for the onset of open or closed loops in the
framework of the Markov chain description are also provided. Then, the
approach is extended to an arbitrary number of synchronized closed loops,
whose fluctuations causes the emergence of a broadband noise component. In
Sect. 3, the proposed analitycal framework is used as descriptive background
to reproduce brainwaves signal features in relation to the mixed power
spectrum. In Sect. 4, the proposed models and results are discussed,
conclusions and suggestions for future work are also provided.

##  2 Mathematical Framework

In this section, the mathematical background for the calculation of the power
spectral density of a sequence of events correlated in a Markov chain and
conditions to yield a closed loop are recalled. The amplitude of the periodic
and aperiodic components are derived for a single loop in subsection (A) and
for an arbitrary number of synchronized closed loops in subsection(B).

Consider a neuron, in a state labelled $\alpha_{1}$, making a firing to a
neuron, in a state labelled $\alpha_{2}$, and so on in a sequence
$\alpha_{1},\alpha_{2},...,\alpha_{N}$ of $N$ states. Let
$n_{1},n_{2},\ldots,n_{N}$ indicate the numbers of neurons respectively in the
states $\alpha_{1},\alpha_{2}\ldots\alpha_{N}$. The firings of $n_{1}$
synchronized neurons result in the subsequent firing of $n_{2}$ neurons,
yielding a total of $n_{1}\cdot n_{2}$ synchronized neurons, and so on. Hence,
the number of synchronized neurons may reach a value of the order of several
thousands in a relatively short time. For the sake of the example if each of
the $n_{1},n_{2},...$ produces a pair of simultaneously firing neurons with
firing characteristic time of $5ms$, a total number $N_{i}$ of about $10^{7}$
synchronized neurons would be produced in only $0.1s$. The same process occurs
on the neurons in the sequence $\alpha_{2},\alpha_{3},...,\alpha_{N}$ of the
$N$ connected states. Thus, a bunch of $N$ groups of $N_{i}$ synchronized
neurons for each state $\alpha$ of the sequence could be expected.

The neuron firing pulses can be described in terms of functions
$F_{\alpha_{i}}(t)$, where $t$ is the time and $\alpha_{i}$ is one of the $N$
states which completely characterizes the firing. The superposition of
individual firing $F_{\alpha_{i}}(t-t_{i})$, where $t_{i}$ is the time origin
arbitrarily chosen for each $F_{\alpha_{i}}(t)$ defines the relevant
neurological signal $I(t)=\sum_{i=-\infty}^{\infty}F_{\alpha_{i}}(t-t_{i}).$
The time interval between subsequent events $F_{\alpha_{i}}(t)$ and
$F_{\alpha_{i+1}}(t)$ is indicated by the variable $u_{i}$, which depends on
the states $\alpha$ through the distribution function
$q_{\alpha_{i},\alpha_{i+1}}(u_{i})$, accounting for the correlation between
the time intervals $u_{i}$.

The $\alpha$ states are represented by an homogeneous Markov chain
characterised by the $N\times N$ matrix $\|m\|$ with entries:

$m_{\alpha_{i},\alpha_{i+1}}=P({\alpha_{i+1}}=\alpha^{\prime}|{\alpha_{i}}=\alpha)$
(2.1)

defined as the conditional probability that if the event $i$ is in a state
$\alpha$, the event ${i+1}$ will be in the state $\alpha^{\prime}$, where
$\alpha$ and $\alpha^{\prime}$ are a pair of $N$ states. Then, the matrix
$\|M(u)\|$ can be built with entries:

$M_{\alpha,\alpha^{{}^{\prime}}}(u)=m_{\alpha,\alpha^{{}^{\prime}}}q_{\alpha,\alpha^{{}^{\prime}}}(u),$
(2.2)

where $\alpha$ and $\alpha^{\prime}$ are the states of a pair of successive
events of the sequence and $q_{\alpha,\alpha^{\prime}}(u)$ the distribution
function of the time interval between the pair. The Fourier transform of
$M_{\alpha,\alpha^{{}^{\prime}}}(u)$ is defined as:

$M_{\alpha,\alpha^{{}^{\prime}}}(\omega)=m_{\alpha,\alpha^{{}^{\prime}}}Q_{\alpha,\alpha^{{}^{\prime}}}(\omega),$
(2.3)

where:

$Q_{\alpha,\alpha^{{}^{\prime}}}(\omega)=\int_{0}^{\infty}q_{\alpha,\alpha^{{}^{\prime}}}(u)\exp(i\omega
u)du,$ (2.4)

$M_{\alpha,\alpha^{{}^{\prime}}}(\omega)$ defines the entries of the
correlation matrix $\|M(\omega)\|$ of the Markov process.

The power spectrum of random processes correlated in a Markov chain is given
by:

$\Phi(\omega)=\nu\overline{|S_{\alpha}(\omega)|^{2}}+2\nu\real\sum_{\alpha\alpha^{{}^{\prime}}}S^{*}_{\alpha}(\omega)S_{\alpha^{{}^{\prime}}}(\omega)p_{\alpha}\|K(\omega)\|_{\alpha\alpha^{{}^{\prime}}}\,,$
(2.5)

where $\nu$ is the average number of events per unit time,
$S_{\alpha}(\omega)$ is of the Fourier transform of $F_{\alpha}(t)$, with the
overline indicating the average over all the pulses in the sequence.
$S_{\alpha}^{*}(\omega)$ and $S_{\alpha^{{}^{\prime}}}(\omega)$ are the
Fourier transforms of $F_{\alpha}(t)$ for a pair of states $\alpha$ and
$\alpha^{{}^{\prime}}$, $p_{\alpha}$ is the fraction of states $\alpha$ in the
sequence. $\real$ means the real part. The matrix $\|K(\omega)\|$ is defined
as:

$\|K(\omega)\|=\|M(\omega)\|\cdot\left(\|I\|-\|M(\omega)\|\right)^{-1}$ (2.6)

with $\|M(\omega)\|$ is the correlation matrix of the Markov process with
entries defined by Eq. (2.3) and $\|I\|$ the identity matrix.

###  2.1 Line Power Spectral Density

In this subsection, we will show how to derive the power spectral density of a
single closed loop of Markov-chain correlated pulses. When the Markov matrix
$\|m\|$ in Eq. (2.1) describes random events organized in closed loop
sequences, the correlation matrix $\|M\|$ yields physically sound line spectra
as those observed in brain waves.

The lines in the power spectrum correspond to singularities of Eq. (2.6) when
$\det\left(\|I\|-\|M(\omega)\|\right)=0$, i.e. for
$q_{\alpha,\alpha^{{}^{\prime}}}(u)=\delta(u-u_{\alpha,\alpha^{{}^{\prime}}})$
where $u_{\alpha,\alpha^{{}^{\prime}}}$ is the time interval between
consecutive events characterized by the states $\alpha,\alpha^{{}^{\prime}}$,
then:

$Q_{\alpha,\alpha^{{}^{\prime}}}(\omega)=\exp(i\omega
u_{\alpha,\alpha^{{}^{\prime}}})$ (2.7)

and Eq. (2.4) takes the form:

$M_{\alpha,\alpha^{{}^{\prime}}}(\omega)=m_{\alpha,\alpha^{{}^{\prime}}}\exp(i\omega
u_{\alpha,\alpha^{{}^{\prime}}})$ (2.8)

A closed loop involving $N$ states $\alpha$ can be expressed by a $N\times N$
matrix $\|M(\omega)\|$ where all the rows are made up of zeroes except one
entry equal to $1$. with $m_{\alpha,\alpha^{{}^{\prime}}}=0$ except if
$\alpha_{i+1}=\alpha^{\prime}$ and ${\alpha_{i}}=\alpha$ then
$m_{\alpha,\alpha^{{}^{\prime}}}=1$. The condition $m_{N-1,N}=m_{N,1}=1$
ensures closeness of the loops. With the above choices, the relationship
$\det\left(\|I\|-\|M(\omega)\|\right)=0$ becomes:

$1-\exp[i\omega(u_{1,2}+u_{2,3}+...+u_{N,1})]=0$ (2.9)

with solutions:

$\omega=\omega_{n}=n\omega_{o}=\frac{2\pi}{\sum_{i=1}^{N}u_{i,i+1}}$ (2.10)

Eq. (2.10) yields the fundamental frequency $\omega_{o}$ and the harmonics of
the periodic component. $n$ is an integer. $\omega_{o}$ decreases as $N$ and
$u_{i,i+1}$ increase. The amplitude of the spectral lines at
$\omega=\omega_{n}$ is given by:

$A_{n}=\frac{2\pi\nu^{2}}{N^{2}}\real\sum_{\alpha\alpha^{{}^{\prime}}}S^{*}_{\alpha}(\omega_{n})S_{\alpha^{{}^{\prime}}}(\omega_{n})C_{\alpha\alpha^{{}^{\prime}}}(\omega_{n})$
(2.11)

where $\nu$ and $S^{*}_{\alpha}(\omega)S_{\alpha^{{}^{\prime}}}(\omega)$ have
been defined after Eq. (2.5) and $C_{\alpha\alpha^{{}^{\prime}}}$ are the
entries of the adjoint matrix:
$\|C(\omega_{n})\|=\operatorname{adj}\left(\|I\|-\|M(\omega_{n})\|\right)$.
The amplitude given by Eq. (2.11) holds only at the singular frequency values
$\omega=\omega_{n}$, when the determinant is zero. At frequencies $\omega$
different from the singularities $\omega_{n}$, the amplitude is equal to zero
as expected for strictly periodic functions. Thus, the power spectral density
of the periodic components writes:

$\Phi_{\ell}(\omega)=\sum_{n=-\infty}^{\infty}A_{n}\;\delta(\omega-\omega_{n})$
(2.12)

The amplitude $A_{n}$ has been estimated for different values of the
parameters $\nu$, $N$ and Fourier transform of the single pulse $S_{\alpha}$
in [23].

The power spectral density of an arbitrary Markov correlated pulse sequence
Eq. (2.5) has been worked out by averaging over time from ${-\infty}$ to
${\infty}$, by assuming stationarity. In the case of a single closed loop
sequence, the power spectrum of a perfectly periodic signal is obtained, i.e.
a line power spectrum taking discrete positive values at $\ n\,\omega_{0}$ and
zero at any other frequency and no broadband noise is generated. The
expression within square brackets in Eq. (2.5) corresponds to the real part of
the sum of $N$ elements of the principal diagonal of the matrix
$||K(\omega)||$ multiplied by $S_{\alpha}(\omega)S_{\alpha}(\omega)^{*}$ and
by $p_{\alpha}$, while the off-diagonal elements do not contribute. The real
parts of the diagonal elements are equal to $-1/2$, multiplied by $p_{\alpha}$
$=$ $1/N$ and by $2$, give $-\overline{|S(\omega)|^{2}}$, that summed to the
first term $\overline{|S(\omega)|^{2}}$ of the same equation, cancel each
other. The term $-\overline{|S(\omega)|^{2}}$ is the average over all the $N$
states $\alpha$ of the square modulus of products relative to the two complex
conjugate transforms of a couple of identical impulses symmetric with respect
to zero within the two half of the sequence extending from $-\infty$ to
$\infty$, while similar products within square brackets in the same equation
refers to a couple of different impulses relative to the same state $\alpha$
along the sequence. When each state $\alpha$ remain identical along the
sequence from $-\infty$ to $\infty$ and only their position along the sequence
change according to the conditional probability expressed by the Markov matrix
$||m||$, averaging over the statistical ensemble does not change the above
conclusions. The line spectrum, generated by a periodic function, remain
unchanged by averaging along the sequence.

###  2.2 Broadband Power Spectral Density

In this subsection, the Markov matrix approach is extended to an arbitrary
number $N_{i}$ of synchronized closed loops of firing neurons. Under the
assumption of fluctuations of $N_{i}$ the expression of the power spectrum
containing the broadband components is derived. The syncronized firing of
neurons belonging to the same state $\alpha$ will be described by the
superposition of individual firing functions in terms of the
$F_{\alpha}(t)=\sum_{i=1}^{N_{i}}F_{i,\alpha}(t)=N_{i}\langle{F_{i,\alpha}(t)}\rangle$,
where the angle brackets $\langle{\,\,}\rangle$ refers to the average over the
ensemble of the $N_{i}$ loops. Owing to the large number $N_{i}$ of loops and
the imperfect synchronization of the elementary impulses belonging to the same
$\alpha$ state, the firing events are described as Gaussian functions, hence
$\langle{F_{i,\alpha}(t)}\rangle$ can be written as:

$\langle
F_{i,\alpha}(t)\rangle=\frac{\langle{A_{\alpha}}\rangle}{\sigma_{\alpha}\sqrt{2\pi}}\exp\left(-\frac{t^{2}}{2\sigma_{\alpha}^{2}}\right)\quad,$
(2.13)

with variance $\sigma_{\alpha}$, amplitude
$\langle{A_{\alpha}}\rangle=\int_{-\infty}^{\infty}{\langle
F_{i,\alpha}(t)\rangle dt}$ and the time origin of the impulses taken at the
maximum of the Gaussian function relative to every state $\alpha$. The Fourier
transform of the function $F_{\alpha}(t)$ can be written as
$S_{\alpha}(\omega)=N_{i}\langle S_{i,\alpha}(\omega)\rangle$ where:

$\langle
S_{i,\alpha}(\omega)\rangle=\langle{A_{\alpha}}\rangle\exp\left(-\frac{\omega^{2}\sigma_{\alpha}^{2}}{2}\right)\quad.$
(2.14)

When the fluctuations of the number $N_{i}$ of synchronized loops are taken
into account in the general expression of the power spectal density, the
quantity $S_{\alpha}(\omega)S_{\alpha}(\omega)^{*}$ writes
$(\overline{N_{i}})^{2}\overline{(<|S_{i,\alpha}(\omega)|>)^{2}}$. The first
term in the same equation is $\overline{(N_{i}^{2})}$
$\overline{(<|S_{i,\alpha}(\omega)|>)^{2}}$. Hence, the power spectrum writes:

$\Phi(\omega)=\nu\left(\overline{N_{i}^{2}}-\overline{N_{i}}^{2}\right)\overline{(\langle|S_{i,\alpha}(\omega)|\rangle)^{2}}$
(2.15)

The quantity $\overline{N_{i}^{2}}-\overline{N_{i}}^{2}$, yielding the
fluctuations of $N_{i}$ around its average value $\overline{N}_{i}$, can be
estimated by assuming that $N_{i}$ is a stationary random variable described
by a normalized Gaussian probability function $P(N_{i})$:

$P(N_{i})=\frac{1}{\sigma_{N_{i}}\sqrt{2\pi}}\cdot\exp\frac{-(N_{i}-\overline{N_{i}})^{2}}{2\sigma_{N_{i}}^{2}}\quad,$
(2.16)

with $(\overline{N_{i}})^{2}=\left(\int_{-\infty}^{\infty}\left(N_{i}\cdot
P(N_{i})\right)dN_{i}\right)^{2}$ and
$\overline{(N_{i}^{2})}=\int_{-\infty}^{\infty}\left(N_{i}^{2}\cdot
P(N_{i})\right)dN_{i}=(\overline{N_{i}})^{2}+\sigma_{N_{i}}^{2}$ and the
variance is $\sigma_{N_{i}}$. Hence Eq. (2.15) writes:

$\Phi(\omega)=\nu\sigma_{N_{i}}^{2}\overline{\langle|S_{i,\alpha}(\omega)|\rangle^{2}}\quad,$
(2.17)

which yields the broadband component of the noise power spectrum, whose
intensity has been estimated for normally distributed fluctuations of the
number of syncronysed loops. The amplitude of the broadband component depends
on the fluctuations of $N_{i}$ through the variance $\sigma_{N_{i}}$.

The width of the Gaussian $\sigma_{\alpha}$ for each state $\alpha$ in
Eq.(2.14) is related to the cut-off frequency of the power spectrum and thus,
to the cut-off of the highest harmonic frequencies of the periodic components.
If the pulses are Gaussian with Fourier transform given by Eq. (2.14), the
cut-off angular frequency may be assumed to be
$\omega_{c}=1/\overline{\sigma}_{\alpha}$, giving a reduction factor of
$1/e\approx 0.36$. For instance, $\overline{\sigma}_{\alpha}=2\cdot 10^{-3}s$
yields a cut off frequency $\omega_{c}=500$ $rad\,s^{-1}$ and $f_{c}=79.5Hz$,
that for an alpha wave of $8Hz$ would allow about $10$ harmonics to stand in
the power spectrum up to $80Hz$ with only a slight reduction, while for a wave
of $20Hz$ a reduction of the amplitude would occur after the $4^{th}$
harmonic. At frequencies lower than the cut-off $\omega_{c}$, number and
amplitude of the harmonics merely depend on the states characterizing the
neurons forming the loops.

The main effect of the fluctuations of $N_{i}$ is to give rise to a mixed
power spectrum. The effect of this noise adds to the signal, which now
includes spectral lines at the angular frequencies $\ n\cdot\omega_{0}$ and a
continuous broadband noise. Fluctuations of the parameters intrisic to a
single loop give rise to the changes in the synchronization with the other
loops by changing the number $N_{i}$. As observed in empirical EEG records,
amplitude and waveform vary almost at every period of the detected signal.
According to our model, this change may be due to fluctuations of the number
of synchronized loops $N_{i}$ and onset of synchronization with slightly
different characteristics.

##  3 Discussion

In this section, the power spectrum generated by the synchronized closed loop
sequences of Markov correlated firing neurons will be confronted with typical
features observed in EEG and MEG measurements. As discussed in Sect. 2, the
sequences of electric and magnetic impulses received by the sensors on the
scalp at every cycle correspond to $N$ groups of $N_{i}$ syncronized impulses
generated by the firing of a single neuron in each loop. The average time
intervals $u$ between subsequent neuron firings along the loop multiplied by
$N$ yields the loop duration and its reciprocal the lowest frequency component
of the mixed power spectrum. In principle $N_{i}$ could be estimated by
considering the intensity of either the elementary electric or the magnetic
impulses, which are almost simultaneously produced by a single firing neuron
in each sequence. Better estimates are obtained by using the magnetic
component, not attenuated by the cerebral matter and the scalp, contrarily to
the electrical components of the signal [25, 26, 27]. The magnetic and
electric field components $\vec{B}$ and $\vec{E}$ generated by the firing of a
single neuron obey the Maxwell equation
$\curl\,\vec{B}=\mu_{0}\vec{J}+\epsilon_{0}\mu_{0}\,\,{\delta\vec{E}}/{\delta
t}$, with $\vec{J}$ and $\mu_{0}\epsilon_{0}\,\,{\delta\vec{E}}/{\delta t}$
the conduction and displacement current density. The conduction charges in the
axon move at speed ranging between $0.5ms^{-1}$ and $5.0ms^{-1}$, thus much
faster than the charges moving in the outer regions. Therefore, the electric
field in the axon is partly screened by the conductive cerebral matter.

The magnetic field generated by the conduction charge inside the axon can be
estimated by using the relationship valid for metallic conductors:

$\vec{B}(t)=\frac{\mu_{0}}{4\pi}I(t)\,\Delta\ell\,\frac{\vec{u}_{A}\,\times\,\vec{u}_{D}}{r_{s}^{2}}\hskip
3.0pt,$

with $I(t)$ the current intensity, $r_{s}$ the distance between the midpoint
of the axon and the point where $\vec{B}(t)$ is measured, $\Delta\ell$ the
length of the axon, which, for neurons connected in the same area of the
brain, ranges between $50\mu m$ and $200\mu m$. The unit vector $\vec{u}_{A}$
and $\vec{u}_{D}$ indicate respectively the directions of $\Delta\ell$ and
$r_{s}$. The amplitude of the magnetic field $\vec{B}(t)$ writes:

${B}(t)=\frac{\mu_{0}}{4\pi}\,I(t)\,\Delta\ell\
\frac{\sin\theta}{r_{s}^{2}}\hskip 10.0pt,$ (3.1)

where $\theta$ is the angle between $\vec{u}_{A}$ and $\vec{u}_{D}$. $I(t)$
can be estimated by considering the charge transferred by the firing process
to nearby neurons. When the neuron receives positive inputs from its dendrites
over a short time interval, its resting membrane potential increases from
about $-75mV$ to a critical value of about $-45mV$. At this point, a positive
charge $Q$ enters the soma from the ionic channels making the membrane
potential slightly positive a process lasting about $1ms$. During a subsequent
time interval with approximately the same duration ($1ms$) the excess positive
charge $Q$ is ejected through its axon, restoring the membrane potential to
its resting value $-75mV$ after a small over-shut. As a good approximation,
the ejection of this charge corresponds to a variation of the membrane
potential of about $100mV$. By approximating the soma as a sphere of radius
$R$ with uniform inner charge density $\rho$, the electric field can be
written as $E(r)={\rho\frac{4}{3}\pi r^{3}}/{4\pi\epsilon_{0}r^{2}}={\rho
r}/{3\epsilon_{0}}\,$ at $r\leq R$ with $r$ the distance from the center of
the sphere. The membrane potential $V_{m}$ writes:

$V_{m}=\int_{0}^{R}E(r)dr=\frac{\rho}{3\epsilon_{0}}\int_{0}^{R}rdr=\frac{\rho}{6\epsilon_{0}}R^{2}=\frac{Q}{8\pi\epsilon_{0}R}$
(3.2)

where $Q=\rho\tfrac{4}{3}\pi R^{3}$ is the total charge within the sphere. A
membrane potential of about $V_{m}=100mV$ and a soma radius of about
$R=25.0\,\,\mu m$ result in an ejected charge
$Q=8\pi\epsilon_{0}RV_{m}=5.55\cdot 10^{-16}\,C$. If the ejected charge
crosses the axon in about $1ms$, the current impulse $I(t)$ can be described
by a Gaussian function of time with variance $\,\sigma=1ms$:

$I(t)=\frac{Q}{\sigma\sqrt{2\pi}}\exp\left(\frac{t^{2}}{2\,\sigma^{2}}\right)$
(3.3)

with the condition $\int_{-\infty}^{\infty}I(t)dt=Q$. The current $I(t)$ can
be introduced in the magnetic field (Eq. (3.1)), i.e.:

${B}(t)=\frac{\mu_{0}}{4\pi}\frac{Q}{\sigma\sqrt{2\pi}}\exp\left(\frac{t^{2}}{2\,\sigma^{2}}\right)\Delta\ell\frac{\sin(\theta)}{r_{s}^{2}}\hskip
5.0pt.$ (3.4)

The maximum value of the magnetic field amplitude is achieved at $t=0$ with
$\sin\theta=1$. This situation, where $\sin(\theta)=1$, occurs when the axon
of the firing neuron is tangent to the surface of the skull in the point where
the magnetic sensor is placed. In the cortical area of the brain this may
happen when the firing neuron is in one of the numerous regions called gyri
[28, 29]. Then by using an average value of $\Delta\ell=100\,\,\mu m$ and of
the distance $r_{s}=2\cdot 10^{-2}\,\,m$ of the magnetic sensor detecting the
impulse, an average peak intensity ${B}(0)\approxeq 0.5\cdot\,10^{-20}\,T$ is
obtained. To generate magnetic impulses of the order of $10^{-13}\,T$, value
generally found in MEG and EEG, about $N_{i}=10^{7}$ synchronized firing
neurons would be needed 111The value $10^{-13}\,T$ is close to the sensitivity
limit of the SQUID sensors (about $10^{-15}T$).

While it is generally accepted that the magnetic signal generated by firing
neurons (MEG) is due to the ejected excess charge within the axon, the origin
of the electric signal (EEG) is more controversial. A common assumption is
that the signal is generated in correspondence of the chemical synapses
connecting the firing neuron to the dendrites of numerous postsynaptic ones.
The charge emitted from the axon of the firing neuron is split in hundreds or
thousands fractions which create ionic currents external to the synapses, then
detected by the sensors of the EEG setup. The synchronized firing of a large
population of neurons and the role played by the excitatory and inhibitory
synapses yield a complex situation of small current impulses, where
spontaneous oscillations can be generated under suitable assumptions [30, 31].
An alternative interpretation relates the electric signals to the transient
potential impulses radially emitted externally to the soma of the firing
neurons, due to the rapid variations of the external electric field generated
by the charge variations inside the neuron. Within this description, the
potential impulse peak value, detected by an electrode internal to the soma
during firing, is assumed of the order of $100mV$, the electrode external to
the soma peak value of about $0.1mV$, the distance of the second electrode
from the membrane of the neuron of the order of $200\mu m$. In order to
evaluate the intensity of the electric potential impulse, we consider again
the neuron with the sferical soma of radius $R=25\mu m$ and the electric field
$E(r)$ at $r<R$ used above for the calculation of the magnetic impulse. If the
conductive medium within the cranial bone is neglected, the electric field
$E(r)$ at $r>R$ is given by $E(r)={Q}/{4\pi\epsilon_{0}r^{2}}\,$ where $Q$ is
the whole charge within the soma. The electric potential, at distance $r>R$
from the center of the sphere, is given by $V={Q}/{4\pi\epsilon_{0}r}$, with
$V=0$ as $r=\infty$. The field $E(r)$ in the presence of conductive liquids,
as it is the case for the brain, in stationary condition would be zero. A
charge layer equal to the internal charge but with opposite sign, would be
attracted and surround the membrane of the soma. This charge with spherical
symmetry cancels out the field for $r>R$. When a fast transient process occurs
to the charge within the soma, as it is the case during the firing of the
neuron, and the conductive liquid within the cranial bone contains positive
and negative ions, the screening of the charge inside the soma is expected to
occur only in part, which justifies the impulse [30]. The amplitude of this
impulse, compared to the amplitude expected from Eq. (3.2), allows to evaluate
the effective charge $Q_{eff}$ at the center of the sphere, and thus the
amplitude of the impulse at an arbitrary distance $r>R$. By assuming a
distance $r$ from the center of the sphere of the order of $200\mu m$ and
$Q=5.55\cdot 10^{-16}\;C$, Eq. (3.2) gives $V=22.28mV$, exceeding the typical
measured value $0.1mV$. This result could imply that the charge internal to
the soma is screened by an external opposite charge which reduces the $Q$
value to $Q_{eff}$. A value of $Q_{eff}$ of the order of $10^{-18}C$, i.e. two
orders of magnitude lower than $Q$ would yield a potential value of the order
of $0.1mV$ at a distance of about $200\mu m$ and a potential value of the
order of $10^{-6}V$ at a distance of about $10^{-2}m$. It should be also
considered that the electrometer input impedance is close to $\infty$. The
impulse amplitude is expected to be reduced by the cranial bone and by the
input impedance of the operational amplifiers connected to the electric
sensors of the EEG set-up, with a gain inversely proportional to the input
resistance, that must be kept low but large enough to drive the signal
recorder. By keeping into account all these effect a smaller value of the
potential could be obtained.

##  4 Concluding remarks

A mathematical framework, leading to the unified description of the discrete
and continuous power spectral components of the EEG and MEG signals, has been
proposed. The model is based on the assumption that the complex network of
interacting neurons spontaneously form closed loops chains of $N$ firing
neurons giving rise to repetitive emission of electric and magnetic impulses.
By describing the electric and magnetic impulses generated by the firing of a
neuron as Gaussians of given amplitude and width, the line power spectrum of
this periodic function, fundamental and harmonic components, are shown to
depend on the distributions of the amplitude and variance of the emitted
impulses and of the time intervals between their emission, which are
expression of the $N$ states $\alpha$ of the sequence. A general matrix
equation gives the line power spectrum.

Furthermore, by considering the fluctuations of the number $N_{i}$ of
synchronized firing neurons belonging to different closed loop chains, a
broadband component emerges in the power spectrum. The syncronized pulses are
represented as Gaussian time functions whose amplitude and variance depend on
the degree of syncronization and simultaneousness of the firing of the neurons
belonging to different single loops but in the same state $\alpha$. T

As discussed in Sect.3, the fluctuations of the number of synchronized loops
$N_{i}$ may change the amplitude of the signal and its waveform which is
determined by the harmonic components generated by the loops. It is worthy of
note that, even if the fluctuations change the waveform of the signal, the
frequency of the wave remains unchanged, as the frequency of the wave depends
on the duration of the loop $\sum_{i}u_{i}$ which is unchanged by the
fluctuation of $N_{i}$. An additional effect of the presence of the broadband
component concerns the onset of a cut-off in the line power spectrum, which is
related to the width of the electric impulses represented by the variance of
the Gaussian time functions. Larger variance implies lower cut-off frequency
and smaller number of harmonic components, filtering out a signal closer and
closer to the pure sinusoid.

The main features explained by the proposed model are summarized here below.
The broad range of discrete frequencies observed in the EEG and MEG signals is
obtained by considering different duration of closed loops sequences of firing
neurons. By assuming an average firing interval between successive neurons of
$5\cdot 10^{-3}$ s, sequences ranging from few hundred neurons to only few
neurons cover the range from $0.5Hz$ (lowest frequency of delta waves) to 50
Hz (highest frequency of gamma waves). The presence of several harmonic
components of the fundamental sinusoidal wave in the graph of EEG is also
accounted for, particularly at low frequency, as the delta waves, where a pure
sinusoid is never observed. High frequency waves are less distorted since
harmonics stand at frequencies multiple of the fundamental one, and the cut-
off frequency of the detected power spectrum cuts the harmonics exceeding that
frequency. In a few particular cases all harmonics are cut-off, or strongly
reduced, giving a sinusoidal, or nearly sinusoidal, wave. Part of the
distortion can be due to the broadband noise created by the fluctuation of the
number of $N_{i}$. One of the effects discussed above, and observed in almost
all EEG graphs, is the continuous change of the waveform, practically at every
period, of the received signal produced by the loops. This change, which is
associated to a heavy distortion of the fundamental wave, is due to the
presence of several harmonic waves within the periodic signal, and it is
enough a change of the amplitude or the phase of one or few of these harmonics
during the fluctuation of $N_{i}$, to change the waveform over the period. A
signal constituted of a fundamental wave and many harmonics is just what is
expected from a sequence of heterogeneous electric impulses characterized by
different states $\alpha$, as considered in the present paper.

## References

  * [1] L. J. Hirsch, and R.P. Brenner, “Atlas of EEG in Critical Care”, Wiley, (2010).
  * [2] da Silva, F.L., 2013. EEG and MEG: relevance to neuroscience. Neuron, 80(5), pp.1112-1128.
  * [3] Baillet, S. (2017). Magnetoencephalography for brain electrophysiology and imaging. Nature neuroscience, 20(3), 327-339.
  * [4] de Arcangelis, L., & Herrmann, H. J. (2010). Learning as a phenomenon occurring in a critical state. Proceedings of the National Academy of Sciences, 107(9), 3977-3981.
  * [5] Tagliazucchi, E., Balenzuela, P., Fraiman, D., & Chialvo, D. R. (2012). Criticality in large-scale brain fMRI dynamics unveiled by a novel point process analysis. Frontiers in physiology, 3, 15.
  * [6] Buzsaki, G., & Draguhn, A. (2004). Neuronal oscillations in cortical networks. science, 304(5679), 1926-1929.
  * [7] Canolty, R. T., Edwards, E., Dalal, S. S., Soltani, M., Nagarajan, S. S., Kirsch, H. E., … & Knight, R. T. (2006). High gamma power is phase-locked to theta oscillations in human neocortex. science, 313(5793), 1626-1628.
  * [8] He, B. J., Zempel, J. M., Snyder, A. Z., & Raichle, M. E. (2010). “The temporal structures and functional significance of scale-free brain activity”. Neuron, 66(3), 353-369.
  * [9] Buzsáki, G. and Wang, X.J., 2012. Mechanisms of gamma oscillations. Annual review of neuroscience, 35, p.203.
  * [10] Becker, R., Van De Ville, D., & Kleinschmidt, A. (2018). Alpha oscillations reduce temporal long-range dependence in spontaneous human brain activity. Journal of Neuroscience, 38(3), 755-764.
  * [11] Wairagkar, M., Hayashi, Y., & Nasuto, S. J. (2021). Dynamics of long-range temporal correlations in broadband EEG during different motor execution and imagery tasks. Frontiers in neuroscience, 15, 413.
  * [12] Cabral, Joana, et al. ”Metastable oscillatory modes emerge from interactions in the brain spacetime connectome.”, Commun Phys 5, 184 (2022)
  * [13] Brady, B., & Bardouille, T. (2022). “Periodic/Aperiodic parameterization of transient oscillations (PAPTO)–Implications for healthy ageing”. NeuroImage, 251, 118974.
  * [14] Donoghue, T., Haller, M., Peterson, E. J., Varma, P., Sebastian, P., Gao, R., … & Voytek, B. (2020). “Parameterizing neural power spectra into periodic and aperiodic components”. Nature Neuroscience, 23(12), 1655-1665.
  * [15] Gerster, M., Waterstraat, G., Litvak, V., Lehnertz, K., Schnitzler, A., Florin, E., … & Nikulin, V. (2022). “Separating neural oscillations from aperiodic 1/f activity: challenges and recommendations”. Neuroinformatics, 1-22.
  * [16] Zhang, M., Tang, Z., Liu, X., & Van der Spiegel, J. (2020). Electronic neural interfaces. Nature Electronics, 3(4), 191-200.
  * [17] Goodfellow, M., Andrzejak, R. G., Masoller, C., & Lehnertz, K. (2022). What Models and Tools can Contribute to a Better Understanding of Brain Activity. Front. Netw. Physiol. 2: 907995. doi: 10.3389/fnetp.
  * [18] W. H. Huggins, ”Signal-Flow Graphs and Random Signals,” in Proceedings of the IRE, vol. 45, no. 1, pp. 74-86, (1957).
  * [19] R. D. Barnard, ”On the discrete spectral densities of Markov pulse trains,” in The Bell System Technical Journal, vol. 43, no. 1, pp. 233-259, (1964).
  * [20] Mazzetti, P., and C. Oldano. “Spectral properties of physical processes of Markov correlated events. I. Theory.” Journal of Applied Physics 49, no. 11 (1978): 5351-5356.
  * [21] P. Galko and S. Pasupathy, ”The mean power spectral density of Markov chain driven signals,” in IEEE Transactions on Information Theory, vol. 27, no. 6, pp. 746-754, (1981) .
  * [22] Bilardi, G., Padovani, R., & Pierobon, G. (1983). Spectral analysis of functions of Markov chains with applications. IEEE Transactions on Communications, 31(7), 853-861.
  * [23] Mazzetti, P., and Carbone, A. “Harmonic spectral components in time sequences of Markov correlated events.” AIP Advances, 7(7), (2017): 075216.
  * [24] Centers, J., Tan, X., Hareedy, A., & Calderbank, R. (2021). Power spectra of constrained codes with level-based signaling: Overcoming finite-length challenges. IEEE Transactions on Communications, 69(8), 4971-4986.
  * [25] Izhikevich, E.M., 2007. Dynamical systems in neuroscience. MIT press.
  * [26] Delorme, A., Palmer, J., Onton, J., Oostenveld, R. and Makeig, S., 2012. Independent EEG sources are dipolar. PloS one, 7(2), p.e30135.
  * [27] Vorwerk, J., Cho, J.H., Rampp, S., Hamer, H., Knösche, T.R. and Wolters, C.H., 2014. A guideline for head volume conductor modeling in EEG and MEG. NeuroImage, 100, pp.590-607.
  * [28] Jiang, X., Zhang, T., Zhang, S., Kendrick, K. M., & Liu, T. (2021). “Fundamental functional differences between gyri and sulci: implications for brain function, cognition, and behavior. Psychoradiology”, 1(1), 23-41.
  * [29] Qiyu Wang, Shijie Zhao, Zhibin He, Shu Zhang, Xi Jiang, Tuo Zhang, Tianming Liu, Cirong Liu, Junwei Han, “Modeling functional difference between gyri and sulci within intrinsic connectivity networks”, Cerebral Cortex, 2022;, bhac111, https://doi.org/10.1093/cercor/bhac111
  * [30] A. Hutt, Oscillatory activity in excitable neural systems.” Contemporary Physics 51, no. 1 (2010): 3-16.
  * [31] M. Hashemi A. Hutt, J. Sleigh, “How the cortico-thalamic feedback affects the EEG power spectrum over frontal and occipital regions during propofol-induced sedation”, J Comput Neurosci (2015) 39:155–179 DOI 10.1007/s10827-015-0569-1


#  PARTITURA: A PYTHON PACKAGE FOR SYMBOLIC MUSIC PROCESSING

Carlos Cancino-Chacón111equal contribution.
Johannes Kepler University
carlos_eduardo.
<EMAIL_ADDRESS>

Francesco Foscarin11footnotemark: 1
Johannes Kepler University
<EMAIL_ADDRESS>

Silvan David Peter11footnotemark: 1
Johannes Kepler University
<EMAIL_ADDRESS>

Maarten Grachten
Independent Researcher
<EMAIL_ADDRESS>

Emmanouil Karystinaios11footnotemark: 1
Johannes Kepler University
<EMAIL_ADDRESS>

Gerhard Widmer
Johannes Kepler University
<EMAIL_ADDRESS>

#### Abstract

_Partitura_ is a lightweight Python package for handling symbolic musical
information. It provides easy access to features commonly used in music
information retrieval tasks, like note arrays (lists of timed pitched events)
and 2D piano roll matrices, as well as other score elements such as time and
key signatures, performance directives, and repeat structures. Partitura can
load musical scores (in MEI, MusicXML, Humdrum **kern, and MIDI formats), MIDI
performances, and score-to-performance alignments. The package includes some
tools for music analysis, such as automatic pitch spelling, key signature
identification, and voice separation. Partitura is an open-source project and
is available at https://github.com/CPJKU/partitura/.

#### Introduction

In the past few years, symbolic music processing has been gaining increasing
attention in the Music Information Research (MIR) community, with several
music datasets of symbolic formats recently released, e.g. (Foscarin ., 2020;
Micchi ., 2020; Kong ., 2020). Systems that target symbolic data are usually
more efficient and easier to interpret than systems that target lower-level
representation of music, such as audio files. This is not surprising, as
sequences of notes are more compact and interpretable than sequences of
amplitudes over time. Symbolic formats can encode much more than a sequential
note representation. Symbolically encoded musical scores arrange those notes
in temporal and organizational structures such as measures, beats, parts, and
voices. They can also explicitly represent dynamics and temporal directives
and other high-level musical features such as time signature, pitch spelling,
and key signatures.

While this rich set of musical elements adds useful information that can be
leveraged by MIR systems, it also drastically increases the complexity of
encoding and processing symbolic musical formats. Common formats for storage
such as MEI, MusicXML, Humdrum **kern and MIDI are not ideally suited to be
directly used as input in MIR tasks111Though a few works exist that target
directly Humdrum **kern files, e.g., (Román ., 2019), but some preprocessing
is always required.. Therefore, the typical data processing pipeline starts
with parsing the relevant information from those files and putting it into a
convenient data structure (e.g., numerical arrays that can be used directly as
input for machine learning or signal processing methods). Both operations
require musical knowledge and can be very time-consuming, thus constituting a
major barrier, especially for data-driven approaches that require a large
dataset to be trained, and for researchers with limited musical background.

These problems have motivated us to develop Partitura. Our goal is to
simplify, as much as possible, all steps from the symbolic encoding to a
convenient input data structure for a MIR system. Partitura can
straightforwardly produce standard data structures while still handling a
complete set of symbolic music elements to create a customized one. Partitura
can parse symbolic representations of musical scores and performances from
multiple file encodings (MEI, MusicXML, Humdrum **kern, and MIDI) into Python
objects to easily access their content. Moreover, it can produce commonly used
data structures such as piano rolls and note arrays at different time
resolutions.

The rest of this paper is structured as follows: Section 1 highlights the
differences between Partitura and other python packages for processing
symbolic musical formats. The package functionalities are detailed in Section
2, and in Section 3 we provide a short usage example. Finally, in Section 4 we
draw some conclusions on this paper and discuss possible future work.

##  1 Related Work

Among the available Python packages for parsing and processing music in
symbolic formats, there are two that stand out in terms of popularity and
usability, _Pretty MIDI_ and _music21_.

_Pretty MIDI_ (Raffel Ellis, 2014) is a Python package that focuses on the
analysis, modification, and generation of MIDI data in a fast and
straightforward way. A strong feature of PrettyMIDI is its ability to easily
extract MIDI properties such as the position of beats and downbeats, key and
time signatures, and to produce piano roll representation with a specific
sample frequency. Partitura follows the PrettyMIDI philosophy of speed and
simplicity but extends it to other symbolic formats of musical scores, and to
the other notation elements they contain. Moreover, while PrettyMIDI only
represents time in seconds, Partitura can work with other time units such as
beats and quarter notes.

Another well-known python package for handling both MIDI and richer symbolic
encodings of musical scores is _music21_ (Cuthbert Ariza, 2010). Indeed,
music21 has been developed and supported for many years now. It offers a
robust parser for many file formats, and support for many “advanced” score
elements such as nested tuples and beamings. Among the package goals, there
are advanced modifications of musical scores, such as transpositions, pitch
respelling, insertion, and deletion of voices and measures. All this is
supported by an internal representation based on nested containers called
Streams that model the hierarchical temporal and organizational structure of
the score in measures, voices, and parts. Partitura does not aim at rebuild
such a complete and complex framework, instead, it focuses on a different
goal: lightweight extraction of features that are relevant for MIR research,
typically sequential representations of score elements such as piano rolls or
note arrays. To efficiently target this objective, Partitura uses a much
simpler, but nonetheless complete, sequential representation of musical
scores, with musical elements arranged in a timeline.

##  2 Partitura

Partitura can handle three symbolic data types: musical scores, performances,
and score-to-performance alignments. The score contains a representation of
music, highly structured in staves, measures, beats, and voices, and express
durations in musical units quantized to fractions of quarter notes and beats.
The performance is a sequential representation of musical events expressed on
a continuous timeline and not quantized to fixed values. Alignments between
the two formats can be done at note- or time-level (e.g., beat and measure).
Different file formats can be parsed into dedicated internal representations
to offer easy access to the file content. A set of functions creates data
structures that are often used in MIR research. Finally, Partitura offers some
music analysis tools.

###  2.1 Internal Data Structures

Figure 1: Schematic representation of a Part. The blue lines represent the
starting times of the objects in the score and the red lines represent the end
times.

Different internal data types are built to represent scores, performances, and
score-to-performance alignments.

For a score, Partitura uses three main classes: TimePoints, TimedObjects, and
Parts. At the highest level, there are one or more Part objects, possibly
grouped by _PartGroup_ objects. Parts are typically associated with
instruments, and each Part may have one or more staves. Each Part contains a
timeline that encapsulates a sequence of TimePoint objects, each denoting a
temporal position in the score.TimePoints encode score time in non-negative
integer units. The relation of this unit to a quarter note is chosen such that
any temporal position present in the score can be represented in integer
values.

Musical elements (for example, a _Note_) are added to the timeline by
registering them with the TimePoints corresponding to their start and end
positions. Any element registered with two TimePoints is a TimedObject.
Partitura represents a large set of score elements as subclasses of the
TimedObject, e.g., notes, rests, time signatures, key signatures, slurs,
measures, tempo and loudness directives. Figure 1 shows a schematic
representation of a Part object and its components.

In contrast to scores, the performance is inherently sequential and can be
represented in a simpler structure. Partitura uses PerformedPart objects that
consist of two ordered containers which store notes and MIDI control
information. A note object of a PerformedPart is a dictionary encoding MIDI
note parameters (onset, offset, velocity, pitch, channel, and track) as well
as a deterministically generated unique note identifier.

Score-to-performance alignments are represented with a Part, a PerformedPart,
and a sequence of alignment pairs. Each alignment pair encodes a link between
a note ID (or time position) in the score and a note ID (or time position) in
the performance.

###  2.2 Supported File Formats

Partitura can parse score formats such as MEI, MusicXML, Humdrum **kern and
produce Part objects. The case of MIDI files is more complex, as they can
encode either a performance or a bare-bones scores representation (Back,
1999). Partitura loads MIDI scores and MIDI performances into Part and
PerformedPart objects respectively. As far as output file formats are
concerned, Partitura can produce MusicXML and MIDI files from Parts and MIDI
files from PerformedParts.

Partitura supports import and export functionality for match files, a format
for encoding symbolic score-to-performance music alignments (Foscarin .,
2022). Furthermore, Partitura parses simpler alignment file formats such as
the .match and .corresp files proposed by Nakamura . (2017).

###  2.3 Generated Data Structures

Although convenient for lossless representation of score time, the internal
representation of time points and durations as integers is not particularly
meaningful from a musical perspective. For this reason, Partitura can output
temporal positions and durations in two other units: quarter notes and beats.
For example, the upper-staff notes of the score in Figure 1 would have a
temporal position of $[0,1,5,6,7,\dots]$ if we are considering quarter notes,
$[-1,0,4,5,6\dots]$ if we are considering “slow-tempo beats” (12 beats for the
measure) or $[-0.333,0,1,0.333,0.666,\dots]$ if we are considering “fast-tempo
beats” (4 beats for the measure). Mappings between various time units are
readily available as Part methods.

Partitura can automatically generate two data structures that are commonly
used in MIR tasks: note arrays and piano rolls matrices (see Figure 2). A note
array is an ordered sequence of note features. Such features can include note
descriptors (e.g., midi-pitch, pitch-spelling, onset position, voice, and
duration), but also context information like metrical position, time
signature, and key signature. Users can choose among these features the ones
that are related to their application. A use case is demonstrated in Figure 4
From this representation, we can build a dedicated word encoding of the
musical score, as done by Hawthorne . (2019). A piano roll is a matrix of
shape $(\textrm{number of pitches}\times\textrm{number of time frames})$ where
the length of a time frame can be set as fractions of beats or quarter notes.
For example, if we consider 4 frames per quarter note, and the piano range,
the score of Figure 1 would produce a piano roll of shape $(88\times 28)$.
This representation is widely used in the MIR community, for example, by Huang
. (2019). Built-in methods to create note arrays and piano rolls matrices are
available for both Part and PerformedPart objects. For efficient processing in
Python, note arrays and score piano rolls are numpy
arrays.222https://numpy.org/

Instances Id Onset Duration Pitch Time Signature … $note_{1}$ $id_{1}$
$on_{1}$ $dur_{1}$ $pi_{1}$ $ts_{1}$ $note_{2}$ $id_{2}$ $on_{2}$ $dur_{2}$
$pi_{2}$ $ts_{2}$ $\vdots$ $\vdots$ $\vdots$ $\vdots$ $\vdots$ $\vdots$
$note_{N}$ $id_{N}$ $on_{N}$ $dur_{N}$ $pi_{N}$ $ts_{N}$ $\vdots$ $\vdots$
$\vdots$ $\vdots$ $\vdots$ $\vdots$

Figure 2: An abstract example of a note array (left) and a piano roll(right).

###  2.4 Music Analysis and Repetition Unfolding Tools

Partitura includes some tools for music analysis that are intended to fill in
missing information with plausible values, for instance, when loading a score
from a MIDI file. The list of available tools includes the Krumhansl–Shepard
algorithm (Krumhansl, 1990) for key signature estimation, the _ps13s1_
algorithm (Meredith, 2006) for pitch spelling, and _VoSA_ (Chew Wu, 2004) for
polyphonic voice estimation. To our knowledge, this is the first publicly
available Python implementation of ps13s1 and VoSA.

Musical scores often encode repetition structures with repeat signs, Volta
brackets, and navigation directions such as al Coda, dal Segno, da Capo, or al
Fine. On the other side, music performances are “unfolded” and multiple
possible unfoldings can exist for a piece, as players often decide to skip
some repetitions. Partitura supports the generation of such unfoldings from a
score’s repetition structure and their conversion into a new Part object.

##  3 Getting Started

In this section, we present a quick introduction to the usage of the Partitura
package. For more examples of use cases, as well as a more detailed
description of the elements of the package, please refer to the online
documentation.333https://partitura.readthedocs.io/ A hands-on tutorial can be
found on Google Colab.444https://tinyurl.com/partituratutorial

The Partitura package can be installed from Python Package
Index555https://pypi.org with the command `<pip install partitura>` or
directly from the source code available on Github.

###  3.1 Importing Files

⬇

import partitura as pt

\par# Load score

score = pt.load_score(”chopin_op9_no2.mei”)

# Load MIDI as a performance

performance = pt.load_performance(”chopin_op9_no2_perf.mid”)

# Load Alignment

performance, alignment = pt.load_match(’chopin_op9_no2.match’)

Figure 3: Importing Files.

As mentioned in Section 2.1, Partitura treats musical scores and performances
differently, and this is reflected in how scores and performances are
imported. Partitura includes a generic `load_score` method for loading files
as scores (i.e., as Parts), as well as a `load_performance` method for loading
files as performances (i.e., as PerformedParts). These generic methods infer
the format of the input file automatically. Additionally, there are individual
methods for loading supported formats (e.g., `load_musicxml`, `load_mei`,
`load_kern` for MusicXML, MEI, Humdrum **kern files, respectively). For MIDI
files, Partitura provides both `load_score_midi` and `load_performance_midi`
methods. By doing so, we expect users to know what kind of information they
would like to extract from MIDI files. As mentioned in Section 2.4, we use the
included music analysis tools to infer plausible values for the missing
information (especially pitch spelling and voice information) in MIDI files
imported as scores. Figure 3 shows an example of loading files.

###  3.2 Computing Note Arrays and Piano Rolls

Figure 4 shows an example of extracting note arrays and piano rolls from a
score (the syntax is the same for performances). This example illustrates the
philosophy of Partitura of reducing the most common operations on symbolic
music to one-line Python commands.

In Partitura, note arrays are implemented using Numpy structured
arrays,666https://numpy.org/doc/stable/user/basics.rec.html arrays in which
each column can have a different datatype. By default, note arrays generated
from scores include onset and duration information (in beats, quarters and
divs), MIDI pitch, voice and note ID. Note arrays generated from performances
include onset and duration in seconds, MIDI pitch, velocity track and channel;
and Note ID. The `note_array` method in Parts and PerformedParts can receive a
list of user defined callable methods which can compute other features at the
note level (e.g., scale degree, etc.).

Since computing piano rolls results in very sparse matrices, Partitura
computes piano rolls as Scipy sparse
matrices.777https://docs.scipy.org/doc/scipy/reference/generated/scipy.sparse.csr_matrix.html
The method `compute_pianoroll` can also specify the desired resolution of the
piano roll by specifying the number of sub-divisions for each time unit with
the `time_div` argument.

⬇

\parimport partitura as pt

import matplotlib.pyplot as plt

\par# Import score

part = pt.load_score(”chopin_op9_no2.mei”)

# Get note array

note_array = part.note_array(include_time_signature=True)

# get piano roll

pianoroll = pt.utils.compute_pianoroll(part,

time_div=8,

piano_range=True)

# plot piano roll

plt.spy(pianoroll)

Output:

Figure 4: Extracting note arrays and piano rolls (score of Figure 1).

###  3.3 Music Analysis Tools

As mentioned in Section 2.4, Partitura includes tools for estimating key
signature, pitch spelling, voice information, and tonal tension, which can be
found in the `partitura.musicanalysis` module. The methods in this module
accept Parts, PerformedParts or note arrays as input and return a Numpy
structured array with the estimated information, except for `estimate_key`
which returns the estimated key signature as a string (e.g., `’Cm’`, `’F#m’`,
etc.). Figure 5 shows an example of how to compute this information from a
score.

⬇

\parimport partitura as pt

# Load score

part = pt.load_score(”chopin_op9_no2.mei”)

# Estimate key signature

key_name = pt.musicanalysis.estimate_key(part)

# Estimate pitch spelling

pitch_spelling = pt.musicanalysis.estimate_spelling(part)

# Estimate voice information

voices = pt.musicanalysis.estimate_voices(part)

# Compute tonal tension

tonal_tension = pt.musicanalysis.estimate_tonaltension(part)

Figure 5: Music analysis tools in Partitura.

##  4 Conclusions and Future Work

In this paper, we presented Partitura, a Python package for handling symbolic
music information that requires minimal music expertise. This package can
parse common symbolic music formats, like MusicXML, MEI, and MIDI, and
conveniently represent them as Python objects that are easy to manipulate in
automatic data pipelines. Moreover, it can straightforwardly produce the most
commonly used data structures for MIR tasks. To the best of our knowledge,
Partitura is the only Python library that can handle alignments between scores
and corresponding performances.

Future work will be in the direction of making Partitura file parsers more
robust to bad encoding practices that are unfortunately very frequent in
symbolic musical scores. Moreover, support for more score elements and
different data structures will be added to keep Partitura on track with new
needs and demands from the research community. We are working on making
Partitura faster and more efficient by optimizing existing methods and
including support for parallel data processing. Another functionality that
will be added is the automatic score unfolding to match the repetition
structure of a given performance. Finally, we will develop more analysis tools
to infer high-level score elements, with the final goal of being able to
“scorify” a performance or an incomplete score representation.

#### Acknowledgements

This project receives funding from the European Research Council (ERC) under
the European Union’s Horizon 2020 research and innovation programme, grant
agreement No 101019375 (Whither Music?).

#### References

## References

  * Back (1999) midi_specBack, D.  1999\.  Standard MIDI-File Format Specifications. Standard MIDI-file format specifications.  http://www.music.mcgill.ca/~ich/classes/mumt306/StandardMIDIfileformat.html Accessed September 23, 2020
  * Chew Wu (2004) Chew2004Chew, E. Wu, X.  2004\.  Separating Voices in Polyphonic Music: A Contig Mapping Approach Separating Voices in Polyphonic Music: A Contig Mapping Approach.  Proceedings of the International Symposium on Computer Music Multidisciplinary Research (CMMR). Proceedings of the International Symposium on Computer Music Multidisciplinary Research (CMMR).  Esbjerg, Denmark.
  * Cuthbert Ariza (2010) music21Cuthbert, MS. Ariza, C.  2010\.  music21: A toolkit for computer-aided musicology and symbolic music data music21: A toolkit for computer-aided musicology and symbolic music data.  Proceedings of the International Society for Music Information Retrieval Conference (ISMIR). Proceedings of the International Society for Music Information Retrieval Conference (ISMIR).  Utrecht, Netherlands.
  * Foscarin . (2022) matchpaperFoscarin, F., Karystinaios, E., Peter, SD., Cancino-Chacón, CE., Grachten, M. Widmer, G.  2022\.  The match file format: Encoding Alignments between Scores and Performances The match file format: Encoding Alignments between Scores and Performances.  Proceedings of the Music Encoding Conference. Proceedings of the music encoding conference.  Halifax, Canada.
  * Foscarin . (2020) asap-datasetFoscarin, F., McLeod, A., Rigaux, P., Jacquemard, F. Sakai, M.  2020\.  ASAP: a dataset of aligned scores and performances for piano transcription ASAP: a dataset of aligned scores and performances for piano transcription.  International Society for Music Information Retrieval Conference (ISMIR) International Society for Music Information Retrieval Conference (ISMIR) ( 534–541).  Montréal, Canada.
  * Hawthorne . (2019) hawthorne2018maestroHawthorne, C., Stasyuk, A., Roberts, A., Simon, I., Huang, CZA., Dieleman, S.Eck, D.  2019\.  Enabling Factorized Piano Music Modeling and Generation with the MAESTRO Dataset Enabling Factorized Piano Music Modeling and Generation with the MAESTRO Dataset.  International Conference on Learning Representations. International Conference on Learning Representations.  New Orleans, USA.  https://openreview.net/forum?id=r1lYRjC9F7
  * Huang . (2019) bach_doodleHuang, A., Hawthorne, C., Roberts, A., Dinculescu, M., Wexler, J., Hong, L. Howcroft, J.  2019\.  Bach Doodle: Approachable music composition with machine learning at scale Bach Doodle: Approachable music composition with machine learning at scale.  Proceedings of the International Society for Music Information Retrieval Conference (ISMIR). Proceedings of the International Society for Music Information Retrieval Conference (ISMIR).  Delft, Netherlands.  https://arxiv.org/abs/1907.06637
  * Kong . (2020) kong2020giantmidiKong, Q., Li, B., Chen, J. Wang, Y.  2020\.  Giantmidi-piano: A large-scale midi dataset for classical piano music Giantmidi-piano: A large-scale midi dataset for classical piano music.  arXiv preprint arXiv:2010.07061.
  * Krumhansl (1990) krumhansl1990Krumhansl, CL.  1990\.  Cognitive foundations of musical pitch Cognitive foundations of musical pitch.  New YorkOxford University Press.
  * Meredith (2006) Meredith:ps13Meredith, D.  2006\.  The ps13 Pitch Spelling Algorithm The ps13 Pitch Spelling Algorithm.  Journal of New Music Research352121–159.
  * Micchi . (2020) micchi2020notMicchi, G., Gotham, M. Giraud, M.  2020\.  Not all roads lead to Rome: Pitch representation and model architecture for automatic harmonic analysis Not all roads lead to rome: Pitch representation and model architecture for automatic harmonic analysis.  Transactions of the International Society for Music Information Retrieval (TISMIR)3142–54.
  * Nakamura . (2017) nakamura2017performanceNakamura, E., Yoshii, K. Katayose, H.  2017\.  Performance Error Detection and Post-Processing for Fast and Accurate Symbolic Music Alignment Performance Error Detection and Post-Processing for Fast and Accurate Symbolic Music Alignment.  Proceedings of the International Society for Music Information Retrieval Conference (ISMIR) Proceedings of the International Society for Music Information Retrieval Conference (ISMIR) ( 347–353).  Suzhou, China.
  * Raffel Ellis (2014) raffel2014intuitiveRaffel, C. Ellis, DP.  2014\.  Intuitive analysis, creation and manipulation of midi data with pretty midi Intuitive analysis, creation and manipulation of midi data with pretty midi.  Late-Breaking Demo Session of the International Society for Music Information Retrieval Conference Late-breaking demo session of the international society for music information retrieval conference ( 84–93).  Taipei, Taiwan.
  * Román . (2019) Roman2019Román, MA., Pertusa, A. Calvo-Zaragoza, J.  2019\.  A Holistic Approach to Polyphonic Music Transcription with Neural Netwoks A Holistic Approach to Polyphonic Music Transcription with Neural Netwoks.  Proceedings of the International Society for Music Information Retrieval Conference (ISMIR) Proceedings of the International Society for Music Information Retrieval Conference (ISMIR) ( 731–737).  Delft, Netherlands.