Browse Source

Renamed the MPETest example to MPEDemo and updated it to reflect the recent MPE class updates

tags/2021-05-28
ed 7 years ago
parent
commit
dbf39f5b7b
51 changed files with 246 additions and 257 deletions
  1. +5
    -5
      examples/MPEDemo/Builds/LinuxMakefile/Makefile
  2. +2
    -2
      examples/MPEDemo/Builds/MacOSX/Info-App.plist
  3. +5
    -5
      examples/MPEDemo/Builds/MacOSX/MPEDemo.xcodeproj/project.pbxproj
  4. +0
    -0
      examples/MPEDemo/Builds/MacOSX/RecentFilesMenuTemplate.nib
  5. +1
    -1
      examples/MPEDemo/Builds/VisualStudio2015/MPEDemo.sln
  6. +11
    -11
      examples/MPEDemo/Builds/VisualStudio2015/MPEDemo_App.vcxproj
  7. +15
    -15
      examples/MPEDemo/Builds/VisualStudio2015/MPEDemo_App.vcxproj.filters
  8. +2
    -2
      examples/MPEDemo/Builds/VisualStudio2015/resources.rc
  9. +1
    -1
      examples/MPEDemo/Builds/VisualStudio2017/MPEDemo.sln
  10. +11
    -11
      examples/MPEDemo/Builds/VisualStudio2017/MPEDemo_App.vcxproj
  11. +15
    -15
      examples/MPEDemo/Builds/VisualStudio2017/MPEDemo_App.vcxproj.filters
  12. +2
    -2
      examples/MPEDemo/Builds/VisualStudio2017/resources.rc
  13. +0
    -0
      examples/MPEDemo/JuceLibraryCode/AppConfig.h
  14. +1
    -1
      examples/MPEDemo/JuceLibraryCode/JuceHeader.h
  15. +0
    -0
      examples/MPEDemo/JuceLibraryCode/ReadMe.txt
  16. +0
    -0
      examples/MPEDemo/JuceLibraryCode/include_juce_audio_basics.cpp
  17. +0
    -0
      examples/MPEDemo/JuceLibraryCode/include_juce_audio_basics.mm
  18. +0
    -0
      examples/MPEDemo/JuceLibraryCode/include_juce_audio_devices.cpp
  19. +0
    -0
      examples/MPEDemo/JuceLibraryCode/include_juce_audio_devices.mm
  20. +0
    -0
      examples/MPEDemo/JuceLibraryCode/include_juce_audio_formats.cpp
  21. +0
    -0
      examples/MPEDemo/JuceLibraryCode/include_juce_audio_formats.mm
  22. +0
    -0
      examples/MPEDemo/JuceLibraryCode/include_juce_audio_processors.cpp
  23. +0
    -0
      examples/MPEDemo/JuceLibraryCode/include_juce_audio_processors.mm
  24. +0
    -0
      examples/MPEDemo/JuceLibraryCode/include_juce_audio_utils.cpp
  25. +0
    -0
      examples/MPEDemo/JuceLibraryCode/include_juce_audio_utils.mm
  26. +0
    -0
      examples/MPEDemo/JuceLibraryCode/include_juce_core.cpp
  27. +0
    -0
      examples/MPEDemo/JuceLibraryCode/include_juce_core.mm
  28. +0
    -0
      examples/MPEDemo/JuceLibraryCode/include_juce_cryptography.cpp
  29. +0
    -0
      examples/MPEDemo/JuceLibraryCode/include_juce_cryptography.mm
  30. +0
    -0
      examples/MPEDemo/JuceLibraryCode/include_juce_data_structures.cpp
  31. +0
    -0
      examples/MPEDemo/JuceLibraryCode/include_juce_data_structures.mm
  32. +0
    -0
      examples/MPEDemo/JuceLibraryCode/include_juce_events.cpp
  33. +0
    -0
      examples/MPEDemo/JuceLibraryCode/include_juce_events.mm
  34. +0
    -0
      examples/MPEDemo/JuceLibraryCode/include_juce_graphics.cpp
  35. +0
    -0
      examples/MPEDemo/JuceLibraryCode/include_juce_graphics.mm
  36. +0
    -0
      examples/MPEDemo/JuceLibraryCode/include_juce_gui_basics.cpp
  37. +0
    -0
      examples/MPEDemo/JuceLibraryCode/include_juce_gui_basics.mm
  38. +0
    -0
      examples/MPEDemo/JuceLibraryCode/include_juce_gui_extra.cpp
  39. +0
    -0
      examples/MPEDemo/JuceLibraryCode/include_juce_gui_extra.mm
  40. +0
    -0
      examples/MPEDemo/JuceLibraryCode/include_juce_opengl.cpp
  41. +0
    -0
      examples/MPEDemo/JuceLibraryCode/include_juce_opengl.mm
  42. +0
    -0
      examples/MPEDemo/JuceLibraryCode/include_juce_video.cpp
  43. +0
    -0
      examples/MPEDemo/JuceLibraryCode/include_juce_video.mm
  44. +10
    -10
      examples/MPEDemo/MPEDemo.jucer
  45. +19
    -20
      examples/MPEDemo/Source/MPEDemoSynthVoice.h
  46. +57
    -77
      examples/MPEDemo/Source/MPESetupComponent.h
  47. +6
    -6
      examples/MPEDemo/Source/Main.cpp
  48. +28
    -17
      examples/MPEDemo/Source/MainComponent.h
  49. +15
    -13
      examples/MPEDemo/Source/Visualiser.h
  50. +10
    -23
      examples/MPEDemo/Source/ZoneColourPicker.h
  51. +30
    -20
      examples/MPEDemo/Source/ZoneLayoutComponent.h

examples/MPETest/Builds/LinuxMakefile/Makefile → examples/MPEDemo/Builds/LinuxMakefile/Makefile View File

@@ -37,7 +37,7 @@ ifeq ($(CONFIG),Debug)
JUCE_CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DDEBUG=1 -D_DEBUG=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=1.0.0 -DJUCE_APP_VERSION_HEX=0x10000 $(shell pkg-config --cflags alsa freetype2 libcurl x11 xext xinerama webkit2gtk-4.0 gtk+-x11-3.0) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS)
JUCE_CPPFLAGS_APP := -DJucePlugin_Build_VST=0 -DJucePlugin_Build_VST3=0 -DJucePlugin_Build_AU=0 -DJucePlugin_Build_AUv3=0 -DJucePlugin_Build_RTAS=0 -DJucePlugin_Build_AAX=0 -DJucePlugin_Build_Standalone=0
JUCE_TARGET_APP := MPETest
JUCE_TARGET_APP := MPEDemo
JUCE_CFLAGS += $(JUCE_CPPFLAGS) $(TARGET_ARCH) -g -ggdb -O0 $(CFLAGS)
JUCE_CXXFLAGS += $(JUCE_CFLAGS) -std=c++14 $(CXXFLAGS)
@@ -58,7 +58,7 @@ ifeq ($(CONFIG),Release)
JUCE_CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DNDEBUG=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=1.0.0 -DJUCE_APP_VERSION_HEX=0x10000 $(shell pkg-config --cflags alsa freetype2 libcurl x11 xext xinerama webkit2gtk-4.0 gtk+-x11-3.0) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS)
JUCE_CPPFLAGS_APP := -DJucePlugin_Build_VST=0 -DJucePlugin_Build_VST3=0 -DJucePlugin_Build_AU=0 -DJucePlugin_Build_AUv3=0 -DJucePlugin_Build_RTAS=0 -DJucePlugin_Build_AAX=0 -DJucePlugin_Build_Standalone=0
JUCE_TARGET_APP := MPETest
JUCE_TARGET_APP := MPEDemo
JUCE_CFLAGS += $(JUCE_CPPFLAGS) $(TARGET_ARCH) -O3 $(CFLAGS)
JUCE_CXXFLAGS += $(JUCE_CFLAGS) -std=c++14 $(CXXFLAGS)
@@ -89,7 +89,7 @@ OBJECTS_APP := \
all : $(JUCE_OUTDIR)/$(JUCE_TARGET_APP)
$(JUCE_OUTDIR)/$(JUCE_TARGET_APP) : check-pkg-config $(OBJECTS_APP) $(RESOURCES)
@echo Linking "MPETest - App"
@echo Linking "MPEDemo - App"
-$(V_AT)mkdir -p $(JUCE_BINDIR)
-$(V_AT)mkdir -p $(JUCE_LIBDIR)
-$(V_AT)mkdir -p $(JUCE_OUTDIR)
@@ -175,11 +175,11 @@ check-pkg-config:
@pkg-config --print-errors alsa freetype2 libcurl x11 xext xinerama webkit2gtk-4.0 gtk+-x11-3.0
clean:
@echo Cleaning MPETest
@echo Cleaning MPEDemo
$(V_AT)$(CLEANCMD)
strip:
@echo Stripping MPETest
@echo Stripping MPEDemo
-$(V_AT)$(STRIP) --strip-unneeded $(JUCE_OUTDIR)/$(TARGET)
-include $(OBJECTS_APP:%.o=%.d)

