VST-as-a-service (Beta)
This feature is still a Beta version
A Python Pedalboard backend to enable Windows VST3 hosting on Windows
Supports headless operation (1:n backend:frontend configuration)
Supports UI plugin configuration (1:1 backend:frontend configuration)
Supports live monitoring (1:1 backend:frontend configuration)
Supports Windows VST3 plugins in any (accessible) location
Supports custom plugin chains with individual plugin configurations (1:n)
Setup Guide
Clone repository
Recommended: Set up a virtual environment
Run
pip install -r requirements.txt
Set up your server configuration:
Either use a provided configuration or create one
The default configuration is
"./configurations/default_config.yaml"
If you want to create a configuration file:
Create a .yaml file with any name e.g. my_config.yaml
The configurations can be in any locations, although keeping them in the configurations folder may make organization easier.
Ensure the mandatory parameters are defined (see mandatory parameter list)
In multithreaded_server.py change DEFAULT_CONFIG_FILE (line 13) to the path of your configuration file. Alternatively the server can also receive configurations from clients.
This is relevant for adapting the configuration to the format of the given audio e.g. changing the channel count, bit depth or sample rate for each audio file individually.
If server should run locally:
In your default server config set:
host: 'localhost'
Ensure that the config your client is using also has host set to localhost.
The server and client will recognize they are running on localhost and will therefore switch to ws instead of wss and not require certificates.
If server should run on a different machine:
Set the host in your config to the adress of the machine where your server is running. For example:
host: 'URL.com'
Ensure the port you have specified in your configuration is accessible. For example:
port:50007
Ensure the server has access to certificates for this address in the cert folder. If the server is not run locally it requires certificates.
To start you server run “multithreader_server.py”
If everything is configured correctly you should see:
Loading default config
Starting server
Server started
At this point you can send messages to your server.
For more details to debug issues open server.log
Configuration
Mandatory parameters:
host (string): address of the backend
Name | Description | Permitted Values |
---|---|---|
port (int) | Port of the backend | Any valid port IP or “localhost” |
sample_rate (int) | Sample rate of the original and returned file | Any valid sample rate. |
bit_depth (int) | Bit depth of the original file | 8,16,24, or 32. Anything other than 32 will be converted to 32 bit float for pedalboard procesing. |
channel_count (int) | The number of channels. | 1 (mono) or 2 (stereo) |
max_size (int) | The limit of the websocket connection in bytes. | Anything permitted by websocket. |
folders (string array) | Path of folders containing VST3 plugins. At least one folder should be given. | Any valid path that is accessible by the script. |
plugins (array): | Contains a number of | |
-> filename(string) | File name of the VST3 plugin. | Any “.vst3” file name. |
-> settings(array): | Contains a number of | |
->-> name (string) | Name of the parameter. | Any parameter name permitted by the plugin. |
->-> value (any) | Value of the parameter. | Any value permitted by the plugin for the specified parameter. |
Optional Parameters
Name | Description | Permitted values |
---|---|---|
headless (bool, default=True) | Specifies whether ot not the backend is run headless or not. In headless mode UIs won’t be shown. | true/false |
playback (bool, default=False) | Activates live monitoring through the default output device. Headles mode needs to be set to false first. | true/false (default=False) |
block_size (int, default=0) | https://python-sounddevice.readthedocs.io/en/latest/api/streams.html “blocksize (int, optional) – The number of frames passed to the stream callback function, or the preferred block granularity for a blocking read/write stream. The special value | |
buffer_size (int, default=128) | Specifies the buffer between the pedalboard processing output and the live monitoring input. | Usually multiples of 64, but any value can be chosen. Should be adapted based on the machine the backend is running on and the plugin chain used. |
close_UI (bool) | Should be considered a message and not a static configuration. | true/false, but it is assumed that it is true. |
Minimal (local) Configuration:
---
host: 'localhost'
port: 50007
sample_rate: 44100
max_size: 524288000
bit_depth: 24
channel_count: 2
folders:
- "C:\\Program Files\\Common Files\\VST3"
plugins:
- filename: "PLUGINNAME.vst3"
All of these parameters can be adapted to the indvidual situation (or audio file) but have to be present. Theoretically no plugins can be given but then the board will do no processing.
Hosted configuration with plugin settings
---
host: 'URL.OF.SYSTEM'
port: 50007
sample_rate: 44100
max_size: 524288000
bit_depth: 16
channel_count: 1
folders:
- "C:\\Program Files\\Common Files\\VST3"
plugins:
- filename: "Ozone 9 Equalizer.vst3"
settings:
- name: "eq_st_m_l_frequency_1_hz"
value: "52.98"
- name: "eq_st_m_l_frequency_2_hz"
value: "2691.16"
- name: "eq_st_m_l_frequency_3_hz"
value: "111.32"
- name: "eq_st_m_l_frequency_4_hz"
value: "486.19"
- name: "eq_st_m_l_frequency_5_hz"
value: "2700.00"
- name: "eq_st_m_l_frequency_7_hz"
value: "6464.99"
- name: "eq_st_m_l_gain_1_db"
value: "-1.96"
- name: "eq_st_m_l_gain_2_db"
value: "-4.96"
- name: "eq_st_m_l_gain_3_db"
value: "4.89"
- name: "eq_st_m_l_gain_4_db"
value: "-3.39"
- name: "eq_st_m_l_gain_5_db"
value: "0.0"
- name: "eq_st_m_l_gain_7_db"
value: "-2.13"
- name: "eq_st_m_l_q_1"
value: "12.00"
- name: "eq_st_m_l_q_2"
value: "2.00"
- name: "eq_st_m_l_q_3"
value: "0.57"
- name: "eq_st_m_l_q_4"
value: "2.00"
- name: "eq_st_m_l_q_5"
value: "0.71"
- name: "eq_st_m_l_q_7"
value: "12.00"
- name: "eq_st_m_l_shape_1"
value: "Flat High-Pass"
- name: "eq_st_m_l_shape_2"
value: "Proportional Q Bell"
- name: "eq_st_m_l_shape_3"
value: "Bell"
- name: "eq_st_m_l_shape_4"
value: "Proportional Q Bell"
- name: "eq_st_m_l_shape_5"
value: "Bell"
- name: "eq_st_m_l_shape_7"
value: "High Shelf"
- name: "eq_st_m_l_enable_1"
value: True
- name: "eq_st_m_l_enable_2"
value: True
- name: "eq_st_m_l_enable_3"
value: True
- name: "eq_st_m_l_enable_4"
value: True
- name: "eq_st_m_l_enable_5"
value: True
- name: "eq_st_m_l_enable_7"
value: True
- filename: "Ozone 9 Vintage Compressor.vst3"
settings:
- name: "vcomp_st_mid_mode"
value: "Smooth"
- name: "vcomp_st_mid_threshold"
value: "-13.3"
- filename: "Ozone 9 Maximizer.vst3"
settings:
- name: "max_ceiling"
value: "-0.3"
- name: "max_threshold"
value: "-1.8"
- filename: "Ozone 9 Vintage Limiter.vst3"
settings:
- name: "vlm_ceiling"
value: "-1.00"
Good to Know
Certain plugins REQUIRE the UI to be shown at least once before they start processing. The current list of plugins where this issue has been encountered are:
IK Multimedia TR5 Classic Comp
The default location for VST3 plugins is
C:\Program Files\Common Files\VST3
If you have installed plugins without being able to choose a location they should be located in this folder.
Certain plugins might SHOW a parameter value e.g. “gain” “-3.5” but actually store it as “-3.49” or “-3.51” while not actually supportin “-3.5” as a value for “gain”. If an error occurs because of an invalid value, the console logs which values the parameter supports. There is currently no automatic correction to the nearest correct value. If the UI is used to configure a plugin however, only supported values are stored (as the “hidden” value is stored and not the “incorrect” value shown in the UI).
No matter the bit depth of the original audio, all samples are converted to 32 bit float, as pedalboard requires this specific bit depth for processing. After processing the samples are converted back to the original bit depth.
If any unexpected behaviour occurs check server.log and ensure that the logging level is set to debug (
level=logging.DEBUG
)