xnano-audio
Synthesize, play and capture sound in Python without audio files or extra dependencies.
Install
pip install xnano-audio
Or install it as an extra of the top-level xnano package, which exposes it as
xnano.audio and adds xnano.note, xnano.play, xnano.load_sound,
canvas.audio, canvas.play and canvas.bpm:
pip install "xnano[audio]"
On Linux, playing on an audio device requires ALSA. Synthesis and rendering work without a device everywhere.
Example
from xnano_audio import render_note, TerminalAudioEffect
# Synthesize a bell with reverb, no device needed
ding = render_note('bell', 'C6', effects=[TerminalAudioEffect.reverb()])
assert ding.peak <= 0.98
# Build a melody on a beat timeline
from xnano_audio import TerminalMelody, TerminalTempoMap
melody = (
TerminalMelody(tempo_map=TerminalTempoMap(100))
.appended_note('C4')
.appended_chord(['E4', 'G4'], duration_beats=2)
.appended_rest(1)
)
sound = melody.render('piano')
What it provides
- Synthesis: 20+ built-in instruments (piano, organ, guitar, synth, kick, snare, bells, etc.) rendered deterministically to raw samples
- Effects: reverb, delay, distortion, filters, tremolo and bit-crushing, composable and reusable
- Melodies: notes arranged on a beat timeline with tempo maps and time signatures
- Playback: play sounds and instruments on the default output device with sample-accurate timing
- Mixing:
TerminalSound.mixcombines sounds, each with an offset and a gain, into one - Capture: read the level of the default input device (microphone)
- No audio files: every sound is computed on the fly
Links
- Repository: https://github.com/hsaeed3/xnano
- Documentation: https://xnano.hammad.app
- API reference: https://xnano.hammad.app/api-reference/
- License: MIT
Metadata
Release files for xnano-audio 0.4.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| xnano_audio-0.4.1.tar.gz | 93.4 kB | Without provenance | Details for xnano_audio-0.4.1.tar.gz |
Built distributions (wheels)
Total release size: 7.5 MB
Release files / xnano_audio-0.4.1.tar.gz
| Download URL | xnano_audio-0.4.1.tar.gz |
|---|---|
| Size | 93.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e6e7a28546349f5a4b0da557df6093ec778a2ca2d25cfbecd64f17bb71723424
|
|
BLAKE2b-256 checksum How to use checksums |
184318e6d25b588db98705285ebc1e93701a8d378d72682246a3d5bcd0da831e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / xnano_audio-0.4.1-cp310-abi3-win_amd64.whl
| Download URL | xnano_audio-0.4.1-cp310-abi3-win_amd64.whl |
|---|---|
| Size | 1.0 MB |
| Tags | CPython 3.10 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
f39d74300a301b742dfc34e0f228106d092252f7b76167c112588e880e613eba
|
|
BLAKE2b-256 checksum How to use checksums |
224bfad7289b033814d27b285f63130122e6b5be48c6bd5154395fabf539e40a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / xnano_audio-0.4.1-cp310-abi3-musllinux_1_2_x86_64.whl
| Download URL | xnano_audio-0.4.1-cp310-abi3-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.10 Linux musl 1.2+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
9ccd3d426d09c570974552c52e4e2de0503fc7b9629f3d48f92b3225678f31f3
|
|
BLAKE2b-256 checksum How to use checksums |
35f315c5cbdfadd968bb8d173fd5ac16760975d099f214bbe4d8900bd1617eb4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / xnano_audio-0.4.1-cp310-abi3-musllinux_1_2_aarch64.whl
| Download URL | xnano_audio-0.4.1-cp310-abi3-musllinux_1_2_aarch64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.10 Linux musl 1.2+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
cd3b86d95fe97baed3e39dd7c7a276b70a6607657b742f222b5252bffd6b9cf7
|
|
BLAKE2b-256 checksum How to use checksums |
8581e8b65612794886e9c1207ae5dd0ea356d9772221cf8a1f05f133825d32a9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / xnano_audio-0.4.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | xnano_audio-0.4.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
e2f8681e66e84581c45f4e0bfd3eb38d4f2e31441f6ed01b6e3f1ef9115c0b9d
|
|
BLAKE2b-256 checksum How to use checksums |
d16ec4f155e7044a3a436e9cc795af2908977793ccf610b0034885c93d400f1b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / xnano_audio-0.4.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | xnano_audio-0.4.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 1.0 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
5709d06a2ff59d5e05e5bef82126a8b4d3e75457f983963de3573786798b61c9
|
|
BLAKE2b-256 checksum How to use checksums |
e1af7c11cfe56e9153aee9c3dd815632a7e6dd2875bd4ca0762f8c94afd0c70f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / xnano_audio-0.4.1-cp310-abi3-macosx_11_0_arm64.whl
| Download URL | xnano_audio-0.4.1-cp310-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.0 MB |
| Tags | CPython 3.10 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
77f06430beb14be35652c0c8a5143f6ecc5455ea33ad23c841060b021bae751c
|
|
BLAKE2b-256 checksum How to use checksums |
812bf1eaa23dc45210c5fc3101463d8a23b04a6a3b94f4a896fcf3d59e4848a2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / xnano_audio-0.4.1-cp310-abi3-macosx_10_12_x86_64.whl
| Download URL | xnano_audio-0.4.1-cp310-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 1.0 MB |
| Tags | CPython 3.10 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
459b226145e8ec29602d5e56eeab441d5464b796320ed8ef6d099dcd64df0f2b
|
|
BLAKE2b-256 checksum How to use checksums |
b2ca5317e6806ad8bf18c14c87a54549986fd8c3b607b7c8e38a5e2b38f6859f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for xnano-audio 0.4.1
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.