examples/MPETest/Builds/MacOSX/Info-App.plist → examples/MPEDemo/Builds/MacOSX/Info-App.plist View File

@@ -10,9 +10,9 @@
<key>CFBundleIdentifier</key>
<string>com.roli.MPETest</string>
<key>CFBundleName</key>
<string>MPETest</string>
<string>MPEDemo</string>
<key>CFBundleDisplayName</key>
<string>MPETest</string>
<string>MPEDemo</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>

examples/MPETest/Builds/MacOSX/MPETest.xcodeproj/project.pbxproj → examples/MPEDemo/Builds/MacOSX/MPEDemo.xcodeproj/project.pbxproj View File

@@ -75,7 +75,7 @@
B238642BCD1B9A2C199F4DBF = {isa = PBXFileReference; lastKnownFileType = file; name = "juce_audio_devices"; path = "../../../../modules/juce_audio_devices"; sourceTree = "SOURCE_ROOT"; };
B28DF2C453E72E37695C06FE = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_audio_processors.mm"; path = "../../JuceLibraryCode/include_juce_audio_processors.mm"; sourceTree = "SOURCE_ROOT"; };
B9D41F779C018E18CEDD66B8 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_core.mm"; path = "../../JuceLibraryCode/include_juce_core.mm"; sourceTree = "SOURCE_ROOT"; };
BCC50B48B1A4B967949B2DB2 = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MPETest.app; sourceTree = "BUILT_PRODUCTS_DIR"; };
BCC50B48B1A4B967949B2DB2 = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MPEDemo.app; sourceTree = "BUILT_PRODUCTS_DIR"; };
BDEC3EEA7DFFC78C00075A2A = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "include_juce_audio_devices.mm"; path = "../../JuceLibraryCode/include_juce_audio_devices.mm"; sourceTree = "SOURCE_ROOT"; };
C64527E74752ECF0B056A9F5 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
CCC23D1BCFBE5FFC700F8608 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
@@ -100,7 +100,7 @@
8A339D25116C57AC5F0FFBCD,
AB1DE39BFBA22179B919703B, ); name = Source; sourceTree = "<group>"; };
C69BCE512948465235B05858 = {isa = PBXGroup; children = (
47DF0B5F0B14AE411808F7CE, ); name = MPETest; sourceTree = "<group>"; };
47DF0B5F0B14AE411808F7CE, ); name = MPEDemo; sourceTree = "<group>"; };
38592324982B511EF7CF4FE1 = {isa = PBXGroup; children = (
947FE6943BE8210665728E5A,
B238642BCD1B9A2C199F4DBF,
@@ -259,7 +259,7 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_NAME = "MPETest";
PRODUCT_NAME = "MPEDemo";
WARNING_CFLAGS = -Wreorder;
ZERO_LINK = NO; }; name = Debug; };
40FE0A8C9EA53BF7A25086B3 = {isa = XCBuildConfiguration; buildSettings = {
@@ -295,7 +295,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
PRODUCT_NAME = "MPETest";
PRODUCT_NAME = "MPEDemo";
WARNING_CFLAGS = -Wreorder;
ZERO_LINK = NO; }; name = Release; };
33F09A62C3878F91E38BA7B3 = {isa = PBXTargetDependency; target = 0DF05A38ED8E8BF6EB7D9C5C; };
@@ -341,7 +341,7 @@
0DF05A38ED8E8BF6EB7D9C5C = {isa = PBXNativeTarget; buildConfigurationList = 20A88B838659B5B766A08F56; buildPhases = (
518008B4BCAC2EDE2921458A,
EF758DF42F97B8D22FD35F80,
AF94D754542EEF998EE0EF72, ); buildRules = ( ); dependencies = ( ); name = "MPETest - App"; productName = MPETest; productReference = BCC50B48B1A4B967949B2DB2; productType = "com.apple.product-type.application"; };
AF94D754542EEF998EE0EF72, ); buildRules = ( ); dependencies = ( ); name = "MPEDemo - App"; productName = MPEDemo; productReference = BCC50B48B1A4B967949B2DB2; productType = "com.apple.product-type.application"; };
9606743A47FFF871B775B1AB = {isa = PBXProject; buildConfigurationList = CC7502C8943D2FC599DFC557; attributes = { LastUpgradeCheck = 0830; ORGANIZATIONNAME = "ROLI Ltd."; TargetAttributes = { 0DF05A38ED8E8BF6EB7D9C5C = { SystemCapabilities = {com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.InterAppAudio = { enabled = 0; }; com.apple.Push = { enabled = 0; }; com.apple.Sandbox = { enabled = 0; }; }; }; }; }; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 9F958921F12E7C784E909D34; projectDirPath = ""; projectRoot = ""; targets = (0DF05A38ED8E8BF6EB7D9C5C); };
};
rootObject = 9606743A47FFF871B775B1AB;

examples/MPETest/Builds/MacOSX/RecentFilesMenuTemplate.nib → examples/MPEDemo/Builds/MacOSX/RecentFilesMenuTemplate.nib View File


examples/MPETest/Builds/VisualStudio2015/MPETest.sln → examples/MPEDemo/Builds/VisualStudio2015/MPEDemo.sln View File

@@ -1,7 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2015
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MPETest - App", "MPETest_App.vcxproj", "{D4B09FE5-F7C6-3530-7AA4-725B57317169}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MPEDemo - App", "MPEDemo_App.vcxproj", "{D4B09FE5-F7C6-3530-7AA4-725B57317169}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution

examples/MPETest/Builds/VisualStudio2015/MPETest_App.vcxproj → examples/MPEDemo/Builds/VisualStudio2015/MPEDemo_App.vcxproj View File

@@ -51,11 +51,11 @@
<TargetExt>.exe</TargetExt>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Platform)\$(Configuration)\App\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\App\</IntDir>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">MPETest</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">MPEDemo</TargetName>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</GenerateManifest>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Platform)\$(Configuration)\App\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\App\</IntDir>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MPETest</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MPEDemo</TargetName>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</GenerateManifest>
<PlatformToolset>v140</PlatformToolset>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
@@ -88,18 +88,18 @@
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Link>
<OutputFile>$(OutDir)\MPETest.exe</OutputFile>
<OutputFile>$(OutDir)\MPEDemo.exe</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<IgnoreSpecificDefaultLibraries>libcmt.lib; msvcrt.lib;;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(IntDir)\MPETest.pdb</ProgramDatabaseFile>
<ProgramDatabaseFile>$(IntDir)\MPEDemo.pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
<LargeAddressAware>true</LargeAddressAware>
</Link>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>$(IntDir)\MPETest.bsc</OutputFile>
<OutputFile>$(IntDir)\MPEDemo.bsc</OutputFile>
</Bscmake>
<Lib/>
</ItemDefinitionGroup>
@@ -130,11 +130,11 @@
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Link>
<OutputFile>$(OutDir)\MPETest.exe</OutputFile>
<OutputFile>$(OutDir)\MPEDemo.exe</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>false</GenerateDebugInformation>
<ProgramDatabaseFile>$(IntDir)\MPETest.pdb</ProgramDatabaseFile>
<ProgramDatabaseFile>$(IntDir)\MPEDemo.pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
<OptimizeReferences>true</OptimizeReferences>
@@ -143,7 +143,7 @@
</Link>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>$(IntDir)\MPETest.bsc</OutputFile>
<OutputFile>$(IntDir)\MPEDemo.bsc</OutputFile>
</Bscmake>
<Lib/>
</ItemDefinitionGroup>
@@ -203,10 +203,10 @@
<ClCompile Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPESynthesiserVoice.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEValue.cpp">
<ClCompile Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEUtils.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEZone.cpp">
<ClCompile Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEValue.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEZoneLayout.cpp">
@@ -1820,8 +1820,8 @@
<ClInclude Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPESynthesiser.h"/>
<ClInclude Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPESynthesiserBase.h"/>
<ClInclude Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPESynthesiserVoice.h"/>
<ClInclude Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEUtils.h"/>
<ClInclude Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEValue.h"/>
<ClInclude Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEZone.h"/>
<ClInclude Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEZoneLayout.h"/>
<ClInclude Include="..\..\..\..\modules\juce_audio_basics\native\juce_mac_CoreAudioLayouts.h"/>
<ClInclude Include="..\..\..\..\modules\juce_audio_basics\sources\juce_AudioSource.h"/>

