Juce Plugin

0 views
Skip to first unread message

Daisy Hughlett

unread,
Aug 4, 2024, 3:39:26 PM8/4/24
to odloperli
Thistutorial will help you to set up your computer and create an Projucer project for developing audio plug-ins (VST3 and AudioUnit) using JUCE. At the end, we will end up with an audio plug-in that says "Hello, World!" and can be loaded into VST3 hosts like Cubase or REAPER.

To create an audio plug-in with JUCE, create a new project in the Projucer and select Audio Plug-In as the project type. See Tutorial: Projucer Part 1: Getting started with the Projucer if you don't know how to do that.


In this tutorial we are creating a VST3 plug-in, so make sure that the VST3 setting is ticked in the "Plugin Formats" field. Then tick Plugin MIDI input and Plugin MIDI output in the "Plugin Characteristics" field below.


One of the challenges of building plug-ins is testing them. Thankfully, JUCE makes that easy, with a built-in plug-in host. To access the host go to extras/AudioPluginHost/ and open the .jucer file with the Projucer. Click Save Project and Open in IDE.... Then inside your IDE build the project to create a binary (which on Mac OS X you will find at extras/AudioPluginHost/Builds/MacOSX/build).


To build AAX plug-ins (for Pro Tools) you will need to contact Avid for a developer license in order to access their SDK. If you do obtain access to the AAX SDK you will notice that the Projucer has a path that you can set in its Global Preferences window.


I do my independent coursework for my informatics studies programming an audio plugin. Everything works well except the fact that when I close the plug-in in any DAW the whole DAW shuts down immediately. I am pretty sure it has something to do with ether a Slider or a Label in the GUI. I already wrapped all the components in ScopedPointers. When closing my plugin I get the following error. I hope you guys can help me out. Regards, Thilo


If I may quote Mr. Donal Knuth himself: The real problem is that programmers have spent far too much time worrying about efficiency in the wrong places and at the wrong times; premature optimization is the root of all evil (or at least most of it) in programming.


Not checking every time if every possible precondition is met is not an optimisation.

The SliderAttachment is not intended to work without a Slider, but a new user is often not aware, that the order you define your members has actually a meaning. When will they learn, if not by these mistakes?


The only problem could be that AudioProcessorValueTreeState::SliderAttachment and all AudioProcessorValueTreeState stuff in general is defined in the juce_audio_processors module while Slider is defined in juce_gui_basisc - so this addition would make juce_audio_processors a dependency for the module?


I would like to write some code to host VST plugins in my C++ application. It looks like the JUCE library may be helpful for this. Does anyone know where I can find a tutorial on how to host and connect together VST plugins in JUCE?


I've built the JUCE code and got the 'Plugin Host' sample working. It looks like the library will be able to do just what I want. My problem is that I'm finding the sample code hard to follow (not many comments etc). It also uses a lot of JUCE-specific coding for managing the UI and so on. I'm finding it hard to disentangle what I need to do to manage VST plugins from the other code in the sample.


Most of the sample Juce code is indeed very Juce-specific, and if you're going to use that platform I'd encourage you to stick with it and push through the samples, even though they may not be very pretty.


Apart from being able to use the DSP in other integrations, this also opens the door to easier debugging/development of DSP modules, as well a road toward better CI with actual tests for each module, etc.


After that a simple make worked fine.

I could bring up the Stand alone app - sound was kind of chunky, but I messed around with the audio settings and changed the buffer size and it mostly sounds better.


though i have been able to get other peoples NON-DaisySP JUCE CMAKE examples to compile and run without issue on OSX --this Daisy Sp JUCE example repo gives me nothing but an empty plugin when I finally am able to get it to compile (it compiles with errors coming from DaisySp).


the odd issue is that if i follow the directions exactly as on the github, the recurse module of DaisySp it gives me includes no Cmake.Lists file (possibly it points to an old version?) and will not compile due to that issue.


This is a very interesting project.

I followed the above steps and successfully cmake it.

However, there is no binary file anywhere in the builid directory

Where was the output?

I have changed the path of the header file.


In my juce fork, if JUCE_AUDIOPROCESSOR_NO_GUI C++ macro is defined, GUI stuff (that relies on X11) does not get built.

