`juce6` technical preview branch

Really looking forward to see examples of use for the new Attachment classes :slight_smile: I did a quick test yesterday, and I initialized my editor with the APVTS reference as an argument, AND I used a parameter ID to get an access to it :slight_smile:

1 Like

Hi JUCE team,

first of, thank you so much for this update. So many nice features, especially the native CMake support.

Test Setup

I created a project to put the preview branch through its paces. It can be found here: tobanteAudio/juce6-demo. I tested on:

  • Windows 10 (VS2019)
  • macOS 10.15
  • Linux (GCC9.2, Clang 9 & Clang trunk)

After the demo project almost worked perfectly, I decided to also port
my existing EQ tobanteAudio/modEQ to the preview branch. Also no major issues.

Issues

XCode

I found a couple of little issues. Most of them are listed in the demo project. But the most notable currently is that setting lto via CMake breaks the build on Xcode:

set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)

Error:

.../3rd_party/JUCE/modules/juce_audio_plugin_client/AUResources.r:96: ### Rez - Expected '-', '(', '!', '~', number, or system function (e.g. $$CountOf), but got 'Unknown token'
.../3rd_party/JUCE/modules/juce_audio_plugin_client/AUResources.r:96: ### Rez - Expected number, but got 'Unknown token'
.../JUCE/modules/juce_audio_plugin_client/AUResources.r:96: ### Rez - Invalid number.
.../JUCE/modules/juce_audio_plugin_client/AUResources.r:96: ### Rez - Expected '-', '(', '!', '~', number, or system function (e.g. $$CountOf), but got 'Unknown token'

The same setting works perfectly on all other platforms.

JUCE modules

The juce_add_module() command only works for headers ending in .h not .hpp

Suggested way of linking the shared plugin code to unit tests

I use Catch2 in both projects. The linking worked but I needed to manually configure more then I expected. See tests/CMakeLists.txt. What is the suggested way of doing this?

Linux VST3

During testing on Linux the build output should that it linked the VST3 executable, but I was not able to load it in either the JUCE Pluginhost or Bitwig Studio 2/3. Are there any special steps required?

1 Like

Is this only when building with CMake or does this also happen with a Projucer-generated build? Does it build the .vst3 folder in the build folder? What does this folder contain?

My demo project creates a vst3:

file build/plugin/Juce6DemoPlugin_artefacts/Juce6\ Demo.vst3/Contents/x86_64-linux/Juce6\ Demo.vst3
build/plugin/Juce6DemoPlugin_artefacts/Juce6 Demo.vst3/Contents/x86_64-linux/Juce6 Demo.vst3: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=5806494fadf2c28cbba0fa40d1776594bece8217, not stripped

The first try a couple of days ago, was with the AudioPluginHost build via CMake from the preview branch.

I just rebuild the AudioPluginHost with the Projucer & now I’m not able to scan for VST3s (Button is missing). Even though the VST3 option is explicitly enabled in the jucer file, under: modules/juce_audio_processors.

Reverting to a CMake build now has the same issue. The VST3 scan option is missing. Very weird, it was definitely there a couple of days ago, I was able to load 3rd party plugins

That looks incorrect, the plug-in inside x86_64-linux should have a .so file extension, not .vst3. I’ve just built the AudioPluginHost from the tip of the juce6 branch and can scan and load vst3 plug-ins without issue, and the AudioPluginDemo built after resaving with a freshly built Projucer is able to be loaded up in the AudioPluginHost as well as Reaper and Bitwig Studio.

This is the output from my demo project, no .so files:

build/plugin/Juce6DemoPlugin_artefacts
β”œβ”€β”€ JuceLibraryCode
β”‚   β”œβ”€β”€ Info.txt
β”‚   └── Release
β”‚       └── Defs.txt
└── Release
    β”œβ”€β”€ Juce6 Demo
    β”œβ”€β”€ Juce6 Demo.vst3
    β”‚   └── Contents
    β”‚       └── x86_64-linux
    β”‚           └── Juce6 Demo.vst3
    └── libJuce6 Demo_SharedCode.a

Building the AudioPluginDemo from a fresh clone via Projucer/Makefile does build the .so. I’m very confused:

➜  AudioPluginDemo make -C Builds/LinuxMakefile CONFIG=Release -j12      
make: Entering directory '/home/tobante/tests/AudioPluginDemo/Builds/LinuxMakefile'
Compiling include_juce_audio_plugin_client_VST3.cpp
Compiling Main.cpp
Compiling include_juce_audio_basics.cpp
Compiling include_juce_audio_devices.cpp
Compiling include_juce_audio_formats.cpp
Compiling include_juce_audio_plugin_client_utils.cpp
Compiling include_juce_audio_processors.cpp
Compiling include_juce_audio_utils.cpp
Compiling include_juce_core.cpp
Compiling include_juce_data_structures.cpp
Compiling include_juce_graphics.cpp
Compiling include_juce_events.cpp
Compiling include_juce_gui_basics.cpp
Compiling include_juce_gui_extra.cpp
Compiling include_juce_audio_plugin_client_Standalone.cpp
Linking AudioPluginDemo - Shared Code
Linking AudioPluginDemo - VST3
Linking AudioPluginDemo - Standalone Plugin
make: Leaving directory '/home/tobante/tests/AudioPluginDemo/Builds/LinuxMakefile'

