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

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