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 terminal.play, terminal.note and terminal.tempo:
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
- 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.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| xnano_audio-0.2.0.tar.gz | 88.9 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| xnano_audio-0.2.0-cp310-abi3-win_amd64.whl | CPython 3.10 | abi3 | Windows x86-64 | Details |
| xnano_audio-0.2.0-cp310-abi3-musllinux_1_2_x86_64.whl | CPython 3.10 | abi3 | Linux musl 1.2+ x86-64 | Details |
| xnano_audio-0.2.0-cp310-abi3-musllinux_1_2_aarch64.whl | CPython 3.10 | abi3 | Linux musl 1.2+ ARM64 | Details |
| xnano_audio-0.2.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.10 | abi3 | Linux glibc 2.17+ x86-64 | Details |
| xnano_audio-0.2.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | CPython 3.10 | abi3 | Linux glibc 2.17+ ARM64 | Details |
| xnano_audio-0.2.0-cp310-abi3-macosx_11_0_arm64.whl | CPython 3.10 | abi3 | macOS 11.0+ ARM64 | Details |
| xnano_audio-0.2.0-cp310-abi3-macosx_10_12_x86_64.whl | CPython 3.10 | abi3 | macOS 10.12+ x86-64 | Details |
Total release size: 7.4 MB
Release files / xnano_audio-0.2.0.tar.gz
| Download URL | xnano_audio-0.2.0.tar.gz |
|---|---|
| Size | 88.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3500cf09cbc48f3157efde0dce158044c687119a5693f73c996a1813d00cb682
|
|
BLAKE2b-256 checksum How to use checksums |
28530d1e809361491151f3bf55e66c1cf0e9ae7a0c807ec108e45f9424faac93
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","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.2.0-cp310-abi3-win_amd64.whl
| Download URL | xnano_audio-0.2.0-cp310-abi3-win_amd64.whl |
|---|---|
| Size | 1.0 MB |
| Tags | CPython 3.10 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
4d75d5e11fd74ce43dd4636c2f0a1828d0543d9deab9bc0e0d70d4e153d858b3
|
|
BLAKE2b-256 checksum How to use checksums |
47c6b85e5fdad926e176a8ca63f0c2cac0553d231a0218f212e7c14ad4adb281
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","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.2.0-cp310-abi3-musllinux_1_2_x86_64.whl
| Download URL | xnano_audio-0.2.0-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 |
38769d732bc57eb3dc48dec6ac71aa3a96442dc91c35efdcccce640e6c4c8fdb
|
|
BLAKE2b-256 checksum How to use checksums |
92bbe032e7904847011f439e7961cb8fc75c077786af2db084b12c0497318a6b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","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.2.0-cp310-abi3-musllinux_1_2_aarch64.whl
| Download URL | xnano_audio-0.2.0-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 |
2da5561a865c8701daa7185c8892b73c71bd8883eb04bb22c9b2883f2de51671
|
|
BLAKE2b-256 checksum How to use checksums |
b8079e9fadd3b3d1d32379da7839a08e8da9a89dbb57d3e3456438fb80ca54fc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","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.2.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | xnano_audio-0.2.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.0 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
15398713aa4b9241b2ce6e292f6d4bc7fcf282fd46e5a7e54498ce99aa927eb2
|
|
BLAKE2b-256 checksum How to use checksums |
2970e41878d76166f8e6089ec17581841ed1dc270c7e47a1fb05d441c07c80b4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","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.2.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | xnano_audio-0.2.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 999.0 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
95360d4c77dc5c5d7c7ebce642307e8f20234761b167a212f04075370b0e1aeb
|
|
BLAKE2b-256 checksum How to use checksums |
cbdfa89bb93112909ba11b2d248315fa91b12ad3b2dd3e1cb6afae77c6567f4e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","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.2.0-cp310-abi3-macosx_11_0_arm64.whl
| Download URL | xnano_audio-0.2.0-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 |
b07864e8d32b80f0b1722d20b0fdc701ac03f0f4fffea119188ce0bfcc89a4fd
|
|
BLAKE2b-256 checksum How to use checksums |
210e083e4edcdc0aff122fb25a00c6723291af900de2430fcd88392de66ab057
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","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.2.0-cp310-abi3-macosx_10_12_x86_64.whl
| Download URL | xnano_audio-0.2.0-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 |
9b991d26def7d053ad0ff772e5ccb1e4dea7f1b493bbdfff1d11065c5fa70480
|
|
BLAKE2b-256 checksum How to use checksums |
e930d8b85ca5b9ddb1eacb9529350af6f2752cb326325b6e1375b5766b3f88fb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","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}
|