Browse Source

Removed old (and broken) ExpressiveMidiTest example app. Please use the newer MPETest app instead.

tags/2021-05-28
Timur Doumler 9 years ago
parent
commit
d43e518f8d
31 changed files with 0 additions and 8606 deletions
  1. +0
    -160
      examples/ExpressiveMidiTest/Builds/LinuxMakefile/Makefile
  2. +0
    -2244
      examples/ExpressiveMidiTest/Builds/MacOSX/ExpressiveMidiTest.xcodeproj/project.pbxproj
  3. +0
    -27
      examples/ExpressiveMidiTest/Builds/MacOSX/Info.plist
  4. BIN
      examples/ExpressiveMidiTest/Builds/MacOSX/RecentFilesMenuTemplate.nib
  5. +0
    -19
      examples/ExpressiveMidiTest/Builds/VisualStudio2015/ExpressiveMidiTest.sln
  6. +0
    -1806
      examples/ExpressiveMidiTest/Builds/VisualStudio2015/ExpressiveMidiTest.vcxproj
  7. +0
    -3089
      examples/ExpressiveMidiTest/Builds/VisualStudio2015/ExpressiveMidiTest.vcxproj.filters
  8. +0
    -29
      examples/ExpressiveMidiTest/Builds/VisualStudio2015/resources.rc
  9. +0
    -106
      examples/ExpressiveMidiTest/ExpressiveMidiTest.jucer
  10. +0
    -210
      examples/ExpressiveMidiTest/JuceLibraryCode/AppConfig.h
  11. +0
    -47
      examples/ExpressiveMidiTest/JuceLibraryCode/JuceHeader.h
  12. +0
    -12
      examples/ExpressiveMidiTest/JuceLibraryCode/ReadMe.txt
  13. +0
    -4
      examples/ExpressiveMidiTest/JuceLibraryCode/modules/juce_audio_basics/juce_audio_basics.h
  14. +0
    -4
      examples/ExpressiveMidiTest/JuceLibraryCode/modules/juce_audio_devices/juce_audio_devices.h
  15. +0
    -4
      examples/ExpressiveMidiTest/JuceLibraryCode/modules/juce_audio_formats/juce_audio_formats.h
  16. +0
    -4
      examples/ExpressiveMidiTest/JuceLibraryCode/modules/juce_audio_processors/juce_audio_processors.h
  17. +0
    -4
      examples/ExpressiveMidiTest/JuceLibraryCode/modules/juce_audio_utils/juce_audio_utils.h
  18. +0
    -4
      examples/ExpressiveMidiTest/JuceLibraryCode/modules/juce_core/juce_core.h
  19. +0
    -4
      examples/ExpressiveMidiTest/JuceLibraryCode/modules/juce_cryptography/juce_cryptography.h
  20. +0
    -4
      examples/ExpressiveMidiTest/JuceLibraryCode/modules/juce_data_structures/juce_data_structures.h
  21. +0
    -4
      examples/ExpressiveMidiTest/JuceLibraryCode/modules/juce_events/juce_events.h
  22. +0
    -4
      examples/ExpressiveMidiTest/JuceLibraryCode/modules/juce_graphics/juce_graphics.h
  23. +0
    -4
      examples/ExpressiveMidiTest/JuceLibraryCode/modules/juce_gui_basics/juce_gui_basics.h
  24. +0
    -4
      examples/ExpressiveMidiTest/JuceLibraryCode/modules/juce_gui_extra/juce_gui_extra.h
  25. +0
    -4
      examples/ExpressiveMidiTest/JuceLibraryCode/modules/juce_opengl/juce_opengl.h
  26. +0
    -4
      examples/ExpressiveMidiTest/JuceLibraryCode/modules/juce_video/juce_video.h
  27. +0
    -92
      examples/ExpressiveMidiTest/Source/Main.cpp
  28. +0
    -146
      examples/ExpressiveMidiTest/Source/MainComponent.h
  29. +0
    -265
      examples/ExpressiveMidiTest/Source/Setup.h
  30. +0
    -80
      examples/ExpressiveMidiTest/Source/Synth.h
  31. +0
    -218
      examples/ExpressiveMidiTest/Source/Visualiser.h

+ 0
- 160
examples/ExpressiveMidiTest/Builds/LinuxMakefile/Makefile View File

