Fixed missing OSC sync

pull/1/head
Pascal Gauthier 10 years ago
parent 6456461700
commit 487038d210
  1. 2
      Source/Dexed.h
  2. 4
      Source/PluginProcessor.cpp
  3. 2
      Source/msfa/dx7note.cc
  4. 2
      Source/msfa/dx7note.h

@ -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.8.1a" #define DEXED_VERSION "0.8.OSC"
#define TRACE(fmt, ...) #define TRACE(fmt, ...)
#endif #endif

@ -331,6 +331,8 @@ void DexedAudioProcessor::keydown(uint8_t pitch, uint8_t velo) {
voices[note].sustained = sustain; voices[note].sustained = sustain;
voices[note].keydown = true; voices[note].keydown = true;
voices[note].dx7_note->init(data, pitch, velo); voices[note].dx7_note->init(data, pitch, velo);
if ( data[136] )
voices[note].dx7_note->oscSync();
break; break;
} }
note = (note + 1) % MAX_ACTIVE_NOTES; note = (note + 1) % MAX_ACTIVE_NOTES;
@ -404,7 +406,7 @@ void DexedAudioProcessor::panic() {
voices[i].keydown = false; voices[i].keydown = false;
voices[i].live = false; voices[i].live = false;
if ( voices[i].dx7_note != NULL ) { if ( voices[i].dx7_note != NULL ) {
voices[i].dx7_note->firstUse(); voices[i].dx7_note->oscSync();
} }
} }
keyboardState.reset(); keyboardState.reset();

@ -289,7 +289,7 @@ void Dx7Note::transferSignal(Dx7Note &src) {
} }
} }
void Dx7Note::firstUse() { void Dx7Note::oscSync() {
for (int i=0;i<6;i++) { for (int i=0;i<6;i++) {
params_[i].gain_out = 0; params_[i].gain_out = 0;
params_[i].phase = 0; params_[i].phase = 0;

@ -55,7 +55,7 @@ class Dx7Note {
void peekVoiceStatus(VoiceStatus &status); void peekVoiceStatus(VoiceStatus &status);
void transferState(Dx7Note& src); void transferState(Dx7Note& src);
void transferSignal(Dx7Note &src); void transferSignal(Dx7Note &src);
void firstUse(); void oscSync();
private: private:
Env env_[6]; Env env_[6];

Loading…
Cancel
Save