Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2025 Mar:415:110347.
doi: 10.1016/j.jneumeth.2024.110347. Epub 2024 Dec 19.

IDyOMpy: A new Python-based model for the statistical analysis of musical expectations

Affiliations

IDyOMpy: A new Python-based model for the statistical analysis of musical expectations

Guilhem Marion et al. J Neurosci Methods. 2025 Mar.

Abstract

Background: IDyOM (Information Dynamics of Music) is the statistical model of music the most used in the community of neuroscience of music. It has been shown to allow for significant correlations with EEG (Marion, 2021), ECoG (Di Liberto, 2020) and fMRI (Cheung, 2019) recordings of human music listening. The language used for IDyOM -Lisp- is not very familiar to the neuroscience community and makes this model hard to use and more importantly to modify.

New method: IDyOMpy is a new Python re-implementation and extension of IDyOM. This new model allows for computing the information content and entropy for each melody note after training on a corpus of melodies. In addition to those features, two new features are presented: probability estimation of silences and enculturation modeling.

Results: We first describe the mathematical details of the implementation. We extensively compare the two models and show that they generate very similar outputs. We also support the validity of IDyOMpy by using its output to replicate previous EEG and behavioral results that relied on the original Lisp version (Gold, 2019; Di Liberto, 2020; Marion, 2021). Finally, it reproduced the computation of cultural distances between two different datasets as described in previous studies (Pearce, 2018).

Comparison with existing methods and conclusions: Our model replicates the previous behaviors of IDyOM in a modern and easy-to-use language -Python. In addition, more features are presented. We deeply think this new version will be of great use to the community of neuroscience of music.

Keywords: Expectations; IDyOM; Music cognition; Statistical model of music.

PubMed Disclaimer

Conflict of interest statement

Declaration of competing interest The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

LinkOut - more resources