➜  AudioPluginDemo tree Builds/LinuxMakefile/build
Builds/LinuxMakefile/build
β”œβ”€β”€ AudioPluginDemo
β”œβ”€β”€ AudioPluginDemo.a
β”œβ”€β”€ AudioPluginDemo.vst3
β”‚   └── Contents
β”‚       └── x86_64-linux
β”‚           └── AudioPluginDemo.so
└── intermediate

After further investigation, I noticed that when building the JUCE examples, only the PIP projects generate a valid VST3, when building all at once using CMake. Not the examples/CMake/AudioPlugin project.

OK, thanks for the info. We’ll look into it.

The original post said that JUCE 6 containers would provide more support for modern C++ iterators. Is there any more information available on this?

@LiamG See the 3rd post of the current thread. It contains links to a few relevant commits.

1 Like

I tried to reproduce this issue but wasn’t able to (macOS 10.15, cmake 3.17, Xcode 11.4). However, I found that when enabling LTO globally via INTERPROCEDURAL_OPTIMIZATION, the linker would crash with β€œbus error: 10” when linking the DemoRunner and UnitTestRunner. It seems that CMake uses -flto=thin when requesting LTO, whereas Projucer-generated projects simply add -flto. I’ll add a juce_recommended_lto_flags interface target which can be used to enable -flto on a target-by-target basis.

The plugin shared-code target now reexports the DEBUG/NDEBUG macros:

Module headers with .h and .hpp extensions are both recognised:

BinaryData targets may specify a custom header name:

JUCE now supplies some helper targets with recommended warnings, optimisation, and lto flags:

4 Likes

I tested the juce6 by building a demo app which also includes a local http server for serving the GUI. Unfortunately the UWP based Webview is not a good fit for loading an html based GUI served from localhost as UWP dissalows loopback. Webview pointed at localhost will simply render a blank screen.

While there is a way to disable this limitation in development, there’s nothing that can be done in production which does not break the sandbox security model.

// This enables Webview load from localhost, and disables all security for WebView on the PC, don't use in production!
CheckNetIsolation.exe LoopbackExempt -a -n=Microsoft.Win32WebViewHost_cw5n1h2txyewy

Chrome based Webview2 is not bound by these restrictions and would be an overall better choice, please consider adding support for it before the official release instead of Webview which

Webview has already been deprecated in WPF winforms and other places in favor of Webview2: https://docs.microsoft.com/en-us/windows/communitytoolkit/controls/wpf-winforms/webview

4 Likes

The Linux VST3 naming issue is now fixed on the juce6 branch:

1 Like

so juce6 + cmake is just amazing. thank you.

this morning I took our SCL/KBM juce, synth finished our juce 6 port and also activated juce 6 in our azure pipelines. microsoft gives free mac windows and linux builds to any opensource project on github, and so on every pull request I do a build on fresh VMs, and when i merge to master, i get a zip/dmg/tgz of the VST3/Standalone/AU posted as a release.

https://github.com/surge-synthesizer/tuning-workbench-synth is the code - and everything worked really well.

The basic trick was: make JUCE a git submodule and add a target to make a .dmg / .tgz / .zip of the final assets to my CMakeLists.txt and voila. Figured I would share in case any of you are trying similar things in your CI environment. Feel free to copy any of the things I did in the azure pipeline or cmake file to your projects. If you have any questions just hit me up on github or here.

And thanks again JUCE team!

11 Likes

Just awesome!!!

I tested the Linux VST3 fixes. Everything seems to work. I was able to load plug-ins in the AudioPluginHost & Bitwig.

All the other fixes work as well. I tested the hpp module headers, debug flags & LTO settings on all three desktop platforms.

Thank you.

The dsp::Convolution class has been updated to add some new features:

  • standard zero latency uniform partitioned convolution
  • uniform partitioned convolution with fixed latency
  • basic zero latency non-uniform partitioned convolution

We’ve also fixed some realtime safety issues.

10 Likes

Tiny data point: I switched my current project from latest stable to juce6 and had 0 issues compiling :sunglasses: Nice job!

1 Like

Looking good! Is live compilation coming with the official release? I’m seeing can't communicate with server when clicking β€˜download.’

I tried manually placing the old JUCECompileEngine.dylib in various directories and blowing away settings in ~/Library/Application\ Support/Projucer/ but I’m guessing the Projucer wants a 6.x version.