From 62a4b58e7800629b3b1b59d5817771e9d2d7eac2 Mon Sep 17 00:00:00 2001 From: Nil Geisweiller Date: Thu, 1 Feb 2007 13:46:13 +0000 Subject: see ChangeLog --- muse/CMakeLists.txt | 4 +- muse/ChangeLog | 2 + muse/plugins/pandelay/ladspapandelay.cpp | 15 +- muse/plugins/pandelay/ladspapandelay.h | 2 +- muse/plugins/pandelay/pandelay.cpp | 7 +- muse/plugins/pandelay/pandelaymodel.cpp | 12 + muse/plugins/pandelay/pandelaymodel.h | 10 +- muse/synti/deicsonze/TODO | 2 +- muse/synti/deicsonze/deicsonze.cpp | 95 +- muse/synti/deicsonze/deicsonze.h | 40 +- muse/synti/deicsonze/deicsonzegui.cpp | 229 ++-- muse/synti/deicsonze/deicsonzegui.h | 20 +- muse/synti/deicsonze/deicsonzegui.ui | 1705 +++++++++++++++++------------- muse/synti/deicsonze/deicsonzeplugin.cpp | 101 +- 14 files changed, 1287 insertions(+), 957 deletions(-) diff --git a/muse/CMakeLists.txt b/muse/CMakeLists.txt index e414d48b..4d50367e 100644 --- a/muse/CMakeLists.txt +++ b/muse/CMakeLists.txt @@ -26,8 +26,8 @@ if (NOT CMAKE_INSTALL_LIBDIR) SET(CMAKE_INSTALL_LIBDIR "lib") endif (NOT CMAKE_INSTALL_LIBDIR) -set(CMAKE_BUILD_TYPE debug) -# set(CMAKE_BUILD_TYPE release) +# set(CMAKE_BUILD_TYPE debug) +set(CMAKE_BUILD_TYPE release) # for debugging the make system uncomment next line: # set(CMAKE_VERBOSE_MAKEFILE ON) diff --git a/muse/ChangeLog b/muse/ChangeLog index 33ce2ec7..c63ea87d 100644 --- a/muse/ChangeLog +++ b/muse/ChangeLog @@ -1,3 +1,5 @@ +01.02 (ng) + - changed PanDelay, time delay is calculated with BPM and beat ratio 27.01 (ws) - changed DSSI initialization making whysynth work diff --git a/muse/plugins/pandelay/ladspapandelay.cpp b/muse/plugins/pandelay/ladspapandelay.cpp index 8c1caa20..b5680d3e 100644 --- a/muse/plugins/pandelay/ladspapandelay.cpp +++ b/muse/plugins/pandelay/ladspapandelay.cpp @@ -51,28 +51,33 @@ void LADSPAPanDelay::activate() { *port[6] = param[2]; *port[7] = param[3]; *port[8] = param[4]; + *port[9] = param[5]; } void LADSPAPanDelay::updateParameters() { if (param[0] != *port[4]) { param[0] = *port[4]; - setDelayTime(param[0]); + setBPM(param[0]); } if (param[1] != *port[5]) { param[1] = *port[5]; - setFeedback(param[1]); + setBeatRatio(param[1]); } if (param[2] != *port[6]) { param[2] = *port[6]; - setPanLFOFreq(param[2]); + setFeedback(param[2]); } if (param[3] != *port[7]) { param[3] = *port[7]; - setPanLFODepth(param[3]); + setPanLFOFreq(param[3]); } if (param[4] != *port[8]) { param[4] = *port[8]; - setDryWet(param[4]); + setPanLFODepth(param[4]); + } + if (param[5] != *port[9]) { + param[5] = *port[9]; + setDryWet(param[5]); } } diff --git a/muse/plugins/pandelay/ladspapandelay.h b/muse/plugins/pandelay/ladspapandelay.h index 1918895c..ab5427a1 100644 --- a/muse/plugins/pandelay/ladspapandelay.h +++ b/muse/plugins/pandelay/ladspapandelay.h @@ -33,7 +33,7 @@ #include "pandelaymodel.h" #include "../../muse/ladspa.h" -#define NBRPARAM 5 +#define NBRPARAM 6 class LADSPAPanDelay : public PanDelayModel { private: diff --git a/muse/plugins/pandelay/pandelay.cpp b/muse/plugins/pandelay/pandelay.cpp index 401e03af..18ce1a41 100644 --- a/muse/plugins/pandelay/pandelay.cpp +++ b/muse/plugins/pandelay/pandelay.cpp @@ -89,7 +89,8 @@ static const char* portNames[] = { "Input (Right)", "Output (Left)", "Output (Right)", - "Delay Time (ms)", + "BMP", + "Beat Ratio", "Feedback", "Pan LFO Freq", "Pan LFO Depth", @@ -105,6 +106,7 @@ LADSPA_PortDescriptor portDescriptors[] = { LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL, LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL, LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL, + LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL, LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL }; @@ -113,7 +115,8 @@ LADSPA_PortRangeHint portRangeHints[] = { { 0, 0.0, 0.0 }, { 0, 0.0, 0.0 }, { 0, 0.0, 0.0 }, - { LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_DEFAULT_LOW, MINDELAYTIME, MAXDELAYTIME }, + { LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_DEFAULT_100, MINBPM, MAXBPM }, + { LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_DEFAULT_1, MINBEATRATIO, MAXBEATRATIO }, { LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_DEFAULT_HIGH, -1.0, 1.0 }, { LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_LOGARITHMIC | LADSPA_HINT_DEFAULT_HIGH, MINFREQ, MAXFREQ }, { LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_DEFAULT_HIGH, 0.0, 1.0 }, diff --git a/muse/plugins/pandelay/pandelaymodel.cpp b/muse/plugins/pandelay/pandelaymodel.cpp index b3ce16a7..ab01ba9f 100644 --- a/muse/plugins/pandelay/pandelaymodel.cpp +++ b/muse/plugins/pandelay/pandelaymodel.cpp @@ -51,6 +51,18 @@ void PanDelayModel::setSamplerate(int sr) { setPanDelay(); } +void PanDelayModel::setBPM(float bpm) { + _BPM = bpm; + _delayTime = _beatRatio * 60.0 / _BPM; + setPanDelay(); +} + +void PanDelayModel::setBeatRatio(float br) { + _beatRatio = br; + _delayTime = _beatRatio * 60.0 / _BPM; + setPanDelay(); +} + void PanDelayModel::setDelayTime(float dt) { if(dt < MINDELAYTIME) _delayTime = MINDELAYTIME; else if(dt > MAXDELAYTIME) _delayTime = MAXDELAYTIME; diff --git a/muse/plugins/pandelay/pandelaymodel.h b/muse/plugins/pandelay/pandelaymodel.h index 66d68076..65983187 100644 --- a/muse/plugins/pandelay/pandelaymodel.h +++ b/muse/plugins/pandelay/pandelaymodel.h @@ -35,6 +35,10 @@ #define MAXBUFFERLENGTH 192000 #define MINFREQ 0.1 //in Hz #define MAXFREQ 10.0 //in Hz +#define MINBPM 60.0 +#define MAXBPM 255.0 +#define MINBEATRATIO 0.125 +#define MAXBEATRATIO 2.0 #define MINDELAYTIME 0.01 //in second #define MAXDELAYTIME 2.0 //in second @@ -45,7 +49,9 @@ class PanDelayModel { int _samplerate; //bool _beatFraction; //if true then the delay is calculated in beat fraction - float _delayTime; + float _BPM; + float _beatRatio; + float _delayTime; //delay is calculated according to BMP and ratioBMP float _feedback; float _panLFOFreq; float _panLFODepth; @@ -67,6 +73,8 @@ class PanDelayModel { ~PanDelayModel(); void setSamplerate(int sr); + void setBeatRatio(float br); + void setBPM(float bpm); void setDelayTime(float dt); void setFeedback(float dt); void setPanLFOFreq(float pf); diff --git a/muse/synti/deicsonze/TODO b/muse/synti/deicsonze/TODO index 29e681c2..f7d486f1 100644 --- a/muse/synti/deicsonze/TODO +++ b/muse/synti/deicsonze/TODO @@ -10,4 +10,4 @@ - Load BUMP preset - calibrate portamento and pitch envelope to fit real DX11 - make deicsonze loadable as standalone by mus - +- It seems that there is still a bug on the note on, on some presets diff --git a/muse/synti/deicsonze/deicsonze.cpp b/muse/synti/deicsonze/deicsonze.cpp index 0cc2b2ea..195e2d13 100644 --- a/muse/synti/deicsonze/deicsonze.cpp +++ b/muse/synti/deicsonze/deicsonze.cpp @@ -2359,10 +2359,17 @@ void DeicsOnze::getInitData(int* length, const unsigned char** data) { + sizeof(float)*i], &val, sizeof(float)); } //delay - buffer[NUM_DELAY_TIME] = (unsigned char)getDelayTime(); - buffer[NUM_DELAY_FEEDBACK] = (unsigned char)getDelayFeedback(); - buffer[NUM_DELAY_LFO_FREQ] = (unsigned char)getDelayLFOFreq(); - buffer[NUM_DELAY_LFO_DEPTH] = (unsigned char)getDelayLFODepth(); + float delayfloat; + delayfloat = getDelayBPM(); + memcpy(&buffer[NUM_DELAY_BPM], &delayfloat, 4); + delayfloat = getDelayBeatRatio(); + memcpy(&buffer[NUM_DELAY_BEATRATIO], &delayfloat, sizeof(float)); + delayfloat = getDelayFeedback(); + memcpy(&buffer[NUM_DELAY_FEEDBACK], &delayfloat, sizeof(float)); + delayfloat = getDelayLFOFreq(); + memcpy(&buffer[NUM_DELAY_LFO_FREQ], &delayfloat, sizeof(float)); + delayfloat = getDelayLFODepth(); + memcpy(&buffer[NUM_DELAY_LFO_DEPTH], &delayfloat, sizeof(float)); //save set data int offset = @@ -2609,33 +2616,51 @@ void DeicsOnze::parseInitData(int length, const unsigned char* data) { MidiEvent evDelayRet(0,ME_SYSEX,(const unsigned char*)dataDelayRet, 2); _gui->writeEvent(evDelayRet); //initPluginDelay(plugins.find("pandelay", "pandelay")); - setDelayTime((int)data[NUM_DELAY_TIME]); - char dataDelayTime[2]; - dataDelayTime[0] = SYSEX_DELAYTIME; - dataDelayTime[1] = (unsigned char)getDelayTime(); - MidiEvent evSysexDelayTime(0,ME_SYSEX, - (const unsigned char*)dataDelayTime, 2); - _gui->writeEvent(evSysexDelayTime); - setDelayFeedback((int)data[NUM_DELAY_FEEDBACK]); - char dataDelayFeedback[2]; + float delayfloat; + memcpy(&delayfloat, &data[NUM_DELAY_BPM], sizeof(float)); + setDelayBPM(delayfloat); + char dataDelayBPM[sizeof(float)+1]; + dataDelayBPM[0] = SYSEX_DELAYBPM; + memcpy(&dataDelayBPM[1], &delayfloat, sizeof(float)); + MidiEvent evSysexDelayBPM(0,ME_SYSEX, + (const unsigned char*)dataDelayBPM, + sizeof(float)+1); + _gui->writeEvent(evSysexDelayBPM); + memcpy(&delayfloat, &data[NUM_DELAY_BEATRATIO], sizeof(float)); + setDelayBeatRatio(delayfloat); + char dataDelayBeatRatio[sizeof(float)+1]; + dataDelayBeatRatio[0] = SYSEX_DELAYBEATRATIO; + memcpy(&dataDelayBeatRatio[1], &delayfloat, sizeof(float)); + MidiEvent evSysexDelayBeatRatio(0,ME_SYSEX, + (const unsigned char*)dataDelayBeatRatio, + sizeof(float)+1); + _gui->writeEvent(evSysexDelayBeatRatio); + memcpy(&delayfloat, &data[NUM_DELAY_FEEDBACK], sizeof(float)); + setDelayFeedback(delayfloat); + char dataDelayFeedback[sizeof(float)+1]; dataDelayFeedback[0] = SYSEX_DELAYFEEDBACK; - dataDelayFeedback[1] = (unsigned char)getDelayFeedback(); + memcpy(&dataDelayFeedback[1], &delayfloat, sizeof(float)); MidiEvent evSysexDelayFeedback(0,ME_SYSEX, - (const unsigned char*)dataDelayFeedback, 2); + (const unsigned char*)dataDelayFeedback, + sizeof(float)+1); _gui->writeEvent(evSysexDelayFeedback); - setDelayLFOFreq((int)data[NUM_DELAY_LFO_FREQ]); - char dataDelayLFOFreq[2]; + memcpy(&delayfloat, &data[NUM_DELAY_LFO_FREQ], sizeof(float)); + setDelayLFOFreq(delayfloat); + char dataDelayLFOFreq[sizeof(float)+1]; dataDelayLFOFreq[0] = SYSEX_DELAYLFOFREQ; - dataDelayLFOFreq[1] = (unsigned char)getDelayLFOFreq(); + memcpy(&dataDelayLFOFreq[1], &delayfloat, sizeof(float)); MidiEvent evSysexDelayLFOFreq(0,ME_SYSEX, - (const unsigned char*)dataDelayLFOFreq, 2); + (const unsigned char*)dataDelayLFOFreq, + sizeof(float)+1); _gui->writeEvent(evSysexDelayLFOFreq); - setDelayLFODepth((int)data[NUM_DELAY_LFO_DEPTH]); - char dataDelayLFODepth[2]; + memcpy(&delayfloat, &data[NUM_DELAY_LFO_DEPTH], sizeof(float)); + setDelayLFODepth(delayfloat); + char dataDelayLFODepth[sizeof(float)+1]; dataDelayLFODepth[0] = SYSEX_DELAYLFODEPTH; - dataDelayLFODepth[1] = (unsigned char)getDelayLFODepth(); + memcpy(&dataDelayLFODepth[1], &delayfloat, sizeof(float)); MidiEvent evSysexDelayLFODepth(0,ME_SYSEX, - (const unsigned char*)dataDelayLFODepth, 2); + (const unsigned char*)dataDelayLFODepth, + sizeof(float)+1); _gui->writeEvent(evSysexDelayLFODepth); //load the set compressed @@ -2876,29 +2901,41 @@ bool DeicsOnze::sysex(int length, const unsigned char* data, bool fromGui) { memcpy(&pluginChorus, &data[1], sizeof(Plugin*)); initPluginChorus(pluginChorus); break; - case SYSEX_DELAYTIME: - setDelayTime((int)data[1]); + case SYSEX_DELAYBPM: + memcpy(&f, &data[1], sizeof(float)); + setDelayBPM(f); + if(!fromGui) { + MidiEvent evSysex(0, ME_SYSEX, data, length); + _gui->writeEvent(evSysex); + } + break; + case SYSEX_DELAYBEATRATIO: + memcpy(&f, &data[1], sizeof(float)); + setDelayBeatRatio(f); if(!fromGui) { MidiEvent evSysex(0, ME_SYSEX, data, length); _gui->writeEvent(evSysex); } break; case SYSEX_DELAYFEEDBACK: - setDelayFeedback((int)data[1]); + memcpy(&f, &data[1], sizeof(float)); + setDelayFeedback(f); if(!fromGui) { MidiEvent evSysex(0, ME_SYSEX, data, length); _gui->writeEvent(evSysex); } break; case SYSEX_DELAYLFOFREQ: - setDelayLFOFreq((int)data[1]); + memcpy(&f, &data[1], sizeof(float)); + setDelayLFOFreq(f); if(!fromGui) { MidiEvent evSysex(0, ME_SYSEX, data, length); _gui->writeEvent(evSysex); } break; case SYSEX_DELAYLFODEPTH: - setDelayLFODepth((int)data[1]); + memcpy(&f, &data[1], sizeof(float)); + setDelayLFODepth(f); if(!fromGui) { MidiEvent evSysex(0, ME_SYSEX, data, length); _gui->writeEvent(evSysex); @@ -3508,6 +3545,8 @@ bool DeicsOnze::setController(int ch, int ctrl, int val, bool fromGui) { _gui->writeEvent(ev); } break; + case CTRL_ALL_SOUNDS_OFF: + resetVoices(); default: break; } diff --git a/muse/synti/deicsonze/deicsonze.h b/muse/synti/deicsonze/deicsonze.h index 5e1f74b7..26316690 100644 --- a/muse/synti/deicsonze/deicsonze.h +++ b/muse/synti/deicsonze/deicsonze.h @@ -153,10 +153,11 @@ #define FILTERSTR "Filter" #define SYSEX_DELAYACTIV 91 #define SYSEX_DELAYRETURN 92 -#define SYSEX_DELAYTIME 93 -#define SYSEX_DELAYFEEDBACK 94 -#define SYSEX_DELAYLFOFREQ 95 -#define SYSEX_DELAYLFODEPTH 96 +#define SYSEX_DELAYBPM 93 +#define SYSEX_DELAYBEATRATIO 94 +#define SYSEX_DELAYFEEDBACK 95 +#define SYSEX_DELAYLFOFREQ 96 +#define SYSEX_DELAYLFODEPTH 97 //REVERB PARAMETERS @@ -212,11 +213,12 @@ enum { NUM_CHORUS_LABEL = NUM_CHORUS_LIB + MAXSTRLENGTHFXLIB + 1, NUM_IS_DELAY_ON = NUM_CHORUS_LABEL + MAXSTRLENGTHFXLABEL + 1, NUM_DELAY_RETURN, - NUM_DELAY_TIME, - NUM_DELAY_FEEDBACK, - NUM_DELAY_LFO_FREQ, - NUM_DELAY_LFO_DEPTH, - NUM_CONFIGLENGTH = NUM_DELAY_LFO_DEPTH + 1 + NUM_DELAY_BPM, + NUM_DELAY_BEATRATIO = NUM_DELAY_BPM + sizeof(float), + NUM_DELAY_FEEDBACK = NUM_DELAY_BEATRATIO + sizeof(float), + NUM_DELAY_LFO_FREQ = NUM_DELAY_FEEDBACK + sizeof(float), + NUM_DELAY_LFO_DEPTH = NUM_DELAY_LFO_FREQ + sizeof(float), + NUM_CONFIGLENGTH = NUM_DELAY_LFO_DEPTH + sizeof(float) }; class DeicsOnzeGui; @@ -474,15 +476,17 @@ class DeicsOnze : public Mess { double getReverbParam(int i); void setChorusParam(int i, double val); double getChorusParam(int i); - void setDelayTime(int val); //0-255 - void setDelayFeedback(int val); //0-255 - void setDelayLFOFreq(int val); //0-255 - void setDelayLFODepth(int val); //0-255 - void setDelayDryWet(int val); //0-255 - int getDelayTime(); - int getDelayFeedback(); - int getDelayLFOFreq(); - int getDelayLFODepth(); + void setDelayBPM(float val); + void setDelayBeatRatio(float val); + void setDelayFeedback(float val); + void setDelayLFOFreq(float val); + void setDelayLFODepth(float val); + void setDelayDryWet(float val); + float getDelayBPM(); + float getDelayBeatRatio(); + float getDelayFeedback(); + float getDelayLFOFreq(); + float getDelayLFODepth(); //Filter LowFilter* _dryFilter; diff --git a/muse/synti/deicsonze/deicsonzegui.cpp b/muse/synti/deicsonze/deicsonzegui.cpp index b7119f43..f765221a 100644 --- a/muse/synti/deicsonze/deicsonzegui.cpp +++ b/muse/synti/deicsonze/deicsonzegui.cpp @@ -363,22 +363,28 @@ DeicsOnzeGui::DeicsOnzeGui(DeicsOnze* deicsOnze) SLOT(setDelayReturn(int))); connect(chDelaySlider, SIGNAL(valueChanged(int)), this, SLOT(setChannelDelay(int))); - connect(delayTimeSlider, SIGNAL(valueChanged(int)), this, - SLOT(setDelayTime(int))); - connect(delayTimeFloatentry, SIGNAL(valueChanged(double, int)), this, - SLOT(setDelayTime(double))); - connect(delayFeedbackSlider, SIGNAL(valueChanged(int)), this, - SLOT(setDelayFeedback(int))); + connect(delayBPMFloatentry, SIGNAL(valueChanged(double, int)), this, + SLOT(setDelayBPM(double))); + connect(delayBPMKnob, SIGNAL(valueChanged(double, int)), this, + SLOT(setDelayBPM(double))); + connect(delayBeatRatioFloatentry, SIGNAL(valueChanged(double, int)), this, + SLOT(setDelayBeatRatio(double))); + connect(delayBeatRatioKnob, SIGNAL(valueChanged(double, int)), this, + SLOT(setDelayBeatRatio(double))); connect(delayFeedbackFloatentry, SIGNAL(valueChanged(double, int)), this, SLOT(setDelayFeedback(double))); - connect(delayPanLFOFreqSlider, SIGNAL(valueChanged(int)), this, - SLOT(setDelayPanLFOFreq(int))); + connect(delayFeedbackKnob, SIGNAL(valueChanged(double, int)), this, + SLOT(setDelayFeedback(double))); connect(delayPanLFOFreqFloatentry, SIGNAL(valueChanged(double, int)), this, SLOT(setDelayPanLFOFreq(double))); - connect(delayPanLFODepthSlider, SIGNAL(valueChanged(int)), this, - SLOT(setDelayPanLFODepth(int))); + connect(delayPanLFOFreqKnob, SIGNAL(valueChanged(double, int)), this, + SLOT(setDelayPanLFOFreq(double))); + delayPanLFOFreqKnob->setMinLogValue(0.1); + delayPanLFOFreqKnob->setMaxLogValue(10.0); connect(delayPanLFODepthFloatentry, SIGNAL(valueChanged(double, int)), this, SLOT(setDelayPanLFODepth(double))); + connect(delayPanLFODepthKnob, SIGNAL(valueChanged(double, int)), this, + SLOT(setDelayPanLFODepth(double))); //category subcategory preset connect(categoryListView, SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)), @@ -827,7 +833,8 @@ void DeicsOnzeGui::setTextColor(const QColor & c) { channelChorusGroupBox->setPalette(p); parametersChorusGroupBox->setPalette(p); fontSizeGroupBox->setPalette(p); - delayTimeGroupBox->setPalette(p); + delayBPMGroupBox->setPalette(p); + delayBeatRatioGroupBox->setPalette(p); delayFeedbackGroupBox->setPalette(p); delayPanLFOGroupBox->setPalette(p); delayPanDepthGroupBox->setPalette(p); @@ -901,6 +908,12 @@ void DeicsOnzeGui::setEditTextColor(const QColor & c) { if(_chorusSliderVector[i]) _chorusSliderVector[i]->setScaleValueColor(c); for(int i=0; i < (int)_reverbSliderVector.size(); i++) if(_reverbSliderVector[i]) _reverbSliderVector[i]->setScaleValueColor(c); + delayBPMKnob->setScaleValueColor(c); + delayBeatRatioKnob->setScaleValueColor(c); + delayFeedbackKnob->setScaleValueColor(c); + delayPanLFOFreqKnob->setScaleValueColor(c); + delayPanLFODepthKnob->setScaleValueColor(c); + //p.setColor(QPalette::WindowText, c); //presetNameLabel->setPalette(p); } @@ -978,6 +991,11 @@ void DeicsOnzeGui::setEditBackgroundColor(const QColor & c) { if(_chorusSliderVector[i]) _chorusSliderVector[i]->setScaleColor(c); for(int i=0; i < (int)_reverbSliderVector.size(); i++) if(_reverbSliderVector[i]) _reverbSliderVector[i]->setScaleColor(c); + delayBPMKnob->setScaleColor(c); + delayBeatRatioKnob->setScaleColor(c); + delayFeedbackKnob->setScaleColor(c); + delayPanLFOFreqKnob->setScaleColor(c); + delayPanLFODepthKnob->setScaleColor(c); } //----------------------------------------------------------- @@ -1473,6 +1491,7 @@ void DeicsOnzeGui::processEvent(const MidiEvent& ev) { //printf("ME_SYSEX\n"); unsigned char* data = ev.data(); int cmd = *data; + float f; switch (cmd) { case SYSEX_CHORUSACTIV : updateChorusActiv((bool)data[1]); @@ -1510,17 +1529,25 @@ void DeicsOnzeGui::processEvent(const MidiEvent& ev) { case SYSEX_DELAYRETURN : updateDelayReturn((int)data[1]); break; - case SYSEX_DELAYTIME : - updateDelayTime((int) data[1]); + case SYSEX_DELAYBPM : + memcpy(&f, &data[1], sizeof(float)); + updateDelayBPM(f); + break; + case SYSEX_DELAYBEATRATIO : + memcpy(&f, &data[1], sizeof(float)); + updateDelayBeatRatio(f); break; case SYSEX_DELAYFEEDBACK : - updateDelayFeedback((int) data[1]); + memcpy(&f, &data[1], sizeof(float)); + updateDelayFeedback(f); break; case SYSEX_DELAYLFOFREQ : - updateDelayPanLFOFreq((int) data[1]); + memcpy(&f, &data[1], sizeof(float)); + updateDelayPanLFOFreq(f); break; case SYSEX_DELAYLFODEPTH : - updateDelayPanLFODepth((int) data[1]); + memcpy(&f, &data[1], sizeof(float)); + updateDelayPanLFODepth(f); break; case SYSEX_QUALITY : updateQuality((int)data[1]); @@ -3002,65 +3029,78 @@ void DeicsOnzeGui::setDelayReturn(int r) { void DeicsOnzeGui::setChannelDelay(int d) { sendController(_currentChannel, CTRL_VARIATION_SEND, (unsigned char)d); } -void DeicsOnzeGui::setDelayTime(int t) { - unsigned char* message = new unsigned char[2]; - message[0]=SYSEX_DELAYTIME; - message[1]=(unsigned char)t; - sendSysex(message, 2); - updateDelayTime(t); -} -void DeicsOnzeGui::setDelayTime(double t) { - int it = (int)(((t - MINDELAYTIME) / (MAXDELAYTIME - MINDELAYTIME))*255.0); - unsigned char* message = new unsigned char[2]; - message[0]=SYSEX_DELAYTIME; - message[1]=(unsigned char)it; - sendSysex(message, 2); - updateDelayTime(it); +//void DeicsOnzeGui::setDelayTime(int t) { +// unsigned char* message = new unsigned char[2]; +// message[0]=SYSEX_DELAYTIME; +// message[1]=(unsigned char)t; +// sendSysex(message, 2); +// updateDelayTime(t); +//} +void DeicsOnzeGui::setDelayBPM(double t) { + //int it = (int)(((t - MINDELAYTIME) / (MAXDELAYTIME - MINDELAYTIME))*255.0); + unsigned char* message = new unsigned char[sizeof(float)+1]; + message[0]=SYSEX_DELAYBPM; + float f = (float)t; + memcpy(&message[1], &f, sizeof(float)); + message[1]=(unsigned char)f; + sendSysex(message, sizeof(float)+1); + //updateDelayTime(it); } -void DeicsOnzeGui::setDelayFeedback(int f) { - unsigned char* message = new unsigned char[2]; - message[0]=SYSEX_DELAYFEEDBACK; +void DeicsOnzeGui::setDelayBeatRatio(double t) { + unsigned char* message = new unsigned char[sizeof(float)+1]; + message[0]=SYSEX_DELAYBEATRATIO; + float f = (float)t; + memcpy(&message[1], &f, sizeof(float)); message[1]=(unsigned char)f; - sendSysex(message, 2); - updateDelayFeedback(f); -} -void DeicsOnzeGui::setDelayFeedback(double f) { - int idf = (int)(f*128.0+128.0); - unsigned char* message = new unsigned char[2]; + sendSysex(message, sizeof(float)+1); +} +//void DeicsOnzeGui::setDelayFeedback(int f) { +// unsigned char* message = new unsigned char[2]; +// message[0]=SYSEX_DELAYFEEDBACK; +// message[1]=(unsigned char)f; +// sendSysex(message, 2); +// updateDelayFeedback(f); +//} +void DeicsOnzeGui::setDelayFeedback(double t) { + //int idf = (int)(f*128.0+128.0); + unsigned char* message = new unsigned char[sizeof(float)+1]; message[0]=SYSEX_DELAYFEEDBACK; - message[1]=(unsigned char)idf; - sendSysex(message, 2); - updateDelayFeedback(idf); -} -void DeicsOnzeGui::setDelayPanLFOFreq(int pf) { - unsigned char* message = new unsigned char[2]; - message[0]=SYSEX_DELAYLFOFREQ; - message[1]=(unsigned char)pf; - sendSysex(message, 2); - updateDelayPanLFOFreq(pf); + float f = (float)t; + memcpy(&message[1], &f, sizeof(float)); + sendSysex(message, sizeof(float)+1); + //updateDelayFeedback(idf); } +//void DeicsOnzeGui::setDelayPanLFOFreq(int pf) { +// unsigned char* message = new unsigned char[2]; +// message[0]=SYSEX_DELAYLFOFREQ; +// message[1]=(unsigned char)pf; +// sendSysex(message, 2); +// updateDelayPanLFOFreq(pf); +//} void DeicsOnzeGui::setDelayPanLFOFreq(double pf) { - int ipf = (int)(((pf - MINFREQ) / (MAXFREQ - MINFREQ))*255.0); - unsigned char* message = new unsigned char[2]; + //int ipf = (int)(((pf - MINFREQ) / (MAXFREQ - MINFREQ))*255.0); + unsigned char* message = new unsigned char[sizeof(float)+1]; message[0]=SYSEX_DELAYLFOFREQ; - message[1]=(unsigned char)ipf; - sendSysex(message, 2); - updateDelayPanLFOFreq(ipf); -} -void DeicsOnzeGui::setDelayPanLFODepth(int pd) { - unsigned char* message = new unsigned char[2]; - message[0]=SYSEX_DELAYLFODEPTH; - message[1]=(unsigned char)pd; - sendSysex(message, 2); - updateDelayPanLFODepth(pd); + float f = (float)pf; + memcpy(&message[1], &f, sizeof(float)); + sendSysex(message, sizeof(float)+1); + //updateDelayPanLFOFreq(ipf); } +//void DeicsOnzeGui::setDelayPanLFODepth(int pd) { +// unsigned char* message = new unsigned char[2]; +// message[0]=SYSEX_DELAYLFODEPTH; +// message[1]=(unsigned char)pd; +// sendSysex(message, 2); +// updateDelayPanLFODepth(pd); +//} void DeicsOnzeGui::setDelayPanLFODepth(double pd) { - int ipd = (int)(pd*255.0); - unsigned char* message = new unsigned char[2]; + //int ipd = (int)(pd*255.0); + unsigned char* message = new unsigned char[sizeof(float)+1]; message[0]=SYSEX_DELAYLFODEPTH; - message[1]=(unsigned char)ipd; - sendSysex(message, 2); - updateDelayPanLFODepth(ipd); + float f = (float)pd; + memcpy(&message[1], &f, sizeof(float)); + sendSysex(message, sizeof(float)+1); + //updateDelayPanLFODepth(ipd); } @@ -3313,39 +3353,44 @@ void DeicsOnzeGui::updateDelayReturn(int r) { delayReturnSlider->setValue(r); delayReturnSlider->blockSignals(false); } -void DeicsOnzeGui::updateDelayPanLFOFreq(int plf) { - delayPanLFOFreqSlider->blockSignals(true); - delayPanLFOFreqSlider->setValue(plf); - delayPanLFOFreqSlider->blockSignals(false); +void DeicsOnzeGui::updateDelayPanLFOFreq(float plf) { + delayPanLFOFreqKnob->blockSignals(true); + delayPanLFOFreqKnob->setValue((double)plf); + delayPanLFOFreqKnob->blockSignals(false); delayPanLFOFreqFloatentry->blockSignals(true); - delayPanLFOFreqFloatentry->setValue(MINFREQ + (MAXFREQ - MINFREQ) - *((float)plf/255.0)); + delayPanLFOFreqFloatentry->setValue((double)plf); delayPanLFOFreqFloatentry->blockSignals(false); } -void DeicsOnzeGui::updateDelayTime(int dt) { - delayTimeSlider->blockSignals(true); - delayTimeSlider->setValue(dt); - delayTimeSlider->blockSignals(false); - delayTimeFloatentry->blockSignals(true); - delayTimeFloatentry->setValue(MINDELAYTIME + - (MAXDELAYTIME - MINDELAYTIME) - *((float)dt/255.0)); - delayTimeFloatentry->blockSignals(false); -} -void DeicsOnzeGui::updateDelayFeedback(int df) { - delayFeedbackSlider->blockSignals(true); - delayFeedbackSlider->setValue(df); - delayFeedbackSlider->blockSignals(false); +void DeicsOnzeGui::updateDelayBPM(float dt) { + delayBPMKnob->blockSignals(true); + delayBPMKnob->setValue((double)dt); + delayBPMKnob->blockSignals(false); + delayBPMFloatentry->blockSignals(true); + delayBPMFloatentry->setValue((double)dt); + delayBPMFloatentry->blockSignals(false); +} +void DeicsOnzeGui::updateDelayBeatRatio(float dt) { + delayBeatRatioKnob->blockSignals(true); + delayBeatRatioKnob->setValue((double)dt); + delayBeatRatioKnob->blockSignals(false); + delayBeatRatioFloatentry->blockSignals(true); + delayBeatRatioFloatentry->setValue((double)dt); + delayBeatRatioFloatentry->blockSignals(false); +} +void DeicsOnzeGui::updateDelayFeedback(float df) { + delayFeedbackKnob->blockSignals(true); + delayFeedbackKnob->setValue((double)df); + delayFeedbackKnob->blockSignals(false); delayFeedbackFloatentry->blockSignals(true); - delayFeedbackFloatentry->setValue((float)(df - 128)/128.0); + delayFeedbackFloatentry->setValue((double)df); delayFeedbackFloatentry->blockSignals(false); } -void DeicsOnzeGui::updateDelayPanLFODepth(int dpd) { - delayPanLFODepthSlider->blockSignals(true); - delayPanLFODepthSlider->setValue(dpd); - delayPanLFODepthSlider->blockSignals(false); +void DeicsOnzeGui::updateDelayPanLFODepth(float dpd) { + delayPanLFODepthKnob->blockSignals(true); + delayPanLFODepthKnob->setValue((double)dpd); + delayPanLFODepthKnob->blockSignals(false); delayPanLFODepthFloatentry->blockSignals(true); - delayPanLFODepthFloatentry->setValue((float)dpd/255.0); + delayPanLFODepthFloatentry->setValue((double)dpd); delayPanLFODepthFloatentry->blockSignals(false); } diff --git a/muse/synti/deicsonze/deicsonzegui.h b/muse/synti/deicsonze/deicsonzegui.h index fbbdaccd..236b4a9f 100644 --- a/muse/synti/deicsonze/deicsonzegui.h +++ b/muse/synti/deicsonze/deicsonzegui.h @@ -337,13 +337,14 @@ class DeicsOnzeGui : public QDialog, public Ui::DeicsOnzeGuiBase, public MessGui void setActivDelay(bool); void setDelayReturn(int); void setChannelDelay(int); - void setDelayTime(int); - void setDelayTime(double); - void setDelayFeedback(int); + //void setDelayTime(int); + void setDelayBPM(double); + void setDelayBeatRatio(double); + //void setDelayFeedback(int); void setDelayFeedback(double); - void setDelayPanLFOFreq(int); + //void setDelayPanLFOFreq(int); void setDelayPanLFOFreq(double); - void setDelayPanLFODepth(int); + //void setDelayPanLFODepth(int); void setDelayPanLFODepth(double); //category subcategory preset void setSet(void); //display the set, that is the category list @@ -381,10 +382,11 @@ class DeicsOnzeGui : public QDialog, public Ui::DeicsOnzeGuiBase, public MessGui void updateDelayActiv(bool a); void updateChannelDelay(int r); void updateDelayReturn(int r); - void updateDelayPanLFOFreq(int plf); - void updateDelayTime(int dt); - void updateDelayFeedback(int df); - void updateDelayPanLFODepth(int dpd); + void updateDelayPanLFOFreq(float plf); + void updateDelayBPM(float dt); + void updateDelayBeatRatio(float dt); + void updateDelayFeedback(float df); + void updateDelayPanLFODepth(float dpd); void addPluginCheckBox(int index, QString text, bool toggled, QWidget* parent, QGridLayout* grid, bool isReverb); void addPluginIntSlider(int index, QString text, double min, double max, diff --git a/muse/synti/deicsonze/deicsonzegui.ui b/muse/synti/deicsonze/deicsonzegui.ui index d649195c..9d75c967 100644 --- a/muse/synti/deicsonze/deicsonzegui.ui +++ b/muse/synti/deicsonze/deicsonzegui.ui @@ -3958,8 +3958,8 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin 6 - - + + 16777215 @@ -3967,7 +3967,7 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin - Delay Time (ms) + Delay Pan Depth @@ -3977,42 +3977,23 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin 6 - + 48 16777215 - - 0.010000000000000 - - - 2.000000000000000 - - - - 13 - - - Channel Chorus - - - 255 - - - Qt::Horizontal - - + - - + + 16777215 @@ -4020,7 +4001,7 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin - Delay Pan Depth + Delay Pan LFO Freq @@ -4029,37 +4010,43 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin 6 + + + + 1.122018456226853 + + + 0.100000000000000 + + + 10.000000000000000 + + + true + + + - + 48 16777215 - - - - - - 13 - - - Channel Chorus - - - 255 + + 0.100000000000000 - - Qt::Horizontal + + 10.000000000000000 - - + + 16777215 @@ -4067,7 +4054,7 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin - Delay Feedback + Delay Ch Send Level @@ -4077,20 +4064,14 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin 6 - - - - 48 - 16777215 - - - - -1.000000000000000 + + + 127 - + 13 @@ -4098,7 +4079,7 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin Channel Chorus - 255 + 127 Qt::Horizontal @@ -4108,8 +4089,8 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin - - + + 16777215 @@ -4117,7 +4098,7 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin - Delay Pan LFO Freq + Delay Feedback @@ -4127,23 +4108,17 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin 6 - - - 13 - - - Channel Chorus - - - 255 + + + 0.000000000000000 - - Qt::Horizontal + + -1.000000000000000 - + 48 @@ -4151,17 +4126,14 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin - 0.100000000000000 - - - 10.000000000000000 + -1.000000000000000 - + @@ -4205,8 +4177,8 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin - - + + 16777215 @@ -4214,7 +4186,7 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin - Delay Ch Send Level + Delay Beat Ratio @@ -4223,33 +4195,92 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin 6 + + + + 1.000000000000000 + + + 0.125000000000000 + + + 2.000000000000000 + + + - - - 127 + + + + 48 + 16777215 + + + + 0.010000000000000 + + + 2.000000000000000 + + + + + + + + 16777215 + 80 + + + + Delay BPM + + + + 9 + + + 6 + - - - 13 + + + 100.000000000000000 - - Channel Chorus + + 60.000000000000000 - - 127 + + 255.000000000000000 - - Qt::Horizontal + + + + + + + 48 + 16777215 + + + + 6 + + + 60.000000000000000 + + + 255.000000000000000 - + 0 @@ -4932,10 +4963,10 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin - - + + - Potamento + Phony Mode @@ -4945,86 +4976,29 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin 6 - + true 13 - - Portamento Mode - - FINGER + POLY - FULL + MONO - - - - QFrame::Box - - - QFrame::Sunken - - - PT - - - - - - - true - - - 13 - - - Portamento Time - - - 0 - - - 99 - - - 1 - - - 0 - - - Qt::Horizontal - - - - - - - true - - - Portamento Time - - - 99 - - - - + Pitch Bend Range @@ -5074,10 +5048,10 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin - - + + - Phony Mode + Potamento @@ -5087,25 +5061,82 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin 6 - + true 13 + + Portamento Mode + - POLY + FINGER - MONO + FULL + + + + QFrame::Box + + + QFrame::Sunken + + + PT + + + + + + + true + + + 13 + + + Portamento Time + + + 0 + + + 99 + + + 1 + + + 0 + + + Qt::Horizontal + + + + + + + true + + + Portamento Time + + + 99 + + + @@ -5848,360 +5879,12 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin - - - + + + - 96 - 16 - - - - Channel Ctrl - - - - 9 - - - 6 - - - - - 13 - - - 0.000000000000000 - - - 1.000000000000000 - - - 0.100000000000000 - - - 0.200000000000000 - - - false - - - - - - - QFrame::StyledPanel - - - Release - - - Qt::AlignCenter - - - - - - - - 32 - 32 - - - - 13 - - - - - - - QFrame::StyledPanel - - - Attack - - - Qt::AlignCenter - - - - - - - - 32 - 32 - - - - 13 - - - - - - - QFrame::StyledPanel - - - Detune - - - Qt::AlignCenter - - - - - - - - 32 - 32 - - - - 13 - - - - - - - QFrame::StyledPanel - - - Brightness - - - Qt::AlignCenter - - - - - - - - 32 - 32 - - - - 13 - - - - - - - QFrame::StyledPanel - - - Modulation - - - Qt::AlignCenter - - - - - - - - 32 - 32 - - - - 13 - - - - - - - QFrame::StyledPanel - - - Pan - - - Qt::AlignCenter - - - - - - - QFrame::StyledPanel - - - Volume - - - Qt::AlignCenter - - - - - - - - 32 - 32 - - - - 13 - - - 1.000000000000000 - - - 0.100000000000000 - - - 0.200000000000000 - - - 270 - - - 6 - - - - - - - - - - - 40 - 40 - - - - -31.287818861687722 - - - 0.000000000000000 - - - 1.000000000000000 - - - 0.100000000000000 - - - 0.200000000000000 - - - false - - - - - - - QFrame::StyledPanel - - - Vol - - - Qt::AlignCenter - - - - - - - - - - - 9 - - - 6 - - - - - true - - - Number of Voices - - - 64 - - - 1 - - - 8 - - - - - - - QFrame::StyledPanel - - - Number of voices - - - Qt::AlignCenter - - - - - - - Enable - - - true - - - - - - - 16 - - - 1 - - - - - - - QFrame::StyledPanel - - - Channel - - - Qt::AlignCenter - - - - - - - - - - - 1000 - 20 + 1000 + 20 @@ -6685,15 +6368,15 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin - Cut all notes off + Set Brightness, Detune, Attack and Release of the current channel to default - Panic! + Res. Ctrl - - + + 1000 @@ -7181,11 +6864,359 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin - Set Brightness, Detune, Attack and Release of the current channel to default + Cut all notes off - Res. Ctrl + Panic! + + + + + + + + + + + 9 + + + 6 + + + + + true + + + Number of Voices + + + 64 + + + 1 + + + 8 + + + + + + + QFrame::StyledPanel + + + Number of voices + + + Qt::AlignCenter + + + + + + + Enable + + + true + + + + + + + 16 + + + 1 + + + + + + + QFrame::StyledPanel + + + Channel + + + Qt::AlignCenter + + + + + + + + + + QFrame::StyledPanel + + + Vol + + + Qt::AlignCenter + + + + + + + + 40 + 40 + + + + -1.240780029054432 + + + 0.000000000000000 + + + 1.000000000000000 + + + 0.100000000000000 + + + 0.200000000000000 + + + false + + + + + + + + 96 + 16 + + + + Channel Ctrl + + + 9 + + + 6 + + + + + 13 + + + 0.000000000000000 + + + 1.000000000000000 + + + 0.100000000000000 + + + 0.200000000000000 + + + false + + + + + + + QFrame::StyledPanel + + + Release + + + Qt::AlignCenter + + + + + + + + 32 + 32 + + + + 13 + + + + + + + QFrame::StyledPanel + + + Attack + + + Qt::AlignCenter + + + + + + + + 32 + 32 + + + + 13 + + + + + + + QFrame::StyledPanel + + + Detune + + + Qt::AlignCenter + + + + + + + + 32 + 32 + + + + 13 + + + + + + + QFrame::StyledPanel + + + Brightness + + + Qt::AlignCenter + + + + + + + + 32 + 32 + + + + 13 + + + + + + + QFrame::StyledPanel + + + Modulation + + + Qt::AlignCenter + + + + + + + + 32 + 32 + + + + 13 + + + + + + + QFrame::StyledPanel + + + Pan + + + Qt::AlignCenter + + + + + + + QFrame::StyledPanel + + + Volume + + + Qt::AlignCenter + + + + + + + + 32 + 32 + + + + 13 + + + 1.000000000000000 + + + 0.100000000000000 + + + 0.200000000000000 + + + 270 + + + 6 + + + + @@ -7338,12 +7369,12 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin setValue(int) - 110 - 115 + 111 + 114 - 110 - 115 + 111 + 114 @@ -7354,12 +7385,12 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin setValue(int) - 110 - 115 + 111 + 114 - 110 - 115 + 111 + 114 @@ -7370,12 +7401,12 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin setValue(int) - 110 - 115 + 111 + 114 - 110 - 115 + 111 + 114 @@ -7386,12 +7417,12 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin setValue(int) - 110 - 115 + 111 + 114 - 110 - 115 + 111 + 114 @@ -7402,12 +7433,12 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin setValue(int) - 110 - 115 + 111 + 114 - 110 - 115 + 111 + 114 @@ -7418,12 +7449,12 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin setValue(int) - 110 - 115 + 111 + 114 - 110 - 115 + 111 + 114 @@ -7434,12 +7465,12 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin setValue(int) - 110 - 115 + 111 + 114 - 110 - 115 + 111 + 114 @@ -7450,12 +7481,12 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin setValue(int) - 110 - 115 + 111 + 114 - 110 - 115 + 111 + 114 @@ -7466,12 +7497,12 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin setValue(int) - 110 - 115 + 111 + 114 - 110 - 115 + 111 + 114 @@ -7482,12 +7513,12 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin setValue(int) - 110 - 115 + 111 + 114 - 110 - 115 + 111 + 114 @@ -7498,12 +7529,12 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin setValue(int) - 110 - 115 + 111 + 114 - 110 - 115 + 111 + 114 @@ -7514,12 +7545,12 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin setValue(int) - 110 - 115 + 111 + 114 - 110 - 115 + 111 + 114 @@ -7530,12 +7561,12 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin setValue(int) - 110 - 115 + 111 + 114 - 110 - 115 + 111 + 114 @@ -8490,12 +8521,12 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin setValue(int) - 110 - 115 + 111 + 114 - 110 - 115 + 111 + 114 @@ -8506,12 +8537,12 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin setValue(int) - 110 - 115 + 111 + 114 - 110 - 115 + 111 + 114 @@ -8522,12 +8553,12 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin setValue(int) - 110 - 115 + 111 + 114 - 110 - 115 + 111 + 114 @@ -8538,12 +8569,12 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin setValue(int) - 110 - 115 + 111 + 114 - 110 - 115 + 111 + 114 @@ -8554,12 +8585,12 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin setValue(int) - 110 - 115 + 111 + 114 - 110 - 115 + 111 + 114 @@ -8570,12 +8601,12 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin setValue(int) - 110 - 115 + 111 + 114 - 110 - 115 + 111 + 114 @@ -8586,12 +8617,12 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin setValue(int) - 262 - 163 + 285 + 155 - 515 - 166 + 494 + 158 @@ -8602,12 +8633,12 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin setValue(int) - 515 - 166 + 494 + 158 - 262 - 163 + 285 + 155 @@ -8618,12 +8649,12 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin setValue(int) - 262 - 209 + 285 + 180 - 504 - 212 + 494 + 177 @@ -8634,12 +8665,12 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin setValue(int) - 504 - 212 + 494 + 177 - 262 - 209 + 285 + 180 @@ -8650,12 +8681,12 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin setValue(int) - 504 - 258 + 494 + 216 - 262 - 255 + 285 + 219 @@ -8666,12 +8697,12 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin setValue(int) - 262 - 255 + 285 + 219 - 504 - 258 + 494 + 216 @@ -8682,12 +8713,12 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin setValue(int) - 485 - 484 + 486 + 483 - 537 - 487 + 538 + 486 @@ -8698,12 +8729,12 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin setValue(int) - 537 - 487 + 538 + 486 - 485 - 484 + 486 + 483 @@ -8714,12 +8745,12 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin setValue(int) - 329 - 484 + 293 + 483 - 381 - 487 + 345 + 486 @@ -8730,12 +8761,12 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin setValue(int) - 381 - 487 + 345 + 486 - 329 - 484 + 293 + 483 @@ -8746,12 +8777,12 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin setValue(int) - 121 - 149 + 224 + 168 - 121 - 149 + 539 + 171 @@ -8762,12 +8793,12 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin setValue(int) - 121 - 149 + 539 + 223 - 121 - 149 + 224 + 220 @@ -8778,12 +8809,12 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin setValue(int) - 121 - 149 + 224 + 220 - 121 - 149 + 539 + 223 @@ -8794,12 +8825,12 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin setValue(int) - 121 - 149 + 539 + 171 - 121 - 149 + 224 + 168 @@ -8810,12 +8841,12 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin setValue(int) - 121 - 149 + 248 + 147 - 121 - 149 + 539 + 150 @@ -8826,12 +8857,12 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin setValue(int) - 121 - 149 + 248 + 178 - 121 - 149 + 539 + 181 @@ -8842,12 +8873,12 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin setValue(int) - 121 - 149 + 248 + 209 - 121 - 149 + 539 + 212 @@ -8858,12 +8889,12 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin setValue(int) - 121 - 149 + 248 + 240 - 121 - 149 + 539 + 243 @@ -8874,12 +8905,12 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin setValue(int) - 121 - 149 + 539 + 150 - 121 - 149 + 248 + 147 @@ -8890,12 +8921,12 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin setValue(int) - 121 - 149 + 539 + 243 - 121 - 149 + 248 + 240 @@ -8906,12 +8937,12 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin setValue(int) - 121 - 149 + 248 + 147 - 121 - 149 + 539 + 150 @@ -8922,12 +8953,12 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin setValue(int) - 121 - 149 + 539 + 181 - 121 - 149 + 248 + 178 @@ -8938,12 +8969,12 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin setValue(int) - 121 - 149 + 248 + 178 - 121 - 149 + 539 + 181 @@ -8954,12 +8985,12 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin setValue(int) - 121 - 149 + 248 + 209 - 121 - 149 + 539 + 212 @@ -8970,12 +9001,12 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin setValue(int) - 121 - 149 + 539 + 212 - 121 - 149 + 248 + 209 @@ -8986,12 +9017,12 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin setValue(int) - 121 - 149 + 248 + 240 - 121 - 149 + 539 + 243 @@ -9002,12 +9033,12 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin setValue(int) - 121 - 149 + 539 + 150 - 121 - 149 + 248 + 147 @@ -9018,12 +9049,12 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin setValue(int) - 121 - 149 + 539 + 243 - 121 - 149 + 248 + 240 @@ -9034,12 +9065,12 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin setValue(int) - 121 - 149 + 539 + 150 - 121 - 149 + 248 + 147 @@ -9050,12 +9081,12 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin setValue(int) - 121 - 149 + 539 + 181 - 121 - 149 + 248 + 178 @@ -9066,12 +9097,12 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin setValue(int) - 121 - 149 + 539 + 212 - 121 - 149 + 248 + 209 @@ -9082,12 +9113,12 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin setValue(int) - 121 - 149 + 539 + 243 - 121 - 149 + 248 + 240 @@ -9114,12 +9145,12 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin setValue(int) - 486 - 150 + 487 + 149 - 538 - 153 + 539 + 152 @@ -9130,12 +9161,12 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin setValue(int) - 538 - 153 + 539 + 152 - 486 - 150 + 487 + 149 @@ -9146,12 +9177,12 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin setValue(int) - 110 - 115 + 487 + 149 - 110 - 115 + 539 + 152 @@ -9162,12 +9193,12 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin setValue(int) - 110 - 115 + 539 + 152 - 110 - 115 + 487 + 149 @@ -9178,12 +9209,12 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin setValue(int) - 110 - 115 + 111 + 114 - 110 - 115 + 111 + 114 @@ -9194,12 +9225,12 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin setValue(int) - 110 - 115 + 111 + 114 - 110 - 115 + 111 + 114 @@ -9210,12 +9241,12 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin setValue(int) - 302 - 339 + 351 + 319 - 344 - 343 + 403 + 322 @@ -9226,12 +9257,172 @@ Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin setValue(int) - 346 - 329 + 403 + 322 + + + 351 + 319 + + + + + delayPanLFOFreqKnob + valueChanged(double,int) + delayPanLFOFreqFloatentry + setValue(double) + + + 477 + 308 + + + 498 + 308 + + + + + delayPanLFOFreqFloatentry + valueChanged(double,int) + delayPanLFOFreqKnob + setValue(double) + + + 497 + 319 + + + 477 + 326 + + + + + delayBPMKnob + valueChanged(double,int) + delayBPMFloatentry + setValue(double) + + + 84 + 389 + + + 104 + 393 + + + + + delayBPMFloatentry + valueChanged(double,int) + delayBPMKnob + setValue(double) + + + 121 + 404 + + + 78 + 409 + + + + + delayBeatRatioKnob + valueChanged(double,int) + delayBeatRatioFloatentry + setValue(double) + + + 212 + 386 + + + 252 + 392 + + + + + delayBeatRatioFloatentry + valueChanged(double,int) + delayBeatRatioKnob + setValue(double) + + + 271 + 398 + + + 228 + 411 + + + + + delayFeedbackKnob + valueChanged(double,int) + delayFeedbackFloatentry + setValue(double) + + + 347 + 388 + + + 368 + 393 + + + + + delayFeedbackFloatentry + valueChanged(double,int) + delayFeedbackKnob + setValue(double) + + + 379 + 405 + + + 352 + 409 + + + + + delayPanLFODepthKnob + valueChanged(double,int) + delayPanLFODepthFloatentry + setValue(double) + + + 464 + 387 + + + 507 + 396 + + + + + delayPanLFODepthFloatentry + valueChanged(double,int) + delayPanLFODepthKnob + setValue(double) + + + 518 + 407 - 278 - 329 + 471 + 409 diff --git a/muse/synti/deicsonze/deicsonzeplugin.cpp b/muse/synti/deicsonze/deicsonzeplugin.cpp index 5d882ff5..e66a4278 100644 --- a/muse/synti/deicsonze/deicsonzeplugin.cpp +++ b/muse/synti/deicsonze/deicsonzeplugin.cpp @@ -96,31 +96,48 @@ void DeicsOnze::initPluginDelay(Plugin* pluginDelay) { _pluginIDelay->setControllerList(c); //setChorusParam(i, pluginDelay->defaultValue(i)); } - setDelayDryWet(255); + setDelayDryWet(1); - char dataDelayTime[2]; - dataDelayTime[0] = SYSEX_DELAYTIME; - dataDelayTime[1] = (unsigned char)getDelayTime(); - MidiEvent evSysexDelayTime(0,ME_SYSEX, - (const unsigned char*)dataDelayTime, 2); - _gui->writeEvent(evSysexDelayTime); - char dataDelayFeedback[2]; + float f; + char dataDelayBPM[sizeof(float)+1]; + dataDelayBPM[0] = SYSEX_DELAYBPM; + f = getDelayBPM(); + memcpy(&dataDelayBPM[1], &f, sizeof(float)); + MidiEvent evSysexDelayBPM(0,ME_SYSEX, + (const unsigned char*)dataDelayBPM, + sizeof(float)+1); + _gui->writeEvent(evSysexDelayBPM); + char dataDelayBeatRatio[sizeof(float)+1]; + dataDelayBeatRatio[0] = SYSEX_DELAYBEATRATIO; + f = getDelayBeatRatio(); + memcpy(&dataDelayBeatRatio[1], &f, sizeof(float)); + MidiEvent evSysexDelayBeatRatio(0,ME_SYSEX, + (const unsigned char*)dataDelayBeatRatio, + sizeof(float)+1); + _gui->writeEvent(evSysexDelayBeatRatio); + char dataDelayFeedback[sizeof(float)+1]; dataDelayFeedback[0] = SYSEX_DELAYFEEDBACK; - dataDelayFeedback[1] = (unsigned char)getDelayFeedback(); + f = getDelayFeedback(); + memcpy(&dataDelayFeedback[1], &f, sizeof(float)); MidiEvent evSysexDelayFeedback(0,ME_SYSEX, - (const unsigned char*)dataDelayFeedback, 2); + (const unsigned char*)dataDelayFeedback, + sizeof(float)+1); _gui->writeEvent(evSysexDelayFeedback); - char dataDelayLFOFreq[2]; + char dataDelayLFOFreq[sizeof(float)+1]; dataDelayLFOFreq[0] = SYSEX_DELAYLFOFREQ; - dataDelayLFOFreq[1] = (unsigned char)getDelayLFOFreq(); + f = getDelayLFOFreq(); + memcpy(&dataDelayLFOFreq[1], &f, sizeof(float)); MidiEvent evSysexDelayLFOFreq(0,ME_SYSEX, - (const unsigned char*)dataDelayLFOFreq, 2); + (const unsigned char*)dataDelayLFOFreq, + sizeof(float)+1); _gui->writeEvent(evSysexDelayLFOFreq); - char dataDelayLFODepth[2]; + char dataDelayLFODepth[sizeof(float)+1]; dataDelayLFODepth[0] = SYSEX_DELAYLFODEPTH; - dataDelayLFODepth[1] = (unsigned char)getDelayLFODepth(); + f = getDelayLFODepth(); + memcpy(&dataDelayLFODepth, &f, sizeof(float)+1); MidiEvent evSysexDelayLFODepth(0,ME_SYSEX, - (const unsigned char*)dataDelayLFODepth, 2); + (const unsigned char*)dataDelayLFODepth, + sizeof(float)+1); _gui->writeEvent(evSysexDelayLFODepth); } @@ -399,39 +416,41 @@ void DeicsOnzeGui::updateChorusFloatEntry(double v, int i) { //------------------------------------------------------------- // set Delay //------------------------------------------------------------- -void DeicsOnze::setDelayTime(int val) { - float res = MINDELAYTIME + (MAXDELAYTIME - MINDELAYTIME)*((float)val/255.0); - _pluginIDelay->controller(0)->setCurVal(res); +void DeicsOnze::setDelayBPM(float val) { + _pluginIDelay->controller(0)->setCurVal(val); } -int DeicsOnze::getDelayTime() { - float dtf = _pluginIDelay->controller(0)->curVal().f; - return (int)(((dtf - MINDELAYTIME) / (MAXDELAYTIME - MINDELAYTIME))*255.0); +void DeicsOnze::setDelayBeatRatio(float val) { + _pluginIDelay->controller(1)->setCurVal(val); } -void DeicsOnze::setDelayFeedback(int val) { - float res = (float)(val - 128)/128.0; - _pluginIDelay->controller(1)->setCurVal(res); +float DeicsOnze::getDelayBPM() { + float dtf = _pluginIDelay->controller(0)->curVal().f; + return dtf; } -int DeicsOnze::getDelayFeedback() { +float DeicsOnze::getDelayBeatRatio() { float dtf = _pluginIDelay->controller(1)->curVal().f; - return (int)(dtf*128.0+128.0); + return dtf; } -void DeicsOnze::setDelayLFOFreq(int val) { - float res = MINFREQ + (MAXFREQ - MINFREQ)*((float)val/255.0); - _pluginIDelay->controller(2)->setCurVal(res); +void DeicsOnze::setDelayFeedback(float val) { + _pluginIDelay->controller(2)->setCurVal(val); } -int DeicsOnze::getDelayLFOFreq() { +float DeicsOnze::getDelayFeedback() { float dtf = _pluginIDelay->controller(2)->curVal().f; - return (int)(((dtf - MINFREQ) / (MAXFREQ - MINFREQ))*255.0); + return dtf; +} +void DeicsOnze::setDelayLFOFreq(float val) { + _pluginIDelay->controller(3)->setCurVal(val); +} +float DeicsOnze::getDelayLFOFreq() { + float dtf = _pluginIDelay->controller(3)->curVal().f; + return dtf; } -void DeicsOnze::setDelayLFODepth(int val) { - float res = (float)val/255.0; - _pluginIDelay->controller(3)->setCurVal(res); +void DeicsOnze::setDelayLFODepth(float val) { + _pluginIDelay->controller(4)->setCurVal(val); } -int DeicsOnze::getDelayLFODepth() { - float dtd = _pluginIDelay->controller(3)->curVal().f; - return (int)(dtd*255.0); +float DeicsOnze::getDelayLFODepth() { + float dtd = _pluginIDelay->controller(4)->curVal().f; + return dtd; } -void DeicsOnze::setDelayDryWet(int val) { - float res = (float)val/255.0; - _pluginIDelay->controller(4)->setCurVal(res); +void DeicsOnze::setDelayDryWet(float val) { + _pluginIDelay->controller(5)->setCurVal(val); } -- cgit v1.2.3