So the result is a juce static lib that makes no calls to X11, freetype or any kind of graphics stuff.

Your own plugin code will need the same treatment. The createEditor() call needs to return null.


HA! You already forked it. Right on. The thread I found was quite disappointing. I gathered some traditional FLOSS flame wars between the LV2 guy and the JUCE guy. I commend your resolve not to engage and keep making great work!


If I take the Crypt example and build it via the build script everything is fine, if I take the source and build after source local.env moddwarf then I am back to the same issue I have with v7 but it is using mod-workdir/moddwarf/host/usr/include/JUCE-6.0.7:


Obviously there is a point where JUCE7 becomes more of a hassle than not using it. It would be nice, though, to have a custom workflow (based on JUCE7) in place in the meantime. If and when full support comes (in the unforeseeable future!), I could then just remove the custom parts. Is my thinking.


Also if you have a lot of parameters then come up with some code that makes connecting them up in ConnectPort() and processing them Run(). So something like a Params class that handles a group of parameters, this can connect things, check if params have changed, check all params are correctly mapped etc.


When developping the plugin and testing it on a classical x86 linux, the library and plugin works fine and the convolution outputs some sound. But when we compile this plugin for ELK OS, it outputs nothing. We tested a few things and it happens that when we just convert form JUCE samples to the sample type of the library (wich is just float numbers too) and then back to JUCE, there is nothing out.


The structure, that we are going to implement, is the allpass-based parametric lowpass/highpass filter from the previous article. If you want, to understand how this structure works and why it is filtering, I invite you to read that article first. This article is purely a plugin implementation of the previously presented algorithm.


The JUCE framework is a C++ framework for building audio plugins and applications. It is very handy in audio plugin creation because it provides wrappers around specific APIs like VST3 or AAX. Therefore, we can write the plugin code once and build plugins for various digital audio workstations (e.g., Reaper, Ableton, ProTools, etc.).


Note that we set the parameters before any processing takes place. In other words, we set the parameters at the audio rate. If we did that every 60 ms, we would then have a separate control rate. 60 ms is short enough to be unnoticed by a human listener but long enough to decrease the processing overhead in the audio processing thread.


generateAudioPlugin options className specifies a nondefault plugin type, output folder, file name, or file type. You can use the -juceproject option to create a zip file containing generated C/C++ code and a JUCER project. Options can be specified in any grouping, and in any order.


generateAudioPlugin with no input arguments opens a user interface (UI) to generate and validate an audio plugin. The UI provides functionality equivalent to the command-line interfaces of generateAudioPlugin, audioPluginConfig, and validateAudioPlugin.


Type "audiopluginexample.Echo" into the Audio plugin class name field. Click Validate to validate the plugin. Click Generate to generate the plugin in the location specified by the Output folder field.


The generated plugin is ad-hoc code signed. You can use the codesign command in the macOS command line to manually code sign the plugin with your own certificate. Use the --force option to ensure that the ad-hoc signature is replaced. For more information, see the Apple documentation, Code Signing Guide.


Generates a standalone executable for your audio plugin. When you evaluate the generated code, the UI you defined in your audio plugin opens. You can control the input to your plugin and the output from your plugin using Options.


Specifies the file name of the generated plugin or zip file. The appropriate extension is appended to the fileName based on the platform on which the plugin or zip file is generated. By default, the plugin or zip file is named after the class.


Creates a 32-bit audio plugin. Valid only on win64 Windows platforms. This option does not support the coder.DeepLearningConfig("mkldnn") deep learning library configuration, the "Intel AVX (Windows)" code replacement library, or the "DSP Intel AVX2-FMA (Windows)" code replacement library.


Creates a Mac audio plugin for use on Intel and Apple Silicon. This option works only on Macintosh platforms. This option does not support the coder.DeepLearningConfig("mkldnn") deep learning library configuration or any code replacement libraries.


If you want to specify the plugin class by file name, and your plugin class is inside a package, you must specify the package as a file path. For example, the following syntaxes perform equivalent operations:


Build problems can occur when using folder names with spaces. For more information, see Build Process Support for File and Folder Names (Simulink Coder) and Why is the build process failing with error code: "NMAKE: fatal error U1073: don't know how to make 'C:\Program'"?.

3a8082e126
Reply all
Reply to author
Forward
0 new messages