A NumPy-based sound library
Project description
NPSound
A collection of simple audio modification methods based on NumPy.
Supported Formats
- .wav
Installation
pip install np-sound
Usage
from np_sound import NPSound
sound = NPSound("soundfile.wav")
# Plot soundfile.wav with the title "NPSound Demo"
sound.plot(title="NPSound Demo")
# Reverse the section of audio from 1.5s to 3s
# NPSound objects are immutable, so the 'sound' object will be unchanged
reversed_audio = sound.reverse((1.5, 3))
reversed_audio.plot()
# Amplify the entire audio file by 50% and plot it
sound.amplify(50).plot(title="Amplified by 50%")
# Concatenate 'sound' with its mirrored version and write to a new sound file
mirror = sound + sound.reverse()
mirror.write("mirrored.wav")
# Plot 5 copies of 'sound' side by side
(sound * 5).plot()
# Plot a 50% softened 'sound' on top of the original 'sound'
sound.plot(layered_plots=[sound.amplify(-50)])
# Plot a 'sound' object padded with 5.5s of empty data on either end below the original 'sound'
sound.plot(adjacent_plots=[sound.pad((5.5, 5.5))])
# Trim audio on both ends so that the first and last values are above 100
sound.clip_at_threshold(100)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
np-sound-0.0.5.1.tar.gz
(4.6 kB
view details)
Built Distribution
File details
Details for the file np-sound-0.0.5.1.tar.gz
.
File metadata
- Download URL: np-sound-0.0.5.1.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b2538fb54e639062ca7ec168c5912d59345b6e0e1d7ff1a93de5197884b05c89 |
|
MD5 | f82077a07189b893ab30328239b38770 |
|
BLAKE2b-256 | bfe36c2162b73338ceae0666f0190fa605d406698f690a8e766c077842a80cf1 |
File details
Details for the file np_sound-0.0.5.1-py3-none-any.whl
.
File metadata
- Download URL: np_sound-0.0.5.1-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2ebbd73e4fc46d8c956e9a847a8dd548bd190ffd24cd9f9a448e02611e024a9 |
|
MD5 | ce0827f5a7b53a43845e6f1dfd28fd9d |
|
BLAKE2b-256 | 8667de97efb92e0b78c64928470704407650604145f425bd99fe8f3913d6b0d2 |