diff --git a/Builds/MacOSX/Dexed.xcodeproj/project.xcworkspace/xcuserdata/asb2m10.xcuserdatad/UserInterfaceState.xcuserstate b/Builds/MacOSX/Dexed.xcodeproj/project.xcworkspace/xcuserdata/asb2m10.xcuserdatad/UserInterfaceState.xcuserstate index 0d62a80..a513efb 100644 Binary files a/Builds/MacOSX/Dexed.xcodeproj/project.xcworkspace/xcuserdata/asb2m10.xcuserdatad/UserInterfaceState.xcuserstate and b/Builds/MacOSX/Dexed.xcodeproj/project.xcworkspace/xcuserdata/asb2m10.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/Source/Dexed.h b/Source/Dexed.h index 214e19b..c17bd55 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.1b3" + #define DEXED_VERSION "0.9.1" #define TRACE(fmt, ...) #endif diff --git a/Source/PluginParam.cpp b/Source/PluginParam.cpp index 06b9ae9..45306ff 100644 --- a/Source/PluginParam.cpp +++ b/Source/PluginParam.cpp @@ -66,7 +66,7 @@ public: case 10: ret << "A#"; break; case 11: ret << "B"; break; } - return ret << (value/12-2); + return ret << (value/12+1); } }; @@ -182,7 +182,7 @@ CtrlDX::CtrlDX(String name, int steps, int offset, int displayValue) : Ctrl(name } float CtrlDX::getValueHost() { - return dxValue / steps; + return getValue() / (float) steps; } void CtrlDX::setValueHost(float f) { diff --git a/Source/PluginProcessor.cpp b/Source/PluginProcessor.cpp index 66708e5..d90a9e6 100644 --- a/Source/PluginProcessor.cpp +++ b/Source/PluginProcessor.cpp @@ -479,10 +479,6 @@ void DexedAudioProcessor::setEngineType(int tp) { TRACE("settings engine %d", tp); switch (tp) { - case DEXED_ENGINE_MODERN : - controllers.core = &engineMsfa; - feedback_bitdepth = 8; - break; case DEXED_ENGINE_MARKI: controllers.core = &engineMkI; feedback_bitdepth = 11; @@ -491,6 +487,10 @@ void DexedAudioProcessor::setEngineType(int tp) { controllers.core = &engineOpl; feedback_bitdepth = 11; break; + default: + controllers.core = &engineMsfa; + feedback_bitdepth = 8; + break; } engineType = tp; } diff --git a/Source/msfa/dx7note.cc b/Source/msfa/dx7note.cc index 7161b58..1aa56c0 100644 --- a/Source/msfa/dx7note.cc +++ b/Source/msfa/dx7note.cc @@ -1,4 +1,5 @@ /* + * Copyright 2016 Pascal Gauthier. * Copyright 2012 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -182,8 +183,11 @@ void Dx7Note::compute(int32_t *buf, int32_t lfo_val, int32_t lfo_delay, const Co uint32_t pmd = pitchmoddepth_ * lfo_delay; // Q32 int32_t senslfo = pitchmodsens_ * (lfo_val - (1 << 23)); int32_t pmod_1 = (((int64_t) pmd) * (int64_t) senslfo) >> 39; + pmod_1 = abs(pmod_1); int32_t pmod_2 = ((int64_t)ctrls->pitch_mod * (int64_t)senslfo) >> 14; - int32_t pitch_mod = pitchenv_.getsample() + max(pmod_1, pmod_2); + pmod_2 = abs(pmod_2); + int32_t pitch_mod = max(pmod_1, pmod_2); + pitch_mod = pitchenv_.getsample() + (pitch_mod * (senslfo < 0 ? -1 : 1)); // ---- PITCH BEND ---- int pitchbend = ctrls->values_[kControllerPitch];