diff --git a/.gitignore b/.gitignore index 5477358..e8952bf 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ Builds/VisualStudio2012/Dexed.vcxproj.user Builds/VisualStudio2012/Dexed.sdf Builds/VisualStudio2012/Debug Builds/VisualStudio2012/Release -Builds/VisualStudio2012/x64 \ No newline at end of file +Builds/VisualStudio2012/x64 +Builds/VisualStudio2012/Dexed.vcxproj.filters \ No newline at end of file diff --git a/Builds/VisualStudio2012/Dexed.sln b/Builds/VisualStudio2012/Dexed.sln index 6b5dd1b..5795149 100644 --- a/Builds/VisualStudio2012/Dexed.sln +++ b/Builds/VisualStudio2012/Dexed.sln @@ -1,17 +1,23 @@ -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2012 -Project("{BD26B4C3-163D-4785-A63F-D3E66858BFF3}") = "Dexed", "Dexed.vcxproj", "{1A9EF105-5BF5-9FB6-9634-A91A6D840866}" +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Express 2012 for Windows Desktop +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Dexed", "Dexed.vcxproj", "{1A9EF105-5BF5-9FB6-9634-A91A6D840866}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 Release|Win32 = Release|Win32 + Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {1A9EF105-5BF5-9FB6-9634-A91A6D840866}.Debug|Win32.ActiveCfg = Debug|Win32 {1A9EF105-5BF5-9FB6-9634-A91A6D840866}.Debug|Win32.Build.0 = Debug|Win32 + {1A9EF105-5BF5-9FB6-9634-A91A6D840866}.Debug|x64.ActiveCfg = Debug|x64 + {1A9EF105-5BF5-9FB6-9634-A91A6D840866}.Debug|x64.Build.0 = Debug|x64 {1A9EF105-5BF5-9FB6-9634-A91A6D840866}.Release|Win32.ActiveCfg = Release|Win32 {1A9EF105-5BF5-9FB6-9634-A91A6D840866}.Release|Win32.Build.0 = Release|Win32 + {1A9EF105-5BF5-9FB6-9634-A91A6D840866}.Release|x64.ActiveCfg = Release|x64 + {1A9EF105-5BF5-9FB6-9634-A91A6D840866}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Builds/VisualStudio2012/Dexed.v11.suo b/Builds/VisualStudio2012/Dexed.v11.suo index 378fbae..4025059 100644 Binary files a/Builds/VisualStudio2012/Dexed.v11.suo and b/Builds/VisualStudio2012/Dexed.v11.suo differ diff --git a/Builds/VisualStudio2012/Dexed.vcxproj b/Builds/VisualStudio2012/Dexed.vcxproj index 0e7a1e6..6a976ee 100644 --- a/Builds/VisualStudio2012/Dexed.vcxproj +++ b/Builds/VisualStudio2012/Dexed.vcxproj @@ -1,37 +1,54 @@ - - + Debug Win32 + + Debug + x64 + Release Win32 + + Release + x64 + {1A9EF105-5BF5-9FB6-9634-A91A6D840866} v110 - + DynamicLibrary false v110 + + DynamicLibrary + false + v110 + DynamicLibrary false true v110 - - + + DynamicLibrary + false + true + v110 + + + - + v110 @@ -39,9 +56,13 @@ <_ProjectFileVersion>10.0.30319.1 Dexed + Dexed true + true Dexed + Dexed true + true v110 @@ -50,7 +71,7 @@ true true Win32 - + Disabled @@ -59,7 +80,7 @@ _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2012_78A501F=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;%(PreprocessorDefinitions) MultiThreadedDebugDLL true - + $(IntDir)\ $(IntDir)\ $(IntDir)\ @@ -87,21 +108,64 @@ $(IntDir)\Dexed.bsc + + + _DEBUG;%(PreprocessorDefinitions) + true + true + + + + + Disabled + ProgramDatabase + ..\..\JuceLibraryCode;..\..\JuceLibraryCode\modules;C:\work\vstsdk2.4;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2012_78A501F=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;%(PreprocessorDefinitions) + MultiThreadedDebugDLL + true + + + $(IntDir)\ + $(IntDir)\ + $(IntDir)\ + Level4 + true + true + + + _DEBUG;%(PreprocessorDefinitions) + + + $(OutDir)\Dexed.dll + true + libcmt.lib; msvcrt.lib;;%(IgnoreSpecificDefaultLibraries) + true + $(IntDir)\Dexed.pdb + Windows + false + true + /FORCE:multiple %(AdditionalOptions) + + + true + $(IntDir)\Dexed.bsc + + NDEBUG;%(PreprocessorDefinitions) true true Win32 - + MinSpace ..\..\JuceLibraryCode;..\..\JuceLibraryCode\modules;C:\work\vstsdk2.4;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2012_78A501F=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;%(PreprocessorDefinitions) - MultiThreadedDLL + MultiThreaded true - + $(IntDir)\ $(IntDir)\ $(IntDir)\ @@ -130,32 +194,75 @@ $(IntDir)\Dexed.bsc + + + NDEBUG;%(PreprocessorDefinitions) + true + true + + + + + MinSpace + ..\..\JuceLibraryCode;..\..\JuceLibraryCode\modules;C:\work\vstsdk2.4;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2012_78A501F=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;%(PreprocessorDefinitions) + MultiThreaded + true + + + $(IntDir)\ + $(IntDir)\ + $(IntDir)\ + Level4 + true + true + + + NDEBUG;%(PreprocessorDefinitions) + + + $(OutDir)\Dexed.dll + true + %(IgnoreSpecificDefaultLibraries) + false + $(IntDir)\Dexed.pdb + Windows + true + true + true + /FORCE:multiple %(AdditionalOptions) + + + true + $(IntDir)\Dexed.bsc + + - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + true @@ -1089,20 +1196,20 @@ true - - - - - - - - - - - - - - + + + + + + + + + + + + + + StdCall @@ -1118,472 +1225,472 @@ StdCall - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - + + + \ No newline at end of file diff --git a/Builds/VisualStudio2012/Dexed.vcxproj.filters b/Builds/VisualStudio2012/Dexed.vcxproj.filters index abfc540..7bd2d4d 100644 --- a/Builds/VisualStudio2012/Dexed.vcxproj.filters +++ b/Builds/VisualStudio2012/Dexed.vcxproj.filters @@ -1,5 +1,4 @@ - - + @@ -409,21 +408,6 @@ Juce Modules\juce_audio_basics\synthesisers - - Juce Modules\juce_audio_plugin_client\AU - - - Juce Modules\juce_audio_plugin_client\RTAS - - - Juce Modules\juce_audio_plugin_client\VST - - - Juce Modules\juce_audio_plugin_client\VST3 - - - Juce Modules\juce_audio_plugin_client\AAX - Juce Modules\juce_audio_processors\processors @@ -445,9 +429,6 @@ Juce Modules\juce_audio_processors\format - - Juce Modules\juce_audio_processors\format_types - Juce Modules\juce_audio_processors\format_types @@ -694,21 +675,6 @@ Juce Modules\juce_core\native - - Juce Modules\juce_core\native - - - Juce Modules\juce_core\native - - - Juce Modules\juce_core\native - - - Juce Modules\juce_core\native - - - Juce Modules\juce_core\native - Juce Modules\juce_core\native @@ -784,15 +750,9 @@ Juce Modules\juce_events\native - - Juce Modules\juce_events\native - Juce Modules\juce_events\native - - Juce Modules\juce_events\native - Juce Modules\juce_events\native @@ -892,12 +852,6 @@ Juce Modules\juce_graphics\native - - Juce Modules\juce_graphics\native - - - Juce Modules\juce_graphics\native - Juce Modules\juce_graphics\native @@ -1246,12 +1200,6 @@ Juce Modules\juce_gui_basics\native - - Juce Modules\juce_gui_basics\native - - - Juce Modules\juce_gui_basics\native - Juce Modules\juce_gui_basics\native @@ -1261,21 +1209,6 @@ Juce Modules\juce_gui_basics\native - - Juce Modules\juce_gui_basics\native - - - Juce Modules\juce_gui_basics\native - - - Juce Modules\juce_gui_basics\native - - - Juce Modules\juce_gui_basics\native - - - Juce Modules\juce_gui_basics\native - Juce Modules\juce_gui_basics\native @@ -1333,27 +1266,15 @@ Juce Modules\juce_gui_extra\native - - Juce Modules\juce_gui_extra\native - Juce Modules\juce_gui_extra\native Juce Modules\juce_gui_extra\native - - Juce Modules\juce_gui_extra\native - - - Juce Modules\juce_gui_extra\native - Juce Modules\juce_gui_extra\native - - Juce Modules\juce_gui_extra\native - Juce Modules\juce_gui_extra\native @@ -2804,4 +2725,4 @@ Juce Library Code - + \ No newline at end of file diff --git a/Source/DXComponents.h b/Source/DXComponents.h index 987ac8e..b20c3f5 100644 --- a/Source/DXComponents.h +++ b/Source/DXComponents.h @@ -22,6 +22,7 @@ #define DXCOMPONENTS_H_INCLUDED #include "../JuceLibraryCode/JuceHeader.h" +#include class EnvDisplay : public Component { public: diff --git a/Source/Dexed.h b/Source/Dexed.h index c17bd55..c4aaab1 100644 --- a/Source/Dexed.h +++ b/Source/Dexed.h @@ -31,7 +31,7 @@ void dexed_trace(const char *source, const char *fmt, ...); #define TRACE(fmt, ...) dexed_trace(__PRETTY_FUNCTION__,fmt,##__VA_ARGS__) #endif #else - #define DEXED_VERSION "0.9.1" + #define DEXED_VERSION "0.9.1b1" #define TRACE(fmt, ...) #endif diff --git a/Source/EngineMkI.cpp b/Source/EngineMkI.cpp index 94a849f..351e8d3 100644 --- a/Source/EngineMkI.cpp +++ b/Source/EngineMkI.cpp @@ -22,8 +22,8 @@ */ #include "EngineMkI.h" - -#include +#define _USE_MATH_DEFINES +#include #include #include "msfa/sin.h" @@ -35,6 +35,12 @@ #endif #ifdef _WIN32 + double log2(double n) { + return log(n) / log(2.0); + } + double round(double n) { + return n < 0.0 ? ceil(n - 0.5) : floor(n + 0.5); + } __declspec(align(16)) int zeros[N] = {0}; #else const int32_t __attribute__ ((aligned(16))) zeros[N] = {0}; diff --git a/Source/PluginProcessor.h b/Source/PluginProcessor.h index a032df5..c034f1d 100644 --- a/Source/PluginProcessor.h +++ b/Source/PluginProcessor.h @@ -116,7 +116,7 @@ class DexedAudioProcessor : public AudioProcessor, public AsyncUpdater, public void resolvAppDir(); - int feedback_bitdepth = 0; + int feedback_bitdepth; public : // in MIDI units (0x4000 is neutral) diff --git a/Source/msfa/controllers.h b/Source/msfa/controllers.h index ce6c511..12d04c0 100755 --- a/Source/msfa/controllers.h +++ b/Source/msfa/controllers.h @@ -21,6 +21,10 @@ #include "../Dexed.h" #include +#ifdef _WIN32 +#define snprintf _snprintf +#endif + // State of MIDI controllers const int kControllerPitch = 128; const int kControllerPitchRange = 129; @@ -29,11 +33,18 @@ const int kControllerPitchStep = 130; class FmCore; struct FmMod { - int range = 0; - bool pitch = false; - bool amp = false; - bool eg = false; + int range; + bool pitch; + bool amp; + bool eg; + FmMod() { + range = 0; + pitch = false; + amp = false; + eg = false; + } + void parseConfig(const char *cfg) { int r = 0, p = 0, a = 0, e = 0; sscanf(cfg, "%d %d %d %d", &r, &p, &a, &e); @@ -66,9 +77,9 @@ class Controllers { public: int values_[131]; - int amp_mod = 0; - int pitch_mod = 0; - int eg_mod = 0; + int amp_mod; + int pitch_mod; + int eg_mod; int aftertouch_cc; int breath_cc; @@ -80,6 +91,12 @@ public: FmMod breath; FmMod at; + Controllers() { + amp_mod = 0; + pitch_mod = 0; + eg_mod = 0; + } + void refresh() { amp_mod = 0; pitch_mod = 0;