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