Welcome to Our Juce 6 Tutorial Series.

Welcome to our JUCE 6 Tutorial FREE YouTube Tutorial Series and this Tutorial 00.  In this Series Josh Hodge will introduce you to JUCE 6 and how to use it to build your own Audio Software and Plugins.  Along the way, Stu Last will be adding tips, explanations and alternative approaches in our new Tutorial Supplementaries.  We’ll also be adding a transcription of Josh’s YouTube Tutorial to really help you get to grips with the JUCE 6 Framework.

In Tutorial 00 Josh will guide you through getting JUCE 6 from the code repository on github.com, how to build it on your Mac, and how to switch between JUCE 5 and JUCE 6.  Stu will give some pointers on installing JUCE on Windows 10 machines, and how to create a “multi JUCE” environment.  

How to use these tutorials.

Stu recommends watching Josh’s YouTube video first, and working through the examples with Josh.  Then jump on over to Stu’s Tutorial Supplementary and read the additional material.  You’ll find the Tutorial Supplementary and Transcription Below.

YouTube Video Transcription

— Transcription Begins —

– Josh Hodges:

(00:00) “Hey what’s up everybody? I’d like to welcome to another JUCE tutorial. In this tutorial we’re going to talk about how to build JUCE from the actual repo that’s on Git Hub. The reason that we want to do this is if we want to start experimenting with some of the new features in JUCE 6 we can do this by switching over to the JUCE 6 branch that we see here on the JUCE GitHub repo at [Github.com/juce-framework/JUCE](https://github.com/juce-framework/juce).

(00:29) I’m going to show you how to switch over to the branch and I’m also going to show you a few things that had me caught out for a little bit and had me stuck for a second – one of things I found out was that I didn’t read the “README” correctly. One of the big things to know is you have to read the Readme in order to actually build these things correctly.

(00:50) So before we get started if you like tutorials like this and you want to see more of them be sure to support us on (Patreon.com/TheAudioProgrammer)[https://www.patroen.com//TheAudioProgrammer] and we also have a free audio development community. If you’d like to join and link up and network with other audio developers, help each other solve problems and discuss all things audio programming, you can join us on (TheAudioProgrammer.com/community)[https://TheAudioProgrammer.com/community]. So lets get started…

(1:19) The first thing we want to do do is want to actually clone the JUCE GitHub repo link. We can do that just by clicking on this arrow and we will just copy this link here. I’m going to go a little bit slower for people who are just starting out and may not be as familiar with command line and repos and these sort of concepts so for more experienced developers please bear with us as we go a little bit slowly for people who are looking to keep up.

(1:53) Now we are in our command line and the first thing that we want to do is we would like to go to our applications folder. This may be a little bit different if you are on a windows or if your using Linux, but this is how you do it on OSX. What we need to do is get into this directory so what we will do is the command “cd” which is “change directory” and then we will just go into our applications folder. Actually I need to go here and there’s our applications folder, and actually you can just take this and drag it, like so, and then press “enter” and now we are inside our applications folder in our command line.

(2:38) So now, I think I need to copy this again so we would just copy this, and now what I’m going to do – I’m in the applications folder – and now I’m going to “clone” this repo into the application folder. Type the command “git clone ” and then paste the link and hit enter and now we see that there’s this new JUCE folder that’s in there. So at the moment I don’t even have JUCE on my computer, I’m just cloning this (I’ve actually delete Juce), and I’m just cloning this from new. You see that we are now cloning the repo.

(3:18) Also I have some tutorials on how to use the command line, “command line basics”. Those are on my YouTube page. I can’t remember what the links are. I’ll actually just link you to them – should be in the top Right Hand Corner (?) of this tutorial and I’ll put a little card there if you’re curios about some of these command line basics.

(3:38) So, currently we are receiving everything – we should be done monetarily – he we are. So, now it’s done cloning the repo and if we click into the JUCE folder, what we’ll see is that unlike when you actually download JUCE from the website, there’s actually no Projucer in this directory. Normally we’d see the Projucer and, I believe, the Demo Runner in this directory and we don’t see it.

(4:10) So, Projucer, we actually have it in “extras”, so if we go to “extras”; we go to “Projucer” and then into builds – and all of this is in the “Readme” by the way – and into “MacOSX” and then… Oh! Did I miss something? Yeah what we need to do is build this. Let me show you something that I did is I actually used the Projucer and that can give you an error – I’m not going to go through the whole thing with you, I’ll do that when I switch branches.

(4:56) Essentially, what the “Readme” will tell if you read the “Readme” is you actually need to build it from the XCode project rather than the from the Projucer. In your MacOS folder, you’ll see a Projucer.xcodeproject – I imagine this will be a Visual Studio Project if you’re on Windows – and so we actually need to launch that and build from that source code.

(5:19) Now we’re just going to build the Projucer, and this will take a second so I’ll be back when this is done … Okay, so here we are, we see that this has built successfully and that this has created a New Project so this has actually launched the Projucer for us. Now if we go into our folder here we see a new folder that says “build” and then in “debug” and then our Projucer is actually there and we can take this and drag this over to our shortcuts now, and now that’s fine.

(5:51) Now I’m going to show you a couple of things that had me stuck when I was actually doing this. Lets say I want to start exploring some of the features in JUCE 6. If we go to the repo here we have 3 branches – a “Master” branch, a “Develop” branch and a “juce6” branch. We can also do that here by doing “git branch –all” – ah – I’m sorry, I’m not in the JUCE folder at the moment – I’m in the application folder – so I need to “cd JUCE/” and now I do “git branch –all” and now we see that this shows us all our branches at the moment. If we try to switch branches at the moment we’re not going to be able to because we changed the actual branch – so I’m just going to reset this by “git reset –hard” like this. If I do “git branch –all” and we see we have a juce6 branch – so what I can do, if I want to switch over to explore juce6, I can do “git checkout juce6” and now we see that we’ve switched over the new branch “juce6”

(7:36) Now what we’ll do, one of the first things we can do, lets just try to do something from the Projucer. We have our Projucer, so let’s just try to create a new project – we’ll call this “Project 5”. I’ll create it, then we’ll try to open it up in the IDE as usual, and now we will just try to build it and let’s see what happens.

(8:06) We see that we get this error that says “This project was saved using an outdated version of the Projucer.” So now we have a problem in that we are in the “juce6” branch but we are using the “JUCE 5” Projucer. What we need to do is to back to our XCode project, click on this again and then we need to actually rebuild this which is going to take a second. I’m going to show you another thing that caught me out the first time that I was doing this.

(8:51) We see that we’ve got a build succeeded here, but one think that you’ll notice if your looking very carefully, is you’ll see down here in our console, “another instance is running” and then it says “quitting: Shutdown.” If you see this it means your actually running the Projucer, so the old version of the Projucer is actually still running. What we need to do is quit out of that in order for us to be able to build the new version properly. So lets just click it again and see that we now don’t get that dialogue any more.

(9:23) Now, here we are, and we see that the JUCE 6 project builder actually looks a little bit different than the JUCE 5 so we have an updated look here. What we can do is save a new project, we’ll just call this “newproject6”, we’ll do create project, then it asks you to save it somewhere, we’ll save it to the desktop and then I’ll just quit out of the Projucer.

(09:58) This should open up our IDE, I actually I think I quite before it actually opened up our new project, but that’s okay – doesn’t matter. Now, let’s say that we have our new JUCE 6 Projucer and now we’ve experimented with some feature and now we want to go back to JUCE 5, to our “Master” branch where we have, let’s say, a number of projects that we are working on that are actual industry projects. So now what we can do is “git checkout master”, and so we go back to the master branch. On thing to keep in mind is that, okay, I’m going to open up the Projucer again and we will see that, when we open up the Projucer, still the JUCE 6 Projucer. So that’s a problem because we’re not going to be able to build JUCE 5 Projects from this Projucer.

(11:01) I’m not going to run through the whole thing but essentially were going to get some sort of weird area. Let’s just do it real quick – why not? We’ll do “newProject6” and then we’ll do “Create Project” and then we see some sort of weird dialogue, but that doesn’t matter, and let’s just “open in IDE” and lets just try and build and show you that, I believe that we will get a strange error here, a linker error, when we do this.

(11:36) So I’m back and as you can see we have this linker error that says “Rez failed with exit code 3”. Basically this isn’t going to build properly with this Projucer. So you’re using a JUCE 6 Projucer to try to build with JUCE 5 (5.4) modules and files. So that’s not going to work. So once again we’re have to go back up to the Projucer file – so don’t go to the Projucer file but we actually have go to the XCode project. Double click here, then we have to build this.

(12:14) Okay, so we’ve got build succeeded, but once again, if you’re paying attention down at the bottom, you’ll see that I’m actually running the newer version of the Projucer, so because of that it won’t let me overwrite that Projucer and it says that “Another instance is running – quitting… Shutdown.” So what we need to do is quit out of that Projucer in order to actually overwrite it with the correct version, and now we have the correct version.

(12:45) So what are the main points of this?

  1. That when you’re using a different branch of JUCE what you’ll need to do is you’ll need to use the XCode project to actually build the correct version of Projucer.
  2. You will not have the Projucer in the JUCE Folder, like if you downloaded it from the JUCE website so you will actually need to build that yourself and then just sae it as a shortcut – just drag it over here.
  3. Every time you switch branches make sure that you quit out of all your Projucer Instances and that you actually build from the XCode project.
  4. Perhaps, the most important lesson is read the README. That is so important or else you’ll be bound to have problems.

I hope you enjoyed this tutorial and we’re going to be doing some JUCE 6 tutorials very soon and I’ll see next time.”

— End of Transcription —


This YouTube tutorial was published before JUCE 6 was formerly released. JUCE6 is now available as a download from http://juce.com .

Multiple, simultaneous versions of JUCE using dowloads from JUCE Website.

It is entirely possible for multiple versions of JUCE to coexist on the same machine and to be accessed independently without rebuilding, although it does take a little organisation and appropriate naming. The following example is shown for Windows users.

JUCE can be stored anywhere on your drives, although permanent drives are better suited to build environments than USB/Portable drives. In this example we are going to install side by side, and create links to the appropriate Projucer. I’m assuming that, for Windows user, the C:drive is the default drive.

Creating space for multiple versions of JUCE.



Install Muliple Versions Of JUCE - Step 1 screenshot

Step 1:

On the C:/ Drive create a folder called “JUCE” at the root (top level)

Installing Multiple Versions of JUCE - Step 2 screenshot

Step 2:

Within this JUCE folder, you can create additional folder levels for different versions of Juce.  In this example we are working with an existing installation of JUCE 5, which I have moved into the “C:/JUCE/Juce 5” folder and will install a copy of JUCE 6 in the “C:/JUCE/Juce 6” folder.
Install Multiple Versions of JUCE - Step 3 screenshot

Step 3:

Windows keeps a track of .exe files when they move folders, so there should be no need for the next step, but in case it doesn’t work as expected, you can still create a new link to the JUCE 5 Projucer by going into the JUCE 5 folder, locating the Projucer.exe file, right clicking it and selecting “Send to > Desktop”. Once a link has been created on your desktop, you can rename it by right clicking on the link, choosing “rename” and entering your own name for the link. I’ve chosen “Projucer 5”.

Install Multiple Versions of JUCE - Step 4 screenshot

Step 4:

Now that the JUCE 5 install has been moved we’re going to encounter an issue with the location of JUCE modules etc. To fix this open up your newly created JUCE 5 link from you desktop (or from the C:/JUCE/Juce 5 folder). Ignore any “Update to JUCE 6” prompts, log in if necessary and you should see an dialog box with the message “Set JUCE path”. This is what allows us to have multiple versions of JUCE on our system. Click on the “Set Path” button. If the message does not appear, go to “File > Global Paths” to set your paths.

Step 5:

 Near the top of the “Global Paths” form, you’ll see fields for “Path to JUCE” and “JUCE modules”. If you’ve been following along using the same drive and folder structure as me, the “Path to JUCE” for the JUCE 5 installation should be “C:\JUCE\Juce 5” and the path to “JUCE Modules” should be “C:\JUCE\JUCE 5\modules”. You can either enter this information in manually or, like me, be certain and use the elipsis to open a file browser to navigate to the right folder (better safe than spend hours debugging).

To test that all has gone well, you can now use the JUCE 5 Projucer to create a new project, open it up in Visual Studio (or whatever your preferred IDE is), and build the project.

These steps of moving JUCE 5 from the C:\JUCE directory to a specific C:\JUCE\Juce 5 directory shows the flexibility we have with where to install JUCE and this is what gives us the power to install a different version of JUCE on our computer, which is what we’ll cover next.

Installing That Second Version of JUCE

 Now that we’ve made space for a second version of JUCE we can now download the latest version of JUCE directly from http:/juce.com. Once downloaded, the zip file can be extracted and content copied into “C:\JUCE\Juce 6”. We repeat the steps used for our “Juce 5” install above insofar as we create a shortcut on our desktop, rename the shortcut and double click on it. This time, though, the UI looks a little different so to make sure our Projucer 6 is looking at the correct folder these steps are just a little different.

Install Multiple Versions of JUCE - Step 6 screenshot
Open up the JUCE 6 Projucer, either by clicking on the newly created (and renamed) desktop shortcut, or by navigating to the C:\JUCE\Juce 6 in our folder hierarchy.  Once any “update” messages have been ignored, and you’re logged in, navigate to “File > Global Paths” and set your global paths.

 Switching between Projucer Versions.

The downside is that, regardless of which version of Projucer you’re using, it is currently hard-wired into the Projucer software to read your settings from a single file contained in (on Windows) , C:\Users\username\AppData\Roaming\Projucer\Projucer.settings. The upside is that the workaround is no hardship, and is certainly easier than switching branches and rebuild Projucer each time you want to work on a different version. There are 2 ways of achieving the switch.

 Method 1.

Open up the file C:\Users\username\AppData\Roaming\Projucer\Projucer.settings with any text editor. Near the top of the file you’ll see <VALUE name="PROJECT_DEFAULT_SETTINGS"/> <PROJECT_DEFAULT_SETTINGS jucePath="C:\JUCE\Juce 6" defaultJuceModulePath="C:\JUCE\Juce 6\modules"/> </VALUE> Simply edit the jucePath value and defaultJuceModulePath value to point to your preferred JUCE version (an obvious and simple folder naming scheme comes in handy here)

Method 2.

As described in the initial set up of the 2 versions of JUCE on your computer, you can open up either Projucer version (it doesn’t matter which one as you’ll have to restart it anyway), go to “File > Global Paths” and change the path to your preferred version of JUCE. Close and Reopen Projucer to apply the changes.

Getting Specific “Branches” from Github and Installing Them in Branch Specific Folders.

There is a little used way of getting a branch from GitHub (or any other Git Repo Service) and cloning it to it’s own “branch specific” folder. This can be very useful if, for example, you wanted to clone and run different branches of JUCE on your computer. In this example, we’ll clone the Master Branch of JUCE and the Development Branch of JUCE into separate folder on our computer in our already created “C:\JUCE” folder. Assuming you’ve already got GitBash installed (see below for more information), you can right click on the C:\Juce folder to open the context menu, and open up a GitBash terminal instance, or you can open up GitBash from your start menu and navigate to the appropriate folder. Note that GitBash uses Linux style shell commands so it’s “ls” not “dir” to get a directory/file listing. Once you’ve got your GitBash terminal open you can use it to grab individual branches and assign them to specific folders. In the case of JUCE, we can use the following to grab the master branch and assign it to a folder I’m going to call “stable” git clone https://github.com/juce-framework/JUCE --single-branch -b master stable The –single-branch flag is self explanatory, the “-b” flag defines the specific branch you wish to grab (“master”). The very last argument is the target directory, which cannot already exist and will be created during the cloning process. If you now cd stable you will see you have the JUCE repo within it. If you then git branch it should only show the “master” branch. We can repeat the process for the “develop” branch, which I’m going to put in a folder called “experimental” git clone https://github.com/juce-framework/JUCE --single-branch -b develop experimental You can than build each independently without the need to keep switching branches and, using the method described above, easily switch between Projucer and JUCE versions.

A Word About GitHub “Releases”

Another way that Git offers for keeping a history of code is through the use of “Releases”.  A Release us a tag that the developers attach to a particular point in a projects evolution to denote a version of the software.  In this supplemental on JUCE, we’ve been talking in terms of JUCE 5 and JUCE 6, which are major releases, but many people are familiar with finer granularity of releases such as JUCE 5.4.1. which is a sub-release that will normally contain fixes, performance improvements and minor changes but do not normally signigy a major change in the UI or functionality of the software.
Getting hold of specific releases is very much like getting hold of a specific branch because Git treats the Release “tag” as a branch name.  For example, if you wanted to get JUCE 5.3.2 you could use the following clone statement
git clone https://github.com/juce-framework/JUCE --single-branch -b 5.3.2 "Juce 5.3.2" 
*Note the use of quotation marks to denote a target folder containing spaces and full stops.
You can then use one of the two methods for switching JUCE version already described above to point to the appropriate modules and folders.

What is the GitSCM and GitBash and How to Get Hold of Them.

Git bash is a terminal “shell” used to interact with the computer file system and git via a terminal (also known as a command line interface or command prompt). On windows you can download and install it from https://gitforwindows.org/. The cool thing about git for windows is that, as well as adding access to git commands to your computer, it also adds a contextual link (open from file and folder by right clicking) and it gives windows users access to linux style shell commands – pretty useful when working in mixed teams.

On MacOSX, the easiest way to get hold of the Git SCM is to install Xcode as this comes pre-packaged.

For Linux users you may need to check for instructions on your own particular Linux flavour, but when I last checked, Git was pretty ubiqitous, and so something as simple as apt-get install git or yum install git should do the trick (not forgetting sudo if you require the permissions).

The Audio Programmer Logo

Connect with the Audio Programmer community and find out about new tutorials, jobs, and events!

You have Successfully Subscribed!