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.4.0 provides 83 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 83 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.4.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.4.0
File
effetune-0.4.0-cp312-abi3-win_amd64.whl CPython 3.12 abi3 Windows x86-64 Details
effetune-0.4.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.4.0-cp312-abi3-macosx_11_0_arm64.whl CPython 3.12 abi3 macOS 11.0+ ARM64 Details
effetune-0.4.0-cp312-abi3-macosx_10_13_x86_64.whl CPython 3.12 abi3 macOS 10.13+ x86-64 Details
effetune-0.4.0-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
effetune-0.4.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details
effetune-0.4.0-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details
effetune-0.4.0-cp311-cp311-macosx_10_13_x86_64.whl CPython 3.11 CPython 3.11 macOS 10.13+ x86-64 Details
effetune-0.4.0-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
effetune-0.4.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.4.0-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details
effetune-0.4.0-cp310-cp310-macosx_10_13_x86_64.whl CPython 3.10 CPython 3.10 macOS 10.13+ x86-64 Details

Total release size: 7.5 MB

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

Download URL effetune-0.4.0-cp312-abi3-win_amd64.whl
Size 572.2 kB
Tags CPython 3.12 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
620ab0f58011d1b6572c02c1dc6a64b2d1c7311884766a2b869cf6573283c325
BLAKE2b-256 checksum
How to use checksums
1d09a2464bb30a6f2a4ab9d69812d8b3a324895a8b6591ee956207a866da8702
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 Aug 8, 2026.

Transparency log

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

Download URL effetune-0.4.0-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 789.4 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
872451b8ff5f57ad3df72b16c861ba4885e2554302a9f49ecc633dd156e43599
BLAKE2b-256 checksum
How to use checksums
e15d50fce1a5ca04e3ad3f8de605a3fc3c8061de3726a25b2bffe430a3cc4505
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 Aug 8, 2026.

Transparency log

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

Download URL effetune-0.4.0-cp312-abi3-macosx_11_0_arm64.whl
Size 542.6 kB
Tags CPython 3.12 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
5d9585503cfef5ece534b2df2a6c9838025a5adbdeb702cf1b51d44d5da3f882
BLAKE2b-256 checksum
How to use checksums
37cdbf6bab47ec90a9ec90a0a0641c5f3d68210a6ae7a519d29e7628de788029
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 Aug 8, 2026.

Transparency log

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

Download URL effetune-0.4.0-cp312-abi3-macosx_10_13_x86_64.whl
Size 588.3 kB
Tags CPython 3.12 abi3 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
4cd33330cb701794fba5858386c79283fac74a3fabc68cf2fe007fa459d5334c
BLAKE2b-256 checksum
How to use checksums
86834b11d2745e14e4e75293d02889b2e75e8d0d79842e702812b8e0cd7f0a39
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 Aug 8, 2026.

Transparency log

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

Download URL effetune-0.4.0-cp311-cp311-win_amd64.whl
Size 574.2 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
b11f7ba7855f81f3ba6e5f52356a7d66d0cdf3319233152bda81ad6a01a865c4
BLAKE2b-256 checksum
How to use checksums
01af64c586380ea7e46bd1a8b0b44785af28651e6089a9fa4ca88a8e888166ee
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 Aug 8, 2026.

Transparency log

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

Download URL effetune-0.4.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 793.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
0a211a12322d050d8bb8c29b8f572368005c71c2d61d1f70c0f9c1bf2847fa08
BLAKE2b-256 checksum
How to use checksums
94fc2c8647ed29a34b3938f273ac81d960295638e2ac3d2ec8a9e69596f202c6
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 Aug 8, 2026.

Transparency log

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

Download URL effetune-0.4.0-cp311-cp311-macosx_11_0_arm64.whl
Size 545.0 kB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
fd0248a2859b3fbaa05ed5f8a7c5c1beeb5476f540459861b1c4a43c0cf4813a
BLAKE2b-256 checksum
How to use checksums
92ad5d9cdeb9a9a2fdabc19fa6db13664e7add19bbf14c5f0f1c633f45457ae4
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 Aug 8, 2026.

Transparency log

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

Download URL effetune-0.4.0-cp311-cp311-macosx_10_13_x86_64.whl
Size 590.2 kB
Tags CPython 3.11 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
ca118a7ebc9e546955b4cd4b1977e036ef09e75801df29d135ec1122905643a4
BLAKE2b-256 checksum
How to use checksums
def79734774b1348173ef7661479f8fa4b611ec8f8a6d4e83c97b92706c15b9e
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 Aug 8, 2026.

Transparency log

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

Download URL effetune-0.4.0-cp310-cp310-win_amd64.whl
Size 574.4 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
b89169885bea26d9935ed56e3fafb451ce1cb446e84be669b2060f05431853d0
BLAKE2b-256 checksum
How to use checksums
dfd25bcae890f7fbfdd7b8942f88f6151a9507d46dd4ccaaac3ae191576309f6
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 Aug 8, 2026.

Transparency log

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

Download URL effetune-0.4.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 794.4 kB
Tags CPython 3.10 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
33369eb3bafcf53683d8de0ce8109c677248b28d0142d69ad6d468563ecb3f71
BLAKE2b-256 checksum
How to use checksums
c76ea98a87e9b76e21333c9a659b8a7d36e6fd3313622c0f8a2286e454d06771
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 Aug 8, 2026.

Transparency log

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

Download URL effetune-0.4.0-cp310-cp310-macosx_11_0_arm64.whl
Size 545.3 kB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
32e46f6cace067f350a5bee9c38d454e575023148a689911a6caea9dc5afc7c6
BLAKE2b-256 checksum
How to use checksums
e125ee1713dc050725d8d4ec3180b377d8cabe599f0f2e9c59fef0eada5d3da2
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 Aug 8, 2026.

Transparency log

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

Download URL effetune-0.4.0-cp310-cp310-macosx_10_13_x86_64.whl
Size 590.4 kB
Tags CPython 3.10 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
e28000e16975aa090796476f3f365f7995c1a609124ddaf263d0d17d154fbbd9
BLAKE2b-256 checksum
How to use checksums
2a420a04ba4c50274f225729f697924c2755e9ffa16a05f3bfecebf30d1a861b
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 Aug 8, 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.4.0 This release

12 release files

0.1.0

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