Skip to main content

Singing Materials

SingingMaterials is a Python package which reads and analyses atomistic simulation data, and uses Strauss to turn it into sound; to hear how materials sing.

A description of this package has been published in the following pre-print, and is accepted to the ICAD proceedings. A .bib file is in the repo, and the plain-text citation is: Whalley, L., Shepherd, R., Boehringer, J., Knotts, S., Vickers, P., Caselton, G., Harrison, C., Hogg, B., Ratliff, D., Davenport, C., & Portas, A. (2026). Singing Materials: Initial experiments in applying sonification to phonon spectra. arXiv:2603.29037 [cond-mat.mtrl-sci]

This repository holds the package only. For examples of how it has been used, including scripts, input files and sound examples, see the SingingMaterials_Dissemination repository.

What is this?

  • The package currently focuses on the sonification of phonon density of states (DOS) data, which is read in from the Materials Project or phonondb databases.
  • It calculates statistics for each site in a material, such as the phonon band centre and the Shannon entropy, optionally weighted by temperature. This part of the package can also be used without producing any sound.
  • Three sonification types are supported: spectral, synth and choral. These can be mixed together in different ways (superimpose, concatenate or a mixture of the two). Mixing is implemented through ffmpeg.
  • If you want to mix sonifications you must use .yml files rather than the command line interface. The command line interface does not allow mixing.
  • The package is designed to be extendable, so that new types of phonon data, new data interfaces, and new sonifications can be implemented in the future.
  • This package also powers the AtomicStrudel web app in-development here.

This is alpha-release software: it has been tested, but there are likely still bugs - please use with caution! If you spot any issues please raise this on the Issues page.

What is Sonification?

Sonification is the use of non-speech audio to convey information. A well-known scientific example is the geiger counter which produces an audible click when it detects an ionisation event. Sonification is being increasingly used within the physical sciences, in particular for astrophysical research. Sonification has also been used as a tool for music composition by a number of contemporary classical composers. The continuum from data representation to data abstraction is briefly discussed in the paper Making data sing (Parkinson and Tanaka, 2013).

Installation

pip install "SingingMaterials[all]"

SingingMaterials supports Python 3.11 to 3.14. On newer versions of Python, dependencies such as h5py may not have pre-built wheels yet, and the install can fail.

This installs everything. The package is then imported in Python as singingmaterials. To leave out dependencies you don't need, choose from these options instead:

Option Needed to Installs
sound create sonifications Strauss
mp read data from the Materials Project mp-api
phonopy read phonondb files phonopy

For example, pip install "SingingMaterials[mp]" is enough to read Materials Project data and calculate statistics, without producing any sound. You need at least one of mp or phonopy to read in new data: with pip install SingingMaterials alone, only DOS data already cached in your working directory can be read.

To read data from the Materials Project, generate an API key and store it as MP_API_KEY in a .env file in your working directory (or one of its parents), or set it as an environment variable.

Mixing sonifications also needs ffmpeg on your path.

The choral sonification uses the Solitary Choir samples by James Peacock, which are not distributed with this package. Set PHONON_CHORAL_SAMPLES to the folder holding the sample .wav files, as an environment variable or in your .env file, or pass sample_path to sonify_site_choral.

To work on the package itself, clone this repository and run pip install -e ".[all,test]" from its root. The test suite is then run with pytest.

Usage

Creating sonifications

From the command line:

phonon-sonify mp-3953 --info --temp 300          # print the sites available for a material
phonon-sonify mp-3953 --temp 300 --all-sites     # sonify all sites (spectral mode by default)
phonon-sonify mp-3953 --site O_6 --mode synth --lfo
phonon-sonify-yaml my_spec.yml                   # create and mix sonifications from a spec file

See spec_example.yml for the spec file format.

From Python:

from singingmaterials import PhononDOSSonifier

sonifier = PhononDOSSonifier(mp_id="mp-3953", temperatures=[300], duration=10.0)
sonifier.print_available_sites(temperature=300)
sonifier.sonify_all_sites(temperature=300, output_path="mp-3953.wav")

Data and statistics only

from singingmaterials import visualisation
from singingmaterials.dos_stats import dos_dict_to_dataframe, dos_stats_analysis

