Skip to main content

vst-audio

Python bindings for vst-audio, a Rust library that hosts VST2 and VST3 plugins in separate worker processes. Scanning also runs outside Python. No audio device is opened.

Installation

pip install vst-audio

Requires Python 3.9 or newer and NumPy. Functional native wheels contain a worker for their platform; the earlier 0.0.1 package was a name reservation and does not host plugins. This implementation targets Windows, Linux and macOS. Native execution has currently been verified on Windows x64 only. Use plugins built for the same architecture as the packaged worker.

import numpy as np, vst_audio
host = vst_audio.Host()
with host.load("Plugin.vst3", sample_rate=48000, block_size=512) as plugin:
    out = plugin.process(np.zeros((plugin.input_channels, 48000), np.float32))

Host() first checks VST_AUDIO_WORKER, then the package's _worker/ directory. An invalid explicit environment override raises WorkerNotFoundError rather than silently running a different worker. You can also pass an executable path directly with Host(worker=...). Plugins are never bundled.

Supported operations

  • Scan VST2 or VST3 classes, optionally in an OS sandbox (sandboxed=True).
  • Load one plugin per worker with a sample rate, block size and f32/f64 precision. The plugin must support the requested precision; there is no implicit conversion.
  • Select a VST3 class using class_id=host.scan(path)[index].id.
  • Render planar NumPy arrays, including C-order and Fortran-order arrays, and request a silent input tail with process(audio, tail=frames).
  • List immutable parameter snapshots, set normalized values, and save or restore opaque state bytes.
  • Open and close a worker-owned floating editor. A usable desktop session is required; opening an editor does not start audio playback.
  • Close explicitly or use a context manager. close() is idempotent and requests asynchronous worker teardown. Do not rely on garbage collection for cleanup.

The input has shape (input_channels, frames) and dtype numpy.float32 for sample_format="f32" or numpy.float64 for "f64". The returned array has shape (output_channels, frames + tail) and the same dtype. The renderer zero-pads the last block and removes pipeline and reported plugin latency. Priming has no samples, but counts as pipeline time so it is not trimmed twice. A zero-length input with tail=0 returns an empty output without processing a block.

Rendering releases the GIL and waits losslessly for each block, with timeout in seconds per block. Control methods also release the GIL while waiting; parameter enumeration uses one timeout for all pages. The input is copied before releasing the GIL, so another Python thread cannot change the render in progress. Block buffers are reused throughout the render. Each process call flushes silence through the latency and rounds to whole blocks; it is an offline render, not a gapless streaming callback. Plugin state is retained between calls. Use a fresh instance for independent renders that require fresh DSP state.

Plugin.latency reports the plugin's latency in frames, excluding the pipeline. The endpoint refreshes this value at block boundaries. Latency is sampled at the first block of each render; plugins that change latency during a render are not supported for sample-accurate alignment. Use a plugin only on its creating thread.

GUI applications

Every call blocks until the worker answers, and a plugin belongs to the thread that created it. In a GUI, give one background thread the Host and the Plugin, send it requests through a queue, and hand results back with the toolkit's own mechanism (after polling in tkinter, a queued signal in Qt, wx.CallAfter, GLib.idle_add). Slow calls release the GIL, so the event loop keeps running meanwhile. The GUI examples do this for CustomTkinter, PyQt6, PySide6, wxPython, PyGObject (GTK 4) and pywebview; CI runs each one's load, editor and render sequence.

Errors

All hosting errors derive from VstAudioError:

  • WorkerNotFoundError: no worker at the configured or bundled location.
  • StartError: startup or request submission failed. kind is the snake_case Rust StartErrorKind name. An expired load timeout cancels startup and has kind="cancelled".
  • RenderError: kind is invalid_buffer, not_running, recovered, timed_out, or lost. No partial render is returned.
  • RequestTimeout: a matching control reply did not arrive in time.

A worker-reported control rejection raises VstAudioError with its diagnostic. Wrong dtype raises TypeError; wrong array shape or invalid format raises ValueError. Unrelated control events are retained internally, but this first API does not expose an event stream. After a failed render, close the instance and load again rather than treating the failed call as a completed render.

Not exposed in this first API

No realtime audio-device callback, MIDI/SysEx, sample-offset automation, transport control, bus configuration, editor embedding, recovery control, async Python API or cross-architecture worker registry is provided. Floating editor support comes from the Rust worker, not a Python GUI toolkit.

Building and testing from the repository

Build tooling requires Rust, Python 3.11+ and platform-native build dependencies. The installed package itself supports Python 3.9+. From bindings/python:

