Mike Slinn

JUCE - Multiplatform C++ Framework for Audio Applications

Published 2025-04-13.
Time to read: 5 minutes.

This page is part of the av_studio collection.

The JUCE framework is a powerful and popular dual-license open-source multiplatfrom C++ framework for audio applications.

The JUCE library, now at version 7.0.10, was developed by Reuben Thomas and Tom Poole, who incorporated as Raw Material Software Limited. PACE Anti-Piracy Inc acquired Raw Material Software Limited in 2014.

JUCE is used in:

  • Ableton Push 3
  • BCR2000_Master
  • Focusrite Control
  • KnobKraft Orm - A cross-platform MIDI Sysex Librarian.
  • NeuralNote, the top-ranked open-source project that performs audio-to-MIDI conversion.
  • React-JUCE, an open-source hybrid JavaScript/C++ framework that enables a React.js frontend for a JUCE application or plugin.
  • Spotify Pedalboard, an open-source Python library for working with audio: reading, writing, rendering, adding effects, and more.
  • The open-source Tracktion Engine, which defines a high-level document object model for time-based, sequenced audio applications and provides an API to create, modify and play the generated audio.

iPlug2 and GPT

JUCE is not the only framework of its kind with mass adoption.

iPlug2 is an alternative C++ audio plug-in framework for desktop, mobile (iOS) and web.

iPlug 2 is a simple-to-use C++ framework for developing cross-platform audio plug-ins/apps and targeting multiple plug-in APIs with the same minimalistic code. It abstracts an audio plug-in (IPlug) and its drawing engine/GUI toolkit (IGraphics).

IGraphics is a simple graphics abstraction layer with good performance which contains a collection of common controls well suited for audio plug-ins, either using bitmap or vector graphics. IGraphics can use NanoVG, Skia and the HTML5 Canvas behind the scenes, providing many options depending on your requirements.

Alternatively, iPlug2 can be used with other UI toolkits. Examples are included showing how you can use technologies such as HTML/CSS or SwiftUI on top of a C++ DSP layer.

Help for iPlug2 is provided by iPlug2GPT, a customized GPT that you can use to learn how to use iPlug2.

Getting Started

As usual, I use WSL/Ubuntu to develop software, so these instructions are targeted at that platform.

The getting started topic seems like it should be the logical place to start, but actually it just gives a brief overview and offers no guidance regarding choices that developers need to make in order to work with JUCE on their computing platform.

I forked JUCE from its GitHub repository. The GitHub CLI has a to learn nice way of doing that. Please read my article on the GitHub CLI to learn how this feature works.

These are the commands I used:

Shell
$ cd $work # The directory tree where I store my work
$ git clone https://github.com/juce-framework/JUCE.git
$ cd JUCE
$ gh repo fork ✓ Created fork mslinn/JUCE ? Would you like to add a remote for the fork? Yes ✓ Added remote origin

In the future, when it is time to update the version of JUCE used by my application to the current HEAD, I will just type:

Shell
$ git pull upstream
remote: Enumerating objects: 141, done.
remote: Counting objects: 100% (141/141), done.
remote: Compressing objects: 100% (58/58), done.
remote: Total 141 (delta 80), reused 138 (delta 80), pack-reused 0
Receiving objects: 100% (141/141), 498.14 KiB | 2.59 MiB/s, done.
Resolving deltas: 100% (80/80), completed with 32 local objects.
From https://github.com/juce-framework/JUCE
    eac95d590..bbc63ba15  develop    -> upstream/develop
    7c2a5fc75..b9a1bfbc2  juce8      -> upstream/juce8
Already up to date. 

Here are some more getting started articles:

Visual Studio Code

The JUCE documentation mentions Visual Studio, but not Visual Studio Code, which concerned me. Visual Studio Code is a free, high-quality, feature-packed, cross-platform, like JUCE, and unlike the officially supported JUCE IDEs. In contrast, Visual Studio is an similar but not fungible commercial product with a free community edition. I use VS Code extensively and have no desire to invest time in another IDE just so I can work with JUCE.

I found this discussion, and this issue, which made me believe there was a way forward. Adding Visual Studio Code code completion

The forum had this solution.

I wonder why VScode is not properly supported and documented instead of the aging and problematic contenders? Inertia?

Projucer vs. CMake

The JUCE documentation says that Projucer, the JUCE project configuration tool, or CMake can be used, but there is no discussion of benefits or issues for either approach. Juce-cookbook has this discussion:

If you already know how CMake works, this will be your best option. The preview branch is very stable.

Projucer

The Projucer is an application that comes with the JUCE library. It handles the creation if IDE projects and Makefiles depending on the platform. All of your configuration is stored in a .jucer file, which internally is xml. Compiler flags, defines & includes can be set for each platform independently. Limitations come when you want to link against third party code. If you get to this point you should probably switch to CMake. This is definitely the fastest way of creating & running a project.

  • Quick Setup
  • Perfect IDE integration
  • Hard to link external code/libraries

CMake

CMake support is coming in JUCE version 6. This will let you simply write add_subdirectory(path/to/JUCE) in your CMake configuration. A guide can be found in the JUCE repository.

Example plug-in projects can be found here:

 – From juce-cookbook

This reddit post, written by a relatively new C++ programmer, strongly favors CMake.

Here is a tutorial.

Another reddit post has more information about using CMake with JUCE, including a mention of a Hello, world CMake tutorial for JUCE.

And the winner is: CMake!

Installing CMake

The installation commands are:

Shell
$ yes | sudo apt install build-essential gdb cmake
$ cmake --version cmake version 3.27.4
CMake suite maintained and supported by Kitware (kitware.com/cmake)

$ gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/12/lto-wrapper OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa OFFLOAD_TARGET_DEFAULT=1 Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 12.3.0-9ubuntu2' --with-bugurl=file:///usr/share/doc/gcc-12/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-12 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --enable-cet --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-12-NvGnOW/gcc-12-12.3.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-12-NvGnOW/gcc-12-12.3.0/debian/tmp-gcn/usr --enable-offload-defaulted --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 12.3.0 (Ubuntu 12.3.0-9ubuntu2)

Visual Studio Code

Visual Studio Code has good support for CMake.

The JUCE documentation mentions Visual Studio, but not Visual Studio Code, which concerned me. Visual Studio Code is a free, high-quality, feature-packed, cross-platform, like JUCE. In contrast, Visual Studio is an similar but not fungible commercial product with a free community edition. I use VS Code extensively and have no desire to invest time in another IDE just so I can work with JUCE.

I found this discussion, and this issue, which made me believe there was a way forward. Adding Visual Studio Code code completion

The forum had this solution.

VSCode Extensions

The C/C++ extension pack includes the following required extensions, plus other useful extensions:

I also installed the Makefile tools extension.

VSCode Documentation

JUCE Examples

Next I looked at the JUCE examples.

Videos

References

* indicates a required field.

Please select the following to receive Mike Slinn’s newsletter:

You can unsubscribe at any time by clicking the link in the footer of emails.

Mike Slinn uses Mailchimp as his marketing platform. By clicking below to subscribe, you acknowledge that your information will be transferred to Mailchimp for processing. Learn more about Mailchimp’s privacy practices.