1 //=========================================================================== 2 // 3 // DeicsOnze an emulator of the YAMAHA DX11 synthesizer 4 // 5 // Version 0.5.5 6 // 7 // 8 // 9 // 10 // Copyright (c) 2004-2006 Nil Geisweiller 11 // 12 // 13 // 14 // This program is free software; you can redistribute it and/or 15 // modify it under the terms of the GNU General Public License 16 // as published by the Free Software Foundation; either version 2 17 // of the License, or (at your option) any later version. 18 // 19 // This program is distributed in the hope that it will be useful, 20 // but WITHOUT ANY WARRANTY; without even the implied warranty of 21 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 // GNU General Public License for more details. 23 // 24 // You should have received a copy of the GNU General Public License 25 // along with this program; if not, write to the Free Software 26 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 27 // 02111-1301, USA or point your web browser to http://www.gnu.org. 28 //=========================================================================== 29 30 31 #ifndef __DEICSONZE_H 32 #define __DEICSONZE_H 33 34 #include <list> 35 36 #include "common_defs.h" 37 #include "deicsonzepreset.h" 38 #include "deicsonzegui.h" 39 #include "deicsonzeplugin.h" 40 #include "deicsonzefilter.h" 41 #include "libsynti/mess.h" 42 #include "libsimpleplugin/simpler_plugin.h" 43 44 #define DEICSONZESTR "deicsonze" 45 46 #define MAXPITCHBENDVALUE 8191 47 48 #define RESOLUTION 96000 49 50 #define MAXFXBUFFERSIZE 48000 51 #define NBRFXINPUTS 2 52 #define NBRFXOUTPUTS 2 53 54 #define NBRCTRLS 127 55 56 #define NBRPRESETS 128 57 58 #define LOWERNOTEFREQ 8.176 59 60 #define DB0LEVEL 90 61 62 #define LENGTHNAME 20 63 #define LENGTHCATEGORY 20 64 #define LENGTHSUBCATEGORY 20 65 66 #define MAXVELO 127 67 #define MAXVOLUME 100.0 68 #define MAXSTRLENGTHINITSETPATH 256 69 #define MAXSTRLENGTHBACKGROUNDPIXPATH 256 70 #define MAXSTRLENGTHFXLIB 256 71 #define MAXSTRLENGTHFXLABEL 256 72 73 #define DB_MIN 25.0 74 75 //coef determined by ear to sound like the YAMAHA DX11 76 #define COEFFEEDBACK 0.3 77 #define COEFPLFO(x) (x==0?0.0:(x==1?0.06:(x==2?0.12:(x==3?0.25:(x==4?0.5:(x==5?0.9:(x==6?3.9:7.9))))))) //return pitch amplitude with respect to sensitivity pitch 78 #define COEFALFO(x) (x==0?0.0:(x==1?0.4:(x==2?0.9:1.0))) 79 #define MAX(x,y) (x<y?y:x) 80 #define COEFLEVEL 1.0//19.0 81 #define COEFMAXATTACK 7.5 82 #define COEFERRDECSUS 0.01 //for the transition between DECAY and SUSTAIN 83 #define COEFERRSUSREL 0.001 //from SUSTAIN or RELEASE until no sound 84 //#define ERRPORTA 0.001 //detection to stop portamento 85 #define COEFPORTA 0.01 //adjusted such that 10 second/octave with max porta 86 #define COEFPITCHENV 0.00000025 //adjust according to a real DX11....??? 87 #define COEFDECAY 1.0 88 #define COEFSUSTAIN 0.2 89 #define COEFRELEASE 1.0 90 #define COEFDETUNE 0.008 91 #define COEFLEVELSCALE 0.0005 92 #define COEFGATTACK 0.9 93 #define COEFGRELEASE 0.9 94 #define LEVELSCALENOTE 24.0 95 96 #define NBRWAVES 8 //number wave forms, do not change 97 #define NBRBANKPRESETS 32 98 #define MAXNBRVOICES 64 99 #define NBRCHANNELS 16 100 101 #define SYSEX_INIT_DATA 1 102 #define SYSEX_INIT_DATA_VERSION 1 103 //#define SYSEX_INIT_DATA_VERSION_2 2 104 ///#define SAVEINITLENGTH 2 105 #define SAVEINITLENGTH 4 // MFG ID, synth ID, init data command, init data version 106 107 #define DEICSONZECONFIGURATIONSTR "deicsOnzeConfiguation" 108 #define SYSEX_MASTERVOL 4 109 #define MASTERVOLSTR "MasterVolume" 110 #define MAXMASTERVOLUME 255 111 #define INITMASTERVOL 192 112 #define SYSEX_QUALITY 5 113 #define QUALITYSTR "Quality" 114 #define HIGHSTR "High" 115 #define MIDDLESTR "Middle" 116 #define LOWSTR "Low" 117 #define ULTRALOWSTR "UltraLow" 118 #define SYSEX_FONTSIZE 6 119 #define FONTSIZESTR "fontSize" 120 #define SYSEX_SAVECONFIG 7 121 #define SAVECONFIGSTR "SaveConfig" 122 #define SYSEX_SAVEONLYUSED 8 123 #define SAVEONLYUSEDSTR "SaveOnlyUsed" 124 #define YESSTRDEI "yes" 125 #define NOSTRDEI "no" 126 #define SYSEX_LOADSET 10 127 #define SYSEX_ISINITSET 12 128 #define ISINITSETSTR "IsInitSet" 129 #define SYSEX_INITSETPATH 13 130 #define INITSETPATHSTR "InitSetPath" 131 #define SYSEX_ISBACKGROUNDPIX 14 132 #define ISBACKGROUNDPIXSTR "IsBackgroundPix" 133 #define SYSEX_BACKGROUNDPIXPATH 15 134 #define BACKGROUNDPIXPATHSTR "backgroundPixPath" 135 #define SYSEX_COLORGUI 20 136 #define TEXTCOLORSTR "TextColor" 137 #define BACKGROUNDCOLORSTR "BackgroundColor" 138 #define EDITTEXTCOLORSTR "EditTextColor" 139 #define EDITBACKGROUNDCOLORSTR "EditBackgroundColor" 140 #define COLORSYSEXLENGTH 12 141 #define SYSEX_UPDATESETGUI 25 142 #define SYSEX_PANIC 30 143 #define SYSEX_CHORUSACTIV 40 144 #define SYSEX_CHORUSPARAM 41 145 #define SYSEX_REVERBACTIV 60 146 #define SYSEX_REVERBPARAM 61 147 #define SYSEX_CHORUSRETURN 80 148 #define SYSEX_REVERBRETURN 81 149 #define MAXFXRETURN 255 150 #define INITFXRETURN 192 151 #define SYSEX_SELECTREVERB 82 152 #define SYSEX_SELECTCHORUS 83 153 #define SYSEX_BUILDGUIREVERB 84 154 #define SYSEX_BUILDGUICHORUS 85 155 #define SYSEX_FILTER 90 156 #define FILTERSTR "Filter" 157 #define SYSEX_DELAYACTIV 91 158 #define SYSEX_DELAYRETURN 92 159 #define SYSEX_DELAYBPM 93 160 #define SYSEX_DELAYBEATRATIO 94 161 #define SYSEX_DELAYFEEDBACK 95 162 #define SYSEX_DELAYLFOFREQ 96 163 #define SYSEX_DELAYLFODEPTH 97 164 #define SYSEX_DELAYWETDRYMIX 98 165 166 //REVERB PARAMETERS 167 168 #define DEFAULTVOL 200 169 170 enum { 171 NUM_MASTERVOL = SAVEINITLENGTH, 172 NUM_CHANNEL_ENABLE, 173 NUM_CHANNEL_VOL = NUM_CHANNEL_ENABLE + NBRCHANNELS + 1, 174 NUM_CHANNEL_PAN = NUM_CHANNEL_VOL + NBRCHANNELS + 1, 175 NUM_CHANNEL_BRIGHTNESS = NUM_CHANNEL_PAN + NBRCHANNELS + 1, 176 NUM_CHANNEL_MODULATION = NUM_CHANNEL_BRIGHTNESS + 2*NBRCHANNELS +1, 177 NUM_CHANNEL_DETUNE = NUM_CHANNEL_MODULATION + NBRCHANNELS + 1, 178 NUM_CHANNEL_ATTACK = NUM_CHANNEL_DETUNE + NBRCHANNELS + 1, 179 NUM_CHANNEL_RELEASE = NUM_CHANNEL_ATTACK + NBRCHANNELS + 1, 180 NUM_CHANNEL_REVERB = NUM_CHANNEL_RELEASE + NBRCHANNELS + 1, 181 NUM_CHANNEL_CHORUS = NUM_CHANNEL_REVERB + NBRCHANNELS + 1, 182 NUM_CHANNEL_DELAY = NUM_CHANNEL_CHORUS + NBRCHANNELS + 1, 183 NUM_CURRENTPROG = NUM_CHANNEL_DELAY + NBRCHANNELS + 1, 184 NUM_CURRENTLBANK = NUM_CURRENTPROG + NBRCHANNELS + 1, 185 NUM_CURRENTHBANK = NUM_CURRENTLBANK + NBRCHANNELS + 1, 186 NUM_NBRVOICES = NUM_CURRENTHBANK + NBRCHANNELS + 1, 187 NUM_SAVEONLYUSED = NUM_NBRVOICES + NBRCHANNELS + 1, 188 NUM_SAVECONFIG, 189 NUM_RED_TEXT, 190 NUM_GREEN_TEXT, 191 NUM_BLUE_TEXT, 192 NUM_RED_BACKGROUND, 193 NUM_GREEN_BACKGROUND, 194 NUM_BLUE_BACKGROUND, 195 NUM_RED_EDITTEXT, 196 NUM_GREEN_EDITTEXT, 197 NUM_BLUE_EDITTEXT, 198 NUM_RED_EDITBACKGROUND, 199 NUM_GREEN_EDITBACKGROUND, 200 NUM_BLUE_EDITBACKGROUND, 201 NUM_QUALITY, 202 NUM_FILTER, 203 NUM_FONTSIZE, 204 NUM_ISINITSET, 205 NUM_INITSETPATH, 206 NUM_ISBACKGROUNDPIX = NUM_INITSETPATH + MAXSTRLENGTHINITSETPATH + 1, 207 NUM_BACKGROUNDPIXPATH, 208 NUM_IS_REVERB_ON = NUM_BACKGROUNDPIXPATH + MAXSTRLENGTHBACKGROUNDPIXPATH + 1, 209 NUM_REVERB_RETURN, 210 NUM_REVERB_PARAM_NBR, 211 NUM_REVERB_LIB, 212 NUM_REVERB_LABEL = NUM_REVERB_LIB + MAXSTRLENGTHFXLIB + 1, 213 NUM_IS_CHORUS_ON = NUM_REVERB_LABEL + MAXSTRLENGTHFXLABEL + 1, 214 NUM_CHORUS_RETURN, 215 NUM_CHORUS_PARAM_NBR, 216 NUM_CHORUS_LIB, 217 NUM_CHORUS_LABEL = NUM_CHORUS_LIB + MAXSTRLENGTHFXLIB + 1, 218 NUM_IS_DELAY_ON = NUM_CHORUS_LABEL + MAXSTRLENGTHFXLABEL + 1, 219 NUM_DELAY_RETURN, 220 NUM_DELAY_BPM, 221 NUM_DELAY_BEATRATIO = NUM_DELAY_BPM + sizeof(float), 222 NUM_DELAY_FEEDBACK = NUM_DELAY_BEATRATIO + sizeof(float), 223 NUM_DELAY_LFO_FREQ = NUM_DELAY_FEEDBACK + sizeof(float), 224 NUM_DELAY_LFO_DEPTH = NUM_DELAY_LFO_FREQ + sizeof(float), 225 NUM_CONFIGLENGTH = NUM_DELAY_LFO_DEPTH + sizeof(float) 226 //NUM_DELAY_WET_DRY_MIX = NUM_DELAY_LFO_DEPTH + sizeof(float), 227 //NUM_CONFIGLENGTH = NUM_DELAY_WET_DRY_MIX + sizeof(float) 228 }; 229 230 class DeicsOnzeGui; 231 class DeicsOnzePlugin; 232 233 //--------------------------------------------------------- 234 // outLevel2Amp, Amp for amplitude //between 0.0 and 2.0 or more 235 // 100->2.0, 90->1.0, 80->0.5 ... 236 //--------------------------------------------------------- 237 inline double outLevel2Amp(int ol); 238 239 //--------------------------------------------------------- 240 // level2amp, 241 // 255->0dB->1.0, 0->-27dB->0 242 //--------------------------------------------------------- 243 inline double level2amp(int l); 244 245 //--------------------------------------------------------- 246 // amp2level 247 // 1.0->0dB->255, 0->-27dB->0 248 //--------------------------------------------------------- 249 inline int amp2level(double amp); 250 251 //--------------------------------------------------------- 252 // amp2lowlevel 253 // 1.0->0dB->127, 0->-27dB->0 254 //--------------------------------------------------------- 255 inline int amp2lowlevel(double amp); 256 257 //--------------------------------------------------------- 258 // lowlevel2amp, 259 // 127->0dB->1.0, 0->-27dB->0 260 //--------------------------------------------------------- 261 inline double lowlevel2amp(int l); 262 263 //--------------------------------------------------------- 264 // envAR2s 265 // return the time in second of the ATTACK duration 266 //--------------------------------------------------------- 267 inline double envAR2s(int ar); 268 269 //--------------------------------------------------------- 270 // coefAttack 271 // convert the attack value to a coef for envInct 272 //--------------------------------------------------------- 273 inline double coefAttack(unsigned char attack); 274 275 //--------------------------------------------------------- 276 // envRR2coef 277 // return the coefficient for the exponential decrease 278 // with respect to rr and sampleRate, sr 279 //--------------------------------------------------------- 280 inline double envRR2coef(int rr, double sr, unsigned char release); 281 282 //-------------------------------------------------------- 283 // DeicsOnzeCtrl 284 //-------------------------------------------------------- 285 struct DeicsOnzeCtlr 286 { 287 std::string name; 288 int num; 289 int min, max; 290 }; 291 292 //--------------------------------------------------------- 293 // EnvState 294 //--------------------------------------------------------- 295 296 enum EnvState{ 297 ATTACK, 298 DECAY, 299 SUSTAIN, 300 RELEASE, 301 OFF 302 }; 303 304 //--------------------------------------------------------- 305 // OpVoice 306 //--------------------------------------------------------- 307 308 struct OpVoice { 309 double index; 310 double inct; 311 double targetInct; //used if portamento 312 double amp; //between 0 and 1 313 double ampVeloNote; //keeps the ratio amplitude from velo2AmpR and note2Amp 314 //in order to change independently the output level 315 //after pressing the note 316 EnvState envState; 317 double envIndex; 318 double envInct; 319 double envLevel; 320 double coefVLevel; 321 }; 322 323 //--------------------------------------------------------- 324 // PitchEnvState 325 //--------------------------------------------------------- 326 enum PitchEnvState{ 327 PHASE1, 328 PHASE2, 329 RELEASE_PE, 330 OFF_PE 331 }; 332 333 //--------------------------------------------------------- 334 // Voice 335 //--------------------------------------------------------- 336 337 struct Voice { 338 bool hasAttractor;//true iff the voice has an attractor (portamento occurring) 339 double attractor; //contains some coefficient for portamento TODO 340 PitchEnvState pitchEnvState; 341 double pitchEnvCoefInct; 342 double pitchEnvCoefInctPhase1; 343 double pitchEnvCoefInctPhase2; 344 double pitchEnvCoefInctPhase3; 345 double pitchEnvCoefInctRelease; 346 double pitchEnvCoefInctInct; 347 bool isOn; 348 bool keyOn; 349 bool isSustained; 350 int pitch; //number of the note 351 double volume; 352 OpVoice op[NBROP]; 353 float sampleFeedback; 354 }; 355 356 //--------------------------------------------------------- 357 // Channel 358 //--------------------------------------------------------- 359 struct Channel { 360 bool isEnable; 361 float ampLeft; 362 float ampRight; 363 int volume; //0 to 255 364 int pan; //TODO -63 +64 or -127 +128 365 int modulation;//0 to 127 366 int detune;//-31 to 31 367 int brightness; //0 to 4095 368 int attack; //0 to 127 369 int release; //0 to 127 370 float feedbackAmp; 371 float lfoFreq; 372 float lfoPitch; 373 float lfoMaxCoefInct; 374 float lfoCoefInct; 375 float lfoCoefInctInct; 376 unsigned int lfoIndex; 377 unsigned int lfoMaxIndex; 378 float lfoMaxAmp; 379 float lfoMaxDAmp; 380 float lfoAmp; 381 float lfoCoefAmp; 382 double lfoDelayIndex; 383 double lfoDelayInct; 384 double lfoDelayMaxIndex; 385 bool delayPassed; 386 bool sustain; 387 double pitchBendCoef;//speed coef to read the sample 388 unsigned char nbrVoices; 389 Voice voices[MAXNBRVOICES]; 390 double lastInc[NBROP]; 391 std::list<int> lastVoiceKeyOn; //stack of the voice number 392 int lastVoiceKeyOff; 393 bool isLastNote; 394 //FX 395 float chorusAmount; //between 0.0 and 1.0 396 float reverbAmount; //between 0.0 and 1.0 397 float delayAmount; //between 0.0 and 1.0 398 }; 399 400 //--------------------------------------------------------- 401 // Global 402 //--------------------------------------------------------- 403 enum Quality { 404 high, 405 middle, 406 low, 407 ultralow 408 }; 409 410 struct Global { 411 float masterVolume; 412 Quality quality; //high, middle, low 413 int qualityCounter; //counter to skip some sample depending on quality 414 int qualityCounterTop; //number of sample - 1 to skip 415 double deiSampleRate; //depending on quality deicsOnze sample rate varies 416 bool filter; //low passe filter used when the sampling is low 417 int fontSize; 418 float lastLeftSample; 419 float lastRightSample; 420 float lastInputLeftChorusSample; 421 float lastInputRightChorusSample; 422 float lastInputLeftReverbSample; 423 float lastInputRightReverbSample; 424 float lastInputLeftDelaySample; 425 float lastInputRightDelaySample; 426 Channel channel[NBRCHANNELS]; 427 bool isChorusActivated; 428 float chorusReturn; 429 bool isReverbActivated; 430 float reverbReturn; 431 bool isDelayActivated; 432 float delayReturn; 433 }; 434 435 //--------------------------------------------------------- 436 // DeicsOnze : DX11 emulator 437 //--------------------------------------------------------- 438 439 class DeicsOnze : public Mess { 440 DeicsOnzeGui* _gui; 441 442 unsigned char* initBuffer; 443 int initLen; 444 445 static int useCount; 446 static float waveTable[NBRWAVES][RESOLUTION]; 447 448 private: 449 void parseInitData(int length, const unsigned char* data); 450 void loadConfiguration(QString fileName); 451 void setupInitBuffer(int len); 452 453 public: 454 float** tempInputChorus; 455 float** tempOutputChorus; 456 float** tempInputReverb; 457 float** tempOutputReverb; 458 float** tempInputDelay; 459 float** tempOutputDelay; 460 461 float* getSinusWaveTable(); 462 463 int nbrCtrl; 464 465 QString _initSetPath; 466 bool _isInitSet; 467 QString _backgroundPixPath; 468 bool _isBackgroundPix; 469 bool _saveOnlyUsed; 470 bool _saveConfig; 471 DeicsOnzeCtlr _ctrl[NBRCTRLS]; 472 Global _global; 473 Preset* _preset[NBRCHANNELS]; 474 Preset* _initialPreset; 475 476 //FX 477 MusESimplePlugin::PluginI* _pluginIReverb; 478 MusESimplePlugin::PluginI* _pluginIChorus; 479 MusESimplePlugin::PluginI* _pluginIDelay; 480 481 void initPluginReverb(MusESimplePlugin::Plugin*); 482 void initPluginChorus(MusESimplePlugin::Plugin*); 483 void initPluginDelay(MusESimplePlugin::Plugin*); 484 485 void setReverbParam(int i, float val); 486 float getReverbParam(int i) const; 487 void setChorusParam(int i, float val); 488 float getChorusParam(int i) const; 489 void setDelayParam(int i, float val); 490 float getDelayParam(int i) const; 491 void setDelayBPM(float val); 492 void setDelayBeatRatio(float val); 493 void setDelayFeedback(float val); 494 void setDelayLFOFreq(float val); 495 void setDelayLFODepth(float val); 496 void setDelayDryWet(float val); 497 float getDelayDryWet() const; 498 float getDelayBPM() const; 499 float getDelayBeatRatio() const; 500 float getDelayFeedback() const; 501 float getDelayLFOFreq() const; 502 float getDelayLFODepth() const; 503 504 //Filter 505 LowFilter* _dryFilter; 506 LowFilter* _chorusFilter; 507 LowFilter* _reverbFilter; 508 LowFilter* _delayFilter; 509 510 mutable MidiPatch _patch; 511 mutable int _numPatchProg; //used by getPatchInfo 512 513 //preset tree 514 Set* _set; 515 516 void setSampleRate(int sr); 517 Preset* findPreset(int hbank, int lbank, int prog) const; 518 Subcategory* findSubcategory(int hbank, int lbank) const; 519 Category* findCategory(int hbank) const; 520 void initCtrls(); 521 void initGlobal(); 522 void initChannels(); 523 void initChannel(int c); 524 void resetVoices(); //when panic is pressed 525 void initVoice(int c, int v); 526 void initVoices(int c); 527 void setPreset(int c); 528 void setFeedback(int c); 529 void setLfo(int c); 530 void setOutLevel(int c, int k); //set the output level of the op k 531 void setOutLevel(int c); //do the same for all operators 532 void setEnvAttack(int c, int v, int k); //set envInct of voice v and op k 533 void setEnvAttack(int c, int k); //do the same for all voices of operator k 534 void setEnvAttack(int c); //do the same for all voices all operators 535 void setEnvRelease(int c, int v, int k); //set coefVLevel of voice v and op k 536 void setEnvRelease(int c, int k); //do the same for all voices of operator k 537 void setEnvRelease(int c); //do the same for all voices all operators 538 void setPitchEnvRelease(int c, int v); 539 void setQuality(Quality q); 540 void setFilter(bool f); 541 double brightness2Amp(int c, int k); //get the brightness of the operator k 542 void loadSutulaPresets(); 543 void loadSet(QString s); 544 int noteOff2Voice(int c); //return the first free voice 545 int minVolu2Voice(int c); 546 int pitchOn2Voice(int c, int pitch); 547 void programSelect(int c, int hbank, int lbank, int prog); 548 bool existsKeyOn(int ch); 549 void setNbrVoices(int c, int nv); 550 void setMasterVol(int v); 551 void setChannelEnable(int c, bool e); 552 void setChannelVol(int c, int v); 553 void setChannelPan(int c, int v); 554 void applyChannelAmp(int c); 555 void setChannelDetune(int c, int d); 556 void setChannelBrightness(int c, int b); 557 void setChannelModulation(int c, int m); 558 void setChannelAttack(int c, int a); 559 void setChannelRelease(int c, int r); 560 void setChannelReverb(int c, int r); 561 void setChannelChorus(int c, int val); 562 void setChannelDelay(int c, int val); 563 void setChorusReturn(int val); 564 void setReverbReturn(int val); 565 void setDelayReturn(int val); 566 bool getChannelEnable(int c) const; 567 int getNbrVoices(int c) const; 568 int getMasterVol(void) const; 569 bool getFilter(void) const; 570 int getChannelVol(int c) const; 571 int getChannelPan(int c) const; 572 int getChannelDetune(int c) const; 573 int getChannelBrightness(int c) const; 574 int getChannelModulation(int c) const; 575 int getChannelAttack(int c) const; 576 int getChannelRelease(int c) const; 577 int getChannelReverb(int c) const; 578 int getChannelChorus(int c) const; 579 int getChannelDelay(int c) const; 580 int getChorusReturn(void) const; 581 int getReverbReturn(void) const; 582 int getDelayReturn(void) const; 583 void setPitchBendCoef(int c, int val); 584 void setModulation(int c, int val); //TODO check between setChannelModulation 585 void setSustain(int c, int val); 586 587 void readConfiguration(QDomNode qdn); 588 void writeConfiguration(AL::Xml* xml); 589 590 bool setController(int ch, int ctrl, int val, bool fromGui); 591 virtual bool setController(int ch, int ctrl, int val); 592 bool sysex(int length, const unsigned char* data, bool fromGui); 593 virtual bool sysex(int l, const unsigned char* d); 594 595 virtual const char* getPatchName(int ch, int number, bool) const; 596 virtual const MidiPatch* getPatchInfo(int, const MidiPatch *) const; 597 598 virtual int getControllerInfo(int arg1, const char** arg2, 599 int* arg3, int* arg4, int* arg5, int* arg6) const; 600 virtual void getInitData(int* length, const unsigned char** data); 601 // This is only a kludge required to support old songs' midistates. Do not use in any new synth. 602 virtual int oldMidiStateHeader(const unsigned char** data) const; 603 604 virtual bool playNote(int channel, int pitch, int velo); 605 virtual void processMessages(); 606 virtual void process(unsigned pos, float** buffer, int offset, int n); 607 608 // GUI interface routines hasNativeGui()609 virtual bool hasNativeGui() const { return true; } 610 virtual bool nativeGuiVisible() const; 611 virtual void showNativeGui(bool); 612 virtual void getNativeGeometry(int* x, int* y, int* w, int* h) const; 613 virtual void setNativeGeometry(int, int, int, int); 614 615 DeicsOnze(); 616 virtual ~DeicsOnze(); 617 }; 618 619 extern QString DEI_hostConfigPath; 620 extern QString DEI_hostCachePath; 621 extern QString DEI_sharePath; 622 extern unsigned int DEI_segmentSize; 623 extern int DEI_sampleRate; 624 extern bool DEI_useDenormalBias; 625 extern float DEI_denormalBias; 626 627 #endif /* __DEICSONZE_H */ 628