spotify / pedalboard

🎛 🔊 A Python library for audio.

Home Page:https://spotify.github.io/pedalboard

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add Support for VST2 Plugins

0xdevalias opened this issue · comments

It would be useful to have VST2 plugin support in Pedalboard. Right now, we can't any plugins that only come as VST2.

I've only done some cursory research on this, and I know that Steinberg has discontinued the VST2 SDK:

Based on what I read in #240, it seems Pedalboard is mostly based around JUCE for plugin loading. Doing some googling, it sounds like JUCE may have dropped support for VST2 at some stage (or plans to):

Though looking at the docs, I still see references to it:

Looking at JUCE's BREAKING_CHANGES.md:

  • https://github.com/juce-framework/JUCE/blob/master/BREAKING_CHANGES.md#version-540
    • Version 5.4.0

      The VST2 SDK embedded within JUCE has been removed.

      Possible Issues

      • Building or hosting VST2 plug-ins requires header files from the VST2 SDK, which is no longer part of JUCE.
      • Building a VST2-compatible VST3 plug-in (the previous default behaviour in JUCE) requires header files from the VST2 SDK, which is no longer part of JUCE.

      Workaround

      • The VST2 SDK can be obtained from the vstsdk3610_11_06_2018_build_37 (or older) VST3 SDK or JUCE version 5.3.2. You should put the VST2 SDK in your header search paths or use the "VST (Legacy) SDK Folder" fields in the Projucer.
      • For new plug-in projects where you will be releasing both a VST2 and VST3 version, and you want the VST3 plug-in to replace the VST2 plug-in in hosts that support it, then you should enable the JUCE_VST3_CAN_REPLACE_VST2 option.
      • When a new JUCE plug-in project is created the value of JUCE_VST3_CAN_REPLACE_VST2 will be set to zero.

      Rationale

      Distributing VST2 plug-ins requires a VST2 license from Steinberg. Following Steinberg's removal of the VST2 SDK from their public SDKs we are also removing the VST2 SDK from the JUCE codebase.

Looking at the VST3 SDK repo README, it has instructions for how to access the VST2 SDK:

  • https://github.com/steinbergmedia/vst3sdk#adding-vst2-version
    • Adding VST2 version

      The VST 2 SDK is not part anymore of the VST 3 SDK, you have to use an older version of the SDK and copy the vst2sdk folder into the VST_SDK folder.
      In order to build a VST2 version of the plug-in and a VST3 at the same time, you need to copy the VST2 folder into the VST3 folder, simply run the following commands:

      • for macOS:
      cd TheFolderWhereYouDownloadTheSDK
      ./copy_vst2_to_vst3_sdk.sh
      • for Windows:
      cd TheFolderWhereYouDownloadTheSDK
      copy_vst2_to_vst3_sdk.bat

See Also

Hi @0xdevalias!

Thanks for all of that research. As you quoted, VST2 is indeed discontinued. Steinberg no longer makes the VST2 SDK available for download, and they also require users of the SDK to receive a license. As of 2020, Steinberg seems to refuse to enter into any license agreements to use the VST2 SDK:

In 2013 Steinberg announced the end of the VST2 SDK release. Five years later, in October 2018, Steinberg no longer makes the VST2 SDK available and no longer enters into VST2 license agreements. Previously, maintenance and technical support for VST2 had already been discontinued. We regret to inform you that it is no longer possible to conclude a license agreement for VST2.

As such, Pedalboard can't load VST2 plugins as we can't legally obtain a license to use the VST2 SDK. We thus have no plans at this time to add VST2 support.

@psobot Thanks for clarifying. I figured that was likely to be the outcome, but wanted to officially capture it here in case (as I'm sure it will come up as a question for others in future as well)


To save anyone else's future time pondering on this, of the above resources, I think these 2 threads seem to touch on the potential 'legal loopholes' side of things (and potentially other methods for adding VST2 support to a new host/etc):

While I didn't read them entirely/thoroughly, they didn't seem to come to any particularly concrete solutions, aside from suggesting using existing VST3/etc plugins that could act as a host for VST2 plugins; one of which that was mentioned being Element:

One of those threads also mentioned the following project as a potential solution, but noted that it is GPLv3 licensed (which may or may not be an issue here, given this project is already open source):

  • https://git.iem.at/zmoelnig/FST/
    • FST - Free Studio Technology: header files for building audio plugins

    • this is a simple header file to allow the compilation of audio plugins and audio plugin hosts following the industrial standard of Steinberg's VST(2).

    • FST is the attempt to create a bona-fide reverse-engineered header file, that is created without reference to the official VST SDK and without its developer(s) having agreed to the VST SDK license agreement.

    • https://git.iem.at/zmoelnig/FST/-/blob/master/docs/REVERSE_ENGINEERING.md

I didn't deeply look into this, or other similar approaches, and as I'm not a lawyer, I couldn't say for sure if this would be a legally viable solution to the "Steinberg no longer licensing VST2 SDK" problem.