VST display fix (thanks to @truongatscopic)
pull/1/head
asb2m10 9 years ago
parent 451497d07c
commit e1fe060b77
  1. BIN
      Builds/MacOSX/Dexed.xcodeproj/project.xcworkspace/xcuserdata/asb2m10.xcuserdatad/UserInterfaceState.xcuserstate
  2. 2
      Source/Dexed.h
  3. 4
      Source/PluginParam.cpp
  4. 8
      Source/PluginProcessor.cpp
  5. 6
      Source/msfa/dx7note.cc

@ -31,7 +31,7 @@ void dexed_trace(const char *source, const char *fmt, ...);
#define TRACE(fmt, ...) dexed_trace(__PRETTY_FUNCTION__,fmt,##__VA_ARGS__) #define TRACE(fmt, ...) dexed_trace(__PRETTY_FUNCTION__,fmt,##__VA_ARGS__)
#endif #endif
#else #else
#define DEXED_VERSION "0.9.1b3" #define DEXED_VERSION "0.9.1"
#define TRACE(fmt, ...) #define TRACE(fmt, ...)
#endif #endif

@ -66,7 +66,7 @@ public:
case 10: ret << "A#"; break; case 10: ret << "A#"; break;
case 11: ret << "B"; 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() { float CtrlDX::getValueHost() {
return dxValue / steps; return getValue() / (float) steps;
} }
void CtrlDX::setValueHost(float f) { void CtrlDX::setValueHost(float f) {

@ -479,10 +479,6 @@ void DexedAudioProcessor::setEngineType(int tp) {
TRACE("settings engine %d", tp); TRACE("settings engine %d", tp);
switch (tp) { switch (tp) {
case DEXED_ENGINE_MODERN :
controllers.core = &engineMsfa;
feedback_bitdepth = 8;
break;
case DEXED_ENGINE_MARKI: case DEXED_ENGINE_MARKI:
controllers.core = &engineMkI; controllers.core = &engineMkI;
feedback_bitdepth = 11; feedback_bitdepth = 11;
@ -491,6 +487,10 @@ void DexedAudioProcessor::setEngineType(int tp) {
controllers.core = &engineOpl; controllers.core = &engineOpl;
feedback_bitdepth = 11; feedback_bitdepth = 11;
break; break;
default:
controllers.core = &engineMsfa;
feedback_bitdepth = 8;
break;
} }
engineType = tp; engineType = tp;
} }

@ -1,4 +1,5 @@
/* /*
* Copyright 2016 Pascal Gauthier.
* Copyright 2012 Google Inc. * Copyright 2012 Google Inc.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * 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 uint32_t pmd = pitchmoddepth_ * lfo_delay; // Q32
int32_t senslfo = pitchmodsens_ * (lfo_val - (1 << 23)); int32_t senslfo = pitchmodsens_ * (lfo_val - (1 << 23));
int32_t pmod_1 = (((int64_t) pmd) * (int64_t) senslfo) >> 39; 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 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 ---- // ---- PITCH BEND ----
int pitchbend = ctrls->values_[kControllerPitch]; int pitchbend = ctrls->values_[kControllerPitch];

Loading…
Cancel
Save