examples/MPETest/Builds/VisualStudio2015/MPETest_App.vcxproj.filters → examples/MPEDemo/Builds/VisualStudio2015/MPEDemo_App.vcxproj.filters View File

@@ -2,11 +2,11 @@
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="MPETest\Source">
<UniqueIdentifier>{4C619D3B-22E1-04C0-C5D0-079B9D4033C5}</UniqueIdentifier>
<Filter Include="MPEDemo\Source">
<UniqueIdentifier>{A5DDD243-6BE8-6763-3B38-381FFC66A24B}</UniqueIdentifier>
</Filter>
<Filter Include="MPETest">
<UniqueIdentifier>{B247D4B4-6F9D-8C96-A514-D55062B9D9F8}</UniqueIdentifier>
<Filter Include="MPEDemo">
<UniqueIdentifier>{9C29808E-4A1F-7792-BC99-39E90332240C}</UniqueIdentifier>
</Filter>
<Filter Include="JUCE Modules\juce_audio_basics\audio_play_head">
<UniqueIdentifier>{EB58F05A-A968-CEBE-40C4-107CDD8F240F}</UniqueIdentifier>
@@ -374,7 +374,7 @@
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\Source\Main.cpp">
<Filter>MPETest\Source</Filter>
<Filter>MPEDemo\Source</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_audio_basics\buffers\juce_AudioChannelSet.cpp">
<Filter>JUCE Modules\juce_audio_basics\buffers</Filter>
@@ -430,10 +430,10 @@
<ClCompile Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPESynthesiserVoice.cpp">
<Filter>JUCE Modules\juce_audio_basics\mpe</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEValue.cpp">
<ClCompile Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEUtils.cpp">
<Filter>JUCE Modules\juce_audio_basics\mpe</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEZone.cpp">
<ClCompile Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEValue.cpp">
<Filter>JUCE Modules\juce_audio_basics\mpe</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEZoneLayout.cpp">
@@ -2167,22 +2167,22 @@
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\Source\MainComponent.h">
<Filter>MPETest\Source</Filter>
<Filter>MPEDemo\Source</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\MPEDemoSynthVoice.h">
<Filter>MPETest\Source</Filter>
<Filter>MPEDemo\Source</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\MPESetupComponent.h">
<Filter>MPETest\Source</Filter>
<Filter>MPEDemo\Source</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\Visualiser.h">
<Filter>MPETest\Source</Filter>
<Filter>MPEDemo\Source</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\ZoneColourPicker.h">
<Filter>MPETest\Source</Filter>
<Filter>MPEDemo\Source</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\ZoneLayoutComponent.h">
<Filter>MPETest\Source</Filter>
<Filter>MPEDemo\Source</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\modules\juce_audio_basics\audio_play_head\juce_AudioPlayHead.h">
<Filter>JUCE Modules\juce_audio_basics\audio_play_head</Filter>
@@ -2253,10 +2253,10 @@
<ClInclude Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPESynthesiserVoice.h">
<Filter>JUCE Modules\juce_audio_basics\mpe</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEValue.h">
<ClInclude Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEUtils.h">
<Filter>JUCE Modules\juce_audio_basics\mpe</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEZone.h">
<ClInclude Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEValue.h">
<Filter>JUCE Modules\juce_audio_basics\mpe</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEZoneLayout.h">

examples/MPETest/Builds/VisualStudio2017/resources.rc → examples/MPEDemo/Builds/VisualStudio2015/resources.rc View File

@@ -15,9 +15,9 @@ BEGIN
BEGIN
VALUE "CompanyName", "ROLI Ltd.\0"
VALUE "LegalCopyright", "ROLI Ltd.\0"
VALUE "FileDescription", "MPETest\0"
VALUE "FileDescription", "MPEDemo\0"
VALUE "FileVersion", "1.0.0\0"
VALUE "ProductName", "MPETest\0"
VALUE "ProductName", "MPEDemo\0"
VALUE "ProductVersion", "1.0.0\0"
END
END

examples/MPETest/Builds/VisualStudio2017/MPETest.sln → examples/MPEDemo/Builds/VisualStudio2017/MPEDemo.sln View File

@@ -1,7 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2017
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MPETest - App", "MPETest_App.vcxproj", "{D4B09FE5-F7C6-3530-7AA4-725B57317169}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MPEDemo - App", "MPEDemo_App.vcxproj", "{D4B09FE5-F7C6-3530-7AA4-725B57317169}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution

examples/MPETest/Builds/VisualStudio2017/MPETest_App.vcxproj → examples/MPEDemo/Builds/VisualStudio2017/MPEDemo_App.vcxproj View File

@@ -53,11 +53,11 @@
<TargetExt>.exe</TargetExt>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Platform)\$(Configuration)\App\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\App\</IntDir>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">MPETest</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">MPEDemo</TargetName>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</GenerateManifest>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Platform)\$(Configuration)\App\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\App\</IntDir>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MPETest</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MPEDemo</TargetName>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</GenerateManifest>
<PlatformToolset>v141</PlatformToolset>
<WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>
@@ -90,17 +90,17 @@
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Link>
<OutputFile>$(OutDir)\MPETest.exe</OutputFile>
<OutputFile>$(OutDir)\MPEDemo.exe</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<IgnoreSpecificDefaultLibraries>libcmt.lib; msvcrt.lib;;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(IntDir)\MPETest.pdb</ProgramDatabaseFile>
<ProgramDatabaseFile>$(IntDir)\MPEDemo.pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<LargeAddressAware>true</LargeAddressAware>
</Link>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>$(IntDir)\MPETest.bsc</OutputFile>
<OutputFile>$(IntDir)\MPEDemo.bsc</OutputFile>
</Bscmake>
<Lib/>
</ItemDefinitionGroup>
@@ -131,11 +131,11 @@
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Link>
<OutputFile>$(OutDir)\MPETest.exe</OutputFile>
<OutputFile>$(OutDir)\MPEDemo.exe</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>false</GenerateDebugInformation>
<ProgramDatabaseFile>$(IntDir)\MPETest.pdb</ProgramDatabaseFile>
<ProgramDatabaseFile>$(IntDir)\MPEDemo.pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
@@ -143,7 +143,7 @@
</Link>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>$(IntDir)\MPETest.bsc</OutputFile>
<OutputFile>$(IntDir)\MPEDemo.bsc</OutputFile>
</Bscmake>
<Lib/>
</ItemDefinitionGroup>
@@ -203,10 +203,10 @@
<ClCompile Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPESynthesiserVoice.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEValue.cpp">
<ClCompile Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEUtils.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEZone.cpp">
<ClCompile Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEValue.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEZoneLayout.cpp">
@@ -1820,8 +1820,8 @@
<ClInclude Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPESynthesiser.h"/>
<ClInclude Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPESynthesiserBase.h"/>
<ClInclude Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPESynthesiserVoice.h"/>
<ClInclude Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEUtils.h"/>
<ClInclude Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEValue.h"/>
<ClInclude Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEZone.h"/>
<ClInclude Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEZoneLayout.h"/>
<ClInclude Include="..\..\..\..\modules\juce_audio_basics\native\juce_mac_CoreAudioLayouts.h"/>
<ClInclude Include="..\..\..\..\modules\juce_audio_basics\sources\juce_AudioSource.h"/>

examples/MPETest/Builds/VisualStudio2017/MPETest_App.vcxproj.filters → examples/MPEDemo/Builds/VisualStudio2017/MPEDemo_App.vcxproj.filters View File

