Skip to main content

py-neil-vst

Cython-based simple VST 2.4 Host and VST Plugins wrapper. Fast work and clean python object-oriented interface, minimum memory required for the one VST HOST instance.

  • Supported platforms: Windows 64bit
  • Supported python versions: 3.7, 3.8, 3.9
  • Supported VST Plugins: only 64-bit/VST2

Create VST host and the one VST plugin (XILS DeeS) example:

from neil_vst import VstHost, VstPlugin
# create VST host
vst_host = VstHost(samplerate=44100, buffer_size=1024, log_level="DEBUG")
# create VST plugin effect
plugin = VstPlugin(
    host=vst_host,
    vst_path_lib="C:/Program Files/Common Files/VST2/XILS DeeS.dll",
    sample_rate=44100,
    block_size=1024,
    max_channels=4,
    self_buffers=True,
    log_level="DEBUG",
)

print( plugin.info() )

Process stereo audio file with Raum VST plugin:

import numpy
from soundfile import SoundFile
from neil_vst import VstHost, VstPlugin

# open input audio file
in_file = SoundFile(infilepath, mode='r', closefd=True)
# create output audio file
out_file = SoundFile(
    outfilepath,
    mode='w',
    samplerate=in_file.samplerate,
    channels=in_file.channels,
    subtype=in_file.subtype,
    closefd=True
)
# sample buffer size
buffer_size = 1024
# create VST host
vst_host = VstHost(samplerate=in_file.samplerate, buffer_size=buffer_size, log_level="DEBUG")
# create VST plugin effect
plugin = VstPlugin(
    host=vst_host,
    vst_path_lib="C:/Program Files/Common Files/VST2/Raum.dll",
    sample_rate=in_file.samplerate,
    block_size=buffer_size,
    max_channels=8,
    self_buffers=True,
    log_level="DEBUG",
)
# process stereo audio file
for block in in_file.blocks(blocksize=self._buffer_size, always_2d=True):
    # prepare buffer from numpy array
    block_rl = block.transpose()
    buf_in = [
        block_rl[0].astype(numpy.float32).ctypes.data,
        block_rl[1].astype(numpy.float32).ctypes.data ]
    # VST process replasing
    plugin.process_replacing( buf_in, plugin.out_buffers, len(block) )
    # get back to numpy array for save to output audio file
    out_left = numpy.ctypeslib.as_array(
        ctypes.cast(plugin.out_buffers[0], ctypes.POINTER(ctypes.c_float)), shape=(len(block),)
    )
    out_right = numpy.ctypeslib.as_array(
        ctypes.cast(plugin.out_buffers[1], ctypes.POINTER(ctypes.c_float)), shape=(len(block),)
    )
    # write out data to output audio file
    out_file.write( [out_left, out_right] )

Open VST plugin GUI with PyQt5 QWidget with callback example:

import sys
import logging
from PyQt5 import QtWidgets
from neil_vst import VstHost, VstPlugin

class VSTPluginWindowExample(QtWidgets.QWidget):
    def __init__(self, plugin, parent=None):
        super(VSTPluginWindowExample, self).__init__(parent)
        # set self window name
        self.setWindowTitle(plugin.name)
        # set self size corresponding to plugin size
        rect = plugin.edit_get_rect()
        self.resize(rect["right"], rect["bottom"])
        # open plugin GUI to self
        plugin.edit_open(int(self.winId()))
        # self show
        self.show()

if __name__ == '__main__':
    app = QtWidgets.QApplication(sys.argv)
    vst_host = VstHost(44100, log_level=logging.DEBUG)
    plugin = VstPlugin(vst_host, "C:/Program Files/Common Files/VST2/TDR VOS SlickEQ.dll", log_level=logging.DEBUG)
    plugin_window = VSTPluginWindowExample(plugin)
    sys.exit(app.exec_())

CLI util example:

>>> neil_vst_chain -h

usage: neil_vst_chain [-h] [-f FOLDER] [-j JOB] [-o OUTPUT] [-b BUFFERSIZE] [-v] [-i]

optional arguments:
  -h, --help            show this help message and exit
  -f FOLDER, --folder FOLDER
                        folder with input audio files (default: .)
  -j JOB, --job JOB     JSON job file
  -o OUTPUT, --output OUTPUT
                        output folder for audio files (default: ./out)
  -b BUFFERSIZE, --buffersize BUFFERSIZE
                        buffer size in bytes [1024...65536] (default: 8096)
  -v, --verbose         verbose logging (default: False)
  -i, --info            show all parameters info for loaded VST (default: False)

Process all files in selected folder from CLI example:

>>> neil_vst_chain -f in_folder -j job_file.json -o out_folder -b 16192
or
>>> neil_vst_chain --folder in_folder --job job_file.json --output out_folder --buffersize 16192

Metadata

Release files for neil-vst 0.2.7

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

Source distribution (sdist)

Source distribution for neil-vst 0.2.7
File Size Uploaded Provenance
neil_vst-0.2.7.tar.gz 310.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for neil-vst 0.2.7
File Interpreter ABI Platform
neil_vst-0.2.7-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details

Total release size: 845.3 kB

Release files / neil_vst-0.2.7.tar.gz

Download URL neil_vst-0.2.7.tar.gz
Size 310.9 kB
Tags Source
SHA-256 checksum
How to use checksums
6d365add22e565f7e37c087a4efa6241dd6bf93548c23a5595fcc460ba296217
BLAKE2b-256 checksum
How to use checksums
f388830eaf97462924a82295602d3465e87249bfc46fc373206305e79b8a8bad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.0

Release files / neil_vst-0.2.7-cp39-cp39-win_amd64.whl

Download URL neil_vst-0.2.7-cp39-cp39-win_amd64.whl
Size 534.5 kB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
7428335e59848f36b452164a1adb1aa2d0a402841a68b20a3879f414658e06b8
BLAKE2b-256 checksum
How to use checksums
6293eeb714449b6a3d54687b094f1b0329180f9b7a050cd9c383f2ff3d126a36
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.0

Security for neil-vst 0.2.7

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.

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