Skip to main content

soundit

A small library for audio manipulation.

import soundit as s
s.play_output_chunks(s.chunked(s.exact(1, s.sine(440))))

Installation

Simply run:

$ pip install soundit[sounddevice]

The [sounddevice] extra installs sounddevice for playing audio through speakers.

Usage

A longer example:

import itertools
import soundit as s

indices = s.make_indices_dict()
frequencies = s.make_frequencies_dict()
notes = "a3 c e a g e c e d e d c a3 c a3 g3".split()

s.play_output_chunks(s.chunked(itertools.chain.from_iterable(
    s.exact(0.5, s.sine(frequencies[indices[note]]))
    for note in notes
)))

An even longer example:

import soundit as s
s.init_piano()  # See its documentation for details on its setup

names = "do di re ri mi fa fi so si la li ti".split()
indices = s.make_indices_dict(names)
music = '''
    . mi mi mi
    fa do . do
    . so mi do
    re mi,re - mi
'''

s.play_output_chunks(s.chunked(
    s.volume(2, s._notes_to_sound(
        s.music_to_notes(music, line_length=1.15),
        lambda name, length: s.piano(indices[name] + 1),
    ))
))

Metadata

Release files for soundit 0.4

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

Source distribution (sdist)

Source distribution for soundit 0.4
File Size Uploaded Provenance
soundit-0.4.tar.gz 24.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for soundit 0.4
File Interpreter ABI Platform
soundit-0.4-py3-none-any.whl Python 3 none any Details

Total release size: 48.1 kB

Release files / soundit-0.4.tar.gz

Download URL soundit-0.4.tar.gz
Size 24.4 kB
Tags Source
SHA-256 checksum
How to use checksums
d78ba3af5b6879807657efc03b6f8420a3d8861a0e7169326e1be973aae1d8f9
BLAKE2b-256 checksum
How to use checksums
958b98ae11f8811a081d4f4307cbf089b2fe3ae06e5c76b4555c7c64a9b0c645
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.22.0

Release files / soundit-0.4-py3-none-any.whl

Download URL soundit-0.4-py3-none-any.whl
Size 23.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0abe95a10e9472c6bcf6320c851ac95f3ce9f3e4c77da3a49bf9cfc0c66be151
BLAKE2b-256 checksum
How to use checksums
6c360c87154fe6dceb884571cfd6d75aee22e81360439c174b4fbdacf4371500
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.22.0

Security for soundit 0.4

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