In this assignment, we welcome you to the world of JUCE, Plugin GUI Magic (PGM), and Faust! How? By downloading everything :) However there are some prerequisites. You will need:
Once you're all set, head over to the
class Gitlab
and clone the class repository. To include the PGM, JUCE, and Faust
submodules,
clone the repo with the --recursive
option
git clone --recursive https://cm-gitlab.stanford.edu/jos/320C-2022.git
This brings in PGM as a git submodule, which in turn brings in JUCE as PGM's submodule. It also brings in Faust as a submodule. If you have an existing install of JUCE, PGM, and/or Faust, you may clone 320C-2022 without cloning its submodules:
git clone https://cm-gitlab.stanford.edu/jos/320C-2022.git
PGM and Faust are still submodules, and the git
submodule
command will show you which commits would be
checked out, but they aren't cloned in this case.
The rest of this assignment is written as if you did clone the submodules above, so substitute your own clone path(s) as needed.
Projucer is a convient application that allows you to create and manage JUCE projects in conjuction with your preferred IDE. Most people use Projucer until they have so many projects with common configuration that they graduate to CMake.
The Projucer project files for Mac, Windows, and Linux can be found
at
~/JUCE/extras/Projucer/Builds/
. Here you can find IDE projects that were generated by
Projucer itself for these operating systems. Navigate to the folder
that matches your operating system and launch the project with your
preferred IDE. After building the Projucer application you can move
it to your Applications folder or whereever you want to store it.
Fire up your freshly born Projucer and you'll see a number of errors regarding your JUCE install. Move onto the next section to clear that up.
ln -s /abs/path/to/320C-2022/PGM ~/PGM
ln -s /abs/path/to/320C-2022/PGM/JUCE ~/JUCE
Don't forget to replace /abs/path/to/320C-2022
with
the
absolute path to your clone of the class repository. These two
ln
commands create symlinks to your installation of PGM and
JUCE. The class repository uses these symlinks, so the PGM and all
JUCE modules should always be found!
Launch Projucer and create a new Basic Plug-In project. Give your project a fun name like HW0HelloWorld
.
Note that Path to Modules
is set
to ~/JUCE/modules
already by default. If
your ~/JUCE
symlink is in place, you shouldn't encounter
any errors regarding your JUCE modules now. However, for
the foleys_gui_magic
module (also in the JUCE module
format, but distributed separately), you still need to manually
add ~/PGM/modules
to your User Modules
path,
by selecting the Projucer / Global Paths ...
menu item,
and setting User Modules
as shown below:
(If you later need more modules, such as your own modules [highly
recommended for all finished and reusable code], you can
set User Modules
to ~/modules
and
populate ~/modules
with symlinks
to foleys_gui_magic
and any other modules you ever use.)
Selected exporter
is what you really want. This should
generate your IDE-format project files and launch your IDE. Set the
active IDE scheme to build a Standalone Plugin
and hit
(Build and) Run in your IDE. This should automatically launch a
standalone version of demo "Hello World" plugin.
Standalone Plugins are great for debugging and testing, but the whole
point of a plug-in is that it plugs into another
application. Change your active scheme to be either VST3
(for most DAWs) or AU
(for Apple DAWs such as Logic Pro
X). After building, launch your DAW and you should be able to load
your "Hello World" plugin inside your DAW.
The JUCE platform is great for allowing you to build applications for many different platforms. Right now your plugin doesn't do anything, but we'll soon change that!