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.

1472 lines
44KB

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