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 42KB

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