Audio plugin host https://kx.studio/carla
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

zynaddsubfx-fx.cpp 44KB

11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
9 years ago
10 years ago
9 years ago
10 years ago
9 years ago
10 years ago
9 years ago
10 years ago
9 years ago
10 years ago
9 years ago
10 years ago
9 years ago
10 years ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490
  1. /*
  2. * Carla Native Plugins
  3. * Copyright (C) 2012-2017 Filipe Coelho <falktx@falktx.com>
  4. *
  5. * This program is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU General Public License as
  7. * published by the Free Software Foundation; either version 2 of
  8. * the License, or any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * For a full copy of the GNU General Public License see the doc/GPL.txt file.
  16. */
  17. #include "CarlaNative.hpp"
  18. #include "CarlaMathUtils.hpp"
  19. #include "Effects/Alienwah.h"
  20. #include "Effects/Chorus.h"
  21. #include "Effects/Distorsion.h"
  22. #include "Effects/DynamicFilter.h"
  23. #include "Effects/Echo.h"
  24. #include "Effects/Phaser.h"
  25. #include "Effects/Reverb.h"
  26. #include "Misc/Allocator.h"
  27. #include "AppConfig.h"
  28. #include "juce_audio_basics/juce_audio_basics.h"
  29. using juce::roundToIntAccurate;
  30. using juce::FloatVectorOperations;
  31. using juce::SharedResourcePointer;
  32. // -----------------------------------------------------------------------
  33. template<class ZynFX>
  34. class FxAbstractPlugin : public NativePluginClass
  35. {
  36. protected:
  37. FxAbstractPlugin(const NativeHostDescriptor* const host, const uint32_t paramCount, const uint32_t programCount)
  38. : NativePluginClass(host),
  39. fParamCount(paramCount-2), // volume and pan handled by host
  40. fProgramCount(programCount),
  41. fParamValues(new uchar[paramCount]),
  42. fParamsChanged(new bool[paramCount]),
  43. fNextProgram(-1),
  44. fBufferSize(getBufferSize()),
  45. fSampleRate(getSampleRate()),
  46. fFilterParams(nullptr),
  47. fEffect(nullptr),
  48. efxoutl(nullptr),
  49. efxoutr(nullptr)
  50. {
  51. const int ibufferSize(static_cast<int>(fBufferSize));
  52. efxoutl = new float[fBufferSize];
  53. efxoutr = new float[fBufferSize];
  54. FloatVectorOperations::clear(efxoutl, ibufferSize);
  55. FloatVectorOperations::clear(efxoutr, ibufferSize);
  56. std::memset(fParamsChanged, 0, sizeof(bool)*fParamCount);
  57. doReinit(true);
  58. }
  59. ~FxAbstractPlugin() override
  60. {
  61. if (efxoutl != nullptr)
  62. {
  63. delete[] efxoutl;
  64. efxoutl = nullptr;
  65. }
  66. if (efxoutr != nullptr)
  67. {
  68. delete[] efxoutr;
  69. efxoutr = nullptr;
  70. }
  71. if (fEffect != nullptr)
  72. {
  73. delete fEffect;
  74. fEffect = nullptr;
  75. }
  76. }
  77. // -------------------------------------------------------------------
  78. // Plugin parameter calls
  79. uint32_t getParameterCount() const final
  80. {
  81. return fParamCount;
  82. }
  83. float getParameterValue(const uint32_t index) const final
  84. {
  85. return static_cast<float>(fEffect->getpar(static_cast<int>(index+2)));
  86. }
  87. // -------------------------------------------------------------------
  88. // Plugin midi-program calls
  89. uint32_t getMidiProgramCount() const final
  90. {
  91. return fProgramCount;
  92. }
  93. // -------------------------------------------------------------------
  94. // Plugin state calls
  95. void setParameterValue(const uint32_t index, const float value) final
  96. {
  97. const int ivalue(roundToIntAccurate(carla_fixedValue(0.0f, 127.0f, value)));
  98. fParamValues[index] = static_cast<uchar>(ivalue);
  99. fParamsChanged[index] = true;
  100. }
  101. void setMidiProgram(const uint8_t, const uint32_t, const uint32_t program) final
  102. {
  103. fNextProgram = program;
  104. }
  105. // -------------------------------------------------------------------
  106. // Plugin process calls
  107. void activate() final
  108. {
  109. fEffect->cleanup();
  110. }
  111. void process(float** const inBuffer, float** const outBuffer, const uint32_t frames, const NativeMidiEvent* const, const uint32_t) final
  112. {
  113. const int iframes(static_cast<int>(frames));
  114. if (outBuffer[0] != inBuffer[0])
  115. FloatVectorOperations::copyWithMultiply(outBuffer[0], inBuffer[0], 0.5f, iframes);
  116. else
  117. FloatVectorOperations::multiply(outBuffer[0], 0.5f, iframes);
  118. if (outBuffer[1] != inBuffer[1])
  119. FloatVectorOperations::copyWithMultiply(outBuffer[1], inBuffer[1], 0.5f, iframes);
  120. else
  121. FloatVectorOperations::multiply(outBuffer[1], 0.5f, iframes);
  122. const int32_t nextProgram = fNextProgram;
  123. fNextProgram = -1;
  124. if (nextProgram >= 0)
  125. {
  126. fEffect->setpreset(static_cast<uchar>(nextProgram));
  127. // reset volume and pan
  128. fEffect->changepar(0, 127);
  129. fEffect->changepar(1, 64);
  130. // ignore next
  131. std::memset(fParamsChanged, 0, sizeof(bool)*fParamCount);
  132. }
  133. else
  134. {
  135. for (int i=0, count=static_cast<int>(fParamCount); i<count; ++i)
  136. {
  137. if (! fParamsChanged[i])
  138. continue;
  139. fEffect->changepar(i+2, fParamValues[i]);
  140. fParamsChanged[i] = false;
  141. }
  142. }
  143. fEffect->out(Stereo<float*>(inBuffer[0], inBuffer[1]));
  144. FloatVectorOperations::addWithMultiply(outBuffer[0], efxoutl, 0.5f, iframes);
  145. FloatVectorOperations::addWithMultiply(outBuffer[1], efxoutr, 0.5f, iframes);
  146. }
  147. // -------------------------------------------------------------------
  148. // Plugin dispatcher
  149. void bufferSizeChanged(const uint32_t bufferSize) final
  150. {
  151. if (fBufferSize == bufferSize)
  152. return;
  153. fBufferSize = bufferSize;
  154. const int ibufferSize(static_cast<int>(fBufferSize));
  155. delete[] efxoutl;
  156. delete[] efxoutr;
  157. efxoutl = new float[bufferSize];
  158. efxoutr = new float[bufferSize];
  159. FloatVectorOperations::clear(efxoutl, ibufferSize);
  160. FloatVectorOperations::clear(efxoutr, ibufferSize);
  161. doReinit(false);
  162. }
  163. void sampleRateChanged(const double sampleRate) final
  164. {
  165. if (fSampleRate == sampleRate)
  166. return;
  167. fSampleRate = sampleRate;
  168. doReinit(false);
  169. }
  170. void doReinit(const bool firstInit)
  171. {
  172. uchar params[fParamCount];
  173. if (fEffect != nullptr)
  174. {
  175. for (int i=0, count=static_cast<int>(fParamCount); i<count; ++i)
  176. params[i] = fEffect->getpar(i+2);
  177. delete fEffect;
  178. }
  179. EffectParams pars(fAllocator.getObject(), false, efxoutl, efxoutr, 0,
  180. static_cast<uint>(fSampleRate), static_cast<int>(fBufferSize), &fFilterParams);
  181. fEffect = new ZynFX(pars);
  182. if (firstInit)
  183. {
  184. fEffect->setpreset(0);
  185. for (int i=0, count=static_cast<int>(fParamCount); i<count; ++i)
  186. fParamValues[i] = fEffect->getpar(i+2);
  187. }
  188. else
  189. {
  190. for (int i=0, count=static_cast<int>(fParamCount); i<count; ++i)
  191. fEffect->changepar(i+2, params[i]);
  192. }
  193. // reset volume and pan
  194. fEffect->changepar(0, 127);
  195. fEffect->changepar(1, 64);
  196. }
  197. // -------------------------------------------------------------------
  198. const uint32_t fParamCount;
  199. const uint32_t fProgramCount;
  200. uchar* const fParamValues;
  201. bool* const fParamsChanged;
  202. int32_t fNextProgram;
  203. uint32_t fBufferSize;
  204. double fSampleRate;
  205. FilterParams fFilterParams;
  206. Effect* fEffect;
  207. float* efxoutl;
  208. float* efxoutr;
  209. // FIXME - is this thread-safe?
  210. SharedResourcePointer<AllocatorClass> fAllocator;
  211. CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(FxAbstractPlugin)
  212. };
  213. // -----------------------------------------------------------------------
  214. class FxAlienWahPlugin : public FxAbstractPlugin<Alienwah>
  215. {
  216. public:
  217. FxAlienWahPlugin(const NativeHostDescriptor* const host)
  218. : FxAbstractPlugin(host, 11, 4) {}
  219. protected:
  220. // -------------------------------------------------------------------
  221. // Plugin parameter calls
  222. const NativeParameter* getParameterInfo(const uint32_t index) const override
  223. {
  224. if (index >= fParamCount)
  225. return nullptr;
  226. static NativeParameter param;
  227. static NativeParameterScalePoint scalePoints[2];
  228. int hints = NATIVE_PARAMETER_IS_ENABLED|NATIVE_PARAMETER_IS_INTEGER;
  229. param.name = nullptr;
  230. param.unit = nullptr;
  231. param.ranges.def = 1.0f;
  232. param.ranges.min = 0.0f;
  233. param.ranges.max = 127.0f;
  234. param.ranges.step = 1.0f;
  235. param.ranges.stepSmall = 1.0f;
  236. param.ranges.stepLarge = 20.0f;
  237. param.scalePointCount = 0;
  238. param.scalePoints = nullptr;
  239. switch (index)
  240. {
  241. case 0:
  242. hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
  243. param.name = "LFO Frequency";
  244. param.ranges.def = 70.0f;
  245. break;
  246. case 1:
  247. hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
  248. param.name = "LFO Randomness";
  249. param.ranges.def = 0.0f;
  250. break;
  251. case 2:
  252. hints |= NATIVE_PARAMETER_IS_AUTOMABLE|NATIVE_PARAMETER_IS_BOOLEAN|NATIVE_PARAMETER_USES_SCALEPOINTS;
  253. param.name = "LFO Type";
  254. param.ranges.def = 0.0f;
  255. param.ranges.max = 1.0f;
  256. param.scalePointCount = 2;
  257. param.scalePoints = scalePoints;
  258. scalePoints[0].label = "Sine";
  259. scalePoints[1].label = "Triangle";
  260. scalePoints[0].value = 0.0f;
  261. scalePoints[1].value = 1.0f;
  262. break;
  263. case 3:
  264. hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
  265. param.name = "LFO Stereo";
  266. param.ranges.def = 62.0f;
  267. break;
  268. case 4:
  269. hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
  270. param.name = "Depth";
  271. param.ranges.def = 60.0f;
  272. break;
  273. case 5:
  274. hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
  275. param.name = "Feedback";
  276. param.ranges.def = 105.0f;
  277. break;
  278. case 6:
  279. param.name = "Delay";
  280. param.ranges.def = 25.0f;
  281. param.ranges.min = 1.0f;
  282. param.ranges.max = 100.0f;
  283. break;
  284. case 7:
  285. hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
  286. param.name = "L/R Cross";
  287. param.ranges.def = 0.0f;
  288. break;
  289. case 8:
  290. hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
  291. param.name = "Phase";
  292. param.ranges.def = 64.0f;
  293. break;
  294. }
  295. param.hints = static_cast<NativeParameterHints>(hints);
  296. return &param;
  297. }
  298. // -------------------------------------------------------------------
  299. // Plugin midi-program calls
  300. const NativeMidiProgram* getMidiProgramInfo(const uint32_t index) const override
  301. {
  302. if (index >= fProgramCount)
  303. return nullptr;
  304. static NativeMidiProgram midiProg;
  305. midiProg.bank = 0;
  306. midiProg.program = index;
  307. switch (index)
  308. {
  309. case 0:
  310. midiProg.name = "AlienWah1";
  311. break;
  312. case 1:
  313. midiProg.name = "AlienWah2";
  314. break;
  315. case 2:
  316. midiProg.name = "AlienWah3";
  317. break;
  318. case 3:
  319. midiProg.name = "AlienWah4";
  320. break;
  321. default:
  322. midiProg.name = nullptr;
  323. break;
  324. }
  325. return &midiProg;
  326. }
  327. // -------------------------------------------------------------------
  328. PluginClassEND(FxAlienWahPlugin)
  329. CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(FxAlienWahPlugin)
  330. };
  331. // -----------------------------------------------------------------------
  332. class FxChorusPlugin : public FxAbstractPlugin<Chorus>
  333. {
  334. public:
  335. FxChorusPlugin(const NativeHostDescriptor* const host)
  336. : FxAbstractPlugin(host, 12, 10) {}
  337. protected:
  338. // -------------------------------------------------------------------
  339. // Plugin parameter calls
  340. const NativeParameter* getParameterInfo(const uint32_t index) const override
  341. {
  342. if (index >= fParamCount)
  343. return nullptr;
  344. static NativeParameter param;
  345. static NativeParameterScalePoint scalePoints[2];
  346. int hints = NATIVE_PARAMETER_IS_ENABLED|NATIVE_PARAMETER_IS_INTEGER;
  347. param.name = nullptr;
  348. param.unit = nullptr;
  349. param.ranges.def = 1.0f;
  350. param.ranges.min = 0.0f;
  351. param.ranges.max = 127.0f;
  352. param.ranges.step = 1.0f;
  353. param.ranges.stepSmall = 1.0f;
  354. param.ranges.stepLarge = 20.0f;
  355. param.scalePointCount = 0;
  356. param.scalePoints = nullptr;
  357. switch (index)
  358. {
  359. case 0:
  360. hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
  361. param.name = "LFO Frequency";
  362. param.ranges.def = 50.0f;
  363. break;
  364. case 1:
  365. hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
  366. param.name = "LFO Randomness";
  367. param.ranges.def = 0.0f;
  368. break;
  369. case 2:
  370. hints |= NATIVE_PARAMETER_IS_AUTOMABLE|NATIVE_PARAMETER_IS_BOOLEAN|NATIVE_PARAMETER_USES_SCALEPOINTS;
  371. param.name = "LFO Type";
  372. param.ranges.def = 0.0f;
  373. param.ranges.max = 1.0f;
  374. param.scalePointCount = 2;
  375. param.scalePoints = scalePoints;
  376. scalePoints[0].label = "Sine";
  377. scalePoints[1].label = "Triangle";
  378. scalePoints[0].value = 0.0f;
  379. scalePoints[1].value = 1.0f;
  380. break;
  381. case 3:
  382. hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
  383. param.name = "LFO Stereo";
  384. param.ranges.def = 90.0f;
  385. break;
  386. case 4:
  387. hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
  388. param.name = "Depth";
  389. param.ranges.def = 40.0f;
  390. break;
  391. case 5:
  392. hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
  393. param.name = "Delay";
  394. param.ranges.def = 85.0f;
  395. break;
  396. case 6:
  397. hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
  398. param.name = "Feedback";
  399. param.ranges.def = 64.0f;
  400. break;
  401. case 7:
  402. hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
  403. param.name = "L/R Cross";
  404. param.ranges.def = 119.0f;
  405. break;
  406. case 8:
  407. hints |= NATIVE_PARAMETER_IS_AUTOMABLE|NATIVE_PARAMETER_IS_BOOLEAN;
  408. param.name = "Flange Mode";
  409. param.ranges.def = 0.0f;
  410. param.ranges.max = 1.0f;
  411. break;
  412. case 9:
  413. hints |= NATIVE_PARAMETER_IS_AUTOMABLE|NATIVE_PARAMETER_IS_BOOLEAN;
  414. param.name = "Subtract Output";
  415. param.ranges.def = 0.0f;
  416. param.ranges.max = 1.0f;
  417. break;
  418. }
  419. param.hints = static_cast<NativeParameterHints>(hints);
  420. return &param;
  421. }
  422. // -------------------------------------------------------------------
  423. // Plugin midi-program calls
  424. const NativeMidiProgram* getMidiProgramInfo(const uint32_t index) const override
  425. {
  426. if (index >= fProgramCount)
  427. return nullptr;
  428. static NativeMidiProgram midiProg;
  429. midiProg.bank = 0;
  430. midiProg.program = index;
  431. switch (index)
  432. {
  433. case 0:
  434. midiProg.name = "Chorus1";
  435. break;
  436. case 1:
  437. midiProg.name = "Chorus2";
  438. break;
  439. case 2:
  440. midiProg.name = "Chorus3";
  441. break;
  442. case 3:
  443. midiProg.name = "Celeste1";
  444. break;
  445. case 4:
  446. midiProg.name = "Celeste2";
  447. break;
  448. case 5:
  449. midiProg.name = "Flange1";
  450. break;
  451. case 6:
  452. midiProg.name = "Flange2";
  453. break;
  454. case 7:
  455. midiProg.name = "Flange3";
  456. break;
  457. case 8:
  458. midiProg.name = "Flange4";
  459. break;
  460. case 9:
  461. midiProg.name = "Flange5";
  462. break;
  463. default:
  464. midiProg.name = nullptr;
  465. break;
  466. }
  467. return &midiProg;
  468. }
  469. // -------------------------------------------------------------------
  470. PluginClassEND(FxChorusPlugin)
  471. CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(FxChorusPlugin)
  472. };
  473. // -----------------------------------------------------------------------
  474. class FxDistortionPlugin : public FxAbstractPlugin<Distorsion>
  475. {
  476. public:
  477. FxDistortionPlugin(const NativeHostDescriptor* const host)
  478. : FxAbstractPlugin(host, 11, 6) {}
  479. protected:
  480. // -------------------------------------------------------------------
  481. // Plugin parameter calls
  482. const NativeParameter* getParameterInfo(const uint32_t index) const override
  483. {
  484. if (index >= fParamCount)
  485. return nullptr;
  486. static NativeParameter param;
  487. static NativeParameterScalePoint scalePoints[14];
  488. int hints = NATIVE_PARAMETER_IS_ENABLED|NATIVE_PARAMETER_IS_INTEGER;
  489. param.name = nullptr;
  490. param.unit = nullptr;
  491. param.ranges.def = 1.0f;
  492. param.ranges.min = 0.0f;
  493. param.ranges.max = 127.0f;
  494. param.ranges.step = 1.0f;
  495. param.ranges.stepSmall = 1.0f;
  496. param.ranges.stepLarge = 20.0f;
  497. param.scalePointCount = 0;
  498. param.scalePoints = nullptr;
  499. switch (index)
  500. {
  501. case 0:
  502. hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
  503. param.name = "L/R Cross";
  504. param.ranges.def = 35.0f;
  505. break;
  506. case 1:
  507. hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
  508. param.name = "Drive";
  509. param.ranges.def = 56.0f;
  510. break;
  511. case 2:
  512. hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
  513. param.name = "Level";
  514. param.ranges.def = 70.0f;
  515. break;
  516. case 3:
  517. hints |= NATIVE_PARAMETER_IS_AUTOMABLE|NATIVE_PARAMETER_USES_SCALEPOINTS;
  518. param.name = "Type";
  519. param.ranges.def = 0.0f;
  520. param.ranges.max = 13.0f;
  521. param.scalePointCount = 14;
  522. param.scalePoints = scalePoints;
  523. scalePoints[ 0].label = "Arctangent";
  524. scalePoints[ 1].label = "Asymmetric";
  525. scalePoints[ 2].label = "Pow";
  526. scalePoints[ 3].label = "Sine";
  527. scalePoints[ 4].label = "Quantisize";
  528. scalePoints[ 5].label = "Zigzag";
  529. scalePoints[ 6].label = "Limiter";
  530. scalePoints[ 7].label = "Upper Limiter";
  531. scalePoints[ 8].label = "Lower Limiter";
  532. scalePoints[ 9].label = "Inverse Limiter";
  533. scalePoints[10].label = "Clip";
  534. scalePoints[11].label = "Asym2";
  535. scalePoints[12].label = "Pow2";
  536. scalePoints[13].label = "Sigmoid";
  537. scalePoints[ 0].value = 0.0f;
  538. scalePoints[ 1].value = 1.0f;
  539. scalePoints[ 2].value = 2.0f;
  540. scalePoints[ 3].value = 3.0f;
  541. scalePoints[ 4].value = 4.0f;
  542. scalePoints[ 5].value = 5.0f;
  543. scalePoints[ 6].value = 6.0f;
  544. scalePoints[ 7].value = 7.0f;
  545. scalePoints[ 8].value = 8.0f;
  546. scalePoints[ 9].value = 9.0f;
  547. scalePoints[10].value = 10.0f;
  548. scalePoints[11].value = 11.0f;
  549. scalePoints[12].value = 12.0f;
  550. scalePoints[13].value = 13.0f;
  551. break;
  552. case 4:
  553. hints |= NATIVE_PARAMETER_IS_AUTOMABLE|NATIVE_PARAMETER_IS_BOOLEAN;
  554. param.name = "Negate";
  555. param.ranges.def = 0.0f;
  556. param.ranges.max = 1.0f;
  557. break;
  558. case 5:
  559. hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
  560. param.name = "Low-Pass Filter";
  561. param.ranges.def = 96.0f;
  562. break;
  563. case 6:
  564. hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
  565. param.name = "High-Pass Filter";
  566. param.ranges.def = 0.0f;
  567. break;
  568. case 7:
  569. hints |= NATIVE_PARAMETER_IS_AUTOMABLE|NATIVE_PARAMETER_IS_BOOLEAN;
  570. param.name = "Stereo";
  571. param.ranges.def = 0.0f;
  572. param.ranges.max = 1.0f;
  573. break;
  574. case 8:
  575. hints |= NATIVE_PARAMETER_IS_AUTOMABLE|NATIVE_PARAMETER_IS_BOOLEAN;
  576. param.name = "Pre-Filtering";
  577. param.ranges.def = 0.0f;
  578. param.ranges.max = 1.0f;
  579. break;
  580. }
  581. param.hints = static_cast<NativeParameterHints>(hints);
  582. return &param;
  583. }
  584. // -------------------------------------------------------------------
  585. // Plugin midi-program calls
  586. const NativeMidiProgram* getMidiProgramInfo(const uint32_t index) const override
  587. {
  588. if (index >= fProgramCount)
  589. return nullptr;
  590. static NativeMidiProgram midiProg;
  591. midiProg.bank = 0;
  592. midiProg.program = index;
  593. switch (index)
  594. {
  595. case 0:
  596. midiProg.name = "Overdrive 1";
  597. break;
  598. case 1:
  599. midiProg.name = "Overdrive 2";
  600. break;
  601. case 2:
  602. midiProg.name = "A. Exciter 1";
  603. break;
  604. case 3:
  605. midiProg.name = "A. Exciter 2";
  606. break;
  607. case 4:
  608. midiProg.name = "Guitar Amp";
  609. break;
  610. case 5:
  611. midiProg.name = "Quantisize";
  612. break;
  613. default:
  614. midiProg.name = nullptr;
  615. break;
  616. }
  617. return &midiProg;
  618. }
  619. // -------------------------------------------------------------------
  620. PluginClassEND(FxDistortionPlugin)
  621. CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(FxDistortionPlugin)
  622. };
  623. // -----------------------------------------------------------------------
  624. class FxDynamicFilterPlugin : public FxAbstractPlugin<DynamicFilter>
  625. {
  626. public:
  627. FxDynamicFilterPlugin(const NativeHostDescriptor* const host)
  628. : FxAbstractPlugin(host, 10, 5) {}
  629. protected:
  630. // -------------------------------------------------------------------
  631. // Plugin parameter calls
  632. const NativeParameter* getParameterInfo(const uint32_t index) const override
  633. {
  634. if (index >= fParamCount)
  635. return nullptr;
  636. static NativeParameter param;
  637. static NativeParameterScalePoint scalePoints[2];
  638. int hints = NATIVE_PARAMETER_IS_ENABLED|NATIVE_PARAMETER_IS_INTEGER;
  639. param.name = nullptr;
  640. param.unit = nullptr;
  641. param.ranges.def = 1.0f;
  642. param.ranges.min = 0.0f;
  643. param.ranges.max = 127.0f;
  644. param.ranges.step = 1.0f;
  645. param.ranges.stepSmall = 1.0f;
  646. param.ranges.stepLarge = 20.0f;
  647. param.scalePointCount = 0;
  648. param.scalePoints = nullptr;
  649. switch (index)
  650. {
  651. case 0:
  652. hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
  653. param.name = "LFO Frequency";
  654. param.ranges.def = 80.0f;
  655. break;
  656. case 1:
  657. hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
  658. param.name = "LFO Randomness";
  659. param.ranges.def = 0.0f;
  660. break;
  661. case 2:
  662. hints |= NATIVE_PARAMETER_IS_AUTOMABLE|NATIVE_PARAMETER_IS_BOOLEAN|NATIVE_PARAMETER_USES_SCALEPOINTS;
  663. param.name = "LFO Type";
  664. param.ranges.def = 0.0f;
  665. param.ranges.max = 1.0f;
  666. param.scalePointCount = 2;
  667. param.scalePoints = scalePoints;
  668. scalePoints[0].label = "Sine";
  669. scalePoints[1].label = "Triangle";
  670. scalePoints[0].value = 0.0f;
  671. scalePoints[1].value = 1.0f;
  672. break;
  673. case 3:
  674. hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
  675. param.name = "LFO Stereo";
  676. param.ranges.def = 64.0f;
  677. break;
  678. case 4:
  679. hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
  680. param.name = "LFO Depth";
  681. param.ranges.def = 0.0f;
  682. break;
  683. case 5:
  684. hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
  685. param.name = "Amp sns";
  686. param.ranges.def = 90.0f;
  687. break;
  688. case 6:
  689. hints |= NATIVE_PARAMETER_IS_AUTOMABLE|NATIVE_PARAMETER_IS_BOOLEAN;
  690. param.name = "Amp sns inv";
  691. param.ranges.def = 0.0f;
  692. param.ranges.max = 1.0f;
  693. break;
  694. case 7:
  695. hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
  696. param.name = "Amp Smooth";
  697. param.ranges.def = 60.0f;
  698. break;
  699. }
  700. param.hints = static_cast<NativeParameterHints>(hints);
  701. return &param;
  702. }
  703. // -------------------------------------------------------------------
  704. // Plugin midi-program calls
  705. const NativeMidiProgram* getMidiProgramInfo(const uint32_t index) const override
  706. {
  707. if (index >= fProgramCount)
  708. return nullptr;
  709. static NativeMidiProgram midiProg;
  710. midiProg.bank = 0;
  711. midiProg.program = index;
  712. switch (index)
  713. {
  714. case 0:
  715. midiProg.name = "WahWah";
  716. break;
  717. case 1:
  718. midiProg.name = "AutoWah";
  719. break;
  720. case 2:
  721. midiProg.name = "Sweep";
  722. break;
  723. case 3:
  724. midiProg.name = "VocalMorph1";
  725. break;
  726. case 4:
  727. midiProg.name = "VocalMorph2";
  728. break;
  729. default:
  730. midiProg.name = nullptr;
  731. break;
  732. }
  733. return &midiProg;
  734. }
  735. // -------------------------------------------------------------------
  736. PluginClassEND(FxDynamicFilterPlugin)
  737. CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(FxDynamicFilterPlugin)
  738. };
  739. // -----------------------------------------------------------------------
  740. class FxEchoPlugin : public FxAbstractPlugin<Echo>
  741. {
  742. public:
  743. FxEchoPlugin(const NativeHostDescriptor* const host)
  744. : FxAbstractPlugin(host, 7, 9) {}
  745. protected:
  746. // -------------------------------------------------------------------
  747. // Plugin parameter calls
  748. const NativeParameter* getParameterInfo(const uint32_t index) const override
  749. {
  750. if (index >= fParamCount)
  751. return nullptr;
  752. static NativeParameter param;
  753. int hints = NATIVE_PARAMETER_IS_ENABLED|NATIVE_PARAMETER_IS_INTEGER;
  754. param.name = nullptr;
  755. param.unit = nullptr;
  756. param.ranges.def = 1.0f;
  757. param.ranges.min = 0.0f;
  758. param.ranges.max = 127.0f;
  759. param.ranges.step = 1.0f;
  760. param.ranges.stepSmall = 1.0f;
  761. param.ranges.stepLarge = 20.0f;
  762. param.scalePointCount = 0;
  763. param.scalePoints = nullptr;
  764. switch (index)
  765. {
  766. case 0:
  767. hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
  768. param.name = "Delay";
  769. param.ranges.def = 35.0f;
  770. break;
  771. case 1:
  772. hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
  773. param.name = "L/R Delay";
  774. param.ranges.def = 64.0f;
  775. break;
  776. case 2:
  777. hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
  778. param.name = "L/R Cross";
  779. param.ranges.def = 30.0f;
  780. break;
  781. case 3:
  782. hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
  783. param.name = "Feedback";
  784. param.ranges.def = 59.0f;
  785. break;
  786. case 4:
  787. hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
  788. param.name = "High Damp";
  789. param.ranges.def = 0.0f;
  790. break;
  791. }
  792. param.hints = static_cast<NativeParameterHints>(hints);
  793. return &param;
  794. }
  795. // -------------------------------------------------------------------
  796. // Plugin midi-program calls
  797. const NativeMidiProgram* getMidiProgramInfo(const uint32_t index) const override
  798. {
  799. if (index >= fProgramCount)
  800. return nullptr;
  801. static NativeMidiProgram midiProg;
  802. midiProg.bank = 0;
  803. midiProg.program = index;
  804. switch (index)
  805. {
  806. case 0:
  807. midiProg.name = "Echo 1";
  808. break;
  809. case 1:
  810. midiProg.name = "Echo 2";
  811. break;
  812. case 2:
  813. midiProg.name = "Echo 3";
  814. break;
  815. case 3:
  816. midiProg.name = "Simple Echo";
  817. break;
  818. case 4:
  819. midiProg.name = "Canyon";
  820. break;
  821. case 5:
  822. midiProg.name = "Panning Echo 1";
  823. break;
  824. case 6:
  825. midiProg.name = "Panning Echo 2";
  826. break;
  827. case 7:
  828. midiProg.name = "Panning Echo 3";
  829. break;
  830. case 8:
  831. midiProg.name = "Feedback Echo";
  832. break;
  833. default:
  834. midiProg.name = nullptr;
  835. break;
  836. }
  837. return &midiProg;
  838. }
  839. // -------------------------------------------------------------------
  840. PluginClassEND(FxEchoPlugin)
  841. CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(FxEchoPlugin)
  842. };
  843. // -----------------------------------------------------------------------
  844. class FxPhaserPlugin : public FxAbstractPlugin<Phaser>
  845. {
  846. public:
  847. FxPhaserPlugin(const NativeHostDescriptor* const host)
  848. : FxAbstractPlugin(host, 15, 12) {}
  849. protected:
  850. // -------------------------------------------------------------------
  851. // Plugin parameter calls
  852. const NativeParameter* getParameterInfo(const uint32_t index) const override
  853. {
  854. if (index >= fParamCount)
  855. return nullptr;
  856. static NativeParameter param;
  857. static NativeParameterScalePoint scalePoints[2];
  858. int hints = NATIVE_PARAMETER_IS_ENABLED|NATIVE_PARAMETER_IS_INTEGER;
  859. param.name = nullptr;
  860. param.unit = nullptr;
  861. param.ranges.def = 1.0f;
  862. param.ranges.min = 0.0f;
  863. param.ranges.max = 127.0f;
  864. param.ranges.step = 1.0f;
  865. param.ranges.stepSmall = 1.0f;
  866. param.ranges.stepLarge = 20.0f;
  867. param.scalePointCount = 0;
  868. param.scalePoints = nullptr;
  869. switch (index)
  870. {
  871. case 0:
  872. hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
  873. param.name = "LFO Frequency";
  874. param.ranges.def = 36.0f;
  875. break;
  876. case 1:
  877. hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
  878. param.name = "LFO Randomness";
  879. param.ranges.def = 0.0f;
  880. break;
  881. case 2:
  882. hints |= NATIVE_PARAMETER_IS_AUTOMABLE|NATIVE_PARAMETER_IS_BOOLEAN|NATIVE_PARAMETER_USES_SCALEPOINTS;
  883. param.name = "LFO Type";
  884. param.ranges.def = 0.0f;
  885. param.ranges.max = 1.0f;
  886. param.scalePointCount = 2;
  887. param.scalePoints = scalePoints;
  888. scalePoints[0].label = "Sine";
  889. scalePoints[1].label = "Triangle";
  890. scalePoints[0].value = 0.0f;
  891. scalePoints[1].value = 1.0f;
  892. break;
  893. case 3:
  894. hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
  895. param.name = "LFO Stereo";
  896. param.ranges.def = 64.0f;
  897. break;
  898. case 4:
  899. hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
  900. param.name = "Depth";
  901. param.ranges.def = 110.0f;
  902. break;
  903. case 5:
  904. hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
  905. param.name = "Feedback";
  906. param.ranges.def = 64.0f;
  907. break;
  908. case 6:
  909. param.name = "Stages";
  910. param.ranges.def = 1.0f;
  911. param.ranges.min = 1.0f;
  912. param.ranges.max = 12.0f;
  913. break;
  914. case 7:
  915. hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
  916. param.name = "L/R Cross|Offset";
  917. param.ranges.def = 0.0f;
  918. break;
  919. case 8:
  920. hints |= NATIVE_PARAMETER_IS_AUTOMABLE|NATIVE_PARAMETER_IS_BOOLEAN;
  921. param.name = "Subtract Output";
  922. param.ranges.def = 0.0f;
  923. param.ranges.max = 1.0f;
  924. break;
  925. case 9:
  926. hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
  927. param.name = "Phase|Width";
  928. param.ranges.def = 20.0f;
  929. break;
  930. case 10:
  931. hints |= NATIVE_PARAMETER_IS_AUTOMABLE|NATIVE_PARAMETER_IS_BOOLEAN;
  932. param.name = "Hyper";
  933. param.ranges.def = 0.0f;
  934. param.ranges.max = 1.0f;
  935. break;
  936. case 11:
  937. hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
  938. param.name = "Distortion";
  939. param.ranges.def = 0.0f;
  940. break;
  941. case 12:
  942. hints |= NATIVE_PARAMETER_IS_AUTOMABLE|NATIVE_PARAMETER_IS_BOOLEAN;
  943. param.name = "Analog";
  944. param.ranges.def = 0.0f;
  945. param.ranges.max = 1.0f;
  946. break;
  947. }
  948. param.hints = static_cast<NativeParameterHints>(hints);
  949. return &param;
  950. }
  951. // -------------------------------------------------------------------
  952. // Plugin midi-program calls
  953. const NativeMidiProgram* getMidiProgramInfo(const uint32_t index) const override
  954. {
  955. if (index >= fProgramCount)
  956. return nullptr;
  957. static NativeMidiProgram midiProg;
  958. midiProg.bank = 0;
  959. midiProg.program = index;
  960. switch (index)
  961. {
  962. case 0:
  963. midiProg.name = "Phaser 1";
  964. break;
  965. case 1:
  966. midiProg.name = "Phaser 2";
  967. break;
  968. case 2:
  969. midiProg.name = "Phaser 3";
  970. break;
  971. case 3:
  972. midiProg.name = "Phaser 4";
  973. break;
  974. case 4:
  975. midiProg.name = "Phaser 5";
  976. break;
  977. case 5:
  978. midiProg.name = "Phaser 6";
  979. break;
  980. case 6:
  981. midiProg.name = "APhaser 1";
  982. break;
  983. case 7:
  984. midiProg.name = "APhaser 2";
  985. break;
  986. case 8:
  987. midiProg.name = "APhaser 3";
  988. break;
  989. case 9:
  990. midiProg.name = "APhaser 4";
  991. break;
  992. case 10:
  993. midiProg.name = "APhaser 5";
  994. break;
  995. case 11:
  996. midiProg.name = "APhaser 6";
  997. break;
  998. default:
  999. midiProg.name = nullptr;
  1000. break;
  1001. }
  1002. return &midiProg;
  1003. }
  1004. // -------------------------------------------------------------------
  1005. PluginClassEND(FxPhaserPlugin)
  1006. CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(FxPhaserPlugin)
  1007. };
  1008. // -----------------------------------------------------------------------
  1009. class FxReverbPlugin : public FxAbstractPlugin<Reverb>
  1010. {
  1011. public:
  1012. FxReverbPlugin(const NativeHostDescriptor* const host)
  1013. : FxAbstractPlugin(host, 13, 13) {}
  1014. protected:
  1015. // -------------------------------------------------------------------
  1016. // Plugin parameter calls
  1017. const NativeParameter* getParameterInfo(const uint32_t index) const override
  1018. {
  1019. if (index >= fParamCount)
  1020. return nullptr;
  1021. static NativeParameter param;
  1022. static NativeParameterScalePoint scalePoints[3];
  1023. int hints = NATIVE_PARAMETER_IS_ENABLED|NATIVE_PARAMETER_IS_INTEGER;
  1024. param.name = nullptr;
  1025. param.unit = nullptr;
  1026. param.ranges.def = 1.0f;
  1027. param.ranges.min = 0.0f;
  1028. param.ranges.max = 127.0f;
  1029. param.ranges.step = 1.0f;
  1030. param.ranges.stepSmall = 1.0f;
  1031. param.ranges.stepLarge = 20.0f;
  1032. param.scalePointCount = 0;
  1033. param.scalePoints = nullptr;
  1034. switch (index)
  1035. {
  1036. case 0:
  1037. hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
  1038. param.name = "Time";
  1039. param.ranges.def = 63.0f;
  1040. break;
  1041. case 1:
  1042. param.name = "Delay";
  1043. param.ranges.def = 24.0f;
  1044. break;
  1045. case 2:
  1046. hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
  1047. param.name = "Feedback";
  1048. param.ranges.def = 0.0f;
  1049. break;
  1050. case 3:
  1051. hints = 0x0;
  1052. param.name = "bw";
  1053. break;
  1054. case 4:
  1055. hints = 0x0;
  1056. param.name = "E/R";
  1057. break;
  1058. case 5:
  1059. param.name = "Low-Pass Filter";
  1060. param.ranges.def = 85.0f;
  1061. break;
  1062. case 6:
  1063. param.name = "High-Pass Filter";
  1064. param.ranges.def = 5.0f;
  1065. break;
  1066. case 7:
  1067. hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
  1068. param.name = "Damp";
  1069. param.ranges.def = 83.0f;
  1070. param.ranges.min = 64.0f;
  1071. break;
  1072. case 8:
  1073. hints |= NATIVE_PARAMETER_USES_SCALEPOINTS;
  1074. param.name = "Type";
  1075. param.ranges.def = 1.0f;
  1076. param.ranges.max = 2.0f;
  1077. param.scalePointCount = 3;
  1078. param.scalePoints = scalePoints;
  1079. scalePoints[0].label = "Random";
  1080. scalePoints[1].label = "Freeverb";
  1081. scalePoints[2].label = "Bandwidth";
  1082. scalePoints[0].value = 0.0f;
  1083. scalePoints[1].value = 1.0f;
  1084. scalePoints[2].value = 2.0f;
  1085. break;
  1086. case 9:
  1087. param.name = "Room size";
  1088. param.ranges.def = 64.0f;
  1089. param.ranges.min = 1.0f;
  1090. break;
  1091. case 10:
  1092. param.name = "Bandwidth";
  1093. param.ranges.def = 20.0f;
  1094. break;
  1095. }
  1096. param.hints = static_cast<NativeParameterHints>(hints);
  1097. return &param;
  1098. }
  1099. // -------------------------------------------------------------------
  1100. // Plugin midi-program calls
  1101. const NativeMidiProgram* getMidiProgramInfo(const uint32_t index) const override
  1102. {
  1103. if (index >= fProgramCount)
  1104. return nullptr;
  1105. static NativeMidiProgram midiProg;
  1106. midiProg.bank = 0;
  1107. midiProg.program = index;
  1108. switch (index)
  1109. {
  1110. case 0:
  1111. midiProg.name = "Cathedral1";
  1112. break;
  1113. case 1:
  1114. midiProg.name = "Cathedral2";
  1115. break;
  1116. case 2:
  1117. midiProg.name = "Cathedral3";
  1118. break;
  1119. case 3:
  1120. midiProg.name = "Hall1";
  1121. break;
  1122. case 4:
  1123. midiProg.name = "Hall2";
  1124. break;
  1125. case 5:
  1126. midiProg.name = "Room1";
  1127. break;
  1128. case 6:
  1129. midiProg.name = "Room2";
  1130. break;
  1131. case 7:
  1132. midiProg.name = "Basement";
  1133. break;
  1134. case 8:
  1135. midiProg.name = "Tunnel";
  1136. break;
  1137. case 9:
  1138. midiProg.name = "Echoed1";
  1139. break;
  1140. case 10:
  1141. midiProg.name = "Echoed2";
  1142. break;
  1143. case 11:
  1144. midiProg.name = "VeryLong1";
  1145. break;
  1146. case 12:
  1147. midiProg.name = "VeryLong2";
  1148. break;
  1149. default:
  1150. midiProg.name = nullptr;
  1151. break;
  1152. }
  1153. return &midiProg;
  1154. }
  1155. // -------------------------------------------------------------------
  1156. PluginClassEND(FxReverbPlugin)
  1157. CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(FxReverbPlugin)
  1158. };
  1159. // -----------------------------------------------------------------------
  1160. static const NativePluginDescriptor fxAlienWahDesc = {
  1161. /* category */ NATIVE_PLUGIN_CATEGORY_MODULATOR,
  1162. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_RTSAFE
  1163. |NATIVE_PLUGIN_USES_PANNING
  1164. |NATIVE_PLUGIN_NEEDS_FIXED_BUFFERS),
  1165. /* supports */ NATIVE_PLUGIN_SUPPORTS_NOTHING,
  1166. /* audioIns */ 2,
  1167. /* audioOuts */ 2,
  1168. /* midiIns */ 0,
  1169. /* midiOuts */ 0,
  1170. /* paramIns */ 11-2,
  1171. /* paramOuts */ 0,
  1172. /* name */ "ZynAlienWah",
  1173. /* label */ "zynalienwah",
  1174. /* maker */ "falkTX, Mark McCurry, Nasca Octavian Paul",
  1175. /* copyright */ "GNU GPL v2+",
  1176. PluginDescriptorFILL(FxAlienWahPlugin)
  1177. };
  1178. static const NativePluginDescriptor fxChorusDesc = {
  1179. /* category */ NATIVE_PLUGIN_CATEGORY_MODULATOR,
  1180. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_RTSAFE
  1181. |NATIVE_PLUGIN_USES_PANNING
  1182. |NATIVE_PLUGIN_NEEDS_FIXED_BUFFERS),
  1183. /* supports */ NATIVE_PLUGIN_SUPPORTS_NOTHING,
  1184. /* audioIns */ 2,
  1185. /* audioOuts */ 2,
  1186. /* midiIns */ 0,
  1187. /* midiOuts */ 0,
  1188. /* paramIns */ 12-2,
  1189. /* paramOuts */ 0,
  1190. /* name */ "ZynChorus",
  1191. /* label */ "zynchorus",
  1192. /* maker */ "falkTX, Mark McCurry, Nasca Octavian Paul",
  1193. /* copyright */ "GNU GPL v2+",
  1194. PluginDescriptorFILL(FxChorusPlugin)
  1195. };
  1196. static const NativePluginDescriptor fxDistortionDesc = {
  1197. /* category */ NATIVE_PLUGIN_CATEGORY_MODULATOR,
  1198. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_USES_PANNING
  1199. |NATIVE_PLUGIN_NEEDS_FIXED_BUFFERS),
  1200. /* supports */ NATIVE_PLUGIN_SUPPORTS_NOTHING,
  1201. /* audioIns */ 2,
  1202. /* audioOuts */ 2,
  1203. /* midiIns */ 0,
  1204. /* midiOuts */ 0,
  1205. /* paramIns */ 11-2,
  1206. /* paramOuts */ 0,
  1207. /* name */ "ZynDistortion",
  1208. /* label */ "zyndistortion",
  1209. /* maker */ "falkTX, Mark McCurry, Nasca Octavian Paul",
  1210. /* copyright */ "GNU GPL v2+",
  1211. PluginDescriptorFILL(FxDistortionPlugin)
  1212. };
  1213. static const NativePluginDescriptor fxDynamicFilterDesc = {
  1214. /* category */ NATIVE_PLUGIN_CATEGORY_FILTER,
  1215. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_USES_PANNING
  1216. |NATIVE_PLUGIN_NEEDS_FIXED_BUFFERS),
  1217. /* supports */ NATIVE_PLUGIN_SUPPORTS_NOTHING,
  1218. /* audioIns */ 2,
  1219. /* audioOuts */ 2,
  1220. /* midiIns */ 0,
  1221. /* midiOuts */ 0,
  1222. /* paramIns */ 10-2,
  1223. /* paramOuts */ 0,
  1224. /* name */ "ZynDynamicFilter",
  1225. /* label */ "zyndynamicfilter",
  1226. /* maker */ "falkTX, Mark McCurry, Nasca Octavian Paul",
  1227. /* copyright */ "GNU GPL v2+",
  1228. PluginDescriptorFILL(FxDynamicFilterPlugin)
  1229. };
  1230. static const NativePluginDescriptor fxEchoDesc = {
  1231. /* category */ NATIVE_PLUGIN_CATEGORY_DELAY,
  1232. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_RTSAFE
  1233. |NATIVE_PLUGIN_USES_PANNING
  1234. |NATIVE_PLUGIN_NEEDS_FIXED_BUFFERS),
  1235. /* supports */ NATIVE_PLUGIN_SUPPORTS_NOTHING,
  1236. /* audioIns */ 2,
  1237. /* audioOuts */ 2,
  1238. /* midiIns */ 0,
  1239. /* midiOuts */ 0,
  1240. /* paramIns */ 7-2,
  1241. /* paramOuts */ 0,
  1242. /* name */ "ZynEcho",
  1243. /* label */ "zynecho",
  1244. /* maker */ "falkTX, Mark McCurry, Nasca Octavian Paul",
  1245. /* copyright */ "GNU GPL v2+",
  1246. PluginDescriptorFILL(FxEchoPlugin)
  1247. };
  1248. static const NativePluginDescriptor fxPhaserDesc = {
  1249. /* category */ NATIVE_PLUGIN_CATEGORY_MODULATOR,
  1250. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_USES_PANNING
  1251. |NATIVE_PLUGIN_NEEDS_FIXED_BUFFERS),
  1252. /* supports */ NATIVE_PLUGIN_SUPPORTS_NOTHING,
  1253. /* audioIns */ 2,
  1254. /* audioOuts */ 2,
  1255. /* midiIns */ 0,
  1256. /* midiOuts */ 0,
  1257. /* paramIns */ 15-2,
  1258. /* paramOuts */ 0,
  1259. /* name */ "ZynPhaser",
  1260. /* label */ "zynphaser",
  1261. /* maker */ "falkTX, Mark McCurry, Nasca Octavian Paul",
  1262. /* copyright */ "GNU GPL v2+",
  1263. PluginDescriptorFILL(FxPhaserPlugin)
  1264. };
  1265. static const NativePluginDescriptor fxReverbDesc = {
  1266. /* category */ NATIVE_PLUGIN_CATEGORY_DELAY,
  1267. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_USES_PANNING
  1268. |NATIVE_PLUGIN_NEEDS_FIXED_BUFFERS),
  1269. /* supports */ NATIVE_PLUGIN_SUPPORTS_NOTHING,
  1270. /* audioIns */ 2,
  1271. /* audioOuts */ 2,
  1272. /* midiIns */ 0,
  1273. /* midiOuts */ 0,
  1274. /* paramIns */ 13-2,
  1275. /* paramOuts */ 0,
  1276. /* name */ "ZynReverb",
  1277. /* label */ "zynreverb",
  1278. /* maker */ "falkTX, Mark McCurry, Nasca Octavian Paul",
  1279. /* copyright */ "GNU GPL v2+",
  1280. PluginDescriptorFILL(FxReverbPlugin)
  1281. };
  1282. // -----------------------------------------------------------------------
  1283. CARLA_EXPORT
  1284. void carla_register_native_plugin_zynaddsubfx_fx();
  1285. CARLA_EXPORT
  1286. void carla_register_native_plugin_zynaddsubfx_fx()
  1287. {
  1288. carla_register_native_plugin(&fxAlienWahDesc);
  1289. carla_register_native_plugin(&fxChorusDesc);
  1290. carla_register_native_plugin(&fxDistortionDesc);
  1291. carla_register_native_plugin(&fxDynamicFilterDesc);
  1292. carla_register_native_plugin(&fxEchoDesc);
  1293. carla_register_native_plugin(&fxPhaserDesc);
  1294. carla_register_native_plugin(&fxReverbDesc);
  1295. }
  1296. // -----------------------------------------------------------------------