@@ -2,11 +2,11 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="MPETest\Source">
<UniqueIdentifier>{4C619D3B-22E1-04C0-C5D0-079B9D4033C5}</UniqueIdentifier>
<Filter Include="MPEDemo\Source">
<UniqueIdentifier>{A5DDD243-6BE8-6763-3B38-381FFC66A24B}</UniqueIdentifier>
</Filter>
<Filter Include="MPETest">
<UniqueIdentifier>{B247D4B4-6F9D-8C96-A514-D55062B9D9F8}</UniqueIdentifier>
<Filter Include="MPEDemo">
<UniqueIdentifier>{9C29808E-4A1F-7792-BC99-39E90332240C}</UniqueIdentifier>
</Filter>
<Filter Include="JUCE Modules\juce_audio_basics\audio_play_head">
<UniqueIdentifier>{EB58F05A-A968-CEBE-40C4-107CDD8F240F}</UniqueIdentifier>
@@ -374,7 +374,7 @@
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\Source\Main.cpp">
<Filter>MPETest\Source</Filter>
<Filter>MPEDemo\Source</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_audio_basics\buffers\juce_AudioChannelSet.cpp">
<Filter>JUCE Modules\juce_audio_basics\buffers</Filter>
@@ -430,10 +430,10 @@
<ClCompile Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPESynthesiserVoice.cpp">
<Filter>JUCE Modules\juce_audio_basics\mpe</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEValue.cpp">
<ClCompile Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEUtils.cpp">
<Filter>JUCE Modules\juce_audio_basics\mpe</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEZone.cpp">
<ClCompile Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEValue.cpp">
<Filter>JUCE Modules\juce_audio_basics\mpe</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEZoneLayout.cpp">
@@ -2167,22 +2167,22 @@
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\Source\MainComponent.h">
<Filter>MPETest\Source</Filter>
<Filter>MPEDemo\Source</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\MPEDemoSynthVoice.h">
<Filter>MPETest\Source</Filter>
<Filter>MPEDemo\Source</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\MPESetupComponent.h">
<Filter>MPETest\Source</Filter>
<Filter>MPEDemo\Source</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\Visualiser.h">
<Filter>MPETest\Source</Filter>
<Filter>MPEDemo\Source</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\ZoneColourPicker.h">
<Filter>MPETest\Source</Filter>
<Filter>MPEDemo\Source</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\ZoneLayoutComponent.h">
<Filter>MPETest\Source</Filter>
<Filter>MPEDemo\Source</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\modules\juce_audio_basics\audio_play_head\juce_AudioPlayHead.h">
<Filter>JUCE Modules\juce_audio_basics\audio_play_head</Filter>
@@ -2253,10 +2253,10 @@
<ClInclude Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPESynthesiserVoice.h">
<Filter>JUCE Modules\juce_audio_basics\mpe</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEValue.h">
<ClInclude Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEUtils.h">
<Filter>JUCE Modules\juce_audio_basics\mpe</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEZone.h">
<ClInclude Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEValue.h">
<Filter>JUCE Modules\juce_audio_basics\mpe</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEZoneLayout.h">

examples/MPETest/Builds/VisualStudio2015/resources.rc → examples/MPEDemo/Builds/VisualStudio2017/resources.rc View File

@@ -15,9 +15,9 @@ BEGIN
BEGIN
VALUE "CompanyName", "ROLI Ltd.\0"
VALUE "LegalCopyright", "ROLI Ltd.\0"
VALUE "FileDescription", "MPETest\0"
VALUE "FileDescription", "MPEDemo\0"
VALUE "FileVersion", "1.0.0\0"
VALUE "ProductName", "MPETest\0"
VALUE "ProductName", "MPEDemo\0"
VALUE "ProductVersion", "1.0.0\0"
END
END

examples/MPETest/JuceLibraryCode/AppConfig.h → examples/MPEDemo/JuceLibraryCode/AppConfig.h View File


examples/MPETest/JuceLibraryCode/JuceHeader.h → examples/MPEDemo/JuceLibraryCode/JuceHeader.h View File

@@ -39,7 +39,7 @@
#if ! JUCE_DONT_DECLARE_PROJECTINFO
namespace ProjectInfo
{
const char* const projectName = "MPETest";
const char* const projectName = "MPEDemo";
const char* const versionString = "1.0.0";
const int versionNumber = 0x10000;
}

examples/MPETest/JuceLibraryCode/ReadMe.txt → examples/MPEDemo/JuceLibraryCode/ReadMe.txt View File


examples/MPETest/JuceLibraryCode/include_juce_audio_basics.cpp → examples/MPEDemo/JuceLibraryCode/include_juce_audio_basics.cpp View File


examples/MPETest/JuceLibraryCode/include_juce_audio_basics.mm → examples/MPEDemo/JuceLibraryCode/include_juce_audio_basics.mm View File


examples/MPETest/JuceLibraryCode/include_juce_audio_devices.cpp → examples/MPEDemo/JuceLibraryCode/include_juce_audio_devices.cpp View File


examples/MPETest/JuceLibraryCode/include_juce_audio_devices.mm → examples/MPEDemo/JuceLibraryCode/include_juce_audio_devices.mm View File


examples/MPETest/JuceLibraryCode/include_juce_audio_formats.cpp → examples/MPEDemo/JuceLibraryCode/include_juce_audio_formats.cpp View File


examples/MPETest/JuceLibraryCode/include_juce_audio_formats.mm → examples/MPEDemo/JuceLibraryCode/include_juce_audio_formats.mm View File


examples/MPETest/JuceLibraryCode/include_juce_audio_processors.cpp → examples/MPEDemo/JuceLibraryCode/include_juce_audio_processors.cpp View File


examples/MPETest/JuceLibraryCode/include_juce_audio_processors.mm → examples/MPEDemo/JuceLibraryCode/include_juce_audio_processors.mm View File


examples/MPETest/JuceLibraryCode/include_juce_audio_utils.cpp → examples/MPEDemo/JuceLibraryCode/include_juce_audio_utils.cpp View File


examples/MPETest/JuceLibraryCode/include_juce_audio_utils.mm → examples/MPEDemo/JuceLibraryCode/include_juce_audio_utils.mm View File


examples/MPETest/JuceLibraryCode/include_juce_core.cpp → examples/MPEDemo/JuceLibraryCode/include_juce_core.cpp View File


examples/MPETest/JuceLibraryCode/include_juce_core.mm → examples/MPEDemo/JuceLibraryCode/include_juce_core.mm View File


examples/MPETest/JuceLibraryCode/include_juce_cryptography.cpp → examples/MPEDemo/JuceLibraryCode/include_juce_cryptography.cpp View File


examples/MPETest/JuceLibraryCode/include_juce_cryptography.mm → examples/MPEDemo/JuceLibraryCode/include_juce_cryptography.mm View File


examples/MPETest/JuceLibraryCode/include_juce_data_structures.cpp → examples/MPEDemo/JuceLibraryCode/include_juce_data_structures.cpp View File


examples/MPETest/JuceLibraryCode/include_juce_data_structures.mm → examples/MPEDemo/JuceLibraryCode/include_juce_data_structures.mm View File


examples/MPETest/JuceLibraryCode/include_juce_events.cpp → examples/MPEDemo/JuceLibraryCode/include_juce_events.cpp View File


examples/MPETest/JuceLibraryCode/include_juce_events.mm → examples/MPEDemo/JuceLibraryCode/include_juce_events.mm View File


examples/MPETest/JuceLibraryCode/include_juce_graphics.cpp → examples/MPEDemo/JuceLibraryCode/include_juce_graphics.cpp View File


examples/MPETest/JuceLibraryCode/include_juce_graphics.mm → examples/MPEDemo/JuceLibraryCode/include_juce_graphics.mm View File


examples/MPETest/JuceLibraryCode/include_juce_gui_basics.cpp → examples/MPEDemo/JuceLibraryCode/include_juce_gui_basics.cpp View File


examples/MPETest/JuceLibraryCode/include_juce_gui_basics.mm → examples/MPEDemo/JuceLibraryCode/include_juce_gui_basics.mm View File


examples/MPETest/JuceLibraryCode/include_juce_gui_extra.cpp → examples/MPEDemo/JuceLibraryCode/include_juce_gui_extra.cpp View File


examples/MPETest/JuceLibraryCode/include_juce_gui_extra.mm → examples/MPEDemo/JuceLibraryCode/include_juce_gui_extra.mm View File


examples/MPETest/JuceLibraryCode/include_juce_opengl.cpp → examples/MPEDemo/JuceLibraryCode/include_juce_opengl.cpp View File


examples/MPETest/JuceLibraryCode/include_juce_opengl.mm → examples/MPEDemo/JuceLibraryCode/include_juce_opengl.mm View File


examples/MPETest/JuceLibraryCode/include_juce_video.cpp → examples/MPEDemo/JuceLibraryCode/include_juce_video.cpp View File


examples/MPETest/JuceLibraryCode/include_juce_video.mm → examples/MPEDemo/JuceLibraryCode/include_juce_video.mm View File


examples/MPETest/MPETest.jucer → examples/MPEDemo/MPEDemo.jucer View File

@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<JUCERPROJECT id="IilE7R" name="MPETest" projectType="guiapp" bundleIdentifier="com.roli.MPETest"
<JUCERPROJECT id="IilE7R" name="MPEDemo" projectType="guiapp" bundleIdentifier="com.roli.MPETest"
jucerVersion="5.2.1" displaySplashScreen="0" reportAppUsage="0"
companyName="ROLI Ltd." companyCopyright="ROLI Ltd.">
<MAINGROUP id="VCQQcn" name="MPETest">
<MAINGROUP id="VCQQcn" name="MPEDemo">
<GROUP id="{D43238F0-992F-BC5A-F1AA-31BBBD3D17B0}" name="Source">
<FILE id="uRxR7V" name="Main.cpp" compile="1" resource="0" file="Source/Main.cpp"/>
<FILE id="UgOrHf" name="MainComponent.h" compile="0" resource="0" file="Source/MainComponent.h"/>
@@ -21,8 +21,8 @@
<EXPORTFORMATS>
<XCODE_MAC targetFolder="Builds/MacOSX">
<CONFIGURATIONS>
<CONFIGURATION name="Debug" osxCompatibility="10.10 SDK" isDebug="1" targetName="MPETest"/>
<CONFIGURATION name="Release" osxCompatibility="10.10 SDK" isDebug="0" targetName="MPETest"/>
<CONFIGURATION name="Debug" osxCompatibility="10.10 SDK" isDebug="1" targetName="MPEDemo"/>
<CONFIGURATION name="Release" osxCompatibility="10.10 SDK" isDebug="0" targetName="MPEDemo"/>
</CONFIGURATIONS>
<MODULEPATHS>
<MODULEPATH id="juce_core" path="../../modules"/>
@@ -43,8 +43,8 @@
</XCODE_MAC>
<LINUX_MAKE targetFolder="Builds/LinuxMakefile">
<CONFIGURATIONS>
<CONFIGURATION name="Debug" libraryPath="/usr/X11R6/lib/" isDebug="1" targetName="MPETest"/>
<CONFIGURATION name="Release" libraryPath="/usr/X11R6/lib/" isDebug="0" targetName="MPETest"/>
<CONFIGURATION name="Debug" libraryPath="/usr/X11R6/lib/" isDebug="1" targetName="MPEDemo"/>
<CONFIGURATION name="Release" libraryPath="/usr/X11R6/lib/" isDebug="0" targetName="MPEDemo"/>
</CONFIGURATIONS>
<MODULEPATHS>
<MODULEPATH id="juce_core" path="../../modules"/>
@@ -66,8 +66,8 @@
<VS2015 targetFolder="Builds/VisualStudio2015">
<CONFIGURATIONS>
<CONFIGURATION name="Debug" winWarningLevel="4" winArchitecture="32-bit" isDebug="1"
targetName="MPETest"/>
<CONFIGURATION name="Release" winArchitecture="32-bit" isDebug="0" targetName="MPETest"/>
targetName="MPEDemo"/>
<CONFIGURATION name="Release" winArchitecture="32-bit" isDebug="0" targetName="MPEDemo"/>
</CONFIGURATIONS>
<MODULEPATHS>
<MODULEPATH id="juce_video" path="../../modules"/>
@@ -88,8 +88,8 @@
</VS2015>
<VS2017 targetFolder="Builds/VisualStudio2017">
<CONFIGURATIONS>
<CONFIGURATION name="Debug" isDebug="1" targetName="MPETest"/>
<CONFIGURATION name="Release" isDebug="0" targetName="MPETest"/>
<CONFIGURATION name="Debug" isDebug="1" targetName="MPEDemo"/>
<CONFIGURATION name="Release" isDebug="0" targetName="MPEDemo"/>
</CONFIGURATIONS>
<MODULEPATHS>
<MODULEPATH id="juce_video" path="../../modules"/>

examples/MPETest/Source/MPEDemoSynthVoice.h → examples/MPEDemo/Source/MPEDemoSynthVoice.h View File

@@ -32,10 +32,7 @@ class MPEDemoSynthVoice : public MPESynthesiserVoice
{
public:
//==============================================================================
MPEDemoSynthVoice()
: phase (0.0), phaseDelta (0.0), tailOff (0.0)
{
}
MPEDemoSynthVoice() {}
//==============================================================================
void noteStarted() override
@@ -49,7 +46,7 @@ public:
timbre.setValue (currentlyPlayingNote.timbre.asUnsignedFloat());
phase = 0.0;
const double cyclesPerSample = frequency.getNextValue() / currentSampleRate;
auto cyclesPerSample = frequency.getNextValue() / currentSampleRate;
phaseDelta = MathConstants<double>::twoPi * cyclesPerSample;
tailOff = 0.0;
@@ -65,8 +62,7 @@ public:
// 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;
tailOff = 1.0; // stopNote method could be called more than once.
}
else
{
@@ -119,9 +115,9 @@ public:
{
while (--numSamples >= 0)
{
const float currentSample = getNextSample() * (float) tailOff;
auto currentSample = getNextSample() * (float) tailOff;
for (int i = outputBuffer.getNumChannels(); --i >= 0;)
for (auto i = outputBuffer.getNumChannels(); --i >= 0;)
outputBuffer.addSample (i, startSample, currentSample);
++startSample;
@@ -141,9 +137,9 @@ public:
{
while (--numSamples >= 0)
{
const float currentSample = getNextSample();
auto currentSample = getNextSample();
for (int i = outputBuffer.getNumChannels(); --i >= 0;)
for (auto i = outputBuffer.getNumChannels(); --i >= 0;)
outputBuffer.addSample (i, startSample, currentSample);
++startSample;
@@ -156,18 +152,18 @@ private:
//==============================================================================
float getNextSample() noexcept
{
const double levelDb = (level.getNextValue() - 1.0) * maxLevelDb;
const double amplitude = std::pow (10.0f, 0.05f * levelDb) * maxLevel;
auto levelDb = (level.getNextValue() - 1.0) * maxLevelDb;
auto amplitude = std::pow (10.0f, 0.05f * levelDb) * maxLevel;
// timbre is used to blend between a sine and a square.
const double f1 = std::sin (phase);
const double f2 = std::copysign (1.0, f1);
const double a2 = timbre.getNextValue();
const double a1 = 1.0 - a2;
auto f1 = std::sin (phase);
auto f2 = std::copysign (1.0, f1);
auto a2 = timbre.getNextValue();
auto a1 = 1.0 - a2;
const float nextSample = float (amplitude * ((a1 * f1) + (a2 * f2)));
auto nextSample = float (amplitude * ((a1 * f1) + (a2 * f2)));
const double cyclesPerSample = frequency.getNextValue() / currentSampleRate;
auto cyclesPerSample = frequency.getNextValue() / currentSampleRate;
phaseDelta = MathConstants<double>::twoPi * cyclesPerSample;
phase = std::fmod (phase + phaseDelta, MathConstants<double>::twoPi);
@@ -176,7 +172,10 @@ private:
//==============================================================================
LinearSmoothedValue<double> level, timbre, frequency;
double phase, phaseDelta, tailOff;
double phase = 0.0;
double phaseDelta = 0.0;
double tailOff = 0.0;
const double maxLevel = 0.05f;
const double maxLevelDb = 31.0f;

examples/MPETest/Source/MPESetupComponent.h → examples/MPEDemo/Source/MPESetupComponent.h View File

@@ -39,7 +39,7 @@ public:
{
public:
virtual ~Listener() {}
virtual void zoneAdded (MPEZone newZone) = 0;
virtual void zoneChanged (bool isLower, int numMemberChans, int perNotePb, int masterPb) = 0;
virtual void allZonesCleared() = 0;
virtual void legacyModeChanged (bool legacyModeEnabled, int pitchbendRange, Range<int> channelRange) = 0;
virtual void voiceStealingEnabledChanged (bool voiceStealingEnabled) = 0;
@@ -51,22 +51,11 @@ public:
//==============================================================================
MPESetupComponent()
: masterChannelLabel (String(), "Master channel:"),
noteChannelsLabel (String(), "Nr. of note channels:"),
masterPitchbendRangeLabel (String(), "Master pitchbend range (semitones):"),
notePitchbendRangeLabel (String(), "Note pitchbend range (semitones):"),
addZoneButton ("Add this zone"),
clearAllZonesButton ("Clear all zones"),
legacyStartChannelLabel (String(), "First channel:"),
legacyEndChannelLabel (String(), "Last channel:"),
legacyPitchbendRangeLabel (String(), "Pitchbend range (semitones):"),
legacyModeEnabledToggle ("Enable Legacy Mode"),
voiceStealingEnabledToggle ("Enable synth voice stealing"),
numberOfVoicesLabel (String(), "Number of synth voices")
{
addAndMakeVisible (isLowerZoneButton);
isLowerZoneButton.setToggleState (true, NotificationType::dontSendNotification);
initialiseComboBoxWithConsecutiveIntegers (masterChannel, masterChannelLabel, 1, 15, defaultMasterChannel);
initialiseComboBoxWithConsecutiveIntegers (noteChannels, noteChannelsLabel, 1, 15, defaultNoteChannels);
initialiseComboBoxWithConsecutiveIntegers (memberChannels, memberChannelsLabel, 0, 16, defaultMemberChannels);
initialiseComboBoxWithConsecutiveIntegers (masterPitchbendRange, masterPitchbendRangeLabel, 0, 96, defaultMasterPitchbendRange);
initialiseComboBoxWithConsecutiveIntegers (notePitchbendRange, notePitchbendRangeLabel, 0, 96, defaultNotePitchbendRange);
@@ -74,12 +63,13 @@ public:
initialiseComboBoxWithConsecutiveIntegers (legacyEndChannel, legacyEndChannelLabel, 1, 16, 16, false);
initialiseComboBoxWithConsecutiveIntegers (legacyPitchbendRange, legacyPitchbendRangeLabel, 0, 96, 2, false);
initialiseButton (addZoneButton);
initialiseButton (setZoneButton);
initialiseButton (clearAllZonesButton);
initialiseButton (legacyModeEnabledToggle);
initialiseButton (voiceStealingEnabledToggle);
initialiseComboBoxWithConsecutiveIntegers (numberOfVoices, numberOfVoicesLabel, 1, 20, 15);
numberOfVoices.addListener (this);
}
@@ -91,29 +81,29 @@ public:
const int hspace = 6;
const int hbigspace = 18;
masterChannel.setBounds (r.removeFromTop (h));
isLowerZoneButton.setBounds (r.removeFromTop (h));
r.removeFromTop (hspace);
noteChannels.setBounds (r.removeFromTop (h));
memberChannels.setBounds (r.removeFromTop (h));
r.removeFromTop (hspace);
notePitchbendRange.setBounds (r.removeFromTop (h));
r.removeFromTop (hspace);
masterPitchbendRange.setBounds (r.removeFromTop (h));
legacyStartChannel.setBounds (masterChannel.getBounds());
legacyEndChannel.setBounds (noteChannels.getBounds());
legacyStartChannel.setBounds (isLowerZoneButton.getBounds());
legacyEndChannel.setBounds (memberChannels.getBounds());
legacyPitchbendRange.setBounds (notePitchbendRange.getBounds());
r.removeFromTop (hbigspace);
int buttonLeft = proportionOfWidth (0.5f);
auto buttonLeft = proportionOfWidth (0.5f);
addZoneButton.setBounds (r.removeFromTop (h).withLeft (buttonLeft));
setZoneButton.setBounds (r.removeFromTop (h).withLeft (buttonLeft));
r.removeFromTop (hspace);
clearAllZonesButton.setBounds (r.removeFromTop (h).withLeft (buttonLeft));
r.removeFromTop (hbigspace);
int toggleLeft = proportionOfWidth (0.25f);
auto toggleLeft = proportionOfWidth (0.25f);
legacyModeEnabledToggle.setBounds (r.removeFromTop (h).withLeft (toggleLeft));
r.removeFromTop (hspace);
@@ -152,33 +142,26 @@ private:
//==============================================================================
void buttonClicked (Button* button) override
{
if (button == &addZoneButton)
addZoneButtonClicked();
else if (button == &clearAllZonesButton)
clearAllZonesButtonClicked();
else if (button == &legacyModeEnabledToggle)
legacyModeEnabledToggleClicked();
else if (button == &voiceStealingEnabledToggle)
voiceStealingEnabledToggleClicked();
if (button == &setZoneButton) setZoneButtonClicked();
else if (button == &clearAllZonesButton) clearAllZonesButtonClicked();
else if (button == &legacyModeEnabledToggle) legacyModeEnabledToggleClicked();
else if (button == &voiceStealingEnabledToggle) voiceStealingEnabledToggleClicked();
}
//==============================================================================
void addZoneButtonClicked()
void setZoneButtonClicked()
{
if (areMPEParametersValid())
{
MPEZone newZone (masterChannel.getText().getIntValue(),
noteChannels.getText().getIntValue(),
notePitchbendRange.getText().getIntValue(),
masterPitchbendRange.getText().getIntValue());
auto isLowerZone = isLowerZoneButton.getToggleState();
auto numMemberChannels = memberChannels.getText().getIntValue();
auto perNotePb = notePitchbendRange.getText().getIntValue();
auto masterPb = masterPitchbendRange.getText().getIntValue();
zoneLayout.addZone (newZone);
listeners.call ([&] (Listener& l) { l.zoneAdded (newZone); });
}
if (isLowerZone)
zoneLayout.setLowerZone (numMemberChannels, perNotePb, masterPb);
else
{
handleInvalidMPEParameters();
}
zoneLayout.setUpperZone (numMemberChannels, perNotePb, masterPb);
listeners.call ([&] (Listener& l) { l.zoneChanged (isLowerZone, numMemberChannels, perNotePb, masterPb); });
}
//==============================================================================
@@ -191,17 +174,17 @@ private:
//==============================================================================
void legacyModeEnabledToggleClicked()
{
bool legacyModeEnabled = legacyModeEnabledToggle.getToggleState();
auto legacyModeEnabled = legacyModeEnabledToggle.getToggleState();
masterChannel.setVisible (! legacyModeEnabled);
noteChannels.setVisible (! legacyModeEnabled);
notePitchbendRange.setVisible (! legacyModeEnabled);
isLowerZoneButton.setVisible (! legacyModeEnabled);
memberChannels.setVisible (! legacyModeEnabled);
notePitchbendRange.setVisible (! legacyModeEnabled);
masterPitchbendRange.setVisible (! legacyModeEnabled);
addZoneButton.setVisible (! legacyModeEnabled);
clearAllZonesButton.setVisible (! legacyModeEnabled);
setZoneButton.setVisible (! legacyModeEnabled);
clearAllZonesButton.setVisible (! legacyModeEnabled);
legacyStartChannel.setVisible (legacyModeEnabled);
legacyEndChannel.setVisible (legacyModeEnabled);
legacyStartChannel.setVisible (legacyModeEnabled);
legacyEndChannel.setVisible (legacyModeEnabled);
legacyPitchbendRange.setVisible (legacyModeEnabled);
if (areLegacyModeParametersValid())
@@ -219,7 +202,7 @@ private:
//==============================================================================
void voiceStealingEnabledToggleClicked()
{
bool newState = voiceStealingEnabledToggle.getToggleState();
auto newState = voiceStealingEnabledToggle.getToggleState();
listeners.call ([=] (Listener& l) { l.voiceStealingEnabledChanged (newState); });
}
@@ -271,21 +254,6 @@ private:
}
//==============================================================================
bool areMPEParametersValid() const
{
int maxPossibleNumNoteChannels = 16 - masterChannel.getText().getIntValue();
return noteChannels.getText().getIntValue() <= maxPossibleNumNoteChannels;
}
void handleInvalidMPEParameters() const
{
AlertWindow::showMessageBoxAsync (AlertWindow::WarningIcon,
"Invalid zone layout",
"Cannot create MPE zone:\n"
"Invalid zone parameters selected!",
"Got it");
}
bool areLegacyModeParametersValid() const
{
return legacyStartChannel.getText().getIntValue() <= legacyEndChannel.getText().getIntValue();
@@ -303,27 +271,39 @@ private:
//==============================================================================
Range<int> getLegacyModeChannelRange() const
{
return Range<int> (legacyStartChannel.getText().getIntValue(),
legacyEndChannel.getText().getIntValue() + 1);
return { legacyStartChannel.getText().getIntValue(),
legacyEndChannel.getText().getIntValue() + 1 };
}
//==============================================================================
MPEZoneLayout zoneLayout;
ComboBox masterChannel, noteChannels, masterPitchbendRange, notePitchbendRange;
Label masterChannelLabel, noteChannelsLabel, masterPitchbendRangeLabel, notePitchbendRangeLabel;
TextButton addZoneButton, clearAllZonesButton;
ComboBox memberChannels, masterPitchbendRange, notePitchbendRange;
ToggleButton isLowerZoneButton { "Lower zone" };
Label memberChannelsLabel { {}, "Nr. of member channels:" };
Label masterPitchbendRangeLabel { {}, "Master pitchbend range (semitones):" };
Label notePitchbendRangeLabel { {}, "Note pitchbend range (semitones):" };
TextButton setZoneButton { "Set zone" };
TextButton clearAllZonesButton { "Clear all zones" };
ComboBox legacyStartChannel, legacyEndChannel, legacyPitchbendRange;
Label legacyStartChannelLabel, legacyEndChannelLabel, legacyPitchbendRangeLabel;
ToggleButton legacyModeEnabledToggle, voiceStealingEnabledToggle;
Label legacyStartChannelLabel { {}, "First channel:" };
Label legacyEndChannelLabel { {}, "Last channel:" };
Label legacyPitchbendRangeLabel { {}, "Pitchbend range (semitones):"};
ToggleButton legacyModeEnabledToggle { "Enable Legacy Mode" };
ToggleButton voiceStealingEnabledToggle { "Enable synth voice stealing" };
ComboBox numberOfVoices;
Label numberOfVoicesLabel;
Label numberOfVoicesLabel { {}, "Number of synth voices"};
ListenerList<Listener> listeners;
const int defaultMasterChannel = 1, defaultNoteChannels = 15,
const int defaultMasterChannel = 1, defaultMemberChannels = 15,
defaultMasterPitchbendRange = 2, defaultNotePitchbendRange = 48;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MPESetupComponent)

examples/MPETest/Source/Main.cpp → examples/MPEDemo/Source/Main.cpp View File

@@ -29,7 +29,7 @@
#include <array>
struct MPETestClasses
struct MPEDemoClasses
{
#include "MPESetupComponent.h"
#include "ZoneColourPicker.h"
@@ -41,11 +41,11 @@ struct MPETestClasses
//==============================================================================
class MPETestApplication : public JUCEApplication
class MPEDemoApplication : public JUCEApplication
{
public:
//==============================================================================
MPETestApplication() {}
MPEDemoApplication() {}
const String getApplicationName() override { return ProjectInfo::projectName; }
const String getApplicationVersion() override { return ProjectInfo::versionString; }
@@ -74,11 +74,11 @@ public:
MainWindow (String name)
: DocumentWindow (name,
LookAndFeel::getDefaultLookAndFeel()
.findColour (ResizableWindow::backgroundColourId),
.findColour (ResizableWindow::backgroundColourId),
DocumentWindow::allButtons)
{
setUsingNativeTitleBar (true);
setContentOwned (new MPETestClasses::MainComponent(), true);
setContentOwned (new MPEDemoClasses::MainComponent(), true);
centreWithSize (getWidth(), getHeight());
setVisible (true);
@@ -98,4 +98,4 @@ private:
};
//==============================================================================
START_JUCE_APPLICATION (MPETestApplication)
START_JUCE_APPLICATION (MPEDemoApplication)

examples/MPETest/Source/MainComponent.h → examples/MPEDemo/Source/MainComponent.h View File

@@ -41,8 +41,8 @@ public:
visualiserComp (colourPicker)
{
setSize (880, 720);
audioDeviceManager.initialise (0, 2, 0, true, String(), 0);
audioDeviceManager.addMidiInputCallback (String(), this);
audioDeviceManager.initialise (0, 2, 0, true, {}, 0);
audioDeviceManager.addMidiInputCallback ({}, this);
audioDeviceManager.addAudioCallback (this);
addAndMakeVisible (audioSetupComp);
@@ -60,7 +60,7 @@ public:
synth.setVoiceStealingEnabled (false);
for (int i = 0; i < 15; ++i)
synth.addVoice (new MPEDemoSynthVoice);
synth.addVoice (new MPEDemoSynthVoice());
}
~MainComponent()
@@ -71,16 +71,16 @@ public:
//==============================================================================
void resized() override
{
const int visualiserCompWidth = 2800;
const int visualiserCompHeight = 300;
const int zoneLayoutCompHeight = 60;
const float audioSetupCompRelativeWidth = 0.55f;
int visualiserCompWidth = 2800;
int visualiserCompHeight = 300;
int zoneLayoutCompHeight = 60;
float audioSetupCompRelativeWidth = 0.55f;
Rectangle<int> r (getLocalBounds());
auto r = getLocalBounds();
visualiserViewport.setBounds (r.removeFromBottom (visualiserCompHeight));
visualiserComp.setBounds (Rectangle<int> (visualiserCompWidth,
visualiserViewport.getHeight() - visualiserViewport.getScrollBarThickness()));
visualiserComp.setBounds ({ visualiserCompWidth,
visualiserViewport.getHeight() - visualiserViewport.getScrollBarThickness() });
zoneLayoutComp.setBounds (r.removeFromBottom (zoneLayoutCompHeight));
audioSetupComp.setBounds (r.removeFromLeft (proportionOfWidth (audioSetupCompRelativeWidth)));
@@ -102,7 +102,8 @@ public:
void audioDeviceAboutToStart (AudioIODevice* device) override
{
const double sampleRate = device->getCurrentSampleRate();
auto sampleRate = device->getCurrentSampleRate();
midiCollector.reset (sampleRate);
synth.setCurrentPlaybackSampleRate (sampleRate);
}
@@ -121,13 +122,23 @@ private:
}
//==============================================================================
void zoneAdded (MPEZone newZone) override
void zoneChanged (bool isLowerZone, int numMemberChannels,
int perNotePitchbendRange, int masterPitchbendRange) override
{
MidiOutput* midiOutput = audioDeviceManager.getDefaultMidiOutput();
auto* midiOutput = audioDeviceManager.getDefaultMidiOutput();
if (midiOutput != nullptr)
midiOutput->sendBlockOfMessagesNow (MPEMessages::addZone (newZone));
{
if (isLowerZone)
midiOutput->sendBlockOfMessagesNow (MPEMessages::setLowerZone (numMemberChannels, perNotePitchbendRange, masterPitchbendRange));
else
midiOutput->sendBlockOfMessagesNow (MPEMessages::setUpperZone (numMemberChannels, perNotePitchbendRange, masterPitchbendRange));
}
if (isLowerZone)
zoneLayout.setLowerZone (numMemberChannels, perNotePitchbendRange, masterPitchbendRange);
else
zoneLayout.setUpperZone (numMemberChannels, perNotePitchbendRange, masterPitchbendRange);
zoneLayout.addZone (newZone);
visualiserInstrument.setZoneLayout (zoneLayout);
synth.setZoneLayout (zoneLayout);
colourPicker.setZoneLayout (zoneLayout);
@@ -135,7 +146,7 @@ private:
void allZonesCleared() override
{
MidiOutput* midiOutput = audioDeviceManager.getDefaultMidiOutput();
auto* midiOutput = audioDeviceManager.getDefaultMidiOutput();
if (midiOutput != nullptr)
midiOutput->sendBlockOfMessagesNow (MPEMessages::clearAllZones());
@@ -172,7 +183,7 @@ private:
synth.reduceNumVoices (numberOfVoices);
else
while (synth.getNumVoices() < numberOfVoices)
synth.addVoice (new MPEDemoSynthVoice);
synth.addVoice (new MPEDemoSynthVoice());
}
//==============================================================================

examples/MPETest/Source/Visualiser.h → examples/MPEDemo/Source/Visualiser.h View File

@@ -84,7 +84,7 @@ private:
g.setColour (zoneColour);
Path circle, dashedCircle;
circle.addEllipse (translateToLocalBounds (getSquareAroundCentre (getNoteOffRadius())));
const float dashLengths[] = { 3.0f, 3.0f };
float dashLengths[] = { 3.0f, 3.0f };
PathStrokeType (2.0, PathStrokeType::mitered).createDashedStroke (dashedCircle, circle, dashLengths, 2);
g.fillPath (dashedCircle);
}
@@ -92,7 +92,8 @@ private:
//==============================================================================
void drawNoteLabel (Graphics& g, Colour zoneColour)
{
Rectangle<int> textBounds = translateToLocalBounds (getTextRectangle()).getSmallestIntegerContainer();
auto textBounds = translateToLocalBounds (getTextRectangle()).getSmallestIntegerContainer();
g.drawText ("+", textBounds, Justification::centred);
g.drawText (MidiMessage::getMidiNoteName (note.initialNote, true, true, 3), textBounds, Justification::centredBottom);
g.setFont (Font (22.0f, Font::bold));
@@ -131,7 +132,7 @@ class Visualiser : public Component,
{
public:
//==============================================================================
Visualiser (const ZoneColourPicker& zoneColourPicker)
Visualiser (ZoneColourPicker& zoneColourPicker)
: colourPicker (zoneColourPicker)
{}
@@ -140,11 +141,12 @@ public:
{
g.fillAll (Colours::black);
float noteDistance = float (getWidth()) / 128;
auto noteDistance = float (getWidth()) / 128;
for (int i = 0; i < 128; ++i)
{
float x = noteDistance * i;
int noteHeight = int (MidiMessage::isMidiNoteBlack (i) ? 0.7 * getHeight() : getHeight());
auto x = noteDistance * i;
auto noteHeight = int (MidiMessage::isMidiNoteBlack (i) ? 0.7 * getHeight() : getHeight());
g.setColour (MidiMessage::isMidiNoteBlack (i) ? Colours::white : Colours::grey);
g.drawLine (x, 0.0f, x, (float) noteHeight);
@@ -185,7 +187,7 @@ public:
{
const ScopedLock sl (lock);
for (int i = activeNotes.size(); --i >= 0;)
for (auto i = activeNotes.size(); --i >= 0;)
if (activeNotes.getReference(i).noteID == finishedNote.noteID)
activeNotes.remove (i);
@@ -218,7 +220,7 @@ private:
{
const ScopedLock sl (lock);
for (int i = noteComponents.size(); --i >= 0;)
for (auto i = noteComponents.size(); --i >= 0;)
if (findActiveNote (noteComponents.getUnchecked(i)->note.noteID) == nullptr)
noteComponents.remove (i);
@@ -234,18 +236,18 @@ private:
//==============================================================================
Point<float> getCentrePositionForNote (MPENote note) const
{
float n = float (note.initialNote) + float (note.totalPitchbendInSemitones);
float x = getWidth() * n / 128;
float y = getHeight() * (1 - note.timbre.asUnsignedFloat());
auto n = float (note.initialNote) + float (note.totalPitchbendInSemitones);
auto x = getWidth() * n / 128;
auto y = getHeight() * (1 - note.timbre.asUnsignedFloat());
return Point<float> (x, y);
return { x, y };
}
//==============================================================================
OwnedArray<NoteComponent> noteComponents;
CriticalSection lock;
Array<MPENote> activeNotes;
const ZoneColourPicker& colourPicker;
ZoneColourPicker& colourPicker;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Visualiser)
};

examples/MPETest/Source/ZoneColourPicker.h → examples/MPEDemo/Source/ZoneColourPicker.h View File

@@ -34,42 +34,29 @@ public:
ZoneColourPicker() {}
//==============================================================================
Colour getColourForMidiChannel (int midiChannel) const noexcept
Colour getColourForMidiChannel (int midiChannel) noexcept
{
if (legacyModeEnabled)
return Colours::white;
if (zoneLayout.getNumZones() == 0)
return Colours::transparentBlack;
if (zoneLayout.getLowerZone().isUsingChannelAsMemberChannel (midiChannel))
return getColourForZone (true);
if (auto* zone = zoneLayout.getZoneByChannel (midiChannel))
return getColourForZoneIndex (std::distance (zoneLayout.getZoneByIndex (0), zone));
if (zoneLayout.getUpperZone().isUsingChannelAsMemberChannel (midiChannel))
return getColourForZone (false);
return Colours::transparentBlack;
}
//==============================================================================
Colour getColourForZoneIndex (int zoneIndex) const noexcept
Colour getColourForZone (bool isLowerZone) const noexcept
{
if (legacyModeEnabled)
return Colours::white;
if (zoneIndex >= zoneLayout.getNumZones())
return Colours::transparentBlack;
static const std::array<Colour, 8> colours =
{
Colours::red,
Colours::yellow,
Colours::blue,
Colours::magenta,
Colours::limegreen,
Colours::cyan,
Colours::orange,
Colours::salmon
};
return colours[zoneIndex % colours.size()];
if (isLowerZone)
return Colours::blue;
return Colours::red;
}
//==============================================================================

examples/MPETest/Source/ZoneLayoutComponent.h → examples/MPEDemo/Source/ZoneLayoutComponent.h View File

@@ -49,9 +49,14 @@ public:
}
//==============================================================================
void zoneAdded (MPEZone newZone) override
void zoneChanged (bool isLowerZone, int numMemberChannels,
int perNotePitchbendRange, int masterPitchbendRange) override
{
zoneLayout.addZone (newZone);
if (isLowerZone)
zoneLayout.setLowerZone (numMemberChannels, perNotePitchbendRange, masterPitchbendRange);
else
zoneLayout.setUpperZone (numMemberChannels, perNotePitchbendRange, masterPitchbendRange);
repaint();
}
@@ -66,6 +71,7 @@ public:
legacyModeEnabled = legacyModeShouldBeEnabled;
legacyModePitchbendRange = pitchbendRange;
legacyModeChannelRange = channelRange;
repaint();
}
@@ -81,11 +87,10 @@ private:
for (int i = 0; i < numMidiChannels; ++i)
{
float x = float (i) * channelWidth;
auto x = float (i) * channelWidth;
Rectangle<int> channelArea ((int) x, 0, (int) channelWidth, getHeight());
Line<float> line (x, 0.0f, x, float (getHeight()));
g.drawLine (line);
g.drawLine ({ x, 0.0f, x, float (getHeight()) });
g.drawText (String (i + 1), channelArea.reduced (4, 4), Justification::topLeft, false);
}
}
@@ -93,35 +98,40 @@ private:
//==============================================================================
void paintZones (Graphics& g)
{
float channelWidth = getChannelRectangleWidth();
auto channelWidth = getChannelRectangleWidth();
Array<MPEZoneLayout::Zone> activeZones;
if (zoneLayout.getLowerZone().isActive()) activeZones.add (zoneLayout.getLowerZone());
if (zoneLayout.getUpperZone().isActive()) activeZones.add (zoneLayout.getUpperZone());
for (int i = 0; i < zoneLayout.getNumZones(); ++i)
for (auto zone : activeZones)
{
MPEZone zone = *zoneLayout.getZoneByIndex (i);
Colour zoneColour = colourPicker.getColourForZoneIndex (i);
auto zoneColour = colourPicker.getColourForZone (zone.isLowerZone());
Rectangle<int> zoneRect (int (getChannelRectangleWidth() * (zone.getMasterChannel() - 1)), 0,
int (getChannelRectangleWidth() * (zone.getNumNoteChannels() + 1)), getHeight());
zoneRect.removeFromTop (20);
auto xPos = zone.isLowerZone() ? 0 : zone.getLastMemberChannel() - 1;
g.setColour (zoneColour.withAlpha (0.3f));
g.fillRect (zoneRect.withWidth ((int) channelWidth));
Rectangle<int> zoneRect { int (channelWidth * (xPos)), 20,
int (channelWidth * (zone.numMemberChannels + 1)), getHeight() - 20 };
g.setColour (zoneColour);
g.drawRect (zoneRect, 3);
g.drawText ("<>" + String (zone.getPerNotePitchbendRange()), zoneRect.withTrimmedLeft ((int) channelWidth).reduced (4, 4), Justification::bottomLeft, false);
g.setColour (Colours::black);
g.drawText ("ZONE " + String (i + 1), zoneRect.reduced (4, 4), Justification::topLeft, false);
g.drawText ("<>" + String (zone.getMasterPitchbendRange()), zoneRect.reduced (4, 4), Justification::bottomLeft, false);
auto masterRect = zone.isLowerZone() ? zoneRect.removeFromLeft (channelWidth) : zoneRect.removeFromRight (channelWidth);
g.setColour (zoneColour.withAlpha (0.3f));
g.fillRect (masterRect);
g.setColour (zoneColour.contrasting());
g.drawText ("<>" + String (zone.masterPitchbendRange), masterRect.reduced (4), Justification::top, false);
g.drawText ("<>" + String (zone.perNotePitchbendRange), masterRect.reduced (4), Justification::bottom, false);
}
}
//==============================================================================
void paintLegacyMode (Graphics& g)
{
int startChannel = legacyModeChannelRange.getStart() - 1;
int numChannels = legacyModeChannelRange.getEnd() - startChannel - 1;
auto startChannel = legacyModeChannelRange.getStart() - 1;
auto numChannels = legacyModeChannelRange.getEnd() - startChannel - 1;
Rectangle<int> zoneRect (int (getChannelRectangleWidth() * startChannel), 0,

Loading…
Cancel
Save