@@ -1,160 +0,0 @@
# Automatically generated makefile, created by the Introjucer
# Don't edit this file! Your changes will be overwritten when you re-save the Introjucer project!
# (this disables dependency generation if multiple architectures are set)
DEPFLAGS := $(if $(word 2, $(TARGET_ARCH)), , -MMD)
ifndef CONFIG
CONFIG=Debug
endif
ifeq ($(CONFIG),Debug)
BINDIR := build
LIBDIR := build
OBJDIR := build/intermediate/Debug
OUTDIR := build
ifeq ($(TARGET_ARCH),)
TARGET_ARCH := -march=native
endif
CPPFLAGS := $(DEPFLAGS) -D "LINUX=1" -D "DEBUG=1" -D "_DEBUG=1" -D "JUCER_LINUX_MAKE_6D53C8B4=1" -D "JUCE_APP_VERSION=1.0.0" -D "JUCE_APP_VERSION_HEX=0x10000" -I /usr/include -I /usr/include/freetype2 -I ../../JuceLibraryCode -I ../../../../modules
CFLAGS += $(CPPFLAGS) $(TARGET_ARCH) -g -ggdb -O0
CXXFLAGS += $(CFLAGS) -std=c++11
LDFLAGS += $(TARGET_ARCH) -L$(BINDIR) -L$(LIBDIR) -L/usr/X11R6/lib/ -lGL -lX11 -lXext -lXinerama -lasound -ldl -lfreetype -lpthread -lrt
TARGET := ExpressiveMidiTest
BLDCMD = $(CXX) -o $(OUTDIR)/$(TARGET) $(OBJECTS) $(LDFLAGS) $(RESOURCES) $(TARGET_ARCH)
CLEANCMD = rm -rf $(OUTDIR)/$(TARGET) $(OBJDIR)
endif
ifeq ($(CONFIG),Release)
BINDIR := build
LIBDIR := build
OBJDIR := build/intermediate/Release
OUTDIR := build
ifeq ($(TARGET_ARCH),)
TARGET_ARCH := -march=native
endif
CPPFLAGS := $(DEPFLAGS) -D "LINUX=1" -D "NDEBUG=1" -D "JUCER_LINUX_MAKE_6D53C8B4=1" -D "JUCE_APP_VERSION=1.0.0" -D "JUCE_APP_VERSION_HEX=0x10000" -I /usr/include -I /usr/include/freetype2 -I ../../JuceLibraryCode -I ../../../../modules
CFLAGS += $(CPPFLAGS) $(TARGET_ARCH) -O3
CXXFLAGS += $(CFLAGS) -std=c++11
LDFLAGS += $(TARGET_ARCH) -L$(BINDIR) -L$(LIBDIR) -fvisibility=hidden -L/usr/X11R6/lib/ -lGL -lX11 -lXext -lXinerama -lasound -ldl -lfreetype -lpthread -lrt
TARGET := ExpressiveMidiTest
BLDCMD = $(CXX) -o $(OUTDIR)/$(TARGET) $(OBJECTS) $(LDFLAGS) $(RESOURCES) $(TARGET_ARCH)
CLEANCMD = rm -rf $(OUTDIR)/$(TARGET) $(OBJDIR)
endif
OBJECTS := \
$(OBJDIR)/Main_90ebc5c2.o \
$(OBJDIR)/juce_audio_basics_399a455e.o \
$(OBJDIR)/juce_audio_devices_c1c9ba9c.o \
$(OBJDIR)/juce_audio_formats_f04b043c.o \
$(OBJDIR)/juce_audio_processors_eb9ae116.o \
$(OBJDIR)/juce_audio_utils_cf18005c.o \
$(OBJDIR)/juce_core_1ee54a40.o \
$(OBJDIR)/juce_cryptography_3b1f489a.o \
$(OBJDIR)/juce_data_structures_84790dfc.o \
$(OBJDIR)/juce_events_584896b4.o \
$(OBJDIR)/juce_graphics_f9afc18.o \
$(OBJDIR)/juce_gui_basics_90929794.o \
$(OBJDIR)/juce_gui_extra_b81d9e1c.o \
$(OBJDIR)/juce_opengl_1890bee0.o \
$(OBJDIR)/juce_video_86a19d3c.o \
.PHONY: clean
$(OUTDIR)/$(TARGET): $(OBJECTS) $(RESOURCES)
@echo Linking ExpressiveMidiTest
-@mkdir -p $(BINDIR)
-@mkdir -p $(LIBDIR)
-@mkdir -p $(OUTDIR)
@$(BLDCMD)
clean:
@echo Cleaning ExpressiveMidiTest
@$(CLEANCMD)
strip:
@echo Stripping ExpressiveMidiTest
-@strip --strip-unneeded $(OUTDIR)/$(TARGET)
$(OBJDIR)/Main_90ebc5c2.o: ../../Source/Main.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling Main.cpp"
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
$(OBJDIR)/juce_audio_basics_399a455e.o: ../../../../modules/juce_audio_basics/juce_audio_basics.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling juce_audio_basics.cpp"
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
$(OBJDIR)/juce_audio_devices_c1c9ba9c.o: ../../../../modules/juce_audio_devices/juce_audio_devices.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling juce_audio_devices.cpp"
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
$(OBJDIR)/juce_audio_formats_f04b043c.o: ../../../../modules/juce_audio_formats/juce_audio_formats.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling juce_audio_formats.cpp"
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
$(OBJDIR)/juce_audio_processors_eb9ae116.o: ../../../../modules/juce_audio_processors/juce_audio_processors.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling juce_audio_processors.cpp"
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
$(OBJDIR)/juce_audio_utils_cf18005c.o: ../../../../modules/juce_audio_utils/juce_audio_utils.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling juce_audio_utils.cpp"
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
$(OBJDIR)/juce_core_1ee54a40.o: ../../../../modules/juce_core/juce_core.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling juce_core.cpp"
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
$(OBJDIR)/juce_cryptography_3b1f489a.o: ../../../../modules/juce_cryptography/juce_cryptography.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling juce_cryptography.cpp"
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
$(OBJDIR)/juce_data_structures_84790dfc.o: ../../../../modules/juce_data_structures/juce_data_structures.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling juce_data_structures.cpp"
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
$(OBJDIR)/juce_events_584896b4.o: ../../../../modules/juce_events/juce_events.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling juce_events.cpp"
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
$(OBJDIR)/juce_graphics_f9afc18.o: ../../../../modules/juce_graphics/juce_graphics.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling juce_graphics.cpp"
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
$(OBJDIR)/juce_gui_basics_90929794.o: ../../../../modules/juce_gui_basics/juce_gui_basics.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling juce_gui_basics.cpp"
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
$(OBJDIR)/juce_gui_extra_b81d9e1c.o: ../../../../modules/juce_gui_extra/juce_gui_extra.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling juce_gui_extra.cpp"
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
$(OBJDIR)/juce_opengl_1890bee0.o: ../../../../modules/juce_opengl/juce_opengl.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling juce_opengl.cpp"
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
$(OBJDIR)/juce_video_86a19d3c.o: ../../../../modules/juce_video/juce_video.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling juce_video.cpp"
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
-include $(OBJECTS:%.o=%.d)

