mirror of https://github.com/probonopd/MiniDexed
Update Synth_Dexed to 2ad9e43095, remove local patch (#903)
* Remove patching [ci skip] * Delete src/patches/dx7note.patch [ci skip] * Update Synth_Dexed to 2ad9e43095pull/906/head
parent
024ecce14a
commit
f1c55431fa
@ -1,81 +0,0 @@ |
||||
diff --git a/src/dx7note.cpp b/src/dx7note.cpp
|
||||
index b5ed6db..2a07836 100644
|
||||
--- a/src/dx7note.cpp
|
||||
+++ b/src/dx7note.cpp
|
||||
@@ -184,11 +184,14 @@ void Dx7Note::init(const uint8_t patch[156], int midinote, int velocity, int src
|
||||
int32_t freq = osc_freq(midinote, mode, coarse, fine, detune);
|
||||
opMode[op] = mode;
|
||||
basepitch_[op] = freq;
|
||||
- porta_curpitch_[op] = freq;
|
||||
ampmodsens_[op] = ampmodsenstab[patch[off + 14] & 3];
|
||||
|
||||
- if (porta >= 0)
|
||||
+ // Always set porta_curpitch_ to basepitch_ if no portamento transition
|
||||
+ if (porta < 0 || porta >= 128 || srcnote == midinote) {
|
||||
+ porta_curpitch_[op] = freq;
|
||||
+ } else {
|
||||
porta_curpitch_[op] = osc_freq(srcnote, mode, coarse, fine, detune);
|
||||
+ }
|
||||
}
|
||||
for (int i = 0; i < 4; i++) {
|
||||
rates[i] = patch[126 + i];
|
||||
@@ -253,13 +256,17 @@ void Dx7Note::compute(int32_t *buf, int32_t lfo_val, int32_t lfo_delay, const Co
|
||||
|
||||
int32_t basepitch = basepitch_[op];
|
||||
|
||||
- if ( opMode[op] )
|
||||
+ if (opMode[op]) {
|
||||
params_[op].freq = Freqlut::lookup(basepitch + pitch_base);
|
||||
- else {
|
||||
- if ( porta_rateindex_ >= 0 ) {
|
||||
- basepitch = porta_curpitch_[op];
|
||||
- if ( porta_gliss_ )
|
||||
- basepitch = logfreq_round2semi(basepitch);
|
||||
+ } else {
|
||||
+ // If portamento is enabled but there is no transition, use basepitch_
|
||||
+ if (porta_rateindex_ >= 0) {
|
||||
+ if (porta_curpitch_[op] != basepitch_[op]) {
|
||||
+ basepitch = porta_curpitch_[op];
|
||||
+ if (porta_gliss_)
|
||||
+ basepitch = logfreq_round2semi(basepitch);
|
||||
+ }
|
||||
+ // else: no transition, use basepitch_ as is
|
||||
}
|
||||
params_[op].freq = Freqlut::lookup(basepitch + pitch_mod);
|
||||
}
|
||||
@@ -280,7 +287,7 @@ void Dx7Note::compute(int32_t *buf, int32_t lfo_val, int32_t lfo_delay, const Co
|
||||
|
||||
// ==== PORTAMENTO ====
|
||||
int porta = porta_rateindex_;
|
||||
- if ( porta >= 0 ) {
|
||||
+ if (porta >= 0) {
|
||||
int32_t rate = Porta::rates[porta];
|
||||
for (int op = 0; op < 6; op++) {
|
||||
int32_t cur = porta_curpitch_[op];
|
||||
@@ -289,7 +296,8 @@ void Dx7Note::compute(int32_t *buf, int32_t lfo_val, int32_t lfo_delay, const Co
|
||||
bool going_up = cur < dst;
|
||||
int32_t newpitch = cur + (going_up ? +rate : -rate);
|
||||
|
||||
- if ( going_up ? (cur > dst) : (cur < dst) )
|
||||
+ // Clamp to destination if we would overshoot/undershoot
|
||||
+ if ((going_up && newpitch > dst) || (!going_up && newpitch < dst))
|
||||
newpitch = dst;
|
||||
|
||||
porta_curpitch_[op] = newpitch;
|
||||
@@ -317,10 +325,15 @@ void Dx7Note::update(const uint8_t patch[156], int midinote, int velocity, int p
|
||||
int detune = patch[off + 20];
|
||||
int32_t freq = osc_freq(midinote, mode, coarse, fine, detune);
|
||||
basepitch_[op] = freq;
|
||||
- porta_curpitch_[op] = freq;
|
||||
ampmodsens_[op] = ampmodsenstab[patch[off + 14] & 3];
|
||||
opMode[op] = mode;
|
||||
|
||||
+ // Always set porta_curpitch_ to basepitch_ if no portamento transition
|
||||
+ if (porta < 0 || porta >= 128) {
|
||||
+ porta_curpitch_[op] = freq;
|
||||
+ }
|
||||
+ // else: porta_curpitch_ will be handled by portamento logic
|
||||
+
|
||||
for (int i = 0; i < 4; i++) {
|
||||
rates[i] = patch[off + i];
|
||||
levels[i] = patch[off + 4 + i];
|
Loading…
Reference in new issue