- clean working copy for leaving SVN

This commit is contained in:
2022-06-28 19:04:46 +02:00
parent 62a2d47cb3
commit 762b8f0e7d
1966 changed files with 699872 additions and 126 deletions
@@ -0,0 +1,168 @@
# Automatically generated makefile, created by the Introjucer
# Don't edit this file! Your changes will be overwritten when you re-save the Introjucer project!
# (this disables dependency generation if multiple architectures are set)
DEPFLAGS := $(if $(word 2, $(TARGET_ARCH)), , -MMD)
ifndef CONFIG
CONFIG=Debug
endif
ifeq ($(CONFIG),Debug)
BINDIR := build
LIBDIR := build
OBJDIR := build/intermediate/Debug
OUTDIR := build
ifeq ($(TARGET_ARCH),)
TARGET_ARCH := -march=native
endif
CPPFLAGS := $(DEPFLAGS) -std=c++11 -D "LINUX=1" -D "DEBUG=1" -D "_DEBUG=1" -D "JUCER_LINUX_MAKE_7346DA2A=1" -D "JUCE_APP_VERSION=1.0.0" -D "JUCE_APP_VERSION_HEX=0x10000" -I /usr/include -I /usr/include/freetype2 -I "~/SDKs/VST3 SDK" -I ~/SDKs/vstsdk2.4 -I ../../JuceLibraryCode -I ../../../../modules
CFLAGS += $(CPPFLAGS) $(TARGET_ARCH) -g -ggdb -fPIC -O0
CXXFLAGS += $(CFLAGS)
LDFLAGS += $(TARGET_ARCH) -L$(BINDIR) -L$(LIBDIR) -shared -L/usr/X11R6/lib/ -lX11 -lXext -lXinerama -lasound -ldl -lfreetype -lpthread -lrt
LDDEPS :=
RESFLAGS := -D "LINUX=1" -D "DEBUG=1" -D "_DEBUG=1" -D "JUCER_LINUX_MAKE_7346DA2A=1" -D "JUCE_APP_VERSION=1.0.0" -D "JUCE_APP_VERSION_HEX=0x10000" -I /usr/include -I /usr/include/freetype2 -I "~/SDKs/VST3 SDK" -I ~/SDKs/vstsdk2.4 -I ../../JuceLibraryCode -I ../../../../modules
TARGET := JuceDemoPlugin.so
BLDCMD = $(CXX) -o $(OUTDIR)/$(TARGET) $(OBJECTS) $(LDFLAGS) $(RESOURCES) $(TARGET_ARCH)
CLEANCMD = rm -rf $(OUTDIR)/$(TARGET) $(OBJDIR)
endif
ifeq ($(CONFIG),Release)
BINDIR := build
LIBDIR := build
OBJDIR := build/intermediate/Release
OUTDIR := build
ifeq ($(TARGET_ARCH),)
TARGET_ARCH := -march=native
endif
CPPFLAGS := $(DEPFLAGS) -std=c++11 -D "LINUX=1" -D "NDEBUG=1" -D "JUCER_LINUX_MAKE_7346DA2A=1" -D "JUCE_APP_VERSION=1.0.0" -D "JUCE_APP_VERSION_HEX=0x10000" -I /usr/include -I /usr/include/freetype2 -I "~/SDKs/VST3 SDK" -I ~/SDKs/vstsdk2.4 -I ../../JuceLibraryCode -I ../../../../modules
CFLAGS += $(CPPFLAGS) $(TARGET_ARCH) -fPIC -Os
CXXFLAGS += $(CFLAGS)
LDFLAGS += $(TARGET_ARCH) -L$(BINDIR) -L$(LIBDIR) -shared -fvisibility=hidden -L/usr/X11R6/lib/ -lX11 -lXext -lXinerama -lasound -ldl -lfreetype -lpthread -lrt
LDDEPS :=
RESFLAGS := -D "LINUX=1" -D "NDEBUG=1" -D "JUCER_LINUX_MAKE_7346DA2A=1" -D "JUCE_APP_VERSION=1.0.0" -D "JUCE_APP_VERSION_HEX=0x10000" -I /usr/include -I /usr/include/freetype2 -I "~/SDKs/VST3 SDK" -I ~/SDKs/vstsdk2.4 -I ../../JuceLibraryCode -I ../../../../modules
TARGET := JuceDemoPlugin.so
BLDCMD = $(CXX) -o $(OUTDIR)/$(TARGET) $(OBJECTS) $(LDFLAGS) $(RESOURCES) $(TARGET_ARCH)
CLEANCMD = rm -rf $(OUTDIR)/$(TARGET) $(OBJDIR)
endif
OBJECTS := \
$(OBJDIR)/PluginProcessor_a059e380.o \
$(OBJDIR)/PluginEditor_94d4fb09.o \
$(OBJDIR)/juce_audio_basics_399a455e.o \
$(OBJDIR)/juce_audio_devices_c1c9ba9c.o \
$(OBJDIR)/juce_audio_formats_f04b043c.o \
$(OBJDIR)/juce_audio_processors_eb9ae116.o \
$(OBJDIR)/juce_audio_utils_cf18005c.o \
$(OBJDIR)/juce_core_1ee54a40.o \
$(OBJDIR)/juce_data_structures_84790dfc.o \
$(OBJDIR)/juce_events_584896b4.o \
$(OBJDIR)/juce_graphics_f9afc18.o \
$(OBJDIR)/juce_gui_basics_90929794.o \
$(OBJDIR)/juce_gui_extra_b81d9e1c.o \
$(OBJDIR)/juce_PluginUtilities_65545a8.o \
$(OBJDIR)/juce_VST_Wrapper_8aa348b1.o \
$(OBJDIR)/juce_VST3_Wrapper_788e19af.o \
.PHONY: clean
$(OUTDIR)/$(TARGET): $(OBJECTS) $(LDDEPS) $(RESOURCES)
@echo Linking JuceDemoPlugin
-@mkdir -p $(BINDIR)
-@mkdir -p $(LIBDIR)
-@mkdir -p $(OUTDIR)
@$(BLDCMD)
clean:
@echo Cleaning JuceDemoPlugin
@$(CLEANCMD)
strip:
@echo Stripping JuceDemoPlugin
-@strip --strip-unneeded $(OUTDIR)/$(TARGET)
$(OBJDIR)/PluginProcessor_a059e380.o: ../../Source/PluginProcessor.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling PluginProcessor.cpp"
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
$(OBJDIR)/PluginEditor_94d4fb09.o: ../../Source/PluginEditor.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling PluginEditor.cpp"
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
$(OBJDIR)/juce_audio_basics_399a455e.o: ../../../../modules/juce_audio_basics/juce_audio_basics.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling juce_audio_basics.cpp"
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
$(OBJDIR)/juce_audio_devices_c1c9ba9c.o: ../../../../modules/juce_audio_devices/juce_audio_devices.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling juce_audio_devices.cpp"
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
$(OBJDIR)/juce_audio_formats_f04b043c.o: ../../../../modules/juce_audio_formats/juce_audio_formats.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling juce_audio_formats.cpp"
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
$(OBJDIR)/juce_audio_processors_eb9ae116.o: ../../../../modules/juce_audio_processors/juce_audio_processors.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling juce_audio_processors.cpp"
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
$(OBJDIR)/juce_audio_utils_cf18005c.o: ../../../../modules/juce_audio_utils/juce_audio_utils.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling juce_audio_utils.cpp"
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
$(OBJDIR)/juce_core_1ee54a40.o: ../../../../modules/juce_core/juce_core.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling juce_core.cpp"
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
$(OBJDIR)/juce_data_structures_84790dfc.o: ../../../../modules/juce_data_structures/juce_data_structures.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling juce_data_structures.cpp"
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
$(OBJDIR)/juce_events_584896b4.o: ../../../../modules/juce_events/juce_events.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling juce_events.cpp"
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
$(OBJDIR)/juce_graphics_f9afc18.o: ../../../../modules/juce_graphics/juce_graphics.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling juce_graphics.cpp"
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
$(OBJDIR)/juce_gui_basics_90929794.o: ../../../../modules/juce_gui_basics/juce_gui_basics.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling juce_gui_basics.cpp"
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
$(OBJDIR)/juce_gui_extra_b81d9e1c.o: ../../../../modules/juce_gui_extra/juce_gui_extra.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling juce_gui_extra.cpp"
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
$(OBJDIR)/juce_PluginUtilities_65545a8.o: ../../../../modules/juce_audio_plugin_client/utility/juce_PluginUtilities.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling juce_PluginUtilities.cpp"
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
$(OBJDIR)/juce_VST_Wrapper_8aa348b1.o: ../../../../modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling juce_VST_Wrapper.cpp"
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
$(OBJDIR)/juce_VST3_Wrapper_788e19af.o: ../../../../modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling juce_VST3_Wrapper.cpp"
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
-include $(OBJECTS:%.o=%.d)
@@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist>
<dict>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>com.juce.JuceDemoPlugin</string>
<key>CFBundleName</key>
<string>JuceDemoPlugin</string>
<key>CFBundlePackageType</key>
<string>TDMw</string>
<key>CFBundleSignature</key>
<string>PTul</string>
<key>CFBundleShortVersionString</key>
<string>1.0.0</string>
<key>CFBundleVersion</key>
<string>1.0.0</string>
<key>NSHumanReadableCopyright</key>
<string>Raw Material Software Ltd.</string>
<key>NSHighResolutionCapable</key>
<true/>
<key>AudioComponents</key>
<array>
<dict>
<key>name</key>
<string>Raw Material Software: Juce Demo Plugin</string>
<key>description</key>
<string>Juce Demo Plugin</string>
<key>factoryFunction</key>
<string>JuceDemoProjectAUFactory</string>
<key>manufacturer</key>
<string>RawM</string>
<key>type</key>
<string>aumf</string>
<key>subtype</key>
<string>Jcdm</string>
<key>version</key>
<integer>65536</integer>
</dict>
</array>
</dict>
</plist>
@@ -0,0 +1,19 @@
Microsoft Visual Studio Solution File, Format Version 9.00
# Visual C++ Express 2005
Project("{45F7ED0D-469F-7EB0-7B2E-D2EAA2170C4E}") = "JuceDemoPlugin", "JuceDemoPlugin.vcproj", "{64F92774-5695-B20A-C63E-7690CA0ECE34}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{64F92774-5695-B20A-C63E-7690CA0ECE34}.Debug|Win32.ActiveCfg = Debug|Win32
{64F92774-5695-B20A-C63E-7690CA0ECE34}.Debug|Win32.Build.0 = Debug|Win32
{64F92774-5695-B20A-C63E-7690CA0ECE34}.Release|Win32.ActiveCfg = Release|Win32
{64F92774-5695-B20A-C63E-7690CA0ECE34}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
@@ -0,0 +1,30 @@
#ifdef JUCE_USER_DEFINED_RC_FILE
#include JUCE_USER_DEFINED_RC_FILE
#else
#undef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,0
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904E4"
BEGIN
VALUE "CompanyName", "Raw Material Software Ltd.\0"
VALUE "FileDescription", "JuceDemoPlugin\0"
VALUE "FileVersion", "1.0.0\0"
VALUE "ProductName", "JuceDemoPlugin\0"
VALUE "ProductVersion", "1.0.0\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 65001
END
END
#endif
@@ -0,0 +1,19 @@
Microsoft Visual Studio Solution File, Format Version 10.00
# Visual C++ Express 2008
Project("{45F7ED0D-469F-7EB0-7B2E-D2EAA2170C4E}") = "JuceDemoPlugin", "JuceDemoPlugin.vcproj", "{64F92774-5695-B20A-C63E-7690CA0ECE34}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{64F92774-5695-B20A-C63E-7690CA0ECE34}.Debug|Win32.ActiveCfg = Debug|Win32
{64F92774-5695-B20A-C63E-7690CA0ECE34}.Debug|Win32.Build.0 = Debug|Win32
{64F92774-5695-B20A-C63E-7690CA0ECE34}.Release|Win32.ActiveCfg = Release|Win32
{64F92774-5695-B20A-C63E-7690CA0ECE34}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
@@ -0,0 +1,30 @@
#ifdef JUCE_USER_DEFINED_RC_FILE
#include JUCE_USER_DEFINED_RC_FILE
#else
#undef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,0
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904E4"
BEGIN
VALUE "CompanyName", "Raw Material Software Ltd.\0"
VALUE "FileDescription", "JuceDemoPlugin\0"
VALUE "FileVersion", "1.0.0\0"
VALUE "ProductName", "JuceDemoPlugin\0"
VALUE "ProductVersion", "1.0.0\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 65001
END
END
#endif
@@ -0,0 +1,19 @@
Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{45F7ED0D-469F-7EB0-7B2E-D2EAA2170C4E}") = "JuceDemoPlugin", "JuceDemoPlugin.vcxproj", "{64F92774-5695-B20A-C63E-7690CA0ECE34}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{64F92774-5695-B20A-C63E-7690CA0ECE34}.Debug|Win32.ActiveCfg = Debug|Win32
{64F92774-5695-B20A-C63E-7690CA0ECE34}.Debug|Win32.Build.0 = Debug|Win32
{64F92774-5695-B20A-C63E-7690CA0ECE34}.Release|Win32.ActiveCfg = Release|Win32
{64F92774-5695-B20A-C63E-7690CA0ECE34}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
@@ -0,0 +1,30 @@
#ifdef JUCE_USER_DEFINED_RC_FILE
#include JUCE_USER_DEFINED_RC_FILE
#else
#undef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,0
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904E4"
BEGIN
VALUE "CompanyName", "Raw Material Software Ltd.\0"
VALUE "FileDescription", "JuceDemoPlugin\0"
VALUE "FileVersion", "1.0.0\0"
VALUE "ProductName", "JuceDemoPlugin\0"
VALUE "ProductVersion", "1.0.0\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 65001
END
END
#endif
@@ -0,0 +1,339 @@
The Juce Polymorphic Plugin Project!
====================================
(c) 2012 by Raw Material Software, visit www.rawmaterialsoftware.com for more info.
-----------------------------------------------------------------------------------------------------
The purpose of this framework is to make is simple to write an audio plugin in a generic
way, which can then be compiled as a VST, AudioUnit, RTAS, or any combination of these.
It's "polymorphic" because the output is a single binary module that acts as all of the
different plugin formats at the same time. This means that you only need to maintain one
project, and only need to perform one build to create a multi-format plugin.
Also included are some helper classes that make it easy to create a stand-alone app to
run your plugin without a host. This might be useful in its own right, but can also be very
handy when developing your plugin, because you can build, test and debug it without needing
to keep restarting a 3rd-party host.
How does it work?
=================
To create your plugin, you just create a subclass of the AudioPluginInstance class to
perform the processing. And your plugin UI is written like any normal Juce UI component.
All the platform-specific code is hidden away in wrapper classes that you just add to
your project - you should (hopefully) never need to even see the inner workings of these.
Licensing issues
================
Juce is released under the GPL (Gnu Public License) - this means that you're free to use
and redistribute it as long as your products are also released under the GPL. Basically
this means that if you use it, you also have to give away your source code.
If you want to release a closed-source application, you can buy a commercial license
that lets you avoid this restriction - see http://www.rawmaterialsoftware.com/juce for more info,
or see the comments at the top of all the Juce source files.
If you're building the VST projects or releasing a VST, you'll need have a look at Steinberg's
developer site to see what licensing rules apply these days. Their website's at
http://www.steinberg.net
If you're building an RTAS then you'll need to sign Digidesign's developer license to get
their SDK. Visit http://www.digidesign.com for more info.
Getting Started
===============
The best advice for creating a plugin is to USE THE INTROJUCER! This will auto-generate a
cross-platform project for you with all the correct settings, and some framework classes to
get you started.
If you choose to go it alone and not use the introjucer, then you'll have a lot of painful
project set-up to do, and will need to scour this document and the juce forum for the details.
There's a demo plugin in the juce/extras folder - this contains an example plugin which can
be built in all the different formats.
Have a look at the demo classes to see how it works, and then to create a real plugin,
you'll need to replace the demo files with your own code.
I've tried to add helpful comments where you might run across common compile errors, to
help describe what you might be doing wrong, as getting a build set-up for some of these
formats can be a bit of a pain. Please let me know if you find there's anything missing
from these instructions or anything I could change to help smooth the build process along
a bit.
-----------------------------------------------------------------------------------------------------
Prerequisites for building a VST
================================
- Visit http://www.steinberg.net and jump through whatever hoops are necessary to download
and install the VST SDK.
-----------------------------------------------------------------------------------------------------
Prerequisites for building an RTAS
==================================
- Contact Digidesign, ask to become a Digidesign Development Partner, sign the relevent
agreements and NDAs.
- From the Digidesign website, download their latest Plug-In SDK
- Install the SDK and build some of the demo plugins to make sure it all works.
- In Visual Studio: Using the Digidesign demo projects in the SDK, make sure you've compiled
debug and release versions of the following static libraries:
DAE.lib, DigiExt.lib, DSI.lib, PlugInLib.lib.
- In XCode: After installing the Digidesign SDK, make sure you've run the config_SDK_for_Mac
command in the SDK's root directory. This sets up some of the tools that it needs.
-----------------------------------------------------------------------------------------------------
Choosing the formats to build
=============================
Each plugin project needs to contain an AppConfig.h file, which holds all the plugin-specific build details.
(The introjucer will auto-generate this file for you when you create a project). In here, there are three macros
that you can set to enable each of the available formats:
#define JucePlugin_Build_VST 1
#define JucePlugin_Build_RTAS 1
#define JucePlugin_Build_AU 1
The introjucer contains options in its config panel that let you set these values automatically without
needing to manually change any files.
-----------------------------------------------------------------------------------------------------
Manually Creating a PC VST/RTAS plugin in Visual Studio
=======================================================
NOTE! That the following tips are provided only for the case where you're not using the introjucer..
If you're sensible, you'll let the introjucer do all the heavy lifting, and won't need to read this.
- First try loading the VST demo project in JuceAudioPlugin/demo/build. Hopefully this
should build correctly.
- Create a new, empty, win32 project using Visual Studio. Choose "DLL" as the type of
product to build
- If building an RTAS, add to your project all the juce_RTAS_*.cpp files from the wrapper/RTAS folder.
- If building a VST, add to your project all the juce_VST_*.cpp files from the wrapper/VST folder.
- Create yourself a JucePluginCharacteristics.h file, starting with a copy of the one in the
demo project. Go through each item inside it carefully, and set them to the appropriate value
for your plugin.
- Under "Additional Include Directories", add the folder in which you're going to put
your JucePluginCharacteristics.h file.
- If you're doing an RTAS, change these project settings (these can all be ignored if you're only doing a VST):
- Make sure all of these are on your include path:
c:\yourdirectory\PT_80_SDK\AlturaPorts\TDMPlugins\PluginLibrary\EffectClasses
c:\yourdirectory\PT_80_SDK\AlturaPorts\TDMPlugins\PluginLibrary\ProcessClasses
c:\yourdirectory\PT_80_SDK\AlturaPorts\TDMPlugins\PluginLibrary\ProcessClasses\Interfaces
c:\yourdirectory\PT_80_SDK\AlturaPorts\TDMPlugins\PluginLibrary\Utilities
c:\yourdirectory\PT_80_SDK\AlturaPorts\TDMPlugins\PluginLibrary\RTASP_Adapt
c:\yourdirectory\PT_80_SDK\AlturaPorts\TDMPlugins\PluginLibrary\CoreClasses
c:\yourdirectory\PT_80_SDK\AlturaPorts\TDMPlugins\PluginLibrary\Controls
c:\yourdirectory\PT_80_SDK\AlturaPorts\TDMPlugins\PluginLibrary\Meters
c:\yourdirectory\PT_80_SDK\AlturaPorts\TDMPlugins\PluginLibrary\ViewClasses
c:\yourdirectory\PT_80_SDK\AlturaPorts\TDMPlugins\PluginLibrary\DSPClasses
c:\yourdirectory\PT_80_SDK\AlturaPorts\TDMPlugins\PluginLibrary\Interfaces
c:\yourdirectory\PT_80_SDK\AlturaPorts\TDMPlugins\common
c:\yourdirectory\PT_80_SDK\AlturaPorts\TDMPlugins\common\Platform
c:\yourdirectory\PT_80_SDK\AlturaPorts\TDMPlugins\SignalProcessing\Public
C:\yourdirectory\PT_80_SDK\AlturaPorts\TDMPlugIns\DSPManager\Interfaces
c:\yourdirectory\PT_80_SDK\AlturaPorts\SADriver\Interfaces
c:\yourdirectory\PT_80_SDK\AlturaPorts\DigiPublic\Interfaces
c:\yourdirectory\PT_80_SDK\AlturaPorts\Fic\Interfaces\DAEClient
c:\yourdirectory\PT_80_SDK\AlturaPorts\NewFileLibs\Cmn
c:\yourdirectory\PT_80_SDK\AlturaPorts\NewFileLibs\DOA
c:\yourdirectory\PT_80_SDK\AlturaPorts\AlturaSource\PPC_H
c:\yourdirectory\PT_80_SDK\AlturaPorts\AlturaSource\AppSupport
c:\yourdirectory\PT_80_SDK\AvidCode\AVX2sdk\AVX\avx2\avx2sdk\inc
C:\yourdirectory\PT_80_SDK\xplat\AVX\avx2\avx2sdk\inc
- Set "C++/Code Generation/Runtime Library" to be "Multi-threaded DLL" or "Multi-threaded Debug DLL"
- Set the "Linker/Input/Module Definition file" to point to "wrapper/RTAS/juce_RTAS_WinExports.def"
- Under "Linker/Input/Delay loaded DLLs", add the following:
"DAE.dll; DigiExt.dll; DSI.dll; PluginLib.dll; DSPManager.dll"
- You may (or may not) need to add "libcmtd.lib; libcmt.lib" to the "Linker/Input/Ignore Specific Library" setting.
- For ONLY the following files:
juce_RTAS_Wrapper.cpp, juce_RTAS_DigiCode1.cpp, juce_RTAS_DigiCode2.cpp, juce_RTAS_DigiCode3.cpp,
change their "C++/Advanced/Calling Convention" property to "__stdcall". All other files should
be left with the default calling convention of "__cdecl"
- Set the "Linker/General/Output File" property to "$(OutDir)\$(ProjectName).dpm" (If you're building
a polymorphic VST/RTAS, then you can simply copy or rename the finished .dpm file to a .dll, and
it'll function as a VST)
- Under "Custom build step", add the following command:
copy /Y "\yourdirectory\juce\extras\audio plugins\wrapper\RTAS\juce_RTAS_WinResources.rsr" "$(TargetPath)".rsr
The corresponding "Outputs" setting for this must be set to "$(TargetPath)".rsr
(This will copy and rename the juce_RTAS_WinResources.rsr file to sit next to the finished .dpm file. It's
a dummy resource file, but PT will refuse to load the plugin unless it has a corresponding .rsr file)
- Because the RTAS code duplicates some win32 constants, you might need to force it to link correctly
by adding "/FORCE:multiple" to the linker's additional command line options.
- You might want to change the output directory to "\Program Files\Common Files\Digidesign\DAE\Plug-Ins\"
if you want the built plugin to go directly into the PT plugins folder
- When setting properties, remember to change them for both your debug and release builds!
- Create your actual plugin classes and add them to the project. Obviously this is the hard bit!
- Add the amalgamated juce source file to the project - have a look at the demo app for neat ways of doing this.
- NOTE: on Windows, because RTAS uses the altura mac-style code, there are annoying clashes caused if
you also include the Apple QuickTime headers, so you might need to turn off quicktime by setting the
juce config macro: #define JUCE_QUICKTIME 0
- NOTE: If you're using MSVC2005 to build your plugin, the users will need to
have the Microsoft VC8 Runtime installed on their machines, otherwise the DLL will
silently fail to load. You should probably add the runtime to your plugin's installer,
and you can get a copy of it here:
http://www.microsoft.com/downloads/details.aspx?FamilyID=32bc1bee-a3f9-4c13-9c99-220b62a191ee&DisplayLang=en
-----------------------------------------------------------------------------------------------------
Creating a Mac AU/VST/RTAS plugin in XCode
==========================================
NOTE! That the following tips are provided only for the case where you're not using the introjucer..
If you're sensible, you'll let the introjucer do all the heavy lifting, and won't need to read this.
- Some of the RTAS SDK files in the demo project might be highlighted red to indicate that they're
missing - if you're not bulding an RTAS, then you can just delete them from the project. If you are
building an RTAS and have the SDK, you might need to update their paths to match your SDK location.
- For an AU, there are a bunch of Apple cpp files that need to be included directly in your project - these
used to be found in /Developer/Examples/CoreAudio/ but in the 10.6 SDK, Apple have moved them to a slightly
more sensible location at /Developer/Extras/CoreAudio. The Juce demo is hardwired to refer to their new
10.6 location, so if you haven't yet installed the 10.6 SDK, the easiest way to make it all happy is just
to duplicate your /Developer/Examples/CoreAudio folder as /Developer/Extras/CoreAudio. That way old and new
juce plugin projects will all compile without changing any project paths.
- For an AU, make sure that the JucePlugin_Build_AU is enabled in your JucePluginCharacteristics.h
- In XCode, create a new project based on the "Audio Unit Effect" template
- XCode will create a bunch of template source files for you - you can remove all of these from the project
and delete them
- In the target settings, clear the "Exported Symbols File" setting. The exports are specified by directives
within the wrapper code, so don't need to be listed explicitly.
- All all the Apple frameworks that Juce normally requires to the "External Frameworks" list
- Add all the juce_AU_* files from the /wrapper/AU directory to your project
- The template project creates an AUPublic group that contains lots of AudioUnit source files. But
it leaves out files that it thinks you might not need, e.g. if you chose an "Audio Unit Effect" project,
then it won't add the classes for handling MIDI. So you'll probably need to go into this folder
and check that it contains AUMIDIBase.cpp, AUMidiEffectBase.cpp, MusicDeviceBase.cpp, etc
- As for the PC, you'll need to make sure your project contains a correctly set-up JucePluginCharacteristics.h
file - start with a copy of the one in the demo plugin project, and go through it making sure that
all the values make sense for your plugin.
- The JucePluginCharacteristics.h file is included not only by the code, but also by the resources files - so it
needs to be locatable on both your normal header search path, and also on your resource include path, which is
the project setting called 'Rez Search Paths'
- Because of the flat naming structure used by Objective-C, if a host loads several different plugins which
all contain slightly different versions of the juce library, you can get nasty situations where all their obj-C
classes are cross-linked to the similarly-named class in other modules, and everything turns into a big mess...
To avoid this, you're advised to set a unique JUCE_ObjCExtraSuffix value (you'll find this in juce_mac_NativeCode.mm,
or if you're using the amalgamated version, you can just set it before including juce_amalgamated.cpp). Choose a
suffix that's unique to both the name and version of your plugin.
- Create your actual plugin classes and add them to the project. Obviously this is the hard bit!
You should now be able to build a functional AU! If you want VST support as well, then read on...
- Make sure that the JucePlugin_Build_VST is enabled in your JucePluginCharacteristics.h
- For VST support, add all the juce_VST_* files from /wrapper/VST
- In your target info settings, add the vstsdk2_4 folder to your "Header Search Paths" list
- Make sure that in your Info.plist, the "Bundle Name" value is correctly set to the name of your plugin.
Now, if you compile, the resulting bundle should work as both a VST and AU - you can simply copy or rename it,
changing the suffix to ".vst", and put it in your VST folder.
NOTE! In order to copy and rename the plugin to the various different plugin folders, the demo plugin project
contains a VERY useful script, which you'll almost certainly want to copy into your own projects - have
a look in the demo target for the build phase called "Copy into the different plugin folders", and use the
inspector to have a look at the script. It uses advanced cunningness to copy only to the correct target
folders for the types of plugin you're targeting, and should be able to be used in your own project
without needing to edit it.
NOTE! If you use the Finder to rename your xyz.component file to xyz.vst, it might look like it's done
exactly this... but in fact, the Finder may have secretly renamed it as "xyz.vst.component", even though
it shows "xyz.vst" as the name on the screen. I have wasted quite a lot of time angrily wondering why my VSTs
don't seem to work, before realising that this is what has happened. You should use the command-line to rename
it correctly.
If you also want to build an RTAS, then carry on reading...
- Make sure that the JucePlugin_Build_RTAS is enabled in your JucePluginCharacteristics.h
- After installing the Digidesign SDK, make sure you've run the config_SDK_for_Mac command in
its root directory. This sets up some of the tools that it needs.
- Add the files from /wrapper/RTAS to your project. Obviously a couple of these are for Windows, so
you shouldn't add those
- In the Digi SDK, in /AlturaPorts/TDMPlugins/common/mac, there are two config files:
CommonDebugSettings.xconfig and CommonReleaseSettings.xconfig
These contain lots of Digi hackery to get their stuff to compile, so you should add them to your project
and change your project's settings to use these files as their base config. Even so, it's all a bit of a mess,
and you may need to tweak them a bit to get it to work on your system.
- In your target settings, add a custom build setting called "MacBag", and set this to the path where the
"MacBag" folder of the Digi SDK lives.
- Add the following to your "Header Search Paths" setting (it's easiest to copy-and-paste this setting from
the demo project):
"$(MacBag)/../AlturaPorts/TDMPlugIns/PlugInLibrary/**"
"$(MacBag)/../AlturaPorts/TDMPlugIns/DSPManager/**"
"$(MacBag)/../AlturaPorts/TDMPlugIns/SupplementalPlugInLib/Encryption"
"$(MacBag)/../AlturaPorts/TDMPlugIns/SupplementalPlugInLib/GraphicsExtensions"
"$(MacBag)/../AlturaPorts/TDMPlugIns/common"
"$(MacBag)/../AlturaPorts/TDMPlugIns/common/PI_LibInterface"
"$(MacBag)/../AlturaPorts/TDMPlugIns/PACEProtection/**"
"$(MacBag)/../AlturaPorts/OMS/Headers"
"$(MacBag)/../AlturaPorts/Fic/Interfaces/**"
"$(MacBag)/../AlturaPorts/Fic/Source/SignalNets"
"$(MacBag)/../AlturaPorts/DSIPublicInterface/PublicHeaders"
"$(MacBag)/../DAEWin/Include"
"$(MacBag)/../AlturaPorts/DigiPublic/Interfaces"
"$(MacBag)/../AlturaPorts/DigiPublic"
"$(MacBag)/../AlturaPorts/NewFileLibs/DOA"
"$(MacBag)/../AlturaPorts/NewFileLibs/Cmn"
"$(MacBag)/../AlturaPorts/TDMPlugIns/SignalProcessing/**"
"$(MacBag)/../AvidCode/AVX2sdk/AVX/avx2/avx2sdk/inc"
"$(MacBag)/../AvidCode/AVX2sdk/AVX/avx2/avx2sdk/utils"
- If you're using the Digi files CommonDebugSettings.xcconfig and CommonReleaseSettings.xcconfig,
then you'll probably have to remove the "-x c++" option from their OTHER_CFLAGS setting, because
that prevents it compiling obj-C. Also, you might need to comment-out the GCC_PREFIX_HEADER setting,
unless you can persuade precompiled headers to work (I've never managed to get them working myself..)
You'll also probably want to add a "MacBag" setting to these files, rather than putting it into
your project - e.g. "MacBag = /Users/jules/SDKs/PT_80_SDK/MacBag"
- If you get include errors compiling some of the DigiDesign code, you may need to
add "/Developer/Headers/FlatCarbon" to your header search path.
- In the SDK, find the PluginLibrary.xcodeproj file, and add this to your "External frameworks and Libraries".
If you've already compiled this library, you can open its item in your XCode project treeview, to find
the "libPluginLibrary.a" item inside it. Drag this subitem down to your Target/"Link Binary With Libraries"
build stage and drop it there to add it to the link process.
- In your Info.plist, change the "Bundle OS Type Code" to "TDMw", and the "Bundle Creator OS Type Code" to
"PTul".
- You may need to remove the "OTHER_CFLAGS = -x c++" from the RTAS settings file to stop it complaining about
obj-C code
You should now be able to build an RTAS! Again, just renaming the finished bundle to ".dpm" and
putting it in your RTAS folder should be do the trick.
If you get any weird build problems, a good tip is to try comparing the demo plugin's build settings with your
own - this should usually show up what's missing.
Note about exported symbols:
When XCode builds the plugin, I've had unpredictable results when trying to stop it from exporting
all of the internal functions as public symbols. There are some flags that are supposed to turn this
off, but sometimes they don't seem to have any effect, and using an explicit exports file also
seems a bit hit-and-miss. (If anyone knows better and can get this working, please let me know!)
Anyway, as well as being wasteful and showing everyone what's inside your plugin, leaving all
the symbols in there will cause fatal crashes when used with Tracktion, or alongside any other
Juce-based plugins. A way of making sure your plugin is stripped is to use the command
"strip -x -S YourPlugin.vst/Contents/MacOS/YourPlugin" after bulding it, which removes the
unnecessary symbols (although in my experience this also doesn't seem to work all the time,
so it's a good idea to check it using the unix "nm" command).
@@ -0,0 +1,159 @@
<?xml version="1.0" encoding="UTF-8"?>
<JUCERPROJECT id="0nRd9LLGO" name="JuceDemoPlugin" projectType="audioplug"
version="1.0.0" juceLinkage="amalg_multi" buildVST="1" buildRTAS="0"
buildAU="1" pluginName="Juce Demo Plugin" pluginDesc="Juce Demo Plugin"
pluginManufacturer="Raw Material Software" pluginManufacturerCode="RawM"
pluginCode="Jcdm" pluginChannelConfigs="{1, 1}, {2, 2}" pluginIsSynth="0"
pluginWantsMidiIn="1" pluginProducesMidiOut="1" pluginSilenceInIsSilenceOut="0"
pluginTailLength="0" pluginEditorRequiresKeys="1" pluginAUExportPrefix="JuceDemoProjectAU"
pluginAUViewClass="JuceDemoProjectAU_V1" pluginRTASCategory=""
bundleIdentifier="com.juce.JuceDemoPlugin" jucerVersion="3.1.0"
companyName="Raw Material Software Ltd." aaxIdentifier="com.yourcompany.JuceDemoPlugin"
buildAAX="0" pluginAAXCategory="AAX_ePlugInCategory_Dynamics"
includeBinaryInAppConfig="1" buildVST3="1" pluginManufacturerEmail="support@yourcompany.com"
companyWebsite="www.juce.com" companyEmail="info@juce.com">
<EXPORTFORMATS>
<XCODE_MAC targetFolder="Builds/MacOSX" vstFolder="~/SDKs/vstsdk2.4" rtasFolder="~/SDKs/PT_80_SDK"
objCExtraSuffix="JuceDemo" aaxFolder="~/SDKs/AAX" postbuildCommand="&#13;&#10;# This script takes the build product and copies it to the AU, VST, VST3, RTAS and AAX folders, depending on &#13;&#10;# which plugin types you've built&#13;&#10;&#13;&#10;original=$CONFIGURATION_BUILD_DIR/$FULL_PRODUCT_NAME&#13;&#10;&#13;&#10;# this looks inside the binary to detect which platforms are needed.. &#13;&#10;copyAU=&#96;nm -g &quot;$CONFIGURATION_BUILD_DIR/$EXECUTABLE_PATH&quot; | grep -i 'AudioUnit' | wc -l&#96;&#13;&#10;copyVST=&#96;nm -g &quot;$CONFIGURATION_BUILD_DIR/$EXECUTABLE_PATH&quot; | grep -i 'VSTPlugin' | wc -l&#96;&#13;&#10;copyVST3=&#96;nm -g &quot;$CONFIGURATION_BUILD_DIR/$EXECUTABLE_PATH&quot; | grep -i 'GetPluginFactory' | wc -l&#96;&#13;&#10;copyRTAS=&#96;nm -g &quot;$CONFIGURATION_BUILD_DIR/$EXECUTABLE_PATH&quot; | grep -i 'CProcess' | wc -l&#96;&#13;&#10;copyAAX=&#96;nm -g &quot;$CONFIGURATION_BUILD_DIR/$EXECUTABLE_PATH&quot; | grep -i 'ACFStartup' | wc -l&#96;&#13;&#10;&#13;&#10;if [ $copyAU -gt 0 ]; then&#13;&#10; echo &quot;Copying to AudioUnit folder...&quot;&#13;&#10; AU=~/Library/Audio/Plug-Ins/Components/$PRODUCT_NAME.component&#13;&#10; if [ -d &quot;$AU&quot; ]; then &#13;&#10; rm -r &quot;$AU&quot;&#13;&#10; fi&#13;&#10;&#13;&#10; cp -r &quot;$original&quot; &quot;$AU&quot;&#13;&#10; sed -i &quot;&quot; -e 's/TDMwPTul/BNDLPTul/g' &quot;$AU/Contents/PkgInfo&quot;&#13;&#10; sed -i &quot;&quot; -e 's/TDMw/BNDL/g' &quot;$AU/Contents/$INFOPLIST_FILE&quot;&#13;&#10;&#13;&#10; # Fix info.plist for AUs built with Xcode 3&#13;&#10; if [ -f &quot;$DEVELOPER_DIR/Library/Developer/CoreAudio/AudioUnits/AUPublic/AUBase/AUPlugInDispatch.cpp&quot; ]; then&#13;&#10; echo&#13;&#10; else&#13;&#10; echo &quot;Removing AudioComponents entry from Info.plist because this is not a new-format AU&quot;&#13;&#10; /usr/libexec/PlistBuddy -c &quot;Delete AudioComponents&quot; &quot;$AU/Contents/Info.plist&quot;&#13;&#10; fi&#13;&#10;fi&#13;&#10;&#13;&#10;if [ $copyVST -gt 0 ]; then&#13;&#10; echo &quot;Copying to VST folder...&quot;&#13;&#10; VST=~/Library/Audio/Plug-Ins/VST/$PRODUCT_NAME.vst&#13;&#10; if [ -d &quot;$VST&quot; ]; then &#13;&#10; rm -r &quot;$VST&quot;&#13;&#10; fi&#13;&#10;&#13;&#10; cp -r &quot;$original&quot; &quot;$VST&quot;&#13;&#10; sed -i &quot;&quot; -e 's/TDMwPTul/BNDLPTul/g' &quot;$VST/Contents/PkgInfo&quot;&#13;&#10; sed -i &quot;&quot; -e 's/TDMw/BNDL/g' &quot;$VST/Contents/$INFOPLIST_FILE&quot;&#13;&#10;fi&#13;&#10;&#13;&#10;if [ $copyVST3 -gt 0 ]; then&#13;&#10; echo &quot;Copying to VST3 folder...&quot;&#13;&#10; VST3=~/Library/Audio/Plug-Ins/VST3/$PRODUCT_NAME.vst3&#13;&#10; if [ -d &quot;$VST3&quot; ]; then &#13;&#10; rm -r &quot;$VST3&quot;&#13;&#10; fi&#13;&#10;&#13;&#10; cp -r &quot;$original&quot; &quot;$VST3&quot;&#13;&#10; sed -i &quot;&quot; -e 's/TDMwPTul/BNDLPTul/g' &quot;$VST3/Contents/PkgInfo&quot;&#13;&#10; sed -i &quot;&quot; -e 's/TDMw/BNDL/g' &quot;$VST3/Contents/$INFOPLIST_FILE&quot;&#13;&#10;fi&#13;&#10;&#13;&#10;if [ $copyRTAS -gt 0 ]; then&#13;&#10; echo &quot;Copying to RTAS folder...&quot;&#13;&#10; RTAS=/Library/Application\ Support/Digidesign/Plug-Ins/$PRODUCT_NAME.dpm&#13;&#10; if [ -d &quot;$RTAS&quot; ]; then&#13;&#10; rm -r &quot;$RTAS&quot;&#13;&#10; fi&#13;&#10;&#13;&#10; cp -r &quot;$original&quot; &quot;$RTAS&quot;&#13;&#10;fi&#13;&#10;&#13;&#10;if [ $copyAAX -gt 0 ]; then&#13;&#10; echo &quot;Copying to AAX folder...&quot;&#13;&#10;&#13;&#10; if [ -d &quot;/Applications/ProTools_3PDev/Plug-Ins&quot; ]; then&#13;&#10; AAX1=&quot;/Applications/ProTools_3PDev/Plug-Ins/$PRODUCT_NAME.aaxplugin&quot;&#13;&#10;&#13;&#10; if [ -d &quot;$AAX1&quot; ]; then&#13;&#10; rm -r &quot;$AAX1&quot;&#13;&#10; fi&#13;&#10;&#13;&#10; cp -r &quot;$original&quot; &quot;$AAX1&quot;&#13;&#10; fi&#13;&#10;&#13;&#10; if [ -d &quot;/Library/Application Support/Avid/Audio/Plug-Ins&quot; ]; then&#13;&#10; AAX2=&quot;/Library/Application Support/Avid/Audio/Plug-Ins/$PRODUCT_NAME.aaxplugin&quot;&#13;&#10;&#13;&#10; if [ -d &quot;$AAX2&quot; ]; then&#13;&#10; rm -r &quot;$AAX2&quot;&#13;&#10; fi&#13;&#10;&#13;&#10; cp -r &quot;$original&quot; &quot;$AAX2&quot;&#13;&#10; fi&#13;&#10;fi&#13;&#10;"
vst3Folder="~/SDKs/VST3 SDK">
<CONFIGURATIONS>
<CONFIGURATION name="Debug" isDebug="1" optimisation="1" targetName="JuceDemoPlugin"
osxSDK="default" osxCompatibility="default" osxArchitecture="64BitUniversal"/>
<CONFIGURATION name="Release" isDebug="0" optimisation="2" targetName="JuceDemoPlugin"
osxSDK="default" osxCompatibility="default" osxArchitecture="64BitUniversal"/>
</CONFIGURATIONS>
<MODULEPATHS>
<MODULEPATH id="juce_gui_extra" path="../../modules"/>
<MODULEPATH id="juce_gui_basics" path="../../modules"/>
<MODULEPATH id="juce_graphics" path="../../modules"/>
<MODULEPATH id="juce_events" path="../../modules"/>
<MODULEPATH id="juce_data_structures" path="../../modules"/>
<MODULEPATH id="juce_core" path="../../modules"/>
<MODULEPATH id="juce_audio_utils" path="../../modules"/>
<MODULEPATH id="juce_audio_processors" path="../../modules"/>
<MODULEPATH id="juce_audio_plugin_client" path="../../modules"/>
<MODULEPATH id="juce_audio_formats" path="../../modules"/>
<MODULEPATH id="juce_audio_devices" path="../../modules"/>
<MODULEPATH id="juce_audio_basics" path="../../modules"/>
</MODULEPATHS>
</XCODE_MAC>
<VS2005 targetFolder="Builds/VisualStudio2005" vstFolder="c:\SDKs\vstsdk2.4"
rtasFolder="c:\SDKs\PT_80_SDK" libraryType="1" aaxFolder="c:\SDKs\AAX">
<CONFIGURATIONS>
<CONFIGURATION name="Debug" isDebug="1" optimisation="1" targetName="JuceDemoPlugin"
winWarningLevel="4" generateManifest="1"/>
<CONFIGURATION name="Release" isDebug="0" optimisation="2" targetName="JuceDemoPlugin"
winWarningLevel="4" generateManifest="1"/>
</CONFIGURATIONS>
<MODULEPATHS>
<MODULEPATH id="juce_gui_extra" path="../../modules"/>
<MODULEPATH id="juce_gui_basics" path="../../modules"/>
<MODULEPATH id="juce_graphics" path="../../modules"/>
<MODULEPATH id="juce_events" path="../../modules"/>
<MODULEPATH id="juce_data_structures" path="../../modules"/>
<MODULEPATH id="juce_core" path="../../modules"/>
<MODULEPATH id="juce_audio_utils" path="../../modules"/>
<MODULEPATH id="juce_audio_processors" path="../../modules"/>
<MODULEPATH id="juce_audio_plugin_client" path="../../modules"/>
<MODULEPATH id="juce_audio_formats" path="../../modules"/>
<MODULEPATH id="juce_audio_devices" path="../../modules"/>
<MODULEPATH id="juce_audio_basics" path="../../modules"/>
</MODULEPATHS>
</VS2005>
<VS2008 targetFolder="Builds/VisualStudio2008" vstFolder="c:\SDKs\vstsdk2.4"
rtasFolder="c:\SDKs\PT_80_SDK" libraryType="1" aaxFolder="c:\SDKs\AAX"
vst3Folder="c:\SDKs\VST3 SDK">
<CONFIGURATIONS>
<CONFIGURATION name="Debug" isDebug="1" optimisation="1" targetName="JuceDemoPlugin"
winWarningLevel="4" generateManifest="1"/>
<CONFIGURATION name="Release" isDebug="0" optimisation="2" targetName="JuceDemoPlugin"
winWarningLevel="4" generateManifest="1"/>
</CONFIGURATIONS>
<MODULEPATHS>
<MODULEPATH id="juce_gui_extra" path="../../modules"/>
<MODULEPATH id="juce_gui_basics" path="../../modules"/>
<MODULEPATH id="juce_graphics" path="../../modules"/>
<MODULEPATH id="juce_events" path="../../modules"/>
<MODULEPATH id="juce_data_structures" path="../../modules"/>
<MODULEPATH id="juce_core" path="../../modules"/>
<MODULEPATH id="juce_audio_utils" path="../../modules"/>
<MODULEPATH id="juce_audio_processors" path="../../modules"/>
<MODULEPATH id="juce_audio_plugin_client" path="../../modules"/>
<MODULEPATH id="juce_audio_formats" path="../../modules"/>
<MODULEPATH id="juce_audio_devices" path="../../modules"/>
<MODULEPATH id="juce_audio_basics" path="../../modules"/>
</MODULEPATHS>
</VS2008>
<VS2010 targetFolder="Builds/VisualStudio2010" vstFolder="c:\SDKs\vstsdk2.4"
vst3Folder="c:\SDKs\VST3 SDK">
<CONFIGURATIONS>
<CONFIGURATION name="Debug" winWarningLevel="4" generateManifest="1" winArchitecture="32-bit"
isDebug="1" optimisation="1" targetName="JuceDemoPlugin"/>
<CONFIGURATION name="Release" winWarningLevel="4" generateManifest="1" winArchitecture="32-bit"
isDebug="0" optimisation="2" targetName="JuceDemoPlugin"/>
</CONFIGURATIONS>
<MODULEPATHS>
<MODULEPATH id="juce_gui_extra" path="../../modules"/>
<MODULEPATH id="juce_gui_basics" path="../../modules"/>
<MODULEPATH id="juce_graphics" path="../../modules"/>
<MODULEPATH id="juce_events" path="../../modules"/>
<MODULEPATH id="juce_data_structures" path="../../modules"/>
<MODULEPATH id="juce_core" path="../../modules"/>
<MODULEPATH id="juce_audio_utils" path="../../modules"/>
<MODULEPATH id="juce_audio_processors" path="../../modules"/>
<MODULEPATH id="juce_audio_plugin_client" path="../../modules"/>
<MODULEPATH id="juce_audio_formats" path="../../modules"/>
<MODULEPATH id="juce_audio_devices" path="../../modules"/>
<MODULEPATH id="juce_audio_basics" path="../../modules"/>
</MODULEPATHS>
</VS2010>
<LINUX_MAKE targetFolder="Builds/Linux" vstFolder="~/SDKs/vstsdk2.4" rtasFolder="~/SDKs/PT_80_SDK">
<CONFIGURATIONS>
<CONFIGURATION name="Debug" isDebug="1" optimisation="1" targetName="JuceDemoPlugin"
libraryPath="/usr/X11R6/lib/"/>
<CONFIGURATION name="Release" isDebug="0" optimisation="2" targetName="JuceDemoPlugin"
libraryPath="/usr/X11R6/lib/"/>
</CONFIGURATIONS>
<MODULEPATHS>
<MODULEPATH id="juce_gui_extra" path="../../modules"/>
<MODULEPATH id="juce_gui_basics" path="../../modules"/>
<MODULEPATH id="juce_graphics" path="../../modules"/>
<MODULEPATH id="juce_events" path="../../modules"/>
<MODULEPATH id="juce_data_structures" path="../../modules"/>
<MODULEPATH id="juce_core" path="../../modules"/>
<MODULEPATH id="juce_audio_utils" path="../../modules"/>
<MODULEPATH id="juce_audio_processors" path="../../modules"/>
<MODULEPATH id="juce_audio_plugin_client" path="../../modules"/>
<MODULEPATH id="juce_audio_formats" path="../../modules"/>
<MODULEPATH id="juce_audio_devices" path="../../modules"/>
<MODULEPATH id="juce_audio_basics" path="../../modules"/>
</MODULEPATHS>
</LINUX_MAKE>
</EXPORTFORMATS>
<MAINGROUP id="dYAMo6Ykd" name="JuceDemoPlugin">
<FILE id="gFFr0hbSp" name="PluginProcessor.cpp" compile="1" resource="0"
file="Source/PluginProcessor.cpp"/>
<FILE id="PkpMNdnIr" name="PluginProcessor.h" compile="0" resource="0"
file="Source/PluginProcessor.h"/>
<FILE id="RCFlkTAef" name="PluginEditor.cpp" compile="1" resource="0"
file="Source/PluginEditor.cpp"/>
<FILE id="Iif5nfHL" name="PluginEditor.h" compile="0" resource="0"
file="Source/PluginEditor.h"/>
</MAINGROUP>
<JUCEOPTIONS JUCE_QUICKTIME="disabled" JUCE_PLUGINHOST_VST="disabled" JUCE_PLUGINHOST_AU="disabled"/>
<MODULES>
<MODULE id="juce_audio_basics" showAllCode="1"/>
<MODULE id="juce_audio_devices" showAllCode="1"/>
<MODULE id="juce_audio_formats" showAllCode="1"/>
<MODULE id="juce_audio_plugin_client" showAllCode="1"/>
<MODULE id="juce_audio_processors" showAllCode="1"/>
<MODULE id="juce_audio_utils" showAllCode="1"/>
<MODULE id="juce_core" showAllCode="1"/>
<MODULE id="juce_data_structures" showAllCode="1"/>
<MODULE id="juce_events" showAllCode="1"/>
<MODULE id="juce_graphics" showAllCode="1"/>
<MODULE id="juce_gui_basics" showAllCode="1"/>
<MODULE id="juce_gui_extra" showAllCode="1" useLocalCopy="0"/>
</MODULES>
</JUCERPROJECT>
@@ -0,0 +1,306 @@
/*
IMPORTANT! This file is auto-generated each time you save your
project - if you alter its contents, your changes may be overwritten!
There's a section below where you can add your own custom code safely, and the
Introjucer will preserve the contents of that block, but the best way to change
any of these definitions is by using the Introjucer's project settings.
Any commented-out settings will assume their default values.
*/
#ifndef __JUCE_APPCONFIG_0NRD9LLGO__
#define __JUCE_APPCONFIG_0NRD9LLGO__
//==============================================================================
// [BEGIN_USER_CODE_SECTION]
// (You can add your own code in this section, and the Introjucer will not overwrite it)
// [END_USER_CODE_SECTION]
//==============================================================================
#define JUCE_MODULE_AVAILABLE_juce_audio_basics 1
#define JUCE_MODULE_AVAILABLE_juce_audio_devices 1
#define JUCE_MODULE_AVAILABLE_juce_audio_formats 1
#define JUCE_MODULE_AVAILABLE_juce_audio_plugin_client 1
#define JUCE_MODULE_AVAILABLE_juce_audio_processors 1
#define JUCE_MODULE_AVAILABLE_juce_audio_utils 1
#define JUCE_MODULE_AVAILABLE_juce_core 1
#define JUCE_MODULE_AVAILABLE_juce_data_structures 1
#define JUCE_MODULE_AVAILABLE_juce_events 1
#define JUCE_MODULE_AVAILABLE_juce_graphics 1
#define JUCE_MODULE_AVAILABLE_juce_gui_basics 1
#define JUCE_MODULE_AVAILABLE_juce_gui_extra 1
//==============================================================================
// juce_audio_devices flags:
#ifndef JUCE_ASIO
//#define JUCE_ASIO
#endif
#ifndef JUCE_WASAPI
//#define JUCE_WASAPI
#endif
#ifndef JUCE_DIRECTSOUND
//#define JUCE_DIRECTSOUND
#endif
#ifndef JUCE_ALSA
//#define JUCE_ALSA
#endif
#ifndef JUCE_JACK
//#define JUCE_JACK
#endif
#ifndef JUCE_USE_ANDROID_OPENSLES
//#define JUCE_USE_ANDROID_OPENSLES
#endif
#ifndef JUCE_USE_CDREADER
//#define JUCE_USE_CDREADER
#endif
#ifndef JUCE_USE_CDBURNER
//#define JUCE_USE_CDBURNER
#endif
//==============================================================================
// juce_audio_formats flags:
#ifndef JUCE_USE_FLAC
//#define JUCE_USE_FLAC
#endif
#ifndef JUCE_USE_OGGVORBIS
//#define JUCE_USE_OGGVORBIS
#endif
#ifndef JUCE_USE_MP3AUDIOFORMAT
//#define JUCE_USE_MP3AUDIOFORMAT
#endif
#ifndef JUCE_USE_LAME_AUDIO_FORMAT
//#define JUCE_USE_LAME_AUDIO_FORMAT
#endif
#ifndef JUCE_USE_WINDOWS_MEDIA_FORMAT
//#define JUCE_USE_WINDOWS_MEDIA_FORMAT
#endif
//==============================================================================
// juce_audio_processors flags:
#ifndef JUCE_PLUGINHOST_VST
#define JUCE_PLUGINHOST_VST 0
#endif
#ifndef JUCE_PLUGINHOST_VST3
//#define JUCE_PLUGINHOST_VST3
#endif
#ifndef JUCE_PLUGINHOST_AU
#define JUCE_PLUGINHOST_AU 0
#endif
//==============================================================================
// juce_core flags:
#ifndef JUCE_FORCE_DEBUG
//#define JUCE_FORCE_DEBUG
#endif
#ifndef JUCE_LOG_ASSERTIONS
//#define JUCE_LOG_ASSERTIONS
#endif
#ifndef JUCE_CHECK_MEMORY_LEAKS
//#define JUCE_CHECK_MEMORY_LEAKS
#endif
#ifndef JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES
//#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES
#endif
#ifndef JUCE_INCLUDE_ZLIB_CODE
//#define JUCE_INCLUDE_ZLIB_CODE
#endif
//==============================================================================
// juce_graphics flags:
#ifndef JUCE_USE_COREIMAGE_LOADER
//#define JUCE_USE_COREIMAGE_LOADER
#endif
#ifndef JUCE_USE_DIRECTWRITE
//#define JUCE_USE_DIRECTWRITE
#endif
//==============================================================================
// juce_gui_basics flags:
#ifndef JUCE_ENABLE_REPAINT_DEBUGGING
//#define JUCE_ENABLE_REPAINT_DEBUGGING
#endif
#ifndef JUCE_USE_XSHM
//#define JUCE_USE_XSHM
#endif
#ifndef JUCE_USE_XRENDER
//#define JUCE_USE_XRENDER
#endif
#ifndef JUCE_USE_XCURSOR
//#define JUCE_USE_XCURSOR
#endif
//==============================================================================
// juce_gui_extra flags:
#ifndef JUCE_WEB_BROWSER
//#define JUCE_WEB_BROWSER
#endif
#ifndef JUCE_ENABLE_LIVE_CONSTANT_EDITOR
//#define JUCE_ENABLE_LIVE_CONSTANT_EDITOR
#endif
//==============================================================================
// Audio plugin settings..
#ifndef JucePlugin_Build_VST
#define JucePlugin_Build_VST 1
#endif
#ifndef JucePlugin_Build_VST3
#define JucePlugin_Build_VST3 1
#endif
#ifndef JucePlugin_Build_AU
#define JucePlugin_Build_AU 1
#endif
#ifndef JucePlugin_Build_RTAS
#define JucePlugin_Build_RTAS 0
#endif
#ifndef JucePlugin_Build_AAX
#define JucePlugin_Build_AAX 0
#endif
#ifndef JucePlugin_Name
#define JucePlugin_Name "Juce Demo Plugin"
#endif
#ifndef JucePlugin_Desc
#define JucePlugin_Desc "Juce Demo Plugin"
#endif
#ifndef JucePlugin_Manufacturer
#define JucePlugin_Manufacturer "Raw Material Software"
#endif
#ifndef JucePlugin_ManufacturerWebsite
#define JucePlugin_ManufacturerWebsite "www.juce.com"
#endif
#ifndef JucePlugin_ManufacturerEmail
#define JucePlugin_ManufacturerEmail "info@juce.com"
#endif
#ifndef JucePlugin_ManufacturerCode
#define JucePlugin_ManufacturerCode 'RawM'
#endif
#ifndef JucePlugin_PluginCode
#define JucePlugin_PluginCode 'Jcdm'
#endif
#ifndef JucePlugin_MaxNumInputChannels
#define JucePlugin_MaxNumInputChannels 2
#endif
#ifndef JucePlugin_MaxNumOutputChannels
#define JucePlugin_MaxNumOutputChannels 2
#endif
#ifndef JucePlugin_PreferredChannelConfigurations
#define JucePlugin_PreferredChannelConfigurations {1, 1}, {2, 2}
#endif
#ifndef JucePlugin_IsSynth
#define JucePlugin_IsSynth 0
#endif
#ifndef JucePlugin_WantsMidiInput
#define JucePlugin_WantsMidiInput 1
#endif
#ifndef JucePlugin_ProducesMidiOutput
#define JucePlugin_ProducesMidiOutput 1
#endif
#ifndef JucePlugin_SilenceInProducesSilenceOut
#define JucePlugin_SilenceInProducesSilenceOut 0
#endif
#ifndef JucePlugin_EditorRequiresKeyboardFocus
#define JucePlugin_EditorRequiresKeyboardFocus 1
#endif
#ifndef JucePlugin_Version
#define JucePlugin_Version 1.0.0
#endif
#ifndef JucePlugin_VersionCode
#define JucePlugin_VersionCode 0x10000
#endif
#ifndef JucePlugin_VersionString
#define JucePlugin_VersionString "1.0.0"
#endif
#ifndef JucePlugin_VSTUniqueID
#define JucePlugin_VSTUniqueID JucePlugin_PluginCode
#endif
#ifndef JucePlugin_VSTCategory
#define JucePlugin_VSTCategory kPlugCategEffect
#endif
#ifndef JucePlugin_AUMainType
#define JucePlugin_AUMainType kAudioUnitType_MusicEffect
#endif
#ifndef JucePlugin_AUSubType
#define JucePlugin_AUSubType JucePlugin_PluginCode
#endif
#ifndef JucePlugin_AUExportPrefix
#define JucePlugin_AUExportPrefix JuceDemoProjectAU
#endif
#ifndef JucePlugin_AUExportPrefixQuoted
#define JucePlugin_AUExportPrefixQuoted "JuceDemoProjectAU"
#endif
#ifndef JucePlugin_AUManufacturerCode
#define JucePlugin_AUManufacturerCode JucePlugin_ManufacturerCode
#endif
#ifndef JucePlugin_CFBundleIdentifier
#define JucePlugin_CFBundleIdentifier com.juce.JuceDemoPlugin
#endif
#ifndef JucePlugin_RTASCategory
#define JucePlugin_RTASCategory ePlugInCategory_None
#endif
#ifndef JucePlugin_RTASManufacturerCode
#define JucePlugin_RTASManufacturerCode JucePlugin_ManufacturerCode
#endif
#ifndef JucePlugin_RTASProductId
#define JucePlugin_RTASProductId JucePlugin_PluginCode
#endif
#ifndef JucePlugin_RTASDisableBypass
#define JucePlugin_RTASDisableBypass 0
#endif
#ifndef JucePlugin_RTASDisableMultiMono
#define JucePlugin_RTASDisableMultiMono 0
#endif
#ifndef JucePlugin_AAXIdentifier
#define JucePlugin_AAXIdentifier com.yourcompany.JuceDemoPlugin
#endif
#ifndef JucePlugin_AAXManufacturerCode
#define JucePlugin_AAXManufacturerCode JucePlugin_ManufacturerCode
#endif
#ifndef JucePlugin_AAXProductId
#define JucePlugin_AAXProductId JucePlugin_PluginCode
#endif
#ifndef JucePlugin_AAXCategory
#define JucePlugin_AAXCategory AAX_ePlugInCategory_Dynamics
#endif
#ifndef JucePlugin_AAXDisableBypass
#define JucePlugin_AAXDisableBypass 0
#endif
#ifndef JucePlugin_AAXDisableMultiMono
#define JucePlugin_AAXDisableMultiMono 0
#endif
#endif // __JUCE_APPCONFIG_0NRD9LLGO__
@@ -0,0 +1,45 @@
/*
IMPORTANT! This file is auto-generated each time you save your
project - if you alter its contents, your changes may be overwritten!
This is the header file that your files should include in order to get all the
JUCE library headers. You should avoid including the JUCE headers directly in
your own source files, because that wouldn't pick up the correct configuration
options for your app.
*/
#ifndef __APPHEADERFILE_0NRD9LLGO__
#define __APPHEADERFILE_0NRD9LLGO__
#include "AppConfig.h"
#include "modules/juce_audio_basics/juce_audio_basics.h"
#include "modules/juce_audio_devices/juce_audio_devices.h"
#include "modules/juce_audio_formats/juce_audio_formats.h"
#include "modules/juce_audio_plugin_client/juce_audio_plugin_client.h"
#include "modules/juce_audio_processors/juce_audio_processors.h"
#include "modules/juce_audio_utils/juce_audio_utils.h"
#include "modules/juce_core/juce_core.h"
#include "modules/juce_data_structures/juce_data_structures.h"
#include "modules/juce_events/juce_events.h"
#include "modules/juce_graphics/juce_graphics.h"
#include "modules/juce_gui_basics/juce_gui_basics.h"
#include "modules/juce_gui_extra/juce_gui_extra.h"
#if ! DONT_SET_USING_JUCE_NAMESPACE
// If your code uses a lot of JUCE classes, then this will obviously save you
// a lot of typing, but can be disabled by setting DONT_SET_USING_JUCE_NAMESPACE.
using namespace juce;
#endif
#if ! JUCE_DONT_DECLARE_PROJECTINFO
namespace ProjectInfo
{
const char* const projectName = "JuceDemoPlugin";
const char* const versionString = "1.0.0";
const int versionNumber = 0x10000;
}
#endif
#endif // __APPHEADERFILE_0NRD9LLGO__
@@ -0,0 +1,12 @@
Important Note!!
================
The purpose of this folder is to contain files that are auto-generated by the Introjucer,
and ALL files in this folder will be mercilessly DELETED and completely re-written whenever
the Introjucer saves your project.
Therefore, it's a bad idea to make any manual changes to the files in here, or to
put any of your own files in here if you don't want to lose them. (Of course you may choose
to add the folder's contents to your version-control system so that you can re-merge your own
modifications after the Introjucer has saved its changes).
@@ -0,0 +1,5 @@
// This is an auto-generated file to redirect any included
// module headers to the correct external folder.
#include "../../../../../modules/juce_audio_basics/juce_audio_basics.h"
@@ -0,0 +1,5 @@
// This is an auto-generated file to redirect any included
// module headers to the correct external folder.
#include "../../../../../modules/juce_audio_devices/juce_audio_devices.h"
@@ -0,0 +1,5 @@
// This is an auto-generated file to redirect any included
// module headers to the correct external folder.
#include "../../../../../modules/juce_audio_formats/juce_audio_formats.h"
@@ -0,0 +1,5 @@
// This is an auto-generated file to redirect any included
// module headers to the correct external folder.
#include "../../../../../modules/juce_audio_plugin_client/juce_audio_plugin_client.h"
@@ -0,0 +1,5 @@
// This is an auto-generated file to redirect any included
// module headers to the correct external folder.
#include "../../../../../modules/juce_audio_processors/juce_audio_processors.h"
@@ -0,0 +1,5 @@
// This is an auto-generated file to redirect any included
// module headers to the correct external folder.
#include "../../../../../modules/juce_audio_utils/juce_audio_utils.h"
@@ -0,0 +1,5 @@
// This is an auto-generated file to redirect any included
// module headers to the correct external folder.
#include "../../../../../modules/juce_core/juce_core.h"
@@ -0,0 +1,5 @@
// This is an auto-generated file to redirect any included
// module headers to the correct external folder.
#include "../../../../../modules/juce_data_structures/juce_data_structures.h"
@@ -0,0 +1,5 @@
// This is an auto-generated file to redirect any included
// module headers to the correct external folder.
#include "../../../../../modules/juce_events/juce_events.h"
@@ -0,0 +1,5 @@
// This is an auto-generated file to redirect any included
// module headers to the correct external folder.
#include "../../../../../modules/juce_graphics/juce_graphics.h"
@@ -0,0 +1,5 @@
// This is an auto-generated file to redirect any included
// module headers to the correct external folder.
#include "../../../../../modules/juce_gui_basics/juce_gui_basics.h"
@@ -0,0 +1,5 @@
// This is an auto-generated file to redirect any included
// module headers to the correct external folder.
#include "../../../../../modules/juce_gui_extra/juce_gui_extra.h"
@@ -0,0 +1,177 @@
/*
==============================================================================
This file was auto-generated by the Jucer!
It contains the basic startup code for a Juce application.
==============================================================================
*/
#include "PluginProcessor.h"
#include "PluginEditor.h"
//==============================================================================
JuceDemoPluginAudioProcessorEditor::JuceDemoPluginAudioProcessorEditor (JuceDemoPluginAudioProcessor& owner)
: AudioProcessorEditor (owner),
midiKeyboard (owner.keyboardState, MidiKeyboardComponent::horizontalKeyboard),
infoLabel (String::empty),
gainLabel ("", "Throughput level:"),
delayLabel ("", "Delay:"),
gainSlider ("gain"),
delaySlider ("delay")
{
// add some sliders..
addAndMakeVisible (gainSlider);
gainSlider.setSliderStyle (Slider::Rotary);
gainSlider.addListener (this);
gainSlider.setRange (0.0, 1.0, 0.01);
addAndMakeVisible (delaySlider);
delaySlider.setSliderStyle (Slider::Rotary);
delaySlider.addListener (this);
delaySlider.setRange (0.0, 1.0, 0.01);
// add some labels for the sliders..
gainLabel.attachToComponent (&gainSlider, false);
gainLabel.setFont (Font (11.0f));
delayLabel.attachToComponent (&delaySlider, false);
delayLabel.setFont (Font (11.0f));
// add the midi keyboard component..
addAndMakeVisible (midiKeyboard);
// add a label that will display the current timecode and status..
addAndMakeVisible (infoLabel);
infoLabel.setColour (Label::textColourId, Colours::blue);
// add the triangular resizer component for the bottom-right of the UI
addAndMakeVisible (resizer = new ResizableCornerComponent (this, &resizeLimits));
resizeLimits.setSizeLimits (150, 150, 800, 300);
// set our component's initial size to be the last one that was stored in the filter's settings
setSize (owner.lastUIWidth,
owner.lastUIHeight);
startTimer (50);
}
JuceDemoPluginAudioProcessorEditor::~JuceDemoPluginAudioProcessorEditor()
{
}
//==============================================================================
void JuceDemoPluginAudioProcessorEditor::paint (Graphics& g)
{
g.setGradientFill (ColourGradient (Colours::white, 0, 0,
Colours::grey, 0, (float) getHeight(), false));
g.fillAll();
}
void JuceDemoPluginAudioProcessorEditor::resized()
{
infoLabel.setBounds (10, 4, 400, 25);
gainSlider.setBounds (20, 60, 150, 40);
delaySlider.setBounds (200, 60, 150, 40);
const int keyboardHeight = 70;
midiKeyboard.setBounds (4, getHeight() - keyboardHeight - 4, getWidth() - 8, keyboardHeight);
resizer->setBounds (getWidth() - 16, getHeight() - 16, 16, 16);
getProcessor().lastUIWidth = getWidth();
getProcessor().lastUIHeight = getHeight();
}
//==============================================================================
// This timer periodically checks whether any of the filter's parameters have changed...
void JuceDemoPluginAudioProcessorEditor::timerCallback()
{
JuceDemoPluginAudioProcessor& ourProcessor = getProcessor();
AudioPlayHead::CurrentPositionInfo newPos (ourProcessor.lastPosInfo);
if (lastDisplayedPosition != newPos)
displayPositionInfo (newPos);
gainSlider.setValue (ourProcessor.gain, dontSendNotification);
delaySlider.setValue (ourProcessor.delay, dontSendNotification);
}
// This is our Slider::Listener callback, when the user drags a slider.
void JuceDemoPluginAudioProcessorEditor::sliderValueChanged (Slider* slider)
{
if (slider == &gainSlider)
{
// It's vital to use setParameterNotifyingHost to change any parameters that are automatable
// by the host, rather than just modifying them directly, otherwise the host won't know
// that they've changed.
getProcessor().setParameterNotifyingHost (JuceDemoPluginAudioProcessor::gainParam,
(float) gainSlider.getValue());
}
else if (slider == &delaySlider)
{
getProcessor().setParameterNotifyingHost (JuceDemoPluginAudioProcessor::delayParam,
(float) delaySlider.getValue());
}
}
//==============================================================================
// quick-and-dirty function to format a timecode string
static String timeToTimecodeString (const double seconds)
{
const double absSecs = std::abs (seconds);
const int hours = (int) (absSecs / (60.0 * 60.0));
const int mins = ((int) (absSecs / 60.0)) % 60;
const int secs = ((int) absSecs) % 60;
String s (seconds < 0 ? "-" : "");
s << String (hours).paddedLeft ('0', 2) << ":"
<< String (mins) .paddedLeft ('0', 2) << ":"
<< String (secs) .paddedLeft ('0', 2) << ":"
<< String (roundToInt (absSecs * 1000) % 1000).paddedLeft ('0', 3);
return s;
}
// quick-and-dirty function to format a bars/beats string
static String ppqToBarsBeatsString (double ppq, double /*lastBarPPQ*/, int numerator, int denominator)
{
if (numerator == 0 || denominator == 0)
return "1|1|0";
const int ppqPerBar = (numerator * 4 / denominator);
const double beats = (fmod (ppq, ppqPerBar) / ppqPerBar) * numerator;
const int bar = ((int) ppq) / ppqPerBar + 1;
const int beat = ((int) beats) + 1;
const int ticks = ((int) (fmod (beats, 1.0) * 960.0 + 0.5));
String s;
s << bar << '|' << beat << '|' << ticks;
return s;
}
// Updates the text in our position label.
void JuceDemoPluginAudioProcessorEditor::displayPositionInfo (const AudioPlayHead::CurrentPositionInfo& pos)
{
lastDisplayedPosition = pos;
String displayText;
displayText.preallocateBytes (128);
displayText << String (pos.bpm, 2) << " bpm, "
<< pos.timeSigNumerator << '/' << pos.timeSigDenominator
<< " - " << timeToTimecodeString (pos.timeInSeconds)
<< " - " << ppqToBarsBeatsString (pos.ppqPosition, pos.ppqPositionOfLastBarStart,
pos.timeSigNumerator, pos.timeSigDenominator);
if (pos.isRecording)
displayText << " (recording)";
else if (pos.isPlaying)
displayText << " (playing)";
infoLabel.setText ("[" + SystemStats::getJUCEVersion() + "] " + displayText, dontSendNotification);
}
@@ -0,0 +1,53 @@
/*
==============================================================================
This file was auto-generated by the Jucer!
It contains the basic startup code for a Juce application.
==============================================================================
*/
#ifndef __PLUGINEDITOR_H_4ACCBAA__
#define __PLUGINEDITOR_H_4ACCBAA__
#include "../JuceLibraryCode/JuceHeader.h"
#include "PluginProcessor.h"
//==============================================================================
/** This is the editor component that our filter will display.
*/
class JuceDemoPluginAudioProcessorEditor : public AudioProcessorEditor,
public SliderListener,
public Timer
{
public:
JuceDemoPluginAudioProcessorEditor (JuceDemoPluginAudioProcessor&);
~JuceDemoPluginAudioProcessorEditor();
//==============================================================================
void timerCallback() override;
void paint (Graphics&) override;
void resized() override;
void sliderValueChanged (Slider*) override;
private:
MidiKeyboardComponent midiKeyboard;
Label infoLabel, gainLabel, delayLabel;
Slider gainSlider, delaySlider;
ScopedPointer<ResizableCornerComponent> resizer;
ComponentBoundsConstrainer resizeLimits;
AudioPlayHead::CurrentPositionInfo lastDisplayedPosition;
JuceDemoPluginAudioProcessor& getProcessor() const
{
return static_cast<JuceDemoPluginAudioProcessor&> (processor);
}
void displayPositionInfo (const AudioPlayHead::CurrentPositionInfo& pos);
};
#endif // __PLUGINEDITOR_H_4ACCBAA__
@@ -0,0 +1,405 @@
/*
==============================================================================
This file was auto-generated by the Jucer!
It contains the basic startup code for a Juce application.
==============================================================================
*/
#include "PluginProcessor.h"
#include "PluginEditor.h"
AudioProcessor* JUCE_CALLTYPE createPluginFilter();
//==============================================================================
/** A demo synth sound that's just a basic sine wave.. */
class SineWaveSound : public SynthesiserSound
{
public:
SineWaveSound() {}
bool appliesToNote (int /*midiNoteNumber*/) override { return true; }
bool appliesToChannel (int /*midiChannel*/) override { return true; }
};
//==============================================================================
/** A simple demo synth voice that just plays a sine wave.. */
class SineWaveVoice : public SynthesiserVoice
{
public:
SineWaveVoice()
: angleDelta (0.0),
tailOff (0.0)
{
}
bool canPlaySound (SynthesiserSound* sound) override
{
return dynamic_cast<SineWaveSound*> (sound) != nullptr;
}
void startNote (int midiNoteNumber, float velocity,
SynthesiserSound* /*sound*/,
int /*currentPitchWheelPosition*/) override
{
currentAngle = 0.0;
level = velocity * 0.15;
tailOff = 0.0;
double cyclesPerSecond = MidiMessage::getMidiNoteInHertz (midiNoteNumber);
double cyclesPerSample = cyclesPerSecond / getSampleRate();
angleDelta = cyclesPerSample * 2.0 * double_Pi;
}
void stopNote (float /*velocity*/, bool allowTailOff) override
{
if (allowTailOff)
{
// start a tail-off by setting this flag. The render callback will pick up on
// this and do a fade out, calling clearCurrentNote() when it's finished.
if (tailOff == 0.0) // we only need to begin a tail-off if it's not already doing so - the
// stopNote method could be called more than once.
tailOff = 1.0;
}
else
{
// we're being told to stop playing immediately, so reset everything..
clearCurrentNote();
angleDelta = 0.0;
}
}
void pitchWheelMoved (int /*newValue*/) override
{
// can't be bothered implementing this for the demo!
}
void controllerMoved (int /*controllerNumber*/, int /*newValue*/) override
{
// not interested in controllers in this case.
}
void renderNextBlock (AudioSampleBuffer& outputBuffer, int startSample, int numSamples) override
{
if (angleDelta != 0.0)
{
if (tailOff > 0)
{
while (--numSamples >= 0)
{
const float currentSample = (float) (sin (currentAngle) * level * tailOff);
for (int i = outputBuffer.getNumChannels(); --i >= 0;)
outputBuffer.addSample (i, startSample, currentSample);
currentAngle += angleDelta;
++startSample;
tailOff *= 0.99;
if (tailOff <= 0.005)
{
clearCurrentNote();
angleDelta = 0.0;
break;
}
}
}
else
{
while (--numSamples >= 0)
{
const float currentSample = (float) (sin (currentAngle) * level);
for (int i = outputBuffer.getNumChannels(); --i >= 0;)
outputBuffer.addSample (i, startSample, currentSample);
currentAngle += angleDelta;
++startSample;
}
}
}
}
private:
double currentAngle, angleDelta, level, tailOff;
};
const float defaultGain = 1.0f;
const float defaultDelay = 0.5f;
//==============================================================================
JuceDemoPluginAudioProcessor::JuceDemoPluginAudioProcessor()
: delayBuffer (2, 12000)
{
// Set up some default values..
gain = defaultGain;
delay = defaultDelay;
lastUIWidth = 400;
lastUIHeight = 200;
lastPosInfo.resetToDefault();
delayPosition = 0;
// Initialise the synth...
for (int i = 4; --i >= 0;)
synth.addVoice (new SineWaveVoice()); // These voices will play our custom sine-wave sounds..
synth.addSound (new SineWaveSound());
}
JuceDemoPluginAudioProcessor::~JuceDemoPluginAudioProcessor()
{
}
//==============================================================================
int JuceDemoPluginAudioProcessor::getNumParameters()
{
return totalNumParams;
}
float JuceDemoPluginAudioProcessor::getParameter (int index)
{
// This method will be called by the host, probably on the audio thread, so
// it's absolutely time-critical. Don't use critical sections or anything
// UI-related, or anything at all that may block in any way!
switch (index)
{
case gainParam: return gain;
case delayParam: return delay;
default: return 0.0f;
}
}
void JuceDemoPluginAudioProcessor::setParameter (int index, float newValue)
{
// This method will be called by the host, probably on the audio thread, so
// it's absolutely time-critical. Don't use critical sections or anything
// UI-related, or anything at all that may block in any way!
switch (index)
{
case gainParam: gain = newValue; break;
case delayParam: delay = newValue; break;
default: break;
}
}
float JuceDemoPluginAudioProcessor::getParameterDefaultValue (int index)
{
switch (index)
{
case gainParam: return defaultGain;
case delayParam: return defaultDelay;
default: break;
}
return 0.0f;
}
const String JuceDemoPluginAudioProcessor::getParameterName (int index)
{
switch (index)
{
case gainParam: return "gain";
case delayParam: return "delay";
default: break;
}
return String::empty;
}
const String JuceDemoPluginAudioProcessor::getParameterText (int index)
{
return String (getParameter (index), 2);
}
//==============================================================================
void JuceDemoPluginAudioProcessor::prepareToPlay (double sampleRate, int /*samplesPerBlock*/)
{
// Use this method as the place to do any pre-playback
// initialisation that you need..
synth.setCurrentPlaybackSampleRate (sampleRate);
keyboardState.reset();
delayBuffer.clear();
}
void JuceDemoPluginAudioProcessor::releaseResources()
{
// When playback stops, you can use this as an opportunity to free up any
// spare memory, etc.
keyboardState.reset();
}
void JuceDemoPluginAudioProcessor::reset()
{
// Use this method as the place to clear any delay lines, buffers, etc, as it
// means there's been a break in the audio's continuity.
delayBuffer.clear();
}
void JuceDemoPluginAudioProcessor::processBlock (AudioSampleBuffer& buffer, MidiBuffer& midiMessages)
{
const int numSamples = buffer.getNumSamples();
int channel, dp = 0;
// Go through the incoming data, and apply our gain to it...
for (channel = 0; channel < getNumInputChannels(); ++channel)
buffer.applyGain (channel, 0, buffer.getNumSamples(), gain);
// Now pass any incoming midi messages to our keyboard state object, and let it
// add messages to the buffer if the user is clicking on the on-screen keys
keyboardState.processNextMidiBuffer (midiMessages, 0, numSamples, true);
// and now get the synth to process these midi events and generate its output.
synth.renderNextBlock (buffer, midiMessages, 0, numSamples);
// Apply our delay effect to the new output..
for (channel = 0; channel < getNumInputChannels(); ++channel)
{
float* channelData = buffer.getWritePointer (channel);
float* delayData = delayBuffer.getWritePointer (jmin (channel, delayBuffer.getNumChannels() - 1));
dp = delayPosition;
for (int i = 0; i < numSamples; ++i)
{
const float in = channelData[i];
channelData[i] += delayData[dp];
delayData[dp] = (delayData[dp] + in) * delay;
if (++dp >= delayBuffer.getNumSamples())
dp = 0;
}
}
delayPosition = dp;
// In case we have more outputs than inputs, we'll clear any output
// channels that didn't contain input data, (because these aren't
// guaranteed to be empty - they may contain garbage).
for (int i = getNumInputChannels(); i < getNumOutputChannels(); ++i)
buffer.clear (i, 0, buffer.getNumSamples());
// ask the host for the current time so we can display it...
AudioPlayHead::CurrentPositionInfo newTime;
if (getPlayHead() != nullptr && getPlayHead()->getCurrentPosition (newTime))
{
// Successfully got the current time from the host..
lastPosInfo = newTime;
}
else
{
// If the host fails to fill-in the current time, we'll just clear it to a default..
lastPosInfo.resetToDefault();
}
}
//==============================================================================
AudioProcessorEditor* JuceDemoPluginAudioProcessor::createEditor()
{
return new JuceDemoPluginAudioProcessorEditor (*this);
}
//==============================================================================
void JuceDemoPluginAudioProcessor::getStateInformation (MemoryBlock& destData)
{
// You should use this method to store your parameters in the memory block.
// Here's an example of how you can use XML to make it easy and more robust:
// Create an outer XML element..
XmlElement xml ("MYPLUGINSETTINGS");
// add some attributes to it..
xml.setAttribute ("uiWidth", lastUIWidth);
xml.setAttribute ("uiHeight", lastUIHeight);
xml.setAttribute ("gain", gain);
xml.setAttribute ("delay", delay);
// then use this helper function to stuff it into the binary blob and return it..
copyXmlToBinary (xml, destData);
}
void JuceDemoPluginAudioProcessor::setStateInformation (const void* data, int sizeInBytes)
{
// You should use this method to restore your parameters from this memory block,
// whose contents will have been created by the getStateInformation() call.
// This getXmlFromBinary() helper function retrieves our XML from the binary blob..
ScopedPointer<XmlElement> xmlState (getXmlFromBinary (data, sizeInBytes));
if (xmlState != nullptr)
{
// make sure that it's actually our type of XML object..
if (xmlState->hasTagName ("MYPLUGINSETTINGS"))
{
// ok, now pull out our parameters..
lastUIWidth = xmlState->getIntAttribute ("uiWidth", lastUIWidth);
lastUIHeight = xmlState->getIntAttribute ("uiHeight", lastUIHeight);
gain = (float) xmlState->getDoubleAttribute ("gain", gain);
delay = (float) xmlState->getDoubleAttribute ("delay", delay);
}
}
}
const String JuceDemoPluginAudioProcessor::getInputChannelName (const int channelIndex) const
{
return String (channelIndex + 1);
}
const String JuceDemoPluginAudioProcessor::getOutputChannelName (const int channelIndex) const
{
return String (channelIndex + 1);
}
bool JuceDemoPluginAudioProcessor::isInputChannelStereoPair (int /*index*/) const
{
return true;
}
bool JuceDemoPluginAudioProcessor::isOutputChannelStereoPair (int /*index*/) const
{
return true;
}
bool JuceDemoPluginAudioProcessor::acceptsMidi() const
{
#if JucePlugin_WantsMidiInput
return true;
#else
return false;
#endif
}
bool JuceDemoPluginAudioProcessor::producesMidi() const
{
#if JucePlugin_ProducesMidiOutput
return true;
#else
return false;
#endif
}
bool JuceDemoPluginAudioProcessor::silenceInProducesSilenceOut() const
{
return false;
}
double JuceDemoPluginAudioProcessor::getTailLengthSeconds() const
{
return 0.0;
}
//==============================================================================
// This creates new instances of the plugin..
AudioProcessor* JUCE_CALLTYPE createPluginFilter()
{
return new JuceDemoPluginAudioProcessor();
}
@@ -0,0 +1,109 @@
/*
==============================================================================
This file was auto-generated by the Jucer!
It contains the basic startup code for a Juce application.
==============================================================================
*/
#ifndef __PLUGINPROCESSOR_H_526ED7A9__
#define __PLUGINPROCESSOR_H_526ED7A9__
#include "../JuceLibraryCode/JuceHeader.h"
//==============================================================================
/**
As the name suggest, this class does the actual audio processing.
*/
class JuceDemoPluginAudioProcessor : public AudioProcessor
{
public:
//==============================================================================
JuceDemoPluginAudioProcessor();
~JuceDemoPluginAudioProcessor();
//==============================================================================
void prepareToPlay (double sampleRate, int samplesPerBlock) override;
void releaseResources() override;
void processBlock (AudioSampleBuffer& buffer, MidiBuffer& midiMessages) override;
void reset() override;
//==============================================================================
bool hasEditor() const override { return true; }
AudioProcessorEditor* createEditor() override;
//==============================================================================
const String getName() const override { return JucePlugin_Name; }
int getNumParameters() override;
float getParameter (int index) override;
float getParameterDefaultValue (int index) override;
void setParameter (int index, float newValue) override;
const String getParameterName (int index) override;
const String getParameterText (int index) override;
const String getInputChannelName (int channelIndex) const override;
const String getOutputChannelName (int channelIndex) const override;
bool isInputChannelStereoPair (int index) const override;
bool isOutputChannelStereoPair (int index) const override;
bool acceptsMidi() const override;
bool producesMidi() const override;
bool silenceInProducesSilenceOut() const override;
double getTailLengthSeconds() const override;
//==============================================================================
int getNumPrograms() override { return 1; }
int getCurrentProgram() override { return 0; }
void setCurrentProgram (int /*index*/) override {}
const String getProgramName (int /*index*/) override { return "Default"; }
void changeProgramName (int /*index*/, const String& /*newName*/) override {}
//==============================================================================
void getStateInformation (MemoryBlock& destData) override;
void setStateInformation (const void* data, int sizeInBytes) override;
//==============================================================================
// These properties are public so that our editor component can access them
// A bit of a hacky way to do it, but it's only a demo! Obviously in your own
// code you'll do this much more neatly..
// this is kept up to date with the midi messages that arrive, and the UI component
// registers with it so it can represent the incoming messages
MidiKeyboardState keyboardState;
// this keeps a copy of the last set of time info that was acquired during an audio
// callback - the UI component will read this and display it.
AudioPlayHead::CurrentPositionInfo lastPosInfo;
// these are used to persist the UI's size - the values are stored along with the
// filter's other parameters, and the UI component will update them when it gets
// resized.
int lastUIWidth, lastUIHeight;
//==============================================================================
enum Parameters
{
gainParam = 0,
delayParam,
totalNumParams
};
float gain, delay;
private:
//==============================================================================
AudioSampleBuffer delayBuffer;
int delayPosition;
// the synth!
Synthesiser synth;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (JuceDemoPluginAudioProcessor)
};
#endif // __PLUGINPROCESSOR_H_526ED7A9__