Skip to main content

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.mix combines 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

Metadata

Release files for xnano-audio 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for xnano-audio 0.4.0
File Size Uploaded Provenance Actions
xnano_audio-0.4.0.tar.gz 93.1 kB Without provenance Details for xnano_audio-0.4.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for xnano-audio 0.4.0
File Actions
xnano_audio-0.4.0-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details for xnano_audio-0.4.0-cp310-abi3-win_amd64.whl
xnano_audio-0.4.0-cp310-abi3-musllinux_1_2_x86_64.whl CPython 3.10 abi3 Linux musl 1.2+ x86-64 Details for xnano_audio-0.4.0-cp310-abi3-musllinux_1_2_x86_64.whl
xnano_audio-0.4.0-cp310-abi3-musllinux_1_2_aarch64.whl CPython 3.10 abi3 Linux musl 1.2+ ARM64 Details for xnano_audio-0.4.0-cp310-abi3-musllinux_1_2_aarch64.whl
xnano_audio-0.4.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 abi3 Linux glibc 2.17+ x86-64 Details for xnano_audio-0.4.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
xnano_audio-0.4.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.10 abi3 Linux glibc 2.17+ ARM64 Details for xnano_audio-0.4.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
xnano_audio-0.4.0-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details for xnano_audio-0.4.0-cp310-abi3-macosx_11_0_arm64.whl
xnano_audio-0.4.0-cp310-abi3-macosx_10_12_x86_64.whl CPython 3.10 abi3 macOS 10.12+ x86-64 Details for xnano_audio-0.4.0-cp310-abi3-macosx_10_12_x86_64.whl

Total release size: 7.5 MB

Release files / xnano_audio-0.4.0.tar.gz

Download URL xnano_audio-0.4.0.tar.gz
Size 93.1 kB
Tags Source
SHA-256 checksum
How to use checksums
63ea5e53b8a0a9aae239c327562550e687c5307639fc44e0f5b1e71cb8de64c6
BLAKE2b-256 checksum
How to use checksums
a8156880f9a8670555b31b72dc42565c49f6e802fd50d3f7cb5a7694c95cef5c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","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.0-cp310-abi3-win_amd64.whl

Download URL xnano_audio-0.4.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
9849740d2e06f24973ef8f76ce144dcb89ea5981e1f139b43c9985816798c832
BLAKE2b-256 checksum
How to use checksums
8e942b7206bcf69303bd6e6c3909a0c5bdf2c98adc49aadea28f11094698d835
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","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.0-cp310-abi3-musllinux_1_2_x86_64.whl

Download URL xnano_audio-0.4.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
68195fcf9e3d8cf239acaf685219c8b317d5f1b680d33d04fd89a139039e149d
BLAKE2b-256 checksum
How to use checksums
c66c707f87ecb439f8da7c985721223107ceea8e47a75f7dfd312b4c1bb286c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","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.0-cp310-abi3-musllinux_1_2_aarch64.whl

Download URL xnano_audio-0.4.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
1f0aa14e732bbb4540a6e59fb86419fd100e68cc70722f78f7242b7f22d003db
BLAKE2b-256 checksum
How to use checksums
86bae699394e32fe2c2b3e2cb22e617aaf376ef1089d5a606ad961d42a2a7e05
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","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.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL xnano_audio-0.4.0-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
0d6505d042f0b1bebc4e3905f5cf4dfa57b2f25f84bbd5505fc43d661a542d95
BLAKE2b-256 checksum
How to use checksums
989a4cab84691d11b266d437659e3fef5783ac95a2b375c23ad23964e9a009c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","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.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL xnano_audio-0.4.0-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
dea38cfa93a35deb4210a4daa69c04064e26c2c3f4e86690e5c01e87bffd28c1
BLAKE2b-256 checksum
How to use checksums
23ea0dfab259c96e55d0113edbd02facc7d47a769a1e1dbb712c2ce142fbfbbd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","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.0-cp310-abi3-macosx_11_0_arm64.whl

Download URL xnano_audio-0.4.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
3154874f63b1aa36c8638140b850e9a4a9eac76cac32654b66f97f57e77a486f
BLAKE2b-256 checksum
How to use checksums
03bba69177749f7c505967e3d2f8de992735a37aa8e55a89257538c56794f22b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","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.0-cp310-abi3-macosx_10_12_x86_64.whl

Download URL xnano_audio-0.4.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
ad3af356c095efb4e95d2fc688c186852fdf2853ffc1035413b7e184f004146a
BLAKE2b-256 checksum
How to use checksums
6dbfda8574ec46b4405b894a0f16a16c112102fd69d8e4c9dee2711720a3f897
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","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.0

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page