dos_dict = dos_stats_analysis(mp_id="mp-3953", temp=300)
print(
    dos_dict["projection"]["total"]["stats"]["thermal"]["300"]["band_centre"]
)  # in Hz
print(dos_dict_to_dataframe(dos_dict))
visualisation.plot_dos_at_temperature(dos_dict)

Package structure

mp_interface.py : interface to the Materials Project database holding density of states data.

phonopy_interface.py : reads in data from a phonopy yml file, and generates density of states data for a given mesh. The phonopy files are distributed as part of phonondb. This module requires phonopy to be installed.

dos_stats.py : this reads in density of states data via one of the interfaces and post-processes it ready for analysis or sonification.

visualisation.py : functions for plotting the density of states data. because seeing things is still useful.

utilities.py : small utility functions.

frequency_mapping.py : functions for mapping from phonon frequencies to audible frequencies.

phonon_dos_sonifier.py: takes the post-processed density of states data and sonifies it using Strauss. Three sonification strategies are implemented: spectral (using the Strauss spectraliser), synth (using the Strauss synth) and choral (using the strauss sampler and choral samples). This module requires Strauss to be installed.

phonon_mixer.py : takes the .wav files created by phonon_dos_sonifier.py and mixes them together with ffmpeg.

cli.py : command-line-interface for the phonon_dos_sonifier module. Allows the user to create .wav files for the spectral, synth or choral sonifications, but does not allow user to mix these together.

run_from_yaml.py : reads in a .yml spec file (see spec_example.yml) and uses it to create and mix sonifications.

spec_example.yml : example yml file which specifies how to create the sonifications and mix them together.

mods.py : dictionaries specifying mods to the Strauss synthesiser parameters.

Citation

If you use this package please cite the following pre-print, which will later be published as part of the ICAD proceedings:

Whalley, L., Shepherd, R., Boehringer, J., Knotts, S., Vickers, P., Caselton, G., Harrison, C., Hogg, B., Ratliff, D., Davenport, C., & Portas, A. (2026). Singing Materials: Initial experiments in applying sonification to phonon spectra. arXiv:2603.29037 [cond-mat.mtrl-sci]

AI usage statement

The main functionality of SingingMaterials was implemented without AI. From October 2026, AI was used to make changes to this repository, including creating the test suite. Commit b11c2ef ("Create LICENSE.md", 15 September 2026) is the last commit made before using AI. Commits after this, starting with 6d034a0 ("Fix crashes and incorrect results in phonon_sonification"), may have been written using Claude Code with Opus 5.5. These commits carry a Co-Authored-By: Claude line in their commit message, so they can be listed with git log --grep="Co-Authored-By: Claude".

Metadata

Release files for SingingMaterials 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for SingingMaterials 0.1.0
File Size Uploaded Provenance Actions
singingmaterials-0.1.0.tar.gz 31.6 kB With provenance Details for singingmaterials-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for SingingMaterials 0.1.0
File Interpreter ABI Platform Actions
singingmaterials-0.1.0-py3-none-any.whl Python 3 none any Details for singingmaterials-0.1.0-py3-none-any.whl

Total release size: 60.0 kB

Release files / singingmaterials-0.1.0.tar.gz

Download URL singingmaterials-0.1.0.tar.gz
Size 31.6 kB
Tags Source
SHA-256 checksum
How to use checksums
765236ad7c55286d09cab2ec09058175461d99ced5bd5dec8ff8f12d44ff374e
BLAKE2b-256 checksum
How to use checksums
d0bb23ae946a06bc4de3b09fc20645a10b08a5efb70e10a9c5e241de7ea3dc1f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

Release files / singingmaterials-0.1.0-py3-none-any.whl

Download URL singingmaterials-0.1.0-py3-none-any.whl
Size 28.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
668379ec9a4e1841452dbf772bd73f1a4d994d31f0f6d55dd3db430943e9f0b3
BLAKE2b-256 checksum
How to use checksums
487850676568ad4e44c76f9253b6cf7aa7561b2bf9d547c7e16d3e38a064e363
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

Security for SingingMaterials 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for singingmaterials-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page