Added fixes from main repository to version 0.9.3

pull/1/head
Holger Wirtz 8 years ago
parent b3d5223a74
commit b7d73f6a92
  1. 7
      src/msfa/controllers.h
  2. 4
      src/msfa/dx7note.cc
  3. 5
      src/msfa/lfo.cc

@ -18,6 +18,7 @@
#define __CONTROLLERS_H
#include "synth.h"
#include "../Dexed.h"
#include <stdio.h>
#include <string.h>
#include "trace.h"
@ -113,14 +114,14 @@ public:
applyMod(foot_cc, foot);
applyMod(aftertouch_cc, at);
if ( ! ((wheel.eg || foot.eg) || (breath.eg || at.eg)) )
/* if ( ! ((wheel.eg || foot.eg) || (breath.eg || at.eg)) )
eg_mod = 127;
*/
TRACE("amp_mod %d pitch_mod %d", amp_mod, pitch_mod);
}
FmCore *core=NULL;
FmCore *core;
};
#endif // __CONTROLLERS_H

@ -211,8 +211,8 @@ void Dx7Note::compute(int32_t *buf, int32_t lfo_val, int32_t lfo_delay, const Co
uint32_t amd_mod = max(amod_1, amod_2);
// ==== EG AMP MOD ====
uint32_t amod_3 = (ctrls->eg_mod+1) << 16;
amd_mod = max((1<<23) - amod_3, amd_mod);
uint32_t amod_3 = (ctrls->eg_mod+1) << 17;
amd_mod = max((1<<24) - amod_3, amd_mod);
// ==== OP RENDER ====
for (int op = 0; op < 6; op++) {

@ -77,8 +77,8 @@ int32_t Lfo::getsample() {
int32_t Lfo::getdelay() {
uint32_t delta = delaystate_ < (1U << 31) ? delayinc_ : delayinc2_;
uint32_t d = delaystate_ + delta;
if (d < delayinc_) {
uint64_t d = ((uint64_t)delaystate_) + delta;
if (d > ~0u) {
return 1 << 24;
}
delaystate_ = d;
@ -95,3 +95,4 @@ void Lfo::keydown() {
}
delaystate_ = 0;
}

Loading…
Cancel
Save