Skip to main content

jaudiopy

Python Version License Code style: black PyPI version PyPI project


jaudiopy logo

jaudiopy is a complete, high‑performance library for beat making, sound synthesis, mixing, mastering, and processing existing audio files (local path or web link). It ships with a pure‑Python engine that has zero required dependencies and an optional numpy/scipy engine (user selectable) for maximum speed, plus drum machines, step sequencers, melodic synths, samplers, a vocal‑mixing chain, a one‑call full‑beat builder, and MIDI import — all through a clean, unified API.


Quick Start – Load and Process an Audio File

from jaudiopy import AudioFile

song = AudioFile("song.wav")
song.add_effect("reverb", "song_reverb.wav", room_size=0.7, mix=0.4)
song.play()

Main Capabilities

· Audio Files – Load from a local path or a web link, play in the terminal, apply effects, change speed/pitch, tune, trim, normalize, fade, mix, and master — all through the AudioFile class.

· Dual Engine – Pure‑Python engine with zero required dependencies, and a numpy engine (change_to_numpy=True) that uses scipy.signal.lfilter when available; both paths are optimized end‑to‑end and produce equivalent results.

· Drum Machine & Sequencing – Built‑in drum kits (kick, snare, hihat, and more), the X/x/. step pattern language, a StepSequencer, and a MelodySequencer for chord progressions.

· Synths & Instruments – Bass, pluck, pad, and piano synths, plus a dedicated 808 bass line generator with continuous pitch glide.

· Effects – Filters, EQ, distortion, bitcrush, delay, reverb, chorus, tremolo, vibrato, phaser, wah, saturation, exciter, noise gate, compressor, limiter, panning, autopan, and stereo widening.

· Mixing & Mastering – A Mixer/AdvancedMixer with buses, and a mastering chain with ready‑made presets (balanced, warm, bright, loud_edm, vocal_pop) including loudness targeting and stereo widening.

· Sampling – Load your own one‑shots or recordings with Sampler, re‑pitch and loop them, or chop them into slices for breaks.

· Vocals – A vocal‑ready EQ/de‑ess/compress/limit chain and automatic sidechain ducking against a beat.

· Full Beat BuilderBeatBuilder generates a complete, mixed, and mastered beat from a style, BPM, key, and length in a single call, at any duration.

· Utilities – MIDI note import, WAV I/O (mono/stereo, file or in‑memory bytes), and URL/local‑path resolution built in.


Installation

# Basic installation (core dependencies only)
pip install jaudiopy

# With the numpy engine
pip install jaudiopy[numpy]

# With numpy + scipy for maximum performance
pip install jaudiopy[fast]

# With more reliable terminal playback
pip install jaudiopy[playback]

# With mp3/ogg/... support (also requires ffmpeg)
pip install jaudiopy[formats]

# With MIDI import support
pip install jaudiopy[midi]

# All optional features
pip install jaudiopy[all]

Debug

The core library has no external dependency — it only uses array, math, random, and wave from the Python standard library. If an optional feature (playback, formats, MIDI) isn't working, make sure the matching extra above is installed.

For jaudiopy[formats] (mp3/ogg/... support), you also need ffmpeg installed on your system:

· Ubuntu/Debian: sudo apt install ffmpeg · Termux (Android): pkg install ffmpeg · macOS: brew install ffmpeg

Or download from ffmpeg.org


More Examples

Engine switch: numpy vs pure‑Python

from jaudiopy import AudioFile

song = AudioFile("song.wav", change_to_numpy=False)  # pure-python engine (default)
song = AudioFile("song.wav", change_to_numpy=True)    # numpy engine

Drums and the X/x/. Pattern

from jaudiopy import drums, StepSequencer

kit = drums.build_kit({
    "K": ("kick", "808"),
    "S": ("snare", "fat"),
    "H": ("hihat", "trap"),
})
seq = StepSequencer(bpm=140)
track = seq.render_kit(
    {"K": "X...x...X...x...", "S": "....X.......X...", "H": "X.X.X.X.X.X.X.X."},
    {
        "K": {"X": kit["K"], "x": (kit["K"], 0.5)},
        "S": {"X": kit["S"]},
        "H": {"X": kit["H"], "x": (kit["H"], 0.4)},
    },
)

Building a Full Beat Fast

from jaudiopy import BeatBuilder

bb = BeatBuilder(style="trap_808", bpm=140, key="E", change_to_numpy=True)
left, right = bb.build(duration_minutes=2.5)
bb.build_and_save("my_beat.wav", duration_minutes=2.5)

Sampling

from jaudiopy import Sampler

sampler = Sampler.load("piano_note_C4.wav", base_note="C", base_octave=4)
note = sampler.play_note("D#", 4, duration=1.0)   # re-pitched to D#4
loop = sampler.loop_to(8.0)                        # looped to 8 seconds
chops = sampler.chop(8)                             # 8 equal slices

Adding Vocals Over a Beat

from jaudiopy import mix_vocal_with_beat

final_left, final_right = mix_vocal_with_beat(
    beat_left, beat_right, vocal_buffer, vocal_at=8.0,
)

Mastering With a Preset

from jaudiopy import master_with_preset

left, right = master_with_preset(left, right, preset="loud_edm", target_crest_db=7.0, haas_mix=0.4)

Issues and Contributions

You can report bugs via GitHub Issues or submit fixes via pull requests.


Links

· GitHub repository: https://github.com/JCode-JCode/jaudiopy

· PyPI page: https://pypi.org/project/jaudiopy/


License

This project is licensed under the Apache License 2.0 – see the LICENSE file for details.


Designed and built with love by J Code

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jaudiopy-1.0.0.tar.gz (46.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jaudiopy-1.0.0-py3-none-any.whl (56.3 kB view details)

Uploaded Python 3

File details

Details for the file jaudiopy-1.0.0.tar.gz.

File metadata

  • Download URL: jaudiopy-1.0.0.tar.gz
  • Upload date:
  • Size: 46.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for jaudiopy-1.0.0.tar.gz
Algorithm Hash digest
SHA256 05f6258871b62ec05b51c7d30e480f12273f9fbc4641e5692b267eb14fe7b059
MD5 b74a772be4f82f7c0fc9a8693855a212
BLAKE2b-256 4a62e70b96369241996edee98f0521f2134755187b74c141abe89168ad36dbf5

See more details on using hashes here.

Provenance

The following attestation bundles were made for jaudiopy-1.0.0.tar.gz:

Publisher: publish.yml on JCode-JCode/jaudiopy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file jaudiopy-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: jaudiopy-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 56.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for jaudiopy-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0e95cdf133db2ccb706ee39a7f19d35fddb1c3aba6f7a6c0865dbd4b55eb81bd
MD5 4cc934a3543970240435ae668eba48c7
BLAKE2b-256 d4af61e3ae0bf960dc6e902941b850ad03347b589b3611ca4666cabba63b01d8

See more details on using hashes here.

Provenance

The following attestation bundles were made for jaudiopy-1.0.0-py3-none-any.whl:

Publisher: publish.yml on JCode-JCode/jaudiopy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 files

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