mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-26 02:14:22 +00:00
Added multi-bus support for audio plug-in clients
This commit is contained in:
parent
e0bd51f26c
commit
4fef661ada
170 changed files with 43444 additions and 2243 deletions
46
examples/PlugInSamples/Spatializer/Builds/MacOSX/Info.plist
Normal file
46
examples/PlugInSamples/Spatializer/Builds/MacOSX/Info.plist
Normal file
|
|
@ -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.ROLI.Spatializer</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>Spatializer</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>ROLI Ltd.</string>
|
||||
<key>NSHighResolutionCapable</key>
|
||||
<true/>
|
||||
<key>AudioComponents</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>ROLI Ltd.: Spatializer</string>
|
||||
<key>description</key>
|
||||
<string>Spatializer</string>
|
||||
<key>factoryFunction</key>
|
||||
<string>SpatializerAUFactory</string>
|
||||
<key>manufacturer</key>
|
||||
<string>ROLI</string>
|
||||
<key>type</key>
|
||||
<string>aufx</string>
|
||||
<key>subtype</key>
|
||||
<string>Spce</string>
|
||||
<key>version</key>
|
||||
<integer>65536</integer>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
BIN
examples/PlugInSamples/Spatializer/Builds/MacOSX/RecentFilesMenuTemplate.nib
generated
Normal file
BIN
examples/PlugInSamples/Spatializer/Builds/MacOSX/RecentFilesMenuTemplate.nib
generated
Normal file
Binary file not shown.
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,19 @@
|
|||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual Studio 2015
|
||||
Project("{5EB4FAE9-3A0A-1E23-BE50-1E03DBF9545D}") = "Spatializer", "Spatializer.vcxproj", "{5688C574-BDEA-F1FF-7716-E727FF891687}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Release|Win32 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{5688C574-BDEA-F1FF-7716-E727FF891687}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{5688C574-BDEA-F1FF-7716-E727FF891687}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{5688C574-BDEA-F1FF-7716-E727FF891687}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{5688C574-BDEA-F1FF-7716-E727FF891687}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -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", "ROLI Ltd.\0"
|
||||
VALUE "FileDescription", "Spatializer\0"
|
||||
VALUE "FileVersion", "1.0.0\0"
|
||||
VALUE "ProductName", "Spatializer\0"
|
||||
VALUE "ProductVersion", "1.0.0\0"
|
||||
END
|
||||
END
|
||||
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1252
|
||||
END
|
||||
END
|
||||
|
||||
#endif
|
||||
334
examples/PlugInSamples/Spatializer/JuceLibraryCode/AppConfig.h
Normal file
334
examples/PlugInSamples/Spatializer/JuceLibraryCode/AppConfig.h
Normal file
|
|
@ -0,0 +1,334 @@
|
|||
/*
|
||||
|
||||
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_AX3KPE__
|
||||
#define __JUCE_APPCONFIG_AX3KPE__
|
||||
|
||||
//==============================================================================
|
||||
// [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_core 1
|
||||
#define JUCE_MODULE_AVAILABLE_juce_cryptography 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
|
||||
#define JUCE_MODULE_AVAILABLE_juce_opengl 1
|
||||
#define JUCE_MODULE_AVAILABLE_juce_video 1
|
||||
|
||||
//==============================================================================
|
||||
#ifndef JUCE_STANDALONE_APPLICATION
|
||||
#define JUCE_STANDALONE_APPLICATION 0
|
||||
#endif
|
||||
|
||||
//==============================================================================
|
||||
// juce_audio_devices flags:
|
||||
|
||||
#ifndef JUCE_ASIO
|
||||
//#define JUCE_ASIO
|
||||
#endif
|
||||
|
||||
#ifndef JUCE_WASAPI
|
||||
//#define JUCE_WASAPI
|
||||
#endif
|
||||
|
||||
#ifndef JUCE_WASAPI_EXCLUSIVE
|
||||
//#define JUCE_WASAPI_EXCLUSIVE
|
||||
#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
|
||||
#endif
|
||||
|
||||
#ifndef JUCE_PLUGINHOST_VST3
|
||||
//#define JUCE_PLUGINHOST_VST3
|
||||
#endif
|
||||
|
||||
#ifndef JUCE_PLUGINHOST_AU
|
||||
//#define JUCE_PLUGINHOST_AU
|
||||
#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
|
||||
|
||||
#ifndef JUCE_USE_CURL
|
||||
//#define JUCE_USE_CURL
|
||||
#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
|
||||
|
||||
//==============================================================================
|
||||
// juce_video flags:
|
||||
|
||||
#ifndef JUCE_DIRECTSHOW
|
||||
//#define JUCE_DIRECTSHOW
|
||||
#endif
|
||||
|
||||
#ifndef JUCE_MEDIAFOUNDATION
|
||||
//#define JUCE_MEDIAFOUNDATION
|
||||
#endif
|
||||
|
||||
#ifndef JUCE_QUICKTIME
|
||||
#define JUCE_QUICKTIME 0
|
||||
#endif
|
||||
|
||||
#ifndef JUCE_USE_CAMERA
|
||||
//#define JUCE_USE_CAMERA
|
||||
#endif
|
||||
|
||||
|
||||
//==============================================================================
|
||||
// Audio plugin settings..
|
||||
|
||||
#ifndef JucePlugin_Build_VST
|
||||
#define JucePlugin_Build_VST 0
|
||||
#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 1
|
||||
#endif
|
||||
#ifndef JucePlugin_Name
|
||||
#define JucePlugin_Name "Spatializer"
|
||||
#endif
|
||||
#ifndef JucePlugin_Desc
|
||||
#define JucePlugin_Desc "Spatializer"
|
||||
#endif
|
||||
#ifndef JucePlugin_Manufacturer
|
||||
#define JucePlugin_Manufacturer "ROLI Ltd."
|
||||
#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 'ROLI'
|
||||
#endif
|
||||
#ifndef JucePlugin_PluginCode
|
||||
#define JucePlugin_PluginCode 'Spce'
|
||||
#endif
|
||||
#ifndef JucePlugin_IsSynth
|
||||
#define JucePlugin_IsSynth 0
|
||||
#endif
|
||||
#ifndef JucePlugin_WantsMidiInput
|
||||
#define JucePlugin_WantsMidiInput 0
|
||||
#endif
|
||||
#ifndef JucePlugin_ProducesMidiOutput
|
||||
#define JucePlugin_ProducesMidiOutput 0
|
||||
#endif
|
||||
#ifndef JucePlugin_IsMidiEffect
|
||||
#define JucePlugin_IsMidiEffect 0
|
||||
#endif
|
||||
#ifndef JucePlugin_SilenceInProducesSilenceOut
|
||||
#define JucePlugin_SilenceInProducesSilenceOut 1
|
||||
#endif
|
||||
#ifndef JucePlugin_EditorRequiresKeyboardFocus
|
||||
#define JucePlugin_EditorRequiresKeyboardFocus 0
|
||||
#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_Effect
|
||||
#endif
|
||||
#ifndef JucePlugin_AUSubType
|
||||
#define JucePlugin_AUSubType JucePlugin_PluginCode
|
||||
#endif
|
||||
#ifndef JucePlugin_AUExportPrefix
|
||||
#define JucePlugin_AUExportPrefix SpatializerAU
|
||||
#endif
|
||||
#ifndef JucePlugin_AUExportPrefixQuoted
|
||||
#define JucePlugin_AUExportPrefixQuoted "SpatializerAU"
|
||||
#endif
|
||||
#ifndef JucePlugin_AUManufacturerCode
|
||||
#define JucePlugin_AUManufacturerCode JucePlugin_ManufacturerCode
|
||||
#endif
|
||||
#ifndef JucePlugin_CFBundleIdentifier
|
||||
#define JucePlugin_CFBundleIdentifier com.ROLI.Spatializer
|
||||
#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.ROLI.Spatializer
|
||||
#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_SoundField
|
||||
#endif
|
||||
#ifndef JucePlugin_AAXDisableBypass
|
||||
#define JucePlugin_AAXDisableBypass 0
|
||||
#endif
|
||||
#ifndef JucePlugin_AAXDisableMultiMono
|
||||
#define JucePlugin_AAXDisableMultiMono 0
|
||||
#endif
|
||||
|
||||
#endif // __JUCE_APPCONFIG_AX3KPE__
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
/*
|
||||
|
||||
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_AX3KPE__
|
||||
#define __APPHEADERFILE_AX3KPE__
|
||||
|
||||
#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_core/juce_core.h"
|
||||
#include "modules/juce_cryptography/juce_cryptography.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"
|
||||
#include "modules/juce_opengl/juce_opengl.h"
|
||||
#include "modules/juce_video/juce_video.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 = "Spatializer";
|
||||
const char* const versionString = "1.0.0";
|
||||
const int versionNumber = 0x10000;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // __APPHEADERFILE_AX3KPE__
|
||||
|
|
@ -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,4 @@
|
|||
// 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,4 @@
|
|||
// 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,4 @@
|
|||
// 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,4 @@
|
|||
// 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,4 @@
|
|||
// 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,4 @@
|
|||
// 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,4 @@
|
|||
// This is an auto-generated file to redirect any included
|
||||
// module headers to the correct external folder.
|
||||
|
||||
#include "../../../../../../modules/juce_cryptography/juce_cryptography.h"
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
// 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,4 @@
|
|||
// 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,4 @@
|
|||
// 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,4 @@
|
|||
// 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,4 @@
|
|||
// 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,4 @@
|
|||
// This is an auto-generated file to redirect any included
|
||||
// module headers to the correct external folder.
|
||||
|
||||
#include "../../../../../../modules/juce_opengl/juce_opengl.h"
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
// This is an auto-generated file to redirect any included
|
||||
// module headers to the correct external folder.
|
||||
|
||||
#include "../../../../../../modules/juce_video/juce_video.h"
|
||||
177
examples/PlugInSamples/Spatializer/Source/Spatializer.cpp
Normal file
177
examples/PlugInSamples/Spatializer/Source/Spatializer.cpp
Normal file
|
|
@ -0,0 +1,177 @@
|
|||
/*
|
||||
==============================================================================
|
||||
|
||||
Spatializer.cpp
|
||||
Created: 23 Nov 2015 3:08:33pm
|
||||
Author: Fabian Renn
|
||||
|
||||
==============================================================================
|
||||
*/
|
||||
|
||||
#include "../JuceLibraryCode/JuceHeader.h"
|
||||
#include "../../GenericEditor.h"
|
||||
|
||||
//==============================================================================
|
||||
/**
|
||||
*/
|
||||
class Spatializer : public AudioProcessor
|
||||
{
|
||||
public:
|
||||
|
||||
struct SpeakerPosition
|
||||
{
|
||||
float radius, phi;
|
||||
};
|
||||
|
||||
struct SpeakerLayout
|
||||
{
|
||||
AudioChannelSet set;
|
||||
Array<SpeakerPosition> positions;
|
||||
};
|
||||
|
||||
// this needs at least c++11
|
||||
static Array<SpeakerLayout> speakerPositions;
|
||||
|
||||
//==============================================================================
|
||||
Spatializer() : currentSpeakerLayout (0)
|
||||
{
|
||||
// clear the default bus arrangements which were created by the base class
|
||||
busArrangement.inputBuses .clear();
|
||||
busArrangement.outputBuses.clear();
|
||||
|
||||
// add mono in and default out
|
||||
busArrangement.inputBuses .add (AudioProcessorBus ("Input", AudioChannelSet::mono()));
|
||||
busArrangement.outputBuses.add (AudioProcessorBus ("Output", speakerPositions[currentSpeakerLayout].set));
|
||||
|
||||
addParameter (radius = new AudioParameterFloat ("radius", "Radius", 0.0f, 1.0f, 0.5f));
|
||||
addParameter (phi = new AudioParameterFloat ("phi", "Phi", 0.0f, 1.0f, 0.0f));
|
||||
}
|
||||
|
||||
~Spatializer() {}
|
||||
|
||||
//==============================================================================
|
||||
bool setPreferredBusArrangement (bool isInputBus, int busIndex,
|
||||
const AudioChannelSet& preferred) override
|
||||
{
|
||||
// we only allow mono in
|
||||
if (isInputBus && preferred != AudioChannelSet::mono())
|
||||
return false;
|
||||
|
||||
// the output must be one of the supported speaker layouts
|
||||
if (! isInputBus)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < speakerPositions.size(); ++i)
|
||||
if (speakerPositions[i].set == preferred) break;
|
||||
|
||||
if (i >= speakerPositions.size())
|
||||
return false;
|
||||
|
||||
currentSpeakerLayout = i;
|
||||
}
|
||||
|
||||
return AudioProcessor::setPreferredBusArrangement (isInputBus, busIndex, preferred);
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
void prepareToPlay (double sampleRate, int samplesPerBlock) override
|
||||
{
|
||||
scratchBuffer.setSize (1, samplesPerBlock);
|
||||
}
|
||||
|
||||
void releaseResources() override {}
|
||||
|
||||
void processBlock (AudioSampleBuffer& buffer, MidiBuffer&) override
|
||||
{
|
||||
// copy the input into a scratch buffer
|
||||
AudioSampleBuffer scratch (scratchBuffer.getArrayOfWritePointers(), 1, buffer.getNumSamples());
|
||||
scratch.copyFrom(0, 0, buffer, 0, 0, buffer.getNumSamples());
|
||||
|
||||
const Array<SpeakerPosition>& positions = speakerPositions.getReference (currentSpeakerLayout).positions;
|
||||
const float* inputBuffer = scratch.getReadPointer (0);
|
||||
const float kMaxDistanceGain = -20.0f;
|
||||
|
||||
for (int speakerIdx = 0; speakerIdx < positions.size(); ++speakerIdx)
|
||||
{
|
||||
const SpeakerPosition& speakerPos = positions.getReference (speakerIdx);
|
||||
float fltDistance = distance (polarToCartesian (speakerPos.radius, speakerPos.phi), polarToCartesian (*radius, (*phi) * 2.0f * float_Pi));
|
||||
float gainInDb = kMaxDistanceGain * (fltDistance / 2.0f);
|
||||
float gain = std::pow (10.0f, (gainInDb / 20.0f));
|
||||
|
||||
busArrangement.getBusBuffer(buffer, false, 0).copyFrom(speakerIdx, 0, inputBuffer, buffer.getNumSamples(), gain);
|
||||
}
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
AudioProcessorEditor* createEditor() override { return new GenericEditor (*this); }
|
||||
bool hasEditor() const override { return true; }
|
||||
|
||||
//==============================================================================
|
||||
const String getName() const override { return "Gain PlugIn"; }
|
||||
|
||||
bool acceptsMidi() const override { return false; }
|
||||
bool producesMidi() const override { return false; }
|
||||
bool silenceInProducesSilenceOut() const override { return true; }
|
||||
double getTailLengthSeconds() const override { return 0; }
|
||||
|
||||
//==============================================================================
|
||||
int getNumPrograms() override { return 1; }
|
||||
int getCurrentProgram() override { return 0; }
|
||||
void setCurrentProgram (int) override {}
|
||||
const String getProgramName (int) override { return String(); }
|
||||
void changeProgramName (int , const String& ) override { }
|
||||
|
||||
//==============================================================================
|
||||
void getStateInformation (MemoryBlock& destData) override
|
||||
{
|
||||
MemoryOutputStream stream (destData, true);
|
||||
|
||||
stream.writeFloat (*radius);
|
||||
stream.writeFloat (*phi);
|
||||
}
|
||||
|
||||
void setStateInformation (const void* data, int sizeInBytes) override
|
||||
{
|
||||
MemoryInputStream stream (data, sizeInBytes, false);
|
||||
|
||||
radius->setValueNotifyingHost (stream.readFloat());
|
||||
phi->setValueNotifyingHost (stream.readFloat());
|
||||
}
|
||||
|
||||
private:
|
||||
//==============================================================================
|
||||
AudioParameterFloat* radius;
|
||||
AudioParameterFloat* phi;
|
||||
int currentSpeakerLayout;
|
||||
AudioSampleBuffer scratchBuffer;
|
||||
|
||||
static Point<float> polarToCartesian (float r, float phi) noexcept
|
||||
{
|
||||
return Point<float> (r * std::cos (phi), r * std::sin (phi));
|
||||
}
|
||||
|
||||
static float distance (Point<float> a, Point<float> b) noexcept
|
||||
{
|
||||
return std::sqrt (std::pow (a.x - b.x, 2.0f) + std::pow (a.y - b.y, 2.0f));
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Spatializer)
|
||||
};
|
||||
|
||||
// this needs at least c++11
|
||||
Array<Spatializer::SpeakerLayout> Spatializer::speakerPositions =
|
||||
{
|
||||
Spatializer::SpeakerLayout { AudioChannelSet::stereo(), { SpeakerPosition { 1.0f, -0.25f * float_Pi }, SpeakerPosition { 1.0f, 0.25f * float_Pi } }},
|
||||
Spatializer::SpeakerLayout { AudioChannelSet::quadraphonic(), { SpeakerPosition { 1.0f, -0.25f * float_Pi }, SpeakerPosition { 1.0f, 0.25f * float_Pi }, SpeakerPosition {1.0f, -0.75f * float_Pi}, SpeakerPosition {1.0f, 0.75f * float_Pi}}},
|
||||
Spatializer::SpeakerLayout { AudioChannelSet::create5point0(), {SpeakerPosition { 1.0f, 0.0f}, SpeakerPosition { 1.0f, -0.25f * float_Pi }, SpeakerPosition { 1.0f, 0.25f * float_Pi }, SpeakerPosition {1.0f, -0.75f * float_Pi}, SpeakerPosition {1.0f, 0.75f * float_Pi}}}
|
||||
};
|
||||
|
||||
|
||||
//==============================================================================
|
||||
// This creates new instances of the plugin..
|
||||
AudioProcessor* JUCE_CALLTYPE createPluginFilter()
|
||||
{
|
||||
return new Spatializer();
|
||||
}
|
||||
86
examples/PlugInSamples/Spatializer/Spatializer.jucer
Normal file
86
examples/PlugInSamples/Spatializer/Spatializer.jucer
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<JUCERPROJECT id="ax3kpe" name="Spatializer" projectType="audioplug" version="1.0.0"
|
||||
bundleIdentifier="com.ROLI.Spatializer" includeBinaryInAppConfig="1"
|
||||
buildVST="0" buildVST3="1" buildAU="1" buildRTAS="0" buildAAX="1"
|
||||
pluginName="Spatializer" pluginDesc="Spatializer" pluginManufacturer="ROLI Ltd."
|
||||
pluginManufacturerCode="ROLI" pluginCode="Spce" pluginChannelConfigs=""
|
||||
pluginIsSynth="0" pluginWantsMidiIn="0" pluginProducesMidiOut="0"
|
||||
pluginIsMidiEffectPlugin="0" pluginSilenceInIsSilenceOut="1"
|
||||
pluginEditorRequiresKeys="0" pluginAUExportPrefix="SpatializerAU"
|
||||
pluginRTASCategory="" aaxIdentifier="com.ROLI.Spatializer" pluginAAXCategory="AAX_ePlugInCategory_SoundField"
|
||||
jucerVersion="4.0.2" companyName="ROLI Ltd." companyWebsite="www.juce.com"
|
||||
companyEmail="info@juce.com">
|
||||
<MAINGROUP id="thFyrP" name="Spatializer">
|
||||
<GROUP id="{9705FE92-3084-C118-7559-BCCD1F2E91EB}" name="Source">
|
||||
<FILE id="nyBk2e" name="Spatializer.cpp" compile="1" resource="0" file="Source/Spatializer.cpp"/>
|
||||
</GROUP>
|
||||
</MAINGROUP>
|
||||
<EXPORTFORMATS>
|
||||
<XCODE_MAC targetFolder="Builds/MacOSX">
|
||||
<CONFIGURATIONS>
|
||||
<CONFIGURATION name="Debug" osxSDK="default" osxCompatibility="default" osxArchitecture="default"
|
||||
isDebug="1" optimisation="1" targetName="Spatializer"/>
|
||||
<CONFIGURATION name="Release" osxSDK="default" osxCompatibility="default" osxArchitecture="default"
|
||||
isDebug="0" optimisation="3" targetName="Spatializer"/>
|
||||
</CONFIGURATIONS>
|
||||
<MODULEPATHS>
|
||||
<MODULEPATH id="juce_core" path="../../../modules"/>
|
||||
<MODULEPATH id="juce_events" path="../../../modules"/>
|
||||
<MODULEPATH id="juce_graphics" path="../../../modules"/>
|
||||
<MODULEPATH id="juce_data_structures" path="../../../modules"/>
|
||||
<MODULEPATH id="juce_gui_basics" path="../../../modules"/>
|
||||
<MODULEPATH id="juce_gui_extra" path="../../../modules"/>
|
||||
<MODULEPATH id="juce_cryptography" path="../../../modules"/>
|
||||
<MODULEPATH id="juce_video" path="../../../modules"/>
|
||||
<MODULEPATH id="juce_opengl" path="../../../modules"/>
|
||||
<MODULEPATH id="juce_audio_basics" path="../../../modules"/>
|
||||
<MODULEPATH id="juce_audio_devices" path="../../../modules"/>
|
||||
<MODULEPATH id="juce_audio_formats" path="../../../modules"/>
|
||||
<MODULEPATH id="juce_audio_processors" path="../../../modules"/>
|
||||
<MODULEPATH id="juce_audio_plugin_client" path="../../../modules"/>
|
||||
</MODULEPATHS>
|
||||
</XCODE_MAC>
|
||||
<VS2015 targetFolder="Builds/VisualStudio2015">
|
||||
<CONFIGURATIONS>
|
||||
<CONFIGURATION name="Debug" winWarningLevel="4" generateManifest="1" winArchitecture="32-bit"
|
||||
isDebug="1" optimisation="1" targetName="Spatializer"/>
|
||||
<CONFIGURATION name="Release" winWarningLevel="4" generateManifest="1" winArchitecture="32-bit"
|
||||
isDebug="0" optimisation="3" targetName="Spatializer"/>
|
||||
</CONFIGURATIONS>
|
||||
<MODULEPATHS>
|
||||
<MODULEPATH id="juce_video" path="../../../modules"/>
|
||||
<MODULEPATH id="juce_opengl" path="../../../modules"/>
|
||||
<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_cryptography" path="../../../modules"/>
|
||||
<MODULEPATH id="juce_core" 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>
|
||||
</VS2015>
|
||||
</EXPORTFORMATS>
|
||||
<MODULES>
|
||||
<MODULE id="juce_audio_basics" showAllCode="1" useLocalCopy="0"/>
|
||||
<MODULE id="juce_audio_devices" showAllCode="1" useLocalCopy="0"/>
|
||||
<MODULE id="juce_audio_formats" showAllCode="1" useLocalCopy="0"/>
|
||||
<MODULE id="juce_audio_plugin_client" showAllCode="1" useLocalCopy="0"/>
|
||||
<MODULE id="juce_audio_processors" showAllCode="1" useLocalCopy="0"/>
|
||||
<MODULE id="juce_core" showAllCode="1" useLocalCopy="0"/>
|
||||
<MODULE id="juce_cryptography" showAllCode="1" useLocalCopy="0"/>
|
||||
<MODULE id="juce_data_structures" showAllCode="1" useLocalCopy="0"/>
|
||||
<MODULE id="juce_events" showAllCode="1" useLocalCopy="0"/>
|
||||
<MODULE id="juce_graphics" showAllCode="1" useLocalCopy="0"/>
|
||||
<MODULE id="juce_gui_basics" showAllCode="1" useLocalCopy="0"/>
|
||||
<MODULE id="juce_gui_extra" showAllCode="1" useLocalCopy="0"/>
|
||||
<MODULE id="juce_opengl" showAllCode="1" useLocalCopy="0"/>
|
||||
<MODULE id="juce_video" showAllCode="1" useLocalCopy="0"/>
|
||||
</MODULES>
|
||||
<JUCEOPTIONS JUCE_QUICKTIME="disabled"/>
|
||||
</JUCERPROJECT>
|
||||
Loading…
Add table
Add a link
Reference in a new issue