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.

1485 lines
45KB

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