+ 0
- 2244
examples/ExpressiveMidiTest/Builds/MacOSX/ExpressiveMidiTest.xcodeproj/project.pbxproj
File diff suppressed because it is too large
View File


+ 0
- 27
examples/ExpressiveMidiTest/Builds/MacOSX/Info.plist View File

@@ -1,27 +0,0 @@
<?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.yourcompany.ExpressiveMidiTest</string>
<key>CFBundleName</key>
<string>ExpressiveMidiTest</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleShortVersionString</key>
<string>1.0.0</string>
<key>CFBundleVersion</key>
<string>1.0.0</string>
<key>NSHumanReadableCopyright</key>
<string></string>
<key>NSHighResolutionCapable</key>
<true/>
</dict>
</plist>

BIN
examples/ExpressiveMidiTest/Builds/MacOSX/RecentFilesMenuTemplate.nib View File


+ 0
- 19
examples/ExpressiveMidiTest/Builds/VisualStudio2015/ExpressiveMidiTest.sln View File

@@ -1,19 +0,0 @@
Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2015
Project("{DD2CC1DB-1ED9-B756-AC06-88E9916DBFEF}") = "ExpressiveMidiTest", "ExpressiveMidiTest.vcxproj", "{160A79F2-5429-4B16-BB1A-9F5761EFACD4}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{160A79F2-5429-4B16-BB1A-9F5761EFACD4}.Debug|Win32.ActiveCfg = Debug|Win32
{160A79F2-5429-4B16-BB1A-9F5761EFACD4}.Debug|Win32.Build.0 = Debug|Win32
{160A79F2-5429-4B16-BB1A-9F5761EFACD4}.Release|Win32.ActiveCfg = Release|Win32
{160A79F2-5429-4B16-BB1A-9F5761EFACD4}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

+ 0
- 1806
examples/ExpressiveMidiTest/Builds/VisualStudio2015/ExpressiveMidiTest.vcxproj
File diff suppressed because it is too large
View File


+ 0
- 3089
examples/ExpressiveMidiTest/Builds/VisualStudio2015/ExpressiveMidiTest.vcxproj.filters
File diff suppressed because it is too large
View File


+ 0
- 29
examples/ExpressiveMidiTest/Builds/VisualStudio2015/resources.rc View File

@@ -1,29 +0,0 @@
#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 "FileDescription", "ExpressiveMidiTest\0"
VALUE "FileVersion", "1.0.0\0"
VALUE "ProductName", "ExpressiveMidiTest\0"
VALUE "ProductVersion", "1.0.0\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1252
END
END
#endif

+ 0
- 106
examples/ExpressiveMidiTest/ExpressiveMidiTest.jucer View File

@@ -1,106 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<JUCERPROJECT id="IilE7R" name="ExpressiveMidiTest" projectType="guiapp" version="1.0.0"
bundleIdentifier="com.yourcompany.ExpressiveMidiTest" includeBinaryInAppConfig="1"
jucerVersion="4.0.1">
<MAINGROUP id="VCQQcn" name="ExpressiveMidiTest">
<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"/>
<FILE id="M1udUu" name="Setup.h" compile="0" resource="0" file="Source/Setup.h"/>
<FILE id="jCp7u7" name="Synth.h" compile="0" resource="0" file="Source/Synth.h"/>
<FILE id="pqFzQb" name="Visualiser.h" compile="0" resource="0" file="Source/Visualiser.h"/>
</GROUP>
</MAINGROUP>
<EXPORTFORMATS>
<XCODE_MAC targetFolder="Builds/MacOSX">
<CONFIGURATIONS>
<CONFIGURATION name="Debug" osxSDK="default" osxCompatibility="10.10 SDK" osxArchitecture="default"
isDebug="1" optimisation="1" targetName="ExpressiveMidiTest"/>
<CONFIGURATION name="Release" osxSDK="default" osxCompatibility="10.10 SDK"
osxArchitecture="default" isDebug="0" optimisation="3" targetName="ExpressiveMidiTest"/>
</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_utils" path="../../modules"/>
</MODULEPATHS>
</XCODE_MAC>
<LINUX_MAKE targetFolder="Builds/LinuxMakefile">
<CONFIGURATIONS>
<CONFIGURATION name="Debug" libraryPath="/usr/X11R6/lib/" isDebug="1" optimisation="1"
targetName="ExpressiveMidiTest"/>
<CONFIGURATION name="Release" libraryPath="/usr/X11R6/lib/" isDebug="0" optimisation="3"
targetName="ExpressiveMidiTest"/>
</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_utils" path="../../modules"/>
</MODULEPATHS>
</LINUX_MAKE>
<VS2015 targetFolder="Builds/VisualStudio2015">
<CONFIGURATIONS>
<CONFIGURATION name="Debug" winWarningLevel="4" generateManifest="1" winArchitecture="32-bit"
isDebug="1" optimisation="1" targetName="ExpressiveMidiTest"/>
<CONFIGURATION name="Release" winWarningLevel="4" generateManifest="1" winArchitecture="32-bit"
isDebug="0" optimisation="3" targetName="ExpressiveMidiTest"/>
</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_formats" path="../../modules"/>
<MODULEPATH id="juce_audio_devices" path="../../modules"/>
<MODULEPATH id="juce_audio_basics" path="../../modules"/>
<MODULEPATH id="juce_audio_utils" path="../../modules"/>
</MODULEPATHS>
</VS2015>
</EXPORTFORMATS>
<MODULES>
<MODULES id="juce_audio_basics" showAllCode="1" useLocalCopy="0"/>
<MODULES id="juce_audio_devices" showAllCode="1" useLocalCopy="0"/>
<MODULES id="juce_audio_formats" showAllCode="1" useLocalCopy="0"/>
<MODULES id="juce_audio_processors" showAllCode="1" useLocalCopy="0"/>
<MODULE id="juce_audio_utils" showAllCode="1" useLocalCopy="0"/>
<MODULES id="juce_core" showAllCode="1" useLocalCopy="0"/>
<MODULES id="juce_cryptography" showAllCode="1" useLocalCopy="0"/>
<MODULES id="juce_data_structures" showAllCode="1" useLocalCopy="0"/>
<MODULES id="juce_events" showAllCode="1" useLocalCopy="0"/>
<MODULES id="juce_graphics" showAllCode="1" useLocalCopy="0"/>
<MODULES id="juce_gui_basics" showAllCode="1" useLocalCopy="0"/>
<MODULES id="juce_gui_extra" showAllCode="1" useLocalCopy="0"/>
<MODULES id="juce_opengl" showAllCode="1" useLocalCopy="0"/>
<MODULES id="juce_video" showAllCode="1" useLocalCopy="0"/>
</MODULES>
<JUCEOPTIONS/>
</JUCERPROJECT>

