From 487038d210a9203f333ceaeeb35444879e883862 Mon Sep 17 00:00:00 2001 From: Pascal Gauthier Date: Thu, 9 Apr 2015 00:55:58 -0400 Subject: [PATCH] Fixed missing OSC sync --- Source/Dexed.h | 2 +- Source/PluginProcessor.cpp | 4 +++- Source/msfa/dx7note.cc | 2 +- Source/msfa/dx7note.h | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Source/Dexed.h b/Source/Dexed.h index e20a079..bc6dfed 100644 --- a/Source/Dexed.h +++ b/Source/Dexed.h @@ -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.8.1a" + #define DEXED_VERSION "0.8.OSC" #define TRACE(fmt, ...) #endif diff --git a/Source/PluginProcessor.cpp b/Source/PluginProcessor.cpp index 3917984..4362653 100644 --- a/Source/PluginProcessor.cpp +++ b/Source/PluginProcessor.cpp @@ -331,6 +331,8 @@ void DexedAudioProcessor::keydown(uint8_t pitch, uint8_t velo) { voices[note].sustained = sustain; voices[note].keydown = true; voices[note].dx7_note->init(data, pitch, velo); + if ( data[136] ) + voices[note].dx7_note->oscSync(); break; } note = (note + 1) % MAX_ACTIVE_NOTES; @@ -404,7 +406,7 @@ void DexedAudioProcessor::panic() { voices[i].keydown = false; voices[i].live = false; if ( voices[i].dx7_note != NULL ) { - voices[i].dx7_note->firstUse(); + voices[i].dx7_note->oscSync(); } } keyboardState.reset(); diff --git a/Source/msfa/dx7note.cc b/Source/msfa/dx7note.cc index 765b8e8..574e86d 100644 --- a/Source/msfa/dx7note.cc +++ b/Source/msfa/dx7note.cc @@ -289,7 +289,7 @@ void Dx7Note::transferSignal(Dx7Note &src) { } } -void Dx7Note::firstUse() { +void Dx7Note::oscSync() { for (int i=0;i<6;i++) { params_[i].gain_out = 0; params_[i].phase = 0; diff --git a/Source/msfa/dx7note.h b/Source/msfa/dx7note.h index 0cab84b..01c3e2f 100644 --- a/Source/msfa/dx7note.h +++ b/Source/msfa/dx7note.h @@ -55,7 +55,7 @@ class Dx7Note { void peekVoiceStatus(VoiceStatus &status); void transferState(Dx7Note& src); void transferSignal(Dx7Note &src); - void firstUse(); + void oscSync(); private: Env env_[6];