python stage_worker.py
python -m pip install .
python run_tests.py

stage_worker.py builds a locked release worker and stages its redistribution notices. --worker PATH uses an existing executable (or a macOS .app bundle) instead. On macOS the helper bundle receives an ad-hoc hardened-runtime signature; distributors remain responsible for signing and notarization.

run_tests.py builds the repository fixtures, stages a release worker, creates a fresh target/python-venv, builds and installs a wheel, then runs pytest against that installed wheel. It verifies bundled-worker resolution as well as the environment override. The Matrix fixtures verify exact f32 matrix output and 64-frame latency compensation. Their f64 rejection is intentional; separate advanced fixtures verify f64 synthesis silence and a nonzero f64 VST3 effect. Editor open and close run in the GUI examples' CI. Python 3.9 and multi-page native parameter enumeration still need platform or fixture coverage.

Licensed under MIT OR Apache-2.0, at your option. The bundled worker's notices, including its BSD-3-Clause and ISC parts, ship with the package.

VST is a registered trademark of Steinberg Media Technologies GmbH. This project is independent of Steinberg and is not endorsed by it.

Metadata

Release files for vst-audio 0.1.2

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 vst-audio 0.1.2
File Actions
vst_audio-0.1.2-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details for vst_audio-0.1.2-cp39-abi3-win_amd64.whl
vst_audio-0.1.2-cp39-abi3-manylinux_2_28_x86_64.whl CPython 3.9 abi3 Linux glibc 2.28+ x86-64 Details for vst_audio-0.1.2-cp39-abi3-manylinux_2_28_x86_64.whl
vst_audio-0.1.2-cp39-abi3-macosx_11_0_x86_64.whl CPython 3.9 abi3 macOS 11.0+ x86-64 Details for vst_audio-0.1.2-cp39-abi3-macosx_11_0_x86_64.whl
vst_audio-0.1.2-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details for vst_audio-0.1.2-cp39-abi3-macosx_11_0_arm64.whl

Total release size: 5.9 MB

Release files / vst_audio-0.1.2-cp39-abi3-win_amd64.whl

Download URL vst_audio-0.1.2-cp39-abi3-win_amd64.whl
Size 1.2 MB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
4f211ca79bf8a1bacbcbcd4460b200ad05c33379186ca1e8789888e353ba488f
BLAKE2b-256 checksum
How to use checksums
109214e2666376cb751a5c98baf8e210e58d87f33df9897955c94f94d111d6e4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 5, 2026.

Transparency log

Release files / vst_audio-0.1.2-cp39-abi3-manylinux_2_28_x86_64.whl

Download URL vst_audio-0.1.2-cp39-abi3-manylinux_2_28_x86_64.whl
Size 1.8 MB
Tags CPython 3.9 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
d63a8e9721c5f45362aa2d50db467bf7b1fb2e44f22f1552a446661267f7d049
BLAKE2b-256 checksum
How to use checksums
74b45baa144d7dc5fa6b14f896173c884f30fb828bf21f72c1526ab85ec675b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 5, 2026.

Transparency log

Release files / vst_audio-0.1.2-cp39-abi3-macosx_11_0_x86_64.whl

Download URL vst_audio-0.1.2-cp39-abi3-macosx_11_0_x86_64.whl
Size 1.4 MB
Tags CPython 3.9 abi3 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
76b9fcf02b1e8d9f5217d0956aec3e01b91a679e0bdd7531f37382472e13b7d3
BLAKE2b-256 checksum
How to use checksums
2afedd58d701a9d991ea9ca4d445efc3ec3ebf1ef115ce6eb4f271cfe6dc58af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 5, 2026.

Transparency log

Release files / vst_audio-0.1.2-cp39-abi3-macosx_11_0_arm64.whl

Download URL vst_audio-0.1.2-cp39-abi3-macosx_11_0_arm64.whl
Size 1.4 MB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
cc56cb91955f1fb47f3896654a4d0457721238bccd6259c054eb899c7be7a10d
BLAKE2b-256 checksum
How to use checksums
ed50e8c6397e4bf1fdc3bbdec84fba78d85023813ba62c70ff0c28450da28cf7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 5, 2026.

Transparency log

Security for vst-audio 0.1.2

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.

Full provenance

All 4 files in this release have been uploaded with provenance metadata.

Select from 4 files

Attestation for vst_audio-0.1.2-cp39-abi3-win_amd64.whl

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 Nov 5, 2026.

Transparency log

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