WARNING: WORK IN PROGRESS. SOME SECTION MIGHT NOT HAVE ANY CONTENT OR ONLY A LIST WITH KEYWORDS FOR ME AS A TODO LIST.
A collection of examples & workflow tips related to the C++ library JUCE.
- Intro
- Disclaimer
- Code license
- Contribute
- How to read
- How to run examples
- Why JUCE
- Other libraries
- Online resources
- C++
- Getting started
- UI
- DSP
- MVC
- File IO
- Network IO
- OpenGL
- Custom modules
- Tracktion engine
- Unit tests
- Continuous integration
- Publish
- My wish list for JUCE
- What next
- Related resources
I started using JUCE because I wanted to make my own audio plugins and after doing a little bit research JUCE seemed to be the way to go.
Over the last couple of years, I have collected all of the resources related to JUCE that I could find. The list of bookmarked pages & code snippets have grown to quite a collection, so I decided to publish them as a cheat sheet for myself and everybody else who uses or wants to use JUCE.
I started with programming at the age of 10. C++ was my first and primary language for the first couple of years. I have since then used Python, JS & Golang. I currently studying computer science with a focus on embedded systems in Berlin.
I'm definitely not an expert in JUCE or C++. I do have a job as a C++ developer, but unfortunately not using JUCE. So if you find any problems in my examples, feel free to open an issue.
JUCE is published under a dual license, it is free for open source & small projects. You can find their license for JUCE 5 here.
All of my example code in this repository is published to the public domain under the Creative Commons CC0 1.0 license.
If you find any bugs or design problems in my examples feel free to open up an issue on GitHub.
If you want to add examples or resources to this collection you can either push a pull request directly or open up an issue first, if you have any questions. Please make sure that your topic is not already covered by one of the official JUCE tutorials. If you want to add to one of the official tutorials make sure you include a link to that page, so we can keep duplicate code as minimal as possible. Maintaining the same tutorial twice doesn't make much sense.
Each chapter can be read individually, feel free to jump around and find sections that are of interest to you.
All of the example projects included in this repository are normal Projucer
projects, so running them is the same as any other project created with the Projucer
- Download JUCE
- Build the Projucer
- Open example projects
.jucer
file & save to generate the build files - Open the project in your IDE (Visual Studio / XCode)
- Build
Make sure you add Projucer
to your PATH
.
cd $PROJECT_ROOT
Projucer --resave $PROJECT_NAME.jucer
cd Builds/LinuxMakefile
make config=[Release, Debug] -j8
Long story short, JUCE is a library which solves many common problems a developer might face during the creation of any kind of application.
It hides away a lot of complexity, which normally is not very fun to work with. This includes cross platform window creation, file I/O, networking and so on.
JUCE also comes with a collection of user interface widgets, such as buttons, combo boxes, menus, tabbed views and many more. A complete list can be found
in the JUCE documentation. Components
as they are called in JUCE form the basis of all user interaction in a JUCE application.
The appearance is easily customizable. If the ones provided by JUCE don't fit your needs you can also create your own, just create subclass from the Compoent
you want to customize and of you go.
- Wraps all common plugin types.
- Basic DSP & Analysis
- Vector instructions for x86 and ARM
- Easily use C++ for both Android & iOS
- Use native features
Of course JUCE is not the only library that helps you build desktop & mobile applications. There are a lot of open source frameworks & libraries that try to achieve similar goals.
The following list is definitely not complete, but should give you a good overview on what is available in the C++ ecosystem.
If you have been programming with C++ for a while, you probably heard of Qt. It's been around since the mid 90's and is currently being developed by The Qt Company.
The goal of Qt is to do it all. It runs on almost every platform including BSDs and embedded platforms. Because of this the whole framework is huge. While JUCE is around a couple of hundred megabytes, Qt is more in the range of a couple gigabytes.
Qt is also not really designed to help you write audio applications. There is no easy way to wrap a Qt application in an AudioUnit or VST plugin for example.
If your goal is to write a desktop application in the style of Gimp, FreeCAD or Blender and you need a lot of premade desktop widgets, Qt is probably the way to go.
Qt is free for open source projects, but a license for closed source application can become pretty expensive.
- very simple
- intended for games
- very simple
- intended for simple widgets
- works well with SFML
- cpp_box
The two most important resources when developing with JUCE are the official JUCE documentation & the JUCE forum.
The API documentation for JUCE is very good in my opinion. All of the classes & functions are clearly documented.
The same goes for the forum, every time I asked a question, it was answered on the same day, which compared to other communities is simply awesome.
If you like to learn using videos, you should be able to go from beginner to advanced using the resources found mainly on YouTube.
The JUCE team has their own YouTube channel, where yo can find all of the talks from the yearly Audio Developer Confrence (ADC)
. The content goes from general audio development to JUCE basics to advanced, companies showing of their workflow using JUCE and much more. I will link to specific talks in later sections.
The Audio Programmer is a YouTube channel which almost only does JUCE related development tutorials. He has videos for the basics on getting up & running with the library, introduction to Components
, an introduction to audio plugin development and interviews with people working in the audio developer industry. Each video is ~20-60min
long.
If you are new to C++ and audio this is a create place to start.
If you are already pretty good in the language and have a basic understanding of audio in the digital world these videos will probably be a little to slow for you.
- Book
- Discord
- New to C++
- Modern standard
- JUCE >= C++14
- C++17 Features
- C++20 Features
- Resources
- CppWeekly
- TheCherno
- CppCon, etc.
- Books
- Idioms
- Inheritance
- virtual / override
- Lambdas
- Constexpr
- Smart Pointer (unique & shared)
- Container (vectors & arrays)
- noexcept where possible
- const where possible
- Inheritance
- Tools
- IDE
- Visual Studio
- XCode
- Makefile
- Visual Studio Code
- CodeBlocks
- compiler
- warnings are your friend
- clang from source
- cross platform different warnings
- old versions in distros
- clang-tidy
- Visual Studio
- from terminal/python script
- clang-format
- A must
- Pick a standard
- Visual Studio integration
- python script
- compiler-explorer
- sanitizers
- gcc & clang
- Makefile/Scripts
- IDE
- AudioApp
- Plugin
- Projucer
- AudioPluginHost
- IDE Integration
- git submodules
- living at head
- comments
- GitHub Pages
- Doxygen
- readthedocs
- Linux
- Dependencies
- Ubuntu
- Arch
- Fedora
- Raspberry PI
- Basic Components
- Top list
- Projucer live build
- Tricks
- Animations
- LookAndFeel
- DSP module
- Gain example
- Compressor example
- AudioProcessor
- Plugins
- VST/AU
- ValueTree/Undo
- Why
- Example
- Talk
- Record/Playback
- Sampler
- OSC
- Arduino
- Text for 3 examples
- JUCE unit tests
- How to run them in a plugin build
- Catch2
- pluginval
Explaining the concepts of continuous integration
and continuous deployment
is far out of scope for this document, but TLDR: CI helps you find problems in your code faster. Every time you push to your version control server of choice (e.g. GitHub or GitLab) builds on various platforms start up. For example in my plugin project modEQ, I have builds for Windows, macOS & Linux. Since all of the platforms are using different compilers I get different warnings on each. Fixing all those little things as you go will save you a lot of time compared to developing exclusively on one platform and then trying to release it for a additional platform at the end.
There are many CI services online for free if your project is publicly available on GitHub or other platforms. I will focus on travis-ci
and appveyor
because those to combined will cover all desktop platforms JUCE supports (Windows, macOS & Linux).
- macOS
- Linux
- windows
- docs
- app/plugin
- GitHub releases
- zip
- installer/package
- FreeBSD support
- Build system
- More widgets
- Read the docs
- Read the source
- Read other app written in JUCE
- modEQ
- helm
- temper
- Faust
- YouTube
std::audio