+ 0
- 210
examples/ExpressiveMidiTest/JuceLibraryCode/AppConfig.h View File

@@ -1,210 +0,0 @@
/*
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_IILE7R__
#define __JUCE_APPCONFIG_IILE7R__
//==============================================================================
// [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_processors 1
#define JUCE_MODULE_AVAILABLE_juce_audio_utils 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 1
#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
#endif
#ifndef JUCE_USE_CAMERA
//#define JUCE_USE_CAMERA
#endif
#endif // __JUCE_APPCONFIG_IILE7R__

+ 0
- 47
examples/ExpressiveMidiTest/JuceLibraryCode/JuceHeader.h View File

@@ -1,47 +0,0 @@
/*
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_IILE7R__
#define __APPHEADERFILE_IILE7R__
#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_processors/juce_audio_processors.h"
#include "modules/juce_audio_utils/juce_audio_utils.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 = "ExpressiveMidiTest";
const char* const versionString = "1.0.0";
const int versionNumber = 0x10000;
}
#endif
#endif // __APPHEADERFILE_IILE7R__

+ 0
- 12
examples/ExpressiveMidiTest/JuceLibraryCode/ReadMe.txt View File

@@ -1,12 +0,0 @@
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
- 4
examples/ExpressiveMidiTest/JuceLibraryCode/modules/juce_audio_basics/juce_audio_basics.h View File

@@ -1,4 +0,0 @@
// 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
- 4
examples/ExpressiveMidiTest/JuceLibraryCode/modules/juce_audio_devices/juce_audio_devices.h View File

@@ -1,4 +0,0 @@
// 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
- 4
examples/ExpressiveMidiTest/JuceLibraryCode/modules/juce_audio_formats/juce_audio_formats.h View File

@@ -1,4 +0,0 @@
// 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
- 4
examples/ExpressiveMidiTest/JuceLibraryCode/modules/juce_audio_processors/juce_audio_processors.h View File

@@ -1,4 +0,0 @@
// 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
- 4
examples/ExpressiveMidiTest/JuceLibraryCode/modules/juce_audio_utils/juce_audio_utils.h View File

@@ -1,4 +0,0 @@
// This is an auto-generated file to redirect any included
// module headers to the correct external folder.
#include "../../../../../modules/juce_audio_utils/juce_audio_utils.h"

+ 0
- 4
examples/ExpressiveMidiTest/JuceLibraryCode/modules/juce_core/juce_core.h View File

@@ -1,4 +0,0 @@
// 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
- 4
examples/ExpressiveMidiTest/JuceLibraryCode/modules/juce_cryptography/juce_cryptography.h View File

@@ -1,4 +0,0 @@
// 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
- 4
examples/ExpressiveMidiTest/JuceLibraryCode/modules/juce_data_structures/juce_data_structures.h View File

@@ -1,4 +0,0 @@
// 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
- 4
examples/ExpressiveMidiTest/JuceLibraryCode/modules/juce_events/juce_events.h View File

@@ -1,4 +0,0 @@
// 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
- 4
examples/ExpressiveMidiTest/JuceLibraryCode/modules/juce_graphics/juce_graphics.h View File

@@ -1,4 +0,0 @@
// 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
- 4
examples/ExpressiveMidiTest/JuceLibraryCode/modules/juce_gui_basics/juce_gui_basics.h View File

@@ -1,4 +0,0 @@
// 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
- 4
examples/ExpressiveMidiTest/JuceLibraryCode/modules/juce_gui_extra/juce_gui_extra.h View File

@@ -1,4 +0,0 @@
// 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
- 4
examples/ExpressiveMidiTest/JuceLibraryCode/modules/juce_opengl/juce_opengl.h View File

@@ -1,4 +0,0 @@
// 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
- 4
examples/ExpressiveMidiTest/JuceLibraryCode/modules/juce_video/juce_video.h View File

@@ -1,4 +0,0 @@
// This is an auto-generated file to redirect any included
// module headers to the correct external folder.
#include "../../../../../modules/juce_video/juce_video.h"

+ 0
- 92
examples/ExpressiveMidiTest/Source/Main.cpp View File

@@ -1,92 +0,0 @@
/*
==============================================================================
This file is part of the JUCE library.
Copyright (c) 2015 - ROLI Ltd.
Permission is granted to use this software under the terms of either:
a) the GPL v2 (or any later version)
b) the Affero GPL v3
Details of these licenses can be found at: www.gnu.org/licenses
JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
------------------------------------------------------------------------------
To release a closed-source product which uses JUCE, commercial licenses are
available: visit www.juce.com for more information.
==============================================================================
*/
#include "../JuceLibraryCode/JuceHeader.h"
struct ExpressiveMidiTestClasses
{
#include "Setup.h"
#include "Synth.h"
#include "Visualiser.h"
#include "MainComponent.h"
};
//==============================================================================
class ExpressiveMidiTestApplication : public JUCEApplication
{
public:
//==========================================================================
ExpressiveMidiTestApplication() {}
const String getApplicationName() override { return ProjectInfo::projectName; }
const String getApplicationVersion() override { return ProjectInfo::versionString; }
bool moreThanOneInstanceAllowed() override { return true; }
//==========================================================================
void initialise (const String& commandLine) override
{
mainWindow = new MainWindow (getApplicationName());
}
void shutdown() override
{
mainWindow = nullptr;
}
void systemRequestedQuit() override
{
quit();
}
//==========================================================================
class MainWindow : public DocumentWindow
{
public:
MainWindow (String name)
: DocumentWindow (name, Colours::lightgrey, DocumentWindow::allButtons)
{
setUsingNativeTitleBar (true);
setContentOwned (new ExpressiveMidiTestClasses::MainComponent(), true);
centreWithSize (getWidth(), getHeight());
setVisible (true);
}
void closeButtonPressed() override
{
JUCEApplication::getInstance()->systemRequestedQuit();
}
private:
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MainWindow)
};
private:
//==========================================================================
ScopedPointer<MainWindow> mainWindow;
};
//==============================================================================
START_JUCE_APPLICATION (ExpressiveMidiTestApplication)

+ 0
- 146
examples/ExpressiveMidiTest/Source/MainComponent.h View File

@@ -1,146 +0,0 @@
/*
==============================================================================
This file is part of the JUCE library.
Copyright (c) 2015 - ROLI Ltd.
Permission is granted to use this software under the terms of either:
a) the GPL v2 (or any later version)
b) the Affero GPL v3
Details of these licenses can be found at: www.gnu.org/licenses
JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
------------------------------------------------------------------------------
To release a closed-source product which uses JUCE, commercial licenses are
available: visit www.juce.com for more information.
==============================================================================
*/
#ifndef MAINCOMPONENT_H_INCLUDED
#define MAINCOMPONENT_H_INCLUDED
//==============================================================================
class MainComponent : public Component,
private AudioIODeviceCallback,
private MidiInputCallback,
private ZoneLayoutComponent::Listener
{
public:
//==========================================================================
MainComponent()
: audioSetupComp (audioDeviceManager, 0, 0, 0, 256, true, true, true, false)
{
setLookAndFeel (&lookAndFeel);
setSize (880, 670);
audioDeviceManager.initialise (0, 2, 0, true, String::empty, 0);
audioDeviceManager.addMidiInputCallback(String::empty, this);
audioDeviceManager.addAudioCallback (this);
addAndMakeVisible (audioSetupComp);
addAndMakeVisible (expressiveMidiSetupComp);
addAndMakeVisible (zoneLayoutComp);
addAndMakeVisible (visualiserViewport);
visualiserViewport.setScrollBarsShown (false, true);
visualiserViewport.setViewedComponent (&visualiserComp, false);
visualiserViewport.setViewPositionProportionately (0.5, 0.0);
expressiveMidiSetupComp.addListener (&zoneLayoutComp);
expressiveMidiSetupComp.addListener (this);
visualiserInstrument.addListener (&visualiserComp);
}
~MainComponent()
{
audioDeviceManager.removeMidiInputCallback (String::empty, this);
}
//==========================================================================
void resized() override
{
const int visualiserCompWidth = 2800;
const int visualiserCompHeight = 300;
const int zoneLayoutCompHeight = 60;
const float audioSetupCompRelativeWidth = 0.6f;
Rectangle<int> r (getLocalBounds());
visualiserViewport.setBounds (r.removeFromBottom (visualiserCompHeight));
visualiserComp.setBounds (Rectangle<int> (visualiserCompWidth,
visualiserViewport.getHeight() - visualiserViewport.getScrollBarThickness()));
zoneLayoutComp.setBounds (r.removeFromBottom (zoneLayoutCompHeight));
audioSetupComp.setBounds (r.removeFromLeft (proportionOfWidth (audioSetupCompRelativeWidth)));
expressiveMidiSetupComp.setBounds (r);
}
//==========================================================================
void audioDeviceIOCallback (const float** inputChannelData, int numInputChannels,
float** outputChannelData, int numOutputChannels,
int numSamples) override
{
AudioBuffer<float> buffer (outputChannelData, numOutputChannels, numSamples);
buffer.clear();
MidiBuffer incomingMidi;
midiCollector.removeNextBlockOfMessages (incomingMidi, numSamples);
synth.renderNextBlock (buffer, incomingMidi, 0, numSamples);
}
void audioDeviceAboutToStart (AudioIODevice* device) override
{
const double sampleRate = device->getCurrentSampleRate();
midiCollector.reset (sampleRate);
synth.setCurrentPlaybackSampleRate (sampleRate);
}
void audioDeviceStopped() override
{
}
private:
//==========================================================================
void handleIncomingMidiMessage (MidiInput* /*source*/,
const MidiMessage& message) override
{
visualiserInstrument.processNextMidiEvent (message);
midiCollector.addMessageToQueue (message);
}
//==========================================================================
void expressiveMidiZoneLayoutChanged (ExpressiveMidiZoneLayout newLayout) override
{
MidiOutput* midiOutput = audioDeviceManager.getDefaultMidiOutput();
if (midiOutput != nullptr)
midiOutput->sendBlockOfMessagesNow (ExpressiveMidiMessages::setZoneLayout (newLayout));
visualiserInstrument.setZoneLayout (newLayout);
synth.setZoneLayout (newLayout);
}
//==========================================================================
LookAndFeel_V3 lookAndFeel;
AudioDeviceManager audioDeviceManager;
AudioDeviceSelectorComponent audioSetupComp;
ExpressiveMidiSetupComponent expressiveMidiSetupComp;
ZoneLayoutComponent zoneLayoutComp;
Visualiser visualiserComp;
Viewport visualiserViewport;
ExpressiveMidiInstrument visualiserInstrument;
DemoSynth synth;
MidiMessageCollector midiCollector;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MainComponent)
};
#endif // MAINCOMPONENT_H_INCLUDED

+ 0
- 265
examples/ExpressiveMidiTest/Source/Setup.h View File

@@ -1,265 +0,0 @@
/*
==============================================================================
This file is part of the JUCE library.
Copyright (c) 2015 - ROLI Ltd.
Permission is granted to use this software under the terms of either:
a) the GPL v2 (or any later version)
b) the Affero GPL v3
Details of these licenses can be found at: www.gnu.org/licenses
JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
------------------------------------------------------------------------------
To release a closed-source product which uses JUCE, commercial licenses are
available: visit www.juce.com for more information.
==============================================================================
*/
#ifndef SETUP_H_INCLUDED
#define SETUP_H_INCLUDED
//==============================================================================
struct Utilities
{
static Colour getZoneColour (int index) noexcept
{
return Colours::red; // TIMUR TODO: use different colours for different zones!
}
};
//==============================================================================
class ExpressiveMidiSetupComponent : public Component,
public ChangeBroadcaster,
private Button::Listener
{
public:
//==========================================================================
ExpressiveMidiSetupComponent()
: masterChannelLabel (String::empty, "Master channel:"),
noteChannelsLabel (String::empty, "Nr. of note channels:"),
masterPitchbendRangeLabel (String::empty, "Master pitchbend range (semitones):"),
notePitchbendRangeLabel (String::empty, "Note pitchbend range (semitones):"),
addZoneButton ("Add this zone"),
clearAllZonesButton ("Clear all zones")
{
initialiseComboBoxWithConsecutiveIntegers (masterChannel, masterChannelLabel, 1, 15, defaultMasterChannel);
initialiseComboBoxWithConsecutiveIntegers (noteChannels, noteChannelsLabel, 1, 15, defaultNoteChannels);
initialiseComboBoxWithConsecutiveIntegers (masterPitchbendRange, masterPitchbendRangeLabel, 0, 96, defaultMasterPitchbendRange);
initialiseComboBoxWithConsecutiveIntegers (notePitchbendRange, notePitchbendRangeLabel, 0, 96, defaultNotePitchbendRange);
initialiseTextButton (addZoneButton);
initialiseTextButton (clearAllZonesButton);
}
//==========================================================================
void resized() override
{
Rectangle<int> r (proportionOfWidth (0.65f), 15, proportionOfWidth (0.25f), 3000);
const int h = 24;
const int space = h / 4;
masterChannel.setBounds (r.removeFromTop (h));
r.removeFromTop (space);
noteChannels.setBounds (r.removeFromTop (h));
r.removeFromTop (space);
masterPitchbendRange.setBounds (r.removeFromTop (h));
r.removeFromTop (space);
notePitchbendRange.setBounds (r.removeFromTop (h));
r.removeFromTop (18);
r.setLeft (proportionOfWidth (0.5f));
addZoneButton.setBounds (r.removeFromTop (h));
r.removeFromTop (space);
clearAllZonesButton.setBounds (r.removeFromTop (h));
}
//==========================================================================
class Listener
{
public:
virtual ~Listener() {}
virtual void expressiveMidiZoneLayoutChanged (ExpressiveMidiZoneLayout newLayout) = 0;
};
void addListener (Listener* listenerToAdd)
{
listeners.add (listenerToAdd);
if (zoneLayout.getNumZones() > 0)
// make the new listener immediately aware of current zone layout
listenerToAdd->expressiveMidiZoneLayoutChanged (zoneLayout);
}
void removeListener (Listener* listenerToRemove)
{
listeners.remove (listenerToRemove);
}
private:
//==========================================================================
void initialiseComboBoxWithConsecutiveIntegers (ComboBox& comboBox, Label& labelToAttach, int firstValue, int numValues, int valueToSelect)
{
addAndMakeVisible (comboBox);
for (int i = 0; i < numValues; ++i)
comboBox.addItem (String (i + firstValue), i + 1);
comboBox.setSelectedId (valueToSelect - firstValue + 1);
labelToAttach.attachToComponent (&comboBox, true);
}
//==========================================================================
void initialiseTextButton (TextButton& button)
{
addAndMakeVisible (button);
button.addListener (this);
}
//==========================================================================
void buttonClicked (Button* button) override
{
if (button == &addZoneButton)
addZoneButtonClicked();
else if (button == &clearAllZonesButton)
clearAllZonesButtonClicked();
}
//==========================================================================
void addZoneButtonClicked()
{
if (selectedZoneParametersValid())
{
ExpressiveMidiZone newZone (masterChannel.getText().getIntValue(),
noteChannels.getText().getIntValue(),
notePitchbendRange.getText().getIntValue(),
masterPitchbendRange.getText().getIntValue());
zoneLayout.addZone (newZone);
listeners.call (&Listener::expressiveMidiZoneLayoutChanged, zoneLayout);
}
else
{
handleInvalidNrOfNoteChannels();
}
}
//==========================================================================
void clearAllZonesButtonClicked()
{
zoneLayout.clearAllZones();
listeners.call (&Listener::expressiveMidiZoneLayoutChanged, zoneLayout);
}
//==========================================================================
bool selectedZoneParametersValid() const
{
int maxPossibleNumNoteChannels = 16 - masterChannel.getText().getIntValue();
return noteChannels.getText().getIntValue() <= maxPossibleNumNoteChannels;
}
//==========================================================================
void handleInvalidNrOfNoteChannels() const
{
AlertWindow::showMessageBoxAsync (AlertWindow::WarningIcon,
"Invalid zone layout",
"Cannot create Expressive MIDI zone:\n"
"Invalid zone parameters selected!",
"Got it");
}
//==========================================================================
ExpressiveMidiZoneLayout zoneLayout;
ComboBox masterChannel, noteChannels, masterPitchbendRange, notePitchbendRange;
Label masterChannelLabel, noteChannelsLabel, masterPitchbendRangeLabel, notePitchbendRangeLabel;
TextButton addZoneButton, clearAllZonesButton;
ListenerList<Listener> listeners;
const int defaultMasterChannel = 1, defaultNoteChannels = 15,
defaultMasterPitchbendRange = 2, defaultNotePitchbendRange = 48;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ExpressiveMidiSetupComponent)
};
//==============================================================================
class ZoneLayoutComponent : public Component,
public ExpressiveMidiSetupComponent::Listener
{
public:
//==========================================================================
void paint (Graphics& g) override
{
g.setColour (Colours::black);
float channelWidth = getChannelRectangleWidth();
for (int i = 0; i < numMidiChannels; ++i)
{
float x = float (i) * channelWidth;
Rectangle<int> channelArea (x, 0.0f, channelWidth, getHeight());
Line<float> line (x, 0.0f, x, float (getHeight()));
g.drawLine (line);
g.drawText (String (i + 1), channelArea.reduced (4, 4), Justification::topLeft, false);
}
paintZones (g);
}
//==========================================================================
void paintZones (Graphics& g)
{
float channelWidth = getChannelRectangleWidth();
for (int i = 0; i < zoneLayout.getNumZones(); ++i)
{
ExpressiveMidiZone zone = zoneLayout.getZone (i);
Rectangle<int> zoneRect (getChannelRectangleWidth() * (zone.getMasterChannel() - 1), 0,
getChannelRectangleWidth() * (zone.getNumNoteChannels() + 1), getHeight());
zoneRect.removeFromTop (20);
g.setColour (Utilities::getZoneColour (i).withAlpha (0.3f));
g.fillRect (zoneRect.withWidth (channelWidth));
g.setColour (Utilities::getZoneColour (i));
g.drawRect (zoneRect, 3);
g.drawText ("<>" + String (zone.getPerNotePitchbendRange()), zoneRect.withTrimmedLeft (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);
}
}
//==========================================================================
void expressiveMidiZoneLayoutChanged (ExpressiveMidiZoneLayout newLayout) override
{
zoneLayout = newLayout;
repaint();
}
private:
//==========================================================================
float getChannelRectangleWidth() const noexcept
{
return float (getWidth()) / numMidiChannels;
}
//==========================================================================
ExpressiveMidiZoneLayout zoneLayout;
const int numMidiChannels = 16;
};
#endif // SETUP_H_INCLUDED

+ 0
- 80
examples/ExpressiveMidiTest/Source/Synth.h View File

@@ -1,80 +0,0 @@
/*
==============================================================================
This file is part of the JUCE library.
Copyright (c) 2015 - ROLI Ltd.
Permission is granted to use this software under the terms of either:
a) the GPL v2 (or any later version)
b) the Affero GPL v3
Details of these licenses can be found at: www.gnu.org/licenses
JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
------------------------------------------------------------------------------
To release a closed-source product which uses JUCE, commercial licenses are
available: visit www.juce.com for more information.
==============================================================================
*/
#ifndef SYNTH_H_INCLUDED
#define SYNTH_H_INCLUDED
//==============================================================================
class DemoSynth: public ExpressiveMidiSynthesiserBase
{
public:
DemoSynth()
: noiseLevel (0.0f)
{
}
void noteAdded (ExpressiveMidiNote newNote) override
{
noiseLevel += 0.05f;
}
void noteChanged (ExpressiveMidiNote changedNote) override
{
// nothing!
}
void noteReleased (ExpressiveMidiNote finishedNote) override
{
noiseLevel -= 0.05f;
}
protected:
//==========================================================================
void renderNextSubBlock (AudioBuffer<float>& outputAudio,
int startSample,
int numSamples) override
{
while (--numSamples >= 0)
{
for (int i = outputAudio.getNumChannels(); --i >= 0;)
{
float randomFloatWithinRange = (2.0f * float (std::rand()) / float (std::numeric_limits<int>::max())) - 1.0f;
const float currentSample = noiseLevel * randomFloatWithinRange;
outputAudio.addSample (i, startSample, currentSample);
}
++startSample;
}
}
private:
//==========================================================================
float noiseLevel;
};
#endif // SYNTH_H_INCLUDED

+ 0
- 218
examples/ExpressiveMidiTest/Source/Visualiser.h View File

@@ -1,218 +0,0 @@
/*
==============================================================================
This file is part of the JUCE library.
Copyright (c) 2015 - ROLI Ltd.
Permission is granted to use this software under the terms of either:
a) the GPL v2 (or any later version)
b) the Affero GPL v3
Details of these licenses can be found at: www.gnu.org/licenses
JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
------------------------------------------------------------------------------
To release a closed-source product which uses JUCE, commercial licenses are
available: visit www.juce.com for more information.
==============================================================================
*/
#ifndef VISUALISER_H_INCLUDED
#define VISUALISER_H_INCLUDED
//==============================================================================
class NoteComponent : public Component
{
public:
NoteComponent (const ExpressiveMidiNote& n) : note (n)
{
}
//==========================================================================
void update (const ExpressiveMidiNote& newNote, Point<float> newCentre)
{
note = newNote;
centre = newCentre;
setBounds (getSquareAroundCentre (jmax (getNoteOnRadius(), getPressureRadius()))
.getUnion (getTextRectangle())
.getSmallestIntegerContainer()
.expanded (3));
repaint();
}
//==========================================================================
void paint (Graphics& g) override
{
Colour colour (Colours::red); // TODO
g.setColour (colour.withAlpha (0.3f));
g.fillEllipse (translateToLocalBounds (getSquareAroundCentre (getNoteOnRadius())));
g.setColour (colour); // TODO
g.drawEllipse (translateToLocalBounds (getSquareAroundCentre (getPressureRadius())), 2.0f);
Rectangle<int> 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));
g.drawText (String (note.midiChannel), textBounds, Justification::centredTop);
}
//==========================================================================
ExpressiveMidiNote note;
Point<float> centre;
private:
//==========================================================================
Rectangle<float> getSquareAroundCentre (float radius) const noexcept
{
return Rectangle<float> (radius * 2.0f, radius * 2.0f).withCentre (centre);
}
Rectangle<float> translateToLocalBounds (Rectangle<float> r) const noexcept
{
return r - getPosition().toFloat();
}
Rectangle<float> getTextRectangle() const noexcept
{
return Rectangle<float> (30.0f, 50.0f).withCentre (centre);
}
float getNoteOnRadius() const { return note.noteOnVelocity.asUnsignedFloat() * maxNoteRadius; }
float getPressureRadius() const { return note.pressure.asUnsignedFloat() * maxNoteRadius; }
const float maxNoteRadius = 100.0f;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (NoteComponent)
};
//==============================================================================
class Visualiser : public Component,
public ExpressiveMidiInstrument::Listener,
private AsyncUpdater
{
public:
//==========================================================================
Visualiser() {}
//==========================================================================
void paint (Graphics& g) override
{
g.fillAll (Colours::black);
float noteDistance = float (getWidth()) / 128;
for (int i = 0; i < 128; ++i)
{
float x = noteDistance * i;
int noteHeight = MidiMessage::isMidiNoteBlack (i) ? 0.7 * getHeight() : getHeight();
g.setColour (MidiMessage::isMidiNoteBlack (i) ? Colours::white : Colours::grey);
g.drawLine (x, 0.0f, x, noteHeight);
if (i > 0 && i % 12 == 0)
{
g.setColour (Colours::grey);
int octaveNumber = (i / 12) - 2;
g.drawText ("C" + String (octaveNumber), x - 15, getHeight() - 30, 30, 30, Justification::centredBottom); // TIMUR TODO: beautify this!
}
}
}
//==========================================================================
void noteAdded (ExpressiveMidiNote newNote) override
{
const ScopedLock sl (lock);
activeNotes.add (newNote);
triggerAsyncUpdate();
}
void noteChanged (ExpressiveMidiNote changedNote) override
{
const ScopedLock sl (lock);
for (auto& note : activeNotes)
if (note.noteID == changedNote.noteID)
note = changedNote;
triggerAsyncUpdate();
}
void noteReleased (ExpressiveMidiNote finishedNote) override
{
const ScopedLock sl (lock);
for (int i = activeNotes.size(); --i >= 0;)
if (activeNotes.getReference(i).noteID == finishedNote.noteID)
activeNotes.remove (i);
triggerAsyncUpdate();
}
private:
//==========================================================================
ExpressiveMidiNote* findActiveNote (int noteID) const noexcept
{
for (auto& note : activeNotes)
if (note.noteID == noteID)
return &note;
return nullptr;
}
NoteComponent* findNoteComponent (int noteID) const noexcept
{
for (auto& noteComp : noteComponents)
if (noteComp->note.noteID == noteID)
return noteComp;
return nullptr;
}
//==========================================================================
void handleAsyncUpdate() override
{
const ScopedLock sl (lock);
for (int i = noteComponents.size(); --i >= 0;)
if (findActiveNote (noteComponents.getUnchecked(i)->note.noteID) == nullptr)
noteComponents.remove (i);
for (auto& note : activeNotes)
if (findNoteComponent (note.noteID) == nullptr)
addAndMakeVisible (noteComponents.add (new NoteComponent (note)));
for (auto& noteComp : noteComponents)
if (auto* noteInfo = findActiveNote (noteComp->note.noteID))
noteComp->update (*noteInfo, getCentrePositionForNote (*noteInfo));
}
//==========================================================================
Point<float> getCentrePositionForNote (ExpressiveMidiNote note) const
{
float pitchbendRange = 24.0f; // TIMUR TODO: get actual range !!!
float n = float (note.initialNote) + note.pitchbend.asPitchbendInSemitones (pitchbendRange);
float x = getWidth() * n / 128;
float y = getHeight() * (1 - note.timbre.asUnsignedFloat());
return Point<float> (x, y);
}
//==========================================================================
OwnedArray<NoteComponent> noteComponents;
CriticalSection lock;
Array<ExpressiveMidiNote> activeNotes;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Visualiser)
};
#endif // VISUALISER_H_INCLUDED

Loading…
Cancel
Save