Skip to content

Commit

Permalink
LFO fix
Browse files Browse the repository at this point in the history
VST display fix (thanks to @truongatscopic)
  • Loading branch information
asb2m10 committed Jan 17, 2016
1 parent 451497d commit e1fe060
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
Binary file not shown.
2 changes: 1 addition & 1 deletion Source/Dexed.h
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions Source/PluginParam.cpp
Expand Up @@ -66,7 +66,7 @@ class CtrlDXTranspose : public CtrlDX {
case 10: ret << "A#"; break;
case 11: ret << "B"; break;
}
return ret << (value/12-2);
return ret << (value/12+1);
}
};

Expand Down Expand Up @@ -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) {
Expand Down
8 changes: 4 additions & 4 deletions Source/PluginProcessor.cpp
Expand Up @@ -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;
Expand All @@ -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;
}
Expand Down
6 changes: 5 additions & 1 deletion 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");
Expand Down Expand Up @@ -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];
Expand Down

0 comments on commit e1fe060

Please sign in to comment.