Prusky Lab
News & Impact

You are here

A neuroscientist's sound toolkit

Journal Article
N. Jeremy Hill, Scott W.J. Mooney, Glen T. Prusky
Year Published: 
Heliyon. 2021 Feb 10;7(2):e06236. doi: 10.1016/j.heliyon.2021.e06236. eCollection 2021 Feb. PMID: 33615015
PMID: 33615015 PMCID: PMC7881231 DOI: 10.1016/j.heliyon.2021.e06236
Full-Text on Heliyon


In neuroscientific experiments and applications, working with auditory stimuli demands software tools for generation and acquisition of raw audio, for composition and tailoring of that material into finished stimuli, for precisely timed presentation of the stimuli, and for experimental session recording. Numerous programming tools exist to approach these tasks, but their differing specializations and conventions demand extra time and effort for integration. In particular, verifying stimulus timing requires extensive engineering effort when developing new applications.

This paper has two purposes. The first is to present audiomath (, a sound software library for Python that prioritizes the needs of neuroscientists. It minimizes programming effort by providing a simple object-oriented interface that unifies functionality for audio generation, manipulation, visualization, decoding, encoding, recording, and playback. It also incorporates specialized tools for measuring and optimizing stimulus timing.

The second purpose is to relay what we have learned, during development and application of the software, about the twin challenges of delivering stimuli precisely at a certain time, and of precisely measuring the time at which stimuli were delivered. We provide a primer on these problems and the possible approaches to them. We then report audio latency measurements across a range of hardware, operating systems and settings, to illustrate the ways in which hardware and software factors interact to affect stimulus presentation performance, and the resulting pitfalls for the programmer and experimenter. In particular, we highlight the potential conflict between demands for low latency, low variability in latency (“jitter”), cooperativeness, and robustness. We report the ways in which audiomath can help to map this territory and provide a simplified path toward each application's particular priority.

By unifying audio-related functionality and providing specialized diagnostic tools, audiomath both simplifies and potentiates the development of neuroscientific applications in Python.


Conditions & Recovery

Traumatic Brain Injury icon
In the U.S., over 5.3 million adults and children live with TBI.
Vision Recovery icon
See better.