Fixes for portamento.

dev
Holger Wirtz 2 years ago
parent 501cb9e7b6
commit 517f4f5488
  1. 1
      doc/enable_sysex.url
  2. 1
      doc/porta.url
  3. 5
      src/dexed.cpp
  4. 4
      src/msfa/dx7note.cc
  5. 2
      src/msfa/dx7note.h

@ -0,0 +1 @@
https://discourse.zynthian.org/t/receive-sysex-data/4825/3

@ -0,0 +1 @@
https://github.com/jpcima/dexed/commits/portamento-wip

@ -91,6 +91,7 @@ Dexed::Dexed(double rate) : lvtk::Synth<DexedVoice, Dexed>(p_n_ports, p_midi_in)
controllers.values_[kControllerPitch] = 0x2000;
controllers.values_[kControllerPitchRange] = 0;
controllers.values_[kControllerPitchStep] = 0;
controllers.values_[kControllerPortamentoGlissando] = 0;
controllers.modwheel_cc = 0;
controllers.foot_cc = 0;
controllers.breath_cc = 0;
@ -761,7 +762,7 @@ void Dexed::setPortamentoMode(uint8_t portamento_mode, uint8_t portamento_glissa
controllers.portamento_cc = portamento_time;
controllers.portamento_enable_cc = portamento_mode > 63;
if (portamento_mode > 63 && portamento_time > 0)
if (portamento_time > 0)
controllers.portamento_enable_cc = true;
else
controllers.portamento_enable_cc = false;
@ -799,7 +800,7 @@ TRACE("pitch=%d, velo=%d\n",pitch,velo);
voices[note].porta = porta;
voices[note].sustained = sustain;
voices[note].keydown = true;
voices[note].dx7_note->init(data, pitch, velo, previousKeyDown, porta);
voices[note].dx7_note->init(data, pitch, velo, previousKeyDown, porta, &controllers);
if ( data[136] )
voices[note].dx7_note->oscSync();
break;

@ -152,7 +152,7 @@ Dx7Note::Dx7Note() {
}
}
void Dx7Note::init(const uint8_t patch[156], int midinote, int velocity, int srcnote, int porta) {
void Dx7Note::init(const uint8_t patch[156], int midinote, int velocity, int srcnote, int porta, const Controllers *ctrls) {
int rates[4];
int levels[4];
for (int op = 0; op < 6; op++) {
@ -197,7 +197,7 @@ void Dx7Note::init(const uint8_t patch[156], int midinote, int velocity, int src
pitchmodsens_ = pitchmodsenstab[patch[143] & 7];
ampmoddepth_ = (patch[140] * 165) >> 6;
porta_rateindex_ = (porta < 128) ? porta : 127;
porta_gliss_ = patch[68];
porta_gliss_ = ctrls->values_[kControllerPortamentoGlissando];
}
void Dx7Note::compute(int32_t *buf, int32_t lfo_val, int32_t lfo_delay, const Controllers *ctrls) {

@ -37,7 +37,7 @@ struct VoiceStatus {
class Dx7Note {
public:
Dx7Note();
void init(const uint8_t patch[156], int midinote, int velocity, int srcnote, int porta);
void init(const uint8_t patch[156], int midinote, int velocity, int srcnote, int porta, const Controllers *ctrls);
// Note: this _adds_ to the buffer. Interesting question whether it's
// worth it...

Loading…
Cancel
Save