All Projects → Cycling74 → gen-workshop

Cycling74 / gen-workshop

Licence: other
Materials for the gen~ workshop and presentation at GRAME

Programming Languages

C++
36643 projects - #6 most used programming language
c
50402 projects - #5 most used programming language
Max
122 projects

gen-workshop

Materials for the gen~ export workshop

Setup and Configuring JUCE to build a VST

We will be using JUCE to wrap our exported gen~ code, so there are some quick steps to follow to get everyting set up correctly.

  1. Download JUCE (see https://juce.com).

  2. Download the VST SDK from Steinberg. https://www.steinberg.net/en/company/developers.html; put the unzipped SDK wherever you like. I put it in ~/Documents

  3. The latest version of the VST SDK and the latest version of JUCE do not work together. Yes, I agree, it is a very silly state of affairs. We've included a patch that you can use to make the SDK compatible with JUCE. Pop open your terminal and run the following:

cd ~/Documents/VST_SDK
git apply ~/gen-workshop/vst-patch.diff

Note that this assumes that you put the VST_SDK in ~/Documents, and that the path to this repository is ~/gen-workshop

  1. Open up the Projucer. In the application menu on the top left, open up Global Paths.

Global Paths

  1. Navigate down to the field for the VST3 SDK path. Browse to the location of the VST3_SDK folder, within the VST SDK that you downloaded and unzipped in step 2.

VST3 Paths

  1. That should be it, the setup should be complete.

Building a VST/AU using gen~

In order to build a VST/AU using gen~, a little bit of finesse is required. We make use of the Projucer in order to create an XCode project that builds the appropriate plugin.

  1. Again, make sure that the Projucer is installed.
  2. In this repository directory, you will see a folder named JUCEPluginTemplate. Copy this folder any time you would like to build a new VST/AU using gen~. You should rename this folder.
  3. Within the copied folder, open the file C74ProjucerGenPlugin.jucer.
  4. Navigate to the Project Settings.

Project Settings Image

  1. Change the Project Name to be whatever you like. This will be the name of the plugin within any host application.

Project Name Image

  1. Change the Plugin Code to be anything unique. You may also change the Plugin Manufacturer Code and Plugin Manufacturer if you like. The only rule is, no two plugins may have the same Plugin Manufacturer Code and Plugin Code. The other only rule is, the Plugin Manufacturer Code and Plugin Code must contain at least one upper-case letter. Apple's own internal plugins may violate this rule, apparently.

Plugin Code Image

  1. Make sure that your Plugin Formats include the formats that you want to build. VST3 and AU are enabled by default, so if you want the legacy VST format you will need to include it here explicitly.

Plugin Targets

  1. Make whatever kind of gen~ patcher your heart desires, according to normal gen~ usage.

  2. Export the gen code. Don't change the exportname attribute. Also don't change the @title attribute, as this will change the name of the exported file. Be sure to export it to the Source folder of your new JUCE project. This where the JUCE project expects it to be (the header search path is configured to look for headers here).

Export Path Image

  1. Build the XCode project in JUCE. This should automatically open the XCode project.

Build JUCE Image

  1. Build the XCode project. Without the VST3 SDK installed, you'll need to build an Audio Unit. This will build the actual component.

Build XCode Image

  1. For Audio Units, this will install the component in ~/Library/Audio/Plug-Ins/Components. VSTs will install in ~/Library/Audio/Plug-Ins/VST

  2. Unlike VSTs, Audio Units must register with the OS after being installed in order to work correctly. If you find that the component is still not registered (you run auval -a from the command line and don't see your component), then there is one thing you can try (I don't understand why this is a solution). Return to JUCE, change the Plugin Code to anything, rebuild the XCode project and rebuild the plugin. Run auval -a again and you should see the plugin under the new name. You can then change the Plugin Code back. I don't know why this helps, but it does.

  3. That should be everything you need to do to build and install your plugin. From this point on, if you need to change your plugin, you need only export the code from Max and rebuild the plugin in XCode. You need not open JUCE again, unless you want to change the name of the plugin or some other configuration.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].