Skip to main content

EffeTune for Python

Documentation: effetune.frieve.com/dsp/

Source and issues: Frieve-A/effetune

effetune.__version__ comes from installed wheel metadata. An unpacked source tree without distribution metadata reports 0+source.

EffeTune is a deterministic audio-effects library backed by the same host-neutral C++20 DSP core used by the EffeTune application. Version 0.1.0 provides 76 semantic effect classes, ordered serial chains, stateful block processing, semantic presets, bounded impulse-response bundles, and a small audio-file CLI.

Install and process

pip install effetune
import numpy as np
import effetune as et

frames = 512
phase = np.arange(frames, dtype=np.float32)
mono = (0.5 * np.sin(2 * np.pi * phase / 97)).astype(np.float32)
audio = np.ascontiguousarray(np.stack((mono, mono)))
chain = et.Chain([et.Volume(volume=-6)])
output = chain.process(audio, sample_rate=48_000)
print(output.shape, float(np.max(np.abs(output))))

Generated effect constructors and create_effect() accept Python snake_case keywords:

shift = et.PitchShifter(pitch_shift=3)
same_shift = et.create_effect("PitchShifter", pitch_shift=3)

Chain JSON and scheduled event parameter objects use semantic catalog names, such as pitchShift. CamelCase semantic names are not constructor aliases.

Audio arrays are C-contiguous planar float32 with shape (channels, frames). Offline calls return a new array and start from fresh DSP state. No resampling is performed.

SoundFile returns (frames, channels). Convert decoded files explicitly:

import numpy as np
import soundfile as sf

decoded, sample_rate = sf.read("input.wav", dtype="float32", always_2d=True)
audio = np.ascontiguousarray(decoded.T, dtype=np.float32)
output = chain.process(audio, sample_rate=sample_rate)
sf.write("output.wav", output.T, sample_rate, subtype="FLOAT")

For persistent filter history and tails:

with chain.stream(48_000, channels=2, block_size=512, seed=42) as stream:
    first = stream.process(block_a)
    second = stream.process(block_b)
    stream.reset()

block_size must be from 1 through 16384 and controls the largest native processing window; process() may receive a longer array and partitions it internally. Parameter events use frame offsets relative to that process() input. They must be ordered, identify an enabled effect with an explicit id, and provide one or more semantic parameter updates:

output = stream.process(audio, events=[
    {"frame": 0, "effectId": "voice", "parameters": {"threshold": -24}},
    {"frame": 0, "effectId": "voice", "parameters": {"ratio": 6}},
])

Each event is merged with the effect's current parameters. Frame zero applies before the first sample. Multiple events at one frame keep their supplied order, so later updates see earlier updates. The final frame is not an event position. reset() restores the initial parameters, state, and seed. Events cannot change parameters that require convolution assets to be staged again. Open a new stream after changing IRReverb.channelMode, latency, or convolutionRate; FIRCrossover.bandCount, latencyMode, or filterDelaySamples; or latencyMode / filterDelaySamples on FiveBandFIRPEQ, GroupDelayEQ, or RoomEQ. close() is idempotent. Processing or resetting a closed stream raises StateError.

Presets and bundles

Chain.from_preset() accepts only canonical Chain v1:

{
  "version": 1,
  "chain": [
    {
      "id": "voice",
      "type": "Compressor",
      "enabled": true,
      "channel": "all",
      "parameters": {"threshold": -18, "ratio": 4}
    }
  ]
}

Application pipeline and plugins presets are deliberately separate. Use Chain.from_legacy_preset() or import_legacy_preset() to convert an app preset whose effects form one ordered serial path. Branched and multi-bus routing is rejected because flattening it would change the acoustic result. Move or copy the desired effects into one serial path in the app and export it again, or reproduce the branching in the host around separate Chains. Unsupported channels, effects, partial short-key arrays, and unknown fields are reported rather than silently dropped.

LevelMeter, Oscilloscope, SpectrumAnalyzer, Spectrogram, and StereoMeter provide opt-in decoded telemetry. Pass on_telemetry to Chain.process() or Chain.stream(), or manage a streaming subscription:

with chain.stream(48_000, channels=2) as stream:
    unsubscribe = stream.subscribe(lambda frame: print(frame.kind))
    output = stream.process(audio)
    print(stream.dropped_telemetry_frames)
    unsubscribe()

The first subscriber enables observations and the last unsubscribe disables them. Delivered tuples are caller-owned semantic values. Raw DSP telemetry is not a public API.

FIRCrossover, FiveBandFIRPEQ, GroupDelayEQ, IRReverb, and RoomEQ require an impulseResponse reference and an asset resolver. The four FIR filter effects use prepared coefficient impulses at the processing sample rate. Resolvers return AssetData containing finite, C-contiguous planar float32 samples, an integer sample rate, and an explicit or unambiguous topology. The runtime rejects missing, malformed, hash-mismatched, ambiguous, and oversized assets. It does not decode or resample an IR.

Bundle.load(path) reads either a JSON manifest or a directory containing bundle.json. Bundle.pack(destination, chain, assets) writes a deterministic Bundle v1 directory from Chain v1 and caller-supplied AssetData. Its asset entries use the canonical ETA1 payload: a 32-byte header, optional 12-byte matrix path records, then planar little-endian float32 samples. Referenced payloads are restricted to the bundle directory and verified against manifest metadata, exact length, SHA-256, header, path records, finite samples, and the native 32 MiB footprint limit before use:

bundle = et.Bundle.load("room-bundle")
chain = et.Chain.from_preset(
    bundle.chain_document,
    asset_resolver=bundle.resolver,
)

The CLI exposes the same writer for decoded IR audio:

effetune bundle pack room-chain.json room-bundle --asset room-ir=room-ir.wav
effetune render input.wav convolved.wav --preset room-bundle --subtype FLOAT

--preset room-bundle/bundle.json is equivalent. For WAV output, omitting --subtype keeps SoundFile's PCM_16 default; --subtype FLOAT preserves 32-bit floating-point samples. render prints a one-line warning to standard error when the default output subtype reduces the input's precision, which passing --subtype explicitly silences, and when the rendered peak exceeds full scale and is clipped by an integer PCM output. Both warnings leave the exit code at 0.

EFFECT_METADATA is the public machine-readable semantic catalog for all 76 root effect classes. It contains channel choices, parameters, required assets, telemetry, and latency declarations without private native implementation details. Stream.latency_samples reports aggregate runtime latency and matches JavaScript ChainStream.latencySamples for the same chain and sample rate. Chain.latency_samples(sample_rate, ...) reports the same aggregate without opening a stream, which aligns offline process() output.

CLI

effetune render input.wav output.wav --preset mastering.json
effetune render input.wav output.wav --preset room-bundle --subtype FLOAT
effetune render input.wav output.flac --chain "[{\"type\":\"Volume\",\"parameters\":{\"volume\":-3}}]"
effetune chain validate mastering.json
effetune preset inspect mastering.json
effetune bundle pack room-chain.json room-bundle --asset room-ir=room-ir.wav

Audio decoding and encoding are delegated to SoundFile. The CLI does not invoke ffmpeg, resample, measure loudness, or change the input sample rate. --preset accepts a Chain file, a Bundle directory, or its bundle.json.

Supported Python wheels

The package supports CPython 3.10 and newer. Nanobind's stable ABI starts at CPython 3.12, so 3.10 and 3.11 wheels are version-specific. Release jobs build the 3.12 wheel with CMake 3.26 or newer:

python -m build -Ccmake.define.ET_PYTHON_STABLE_ABI=ON -Cwheel.py-api=cp312

That cp312-abi3 wheel covers supported newer CPython versions. This is a private static-link extension; the repository's wasm32 C ABI is not exposed as a native public ABI. Linux x86-64, Windows AMD64, macOS Intel, and macOS Apple Silicon wheels are built and clean-install tested independently.

Official Python releases are wheels only. An sdist built from this subproject would omit DSP sources located above the Python package directory, so source builds are supported only from a complete EffeTune repository checkout.

Release files for effetune 0.1.0

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

Built distributions (wheels)

Table of built distributions (wheels) for effetune 0.1.0
File
effetune-0.1.0-cp312-abi3-win_amd64.whl CPython 3.12 abi3 Windows x86-64 Details
effetune-0.1.0-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 abi3 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details
effetune-0.1.0-cp312-abi3-macosx_11_0_arm64.whl CPython 3.12 abi3 macOS 11.0+ ARM64 Details
effetune-0.1.0-cp312-abi3-macosx_10_13_x86_64.whl CPython 3.12 abi3 macOS 10.13+ x86-64 Details
effetune-0.1.0-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
effetune-0.1.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details
effetune-0.1.0-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details
effetune-0.1.0-cp311-cp311-macosx_10_13_x86_64.whl CPython 3.11 CPython 3.11 macOS 10.13+ x86-64 Details
effetune-0.1.0-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
effetune-0.1.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details
effetune-0.1.0-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details
effetune-0.1.0-cp310-cp310-macosx_10_13_x86_64.whl CPython 3.10 CPython 3.10 macOS 10.13+ x86-64 Details

Total release size: 5.1 MB

Release files / effetune-0.1.0-cp312-abi3-win_amd64.whl

Download URL effetune-0.1.0-cp312-abi3-win_amd64.whl
Size 395.9 kB
Tags CPython 3.12 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
fcb6254c23febd4a70bb5f8d3804fad823cd00426cbf7309f112cb530aa8d45b
BLAKE2b-256 checksum
How to use checksums
a84a249d5a040aa8dced2bb2a2a4c1bf7f4ea8f5f6a637d3aa92aae53ec1bddd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 31, 2026.

Transparency log

Release files / effetune-0.1.0-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL effetune-0.1.0-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 521.1 kB
Tags CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
d925de521069b7ac0616794da70039fad678b6dd6403dee15ba19cdcbd951722
BLAKE2b-256 checksum
How to use checksums
7e73982b258afc416cf431446daebb9bea910f56066b4218809aeb0d768f839f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 31, 2026.

Transparency log

Release files / effetune-0.1.0-cp312-abi3-macosx_11_0_arm64.whl

Download URL effetune-0.1.0-cp312-abi3-macosx_11_0_arm64.whl
Size 369.0 kB
Tags CPython 3.12 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
8670a64dc496ceab82031f74d846dd67b9da04f2fb819da1c09f97f94b62246d
BLAKE2b-256 checksum
How to use checksums
baf903717da52926cdb6becd9f14bd7da795dca9b69dc4e4827b099f0f474575
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 31, 2026.

Transparency log

Release files / effetune-0.1.0-cp312-abi3-macosx_10_13_x86_64.whl

Download URL effetune-0.1.0-cp312-abi3-macosx_10_13_x86_64.whl
Size 409.4 kB
Tags CPython 3.12 abi3 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
20d9865741e996e5621eea15b48aba243b56f7dc610c14b06ef8b3c329c295b8
BLAKE2b-256 checksum
How to use checksums
c819e604ea5d484f593585ea2f33a89beafe112eef16ce0b21537f6fb98ede90
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 31, 2026.

Transparency log

Release files / effetune-0.1.0-cp311-cp311-win_amd64.whl

Download URL effetune-0.1.0-cp311-cp311-win_amd64.whl
Size 397.9 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
10d273ad98d6e12e07da6b6a95bcc3d58cf5caff2eab3ecc0a84084462f4b1f7
BLAKE2b-256 checksum
How to use checksums
1975303d02c0da455f584453d8c43faef927a2f15c0c1aa7ff9d8ad35f9c835d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 31, 2026.

Transparency log

Release files / effetune-0.1.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL effetune-0.1.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 525.9 kB
Tags CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
0c21e34745bef812460bf2c73780762082f01246d6663827937d2ffb05ae8e10
BLAKE2b-256 checksum
How to use checksums
334b8361da37e0f87d045ee05f3e89b875bc34033275fcc0a03db074e3e4d31a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 31, 2026.

Transparency log

Release files / effetune-0.1.0-cp311-cp311-macosx_11_0_arm64.whl

Download URL effetune-0.1.0-cp311-cp311-macosx_11_0_arm64.whl
Size 371.2 kB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
8942ad8b29734e6eb79774561f71ae02f4f5057ef60842cb936a00fa14e15708
BLAKE2b-256 checksum
How to use checksums
4de090733893ed48aee90b5e394084f301e6813f7fbe1ca0a6148a617b75976f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 31, 2026.

Transparency log

Release files / effetune-0.1.0-cp311-cp311-macosx_10_13_x86_64.whl

Download URL effetune-0.1.0-cp311-cp311-macosx_10_13_x86_64.whl
Size 411.7 kB
Tags CPython 3.11 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
d1a6857e999b94e6f38b3f08f6356d675378e3ec0c6e957eb6b00e03ceabd5fb
BLAKE2b-256 checksum
How to use checksums
65eae941ab4ff748c0483fb4d0b1506a5b22ab5adab0dc65d64be0fa17155179
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 31, 2026.

Transparency log

Release files / effetune-0.1.0-cp310-cp310-win_amd64.whl

Download URL effetune-0.1.0-cp310-cp310-win_amd64.whl
Size 398.2 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
98906781708e0d97d42e0f826890f0e325f4e41243235567f09dcef14f6bc1da
BLAKE2b-256 checksum
How to use checksums
bd94e75eaa9bd4e5ae05e149dde2a84a1a95d9ea3ccdf4b052182881aef342b5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 31, 2026.

Transparency log

Release files / effetune-0.1.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL effetune-0.1.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 526.3 kB
Tags CPython 3.10 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
4c965454958923a276556ad22b79de22a7c88282362a018bb49f0235390e31b5
BLAKE2b-256 checksum
How to use checksums
c3a39a9e68d44bbbad84e26257fc4af88df9644e3985435e584c2e2670a89687
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 31, 2026.

Transparency log

Release files / effetune-0.1.0-cp310-cp310-macosx_11_0_arm64.whl

Download URL effetune-0.1.0-cp310-cp310-macosx_11_0_arm64.whl
Size 371.5 kB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
60476748ae31ad2c42512e19ed0988cf389265705d1cbede0a39ed72c948a50d
BLAKE2b-256 checksum
How to use checksums
dc578871541ee7c44cf11724c7ea8cc807e1c98280c0dcfca7c0d87a8af29562
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 31, 2026.

Transparency log

Release files / effetune-0.1.0-cp310-cp310-macosx_10_13_x86_64.whl

Download URL effetune-0.1.0-cp310-cp310-macosx_10_13_x86_64.whl
Size 412.0 kB
Tags CPython 3.10 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
8e60500fa55860d57f4441ad108a34ec02944d734d5ae4c4bf6d41a2b633dfcb
BLAKE2b-256 checksum
How to use checksums
29ee9692f97d91916e33299d60fb7b0e95a035c3dafaa87f904269ae0be8cc7d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 31, 2026.

Transparency log

Release history Release notifications | RSS feed

0.9.0

12 release files

0.7.0

12 release files

0.6.0

12 release files

0.5.0

12 release files

This release

0.1.0 This release

12 release 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