audiomath 1.18.2
Permanent home: https://pypi.org/project/audiomath
Documentation: https://audiomath.readthedocs.io
Source code: https://bitbucket.org/snapproject/audiomath-gitrepo
When reporting any work in which you used audiomath
, please cite:
Hill NJ, Mooney SWJ & Prusky GT (2021). audiomath: a neuroscientist’s sound toolkit. Heliyon 7(2):e06236. https://doi.org/10.1016/j.heliyon.2021.e06236
@article{hill2020audiomath, author = {Hill, N. Jeremy and Mooney, Scott W. J. and Prusky, Glen T.}, title = {{audiomath}: a Neuroscientist's Sound Toolkit}, journal = {Heliyon}, volume = {7}, number = {2}, pages = {e06236}, month = {February}, year = {2021}, date = {2021-02-10}, doi = {10.1016/j.heliyon.2021.e06236}, url = {https://doi.org/10.1016/j.heliyon.2021.e06236}, }
audiomath is a package for Python programmers who want to record, manipulate, visualize or play sound waveforms. It allows you to:
Represent sounds as numeric arrays via the third-party Python package
numpy
(required). The arrays are contained within high-level objects, allowing common operations to be performed with minimal coding—for example: slicing and concatenation in time, selection and stacking of channels, resampling, mixing, rescaling and modulation.Plot the resulting waveforms, via the third-party Python package
matplotlib
(optional).Read and write uncompressed
wav
files (via the Python standard library).Read other audio formats using the third-party AVbin library (binaries are included in the package, for a selection of platforms).
Record and play back sounds using the third-party PortAudio library (binaries are included in the package, for a selection of platforms).
Play sounds using the alternative PsychPortAudio back-end, from the (optional)
psychtoolbox
package, allowing very precise control of latencyPlug in other recording/playback back-ends with moderate development effort.
- Installation
- How to…
- Read a sound from a file into memory
- Write a sound from memory into a file
- Create a sound from scratch, in memory
- Define a functionally-generated sound
- Perform simple arithmetic
- Extract a segment of a sound
- Extract selected channels from multi-channel sounds
- Concatenate sounds in time (splicing)
- Stack channels (multiplexing)
- Pitch-shift or time-stretch a sound
- Preprocess a sound using SoX
- Manipulate a sound in other miscellaneous ways
- Plot a sound
- Play sounds
- Play sounds with more-precise latency, via
PsychPortAudio
- Record a sound into memory
- Record a sound directly to file
- Target a particular input or output device
- Manipulate the operating-system’s overall volume settings
- Measure audio latency
- API reference
- The
audiomath
package - The
Sound
class - The
Synth
class - The
Player
class - The
Queue
class - The
Fader
class - The
Delay
class - The
Recorder
class - The
ffmpeg
class - The
sox
class - The
audiomath.PortAudioInterface
sub-module - The
audiomath.PsychToolboxInterface
sub-module - The
audiomath.Signal
sub-module - The
audiomath.SystemVolume
sub-module
- The
- Support
- License