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.

1099 lines
32KB

  1. /*
  2. * DISTRHO Cardinal Plugin
  3. * Copyright (C) 2021 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 3 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 LICENSE file.
  16. */
  17. #include <plugin.hpp>
  18. #include "DistrhoUtils.hpp"
  19. // Cardinal (built-in)
  20. #include "Cardinal/src/plugin.hpp"
  21. #ifndef NOPLUGINS
  22. // AmalgamatedHarmonics
  23. #include "AmalgamatedHarmonics/src/AH.hpp"
  24. // AnimatedCircuits
  25. #include "AnimatedCircuits/src/plugin.hpp"
  26. // AS
  27. #define modelADSR modelASADSR
  28. #define modelVCA modelASVCA
  29. #include "AS/src/AS.hpp"
  30. #undef modelADSR
  31. #undef modelVCA
  32. // AudibleInstruments
  33. #include "AudibleInstruments/src/plugin.hpp"
  34. // Befaco
  35. #include "Befaco/src/plugin.hpp"
  36. // Bidoo
  37. #include "Bidoo/src/plugin.hpp"
  38. // BogaudioModules
  39. #define modelADSR modelBogaudioADSR
  40. #define modelLFO modelBogaudioLFO
  41. #define modelNoise modelBogaudioNoise
  42. #define modelVCA modelBogaudioVCA
  43. #define modelVCF modelBogaudioVCF
  44. #define modelVCO modelBogaudioVCO
  45. #include "BogaudioModules/src/AD.hpp"
  46. #include "BogaudioModules/src/Additator.hpp"
  47. #include "BogaudioModules/src/AddrSeqX.hpp"
  48. #include "BogaudioModules/src/ADSR.hpp"
  49. #include "BogaudioModules/src/AMRM.hpp"
  50. #include "BogaudioModules/src/Analyzer.hpp"
  51. #include "BogaudioModules/src/AnalyzerXL.hpp"
  52. #include "BogaudioModules/src/Assign.hpp"
  53. #include "BogaudioModules/src/ASR.hpp"
  54. #include "BogaudioModules/src/Arp.hpp"
  55. #include "BogaudioModules/src/Blank3.hpp"
  56. #include "BogaudioModules/src/Blank6.hpp"
  57. #include "BogaudioModules/src/Bool.hpp"
  58. #include "BogaudioModules/src/Chirp.hpp"
  59. #include "BogaudioModules/src/Clpr.hpp"
  60. #include "BogaudioModules/src/Cmp.hpp"
  61. #include "BogaudioModules/src/CmpDist.hpp"
  62. #include "BogaudioModules/src/CVD.hpp"
  63. #include "BogaudioModules/src/DADSRH.hpp"
  64. #include "BogaudioModules/src/DADSRHPlus.hpp"
  65. #include "BogaudioModules/src/Detune.hpp"
  66. #include "BogaudioModules/src/DGate.hpp"
  67. #include "BogaudioModules/src/Edge.hpp"
  68. #include "BogaudioModules/src/EightFO.hpp"
  69. #include "BogaudioModules/src/EightOne.hpp"
  70. #include "BogaudioModules/src/EQ.hpp"
  71. #include "BogaudioModules/src/EQS.hpp"
  72. #include "BogaudioModules/src/FFB.hpp"
  73. #include "BogaudioModules/src/FlipFlop.hpp"
  74. #include "BogaudioModules/src/FMOp.hpp"
  75. #include "BogaudioModules/src/Follow.hpp"
  76. #include "BogaudioModules/src/FourFO.hpp"
  77. #include "BogaudioModules/src/FourMan.hpp"
  78. #include "BogaudioModules/src/Inv.hpp"
  79. #include "BogaudioModules/src/LFO.hpp"
  80. #include "BogaudioModules/src/Lgsw.hpp"
  81. #include "BogaudioModules/src/LLFO.hpp"
  82. #include "BogaudioModules/src/LLPG.hpp"
  83. #include "BogaudioModules/src/Lmtr.hpp"
  84. #include "BogaudioModules/src/LPG.hpp"
  85. #include "BogaudioModules/src/LVCF.hpp"
  86. #include "BogaudioModules/src/LVCO.hpp"
  87. #include "BogaudioModules/src/Manual.hpp"
  88. #include "BogaudioModules/src/Matrix18.hpp"
  89. #include "BogaudioModules/src/Matrix44.hpp"
  90. #include "BogaudioModules/src/Matrix81.hpp"
  91. #include "BogaudioModules/src/Matrix88.hpp"
  92. #include "BogaudioModules/src/Matrix88Cv.hpp"
  93. #include "BogaudioModules/src/Matrix88M.hpp"
  94. #include "BogaudioModules/src/MegaGate.hpp"
  95. #include "BogaudioModules/src/Mix1.hpp"
  96. #include "BogaudioModules/src/Mix2.hpp"
  97. #include "BogaudioModules/src/Mix4.hpp"
  98. #include "BogaudioModules/src/Mix4x.hpp"
  99. #include "BogaudioModules/src/Mix8x.hpp"
  100. #include "BogaudioModules/src/Mono.hpp"
  101. #include "BogaudioModules/src/Mult.hpp"
  102. #include "BogaudioModules/src/Mumix.hpp"
  103. #include "BogaudioModules/src/Mute8.hpp"
  104. #include "BogaudioModules/src/Noise.hpp"
  105. #include "BogaudioModules/src/Nsgt.hpp"
  106. #include "BogaudioModules/src/Offset.hpp"
  107. #include "BogaudioModules/src/OneEight.hpp"
  108. #include "BogaudioModules/src/Pan.hpp"
  109. #include "BogaudioModules/src/PEQ.hpp"
  110. #include "BogaudioModules/src/PEQ6.hpp"
  111. #include "BogaudioModules/src/PEQ6XF.hpp"
  112. #include "BogaudioModules/src/PEQ14.hpp"
  113. #include "BogaudioModules/src/PEQ14XF.hpp"
  114. #include "BogaudioModules/src/Pgmr.hpp"
  115. #include "BogaudioModules/src/PgmrX.hpp"
  116. #include "BogaudioModules/src/PolyCon16.hpp"
  117. #include "BogaudioModules/src/PolyCon8.hpp"
  118. #include "BogaudioModules/src/PolyMult.hpp"
  119. #include "BogaudioModules/src/PolyOff16.hpp"
  120. #include "BogaudioModules/src/PolyOff8.hpp"
  121. #include "BogaudioModules/src/Pressor.hpp"
  122. #include "BogaudioModules/src/Pulse.hpp"
  123. #include "BogaudioModules/src/Ranalyzer.hpp"
  124. #include "BogaudioModules/src/Reftone.hpp"
  125. #include "BogaudioModules/src/RGate.hpp"
  126. #include "BogaudioModules/src/SampleHold.hpp"
  127. #include "BogaudioModules/src/Shaper.hpp"
  128. #include "BogaudioModules/src/ShaperPlus.hpp"
  129. #include "BogaudioModules/src/Sine.hpp"
  130. #include "BogaudioModules/src/Slew.hpp"
  131. #include "BogaudioModules/src/Stack.hpp"
  132. #include "BogaudioModules/src/Sums.hpp"
  133. #include "BogaudioModules/src/Switch.hpp"
  134. #include "BogaudioModules/src/Switch1616.hpp"
  135. #include "BogaudioModules/src/Switch18.hpp"
  136. #include "BogaudioModules/src/Switch44.hpp"
  137. #include "BogaudioModules/src/Switch81.hpp"
  138. #include "BogaudioModules/src/Switch88.hpp"
  139. #include "BogaudioModules/src/UMix.hpp"
  140. #include "BogaudioModules/src/Unison.hpp"
  141. #include "BogaudioModules/src/VCA.hpp"
  142. #include "BogaudioModules/src/VCAmp.hpp"
  143. #include "BogaudioModules/src/VCF.hpp"
  144. #include "BogaudioModules/src/VCM.hpp"
  145. #include "BogaudioModules/src/VCO.hpp"
  146. #include "BogaudioModules/src/Velo.hpp"
  147. #include "BogaudioModules/src/Vish.hpp"
  148. #include "BogaudioModules/src/VU.hpp"
  149. #include "BogaudioModules/src/Walk.hpp"
  150. #include "BogaudioModules/src/Walk2.hpp"
  151. #include "BogaudioModules/src/XCO.hpp"
  152. #include "BogaudioModules/src/XFade.hpp"
  153. #undef modelADSR
  154. #undef modelLFO
  155. #undef modelNoise
  156. #undef modelVCA
  157. #undef modelVCF
  158. #undef modelVCO
  159. // cf
  160. #include "cf/src/plugin.hpp"
  161. // ESeries
  162. #include "ESeries/src/plugin.hpp"
  163. // Fundamental
  164. #include "Fundamental/src/plugin.hpp"
  165. // GrandeModular
  166. #include "GrandeModular/src/plugin.hpp"
  167. // ImpromptuModular
  168. /* NOTE too much noise in original include, do this a different way
  169. // #include "ImpromptuModular/src/ImpromptuModular.hpp"
  170. */
  171. extern Model *modelBigButtonSeq;
  172. extern Model *modelBigButtonSeq2;
  173. extern Model *modelChordKey;
  174. extern Model *modelChordKeyExpander;
  175. extern Model *modelClocked;
  176. extern Model *modelClockedExpander;
  177. extern Model *modelClkd;
  178. extern Model *modelCvPad;
  179. extern Model *modelFoundry;
  180. extern Model *modelFoundryExpander;
  181. extern Model *modelFourView;
  182. extern Model *modelGateSeq64;
  183. extern Model *modelGateSeq64Expander;
  184. extern Model *modelHotkey;
  185. extern Model *modelPart;
  186. extern Model *modelPhraseSeq16;
  187. extern Model *modelPhraseSeq32;
  188. extern Model *modelPhraseSeqExpander;
  189. extern Model *modelProbKey;
  190. // extern Model *modelProbKeyExpander;
  191. extern Model *modelSemiModularSynth;
  192. extern Model *modelTact;
  193. extern Model *modelTact1;
  194. extern Model *modelTactG;
  195. extern Model *modelTwelveKey;
  196. extern Model *modelWriteSeq32;
  197. extern Model *modelWriteSeq64;
  198. extern Model *modelBlankPanel;
  199. // JW-Modules
  200. #define modelQuantizer modelJWQuantizer
  201. #include "JW-Modules/src/JWModules.hpp"
  202. #undef modelQuantizer
  203. // MindMeldModular
  204. /* NOTE too much noise in original include, do this a different way
  205. // #include "MindMeldModular/src/MindMeldModular.hpp"
  206. */
  207. extern Model *modelMixMasterJr;
  208. extern Model *modelAuxExpanderJr;
  209. extern Model *modelMixMaster;
  210. extern Model *modelAuxExpander;
  211. extern Model *modelMeld;
  212. extern Model *modelUnmeld;
  213. extern Model *modelEqMaster;
  214. extern Model *modelEqExpander;
  215. extern Model *modelBassMaster;
  216. extern Model *modelBassMasterJr;
  217. extern Model *modelShapeMaster;
  218. // rackwindows
  219. #include "rackwindows/src/plugin.hpp"
  220. // ValleyAudio
  221. #include "ValleyAudio/src/Valley.hpp"
  222. // ZetaCarinaeModules
  223. #include "ZetaCarinaeModules/src/plugin.hpp"
  224. #endif // NOPLUGINS
  225. // stuff that reads config files, we dont want that
  226. int loadConsoleType() { return 0; }
  227. int loadDirectOutMode() { return 0; }
  228. bool loadDarkAsDefault() { return true; }
  229. bool loadQuality() { return false; }
  230. void saveConsoleType(int) {}
  231. void saveDarkAsDefault(bool) {}
  232. void saveDirectOutMode(bool) {}
  233. void saveHighQualityAsDefault(bool) {}
  234. // plugin instances
  235. Plugin* pluginInstance__Cardinal;
  236. #ifndef NOPLUGINS
  237. Plugin* pluginInstance__AmalgamatedHarmonics;
  238. Plugin* pluginInstance__AnimatedCircuits;
  239. Plugin* pluginInstance__AS;
  240. Plugin* pluginInstance__AudibleInstruments;
  241. Plugin* pluginInstance__Befaco;
  242. Plugin* pluginInstance__Bidoo;
  243. Plugin* pluginInstance__BogaudioModules;
  244. Plugin* pluginInstance__cf;
  245. Plugin* pluginInstance__ESeries;
  246. Plugin* pluginInstance__Fundamental;
  247. Plugin* pluginInstance__GrandeModular;
  248. extern Plugin* pluginInstance__ImpromptuModular;
  249. Plugin* pluginInstance__JW;
  250. extern Plugin* pluginInstance__MindMeld;
  251. Plugin* pluginInstance__rackwindows;
  252. Plugin* pluginInstance__ValleyAudio;
  253. Plugin* pluginInstance__ZetaCarinaeModules;
  254. #endif // NOPLUGINS
  255. namespace rack {
  256. namespace asset {
  257. std::string pluginManifest(const std::string& dirname);
  258. std::string pluginPath(const std::string& dirname);
  259. }
  260. // core plugins
  261. namespace core {
  262. extern Model* modelAudioInterface;
  263. extern Model* modelAudioInterface2;
  264. extern Model* modelAudioInterface16;
  265. extern Model* modelMIDI_CV;
  266. extern Model* modelMIDI_CC;
  267. extern Model* modelMIDI_Gate;
  268. extern Model* modelMIDI_Map;
  269. extern Model* modelCV_MIDI;
  270. extern Model* modelCV_CC;
  271. extern Model* modelCV_Gate;
  272. extern Model* modelBlank;
  273. extern Model* modelNotes;
  274. }
  275. // regular plugins
  276. namespace plugin {
  277. struct StaticPluginLoader {
  278. Plugin* const plugin;
  279. FILE* file;
  280. json_t* rootJ;
  281. StaticPluginLoader(Plugin* const p, const char* const name)
  282. : plugin(p),
  283. file(nullptr),
  284. rootJ(nullptr)
  285. {
  286. #ifdef DEBUG
  287. DEBUG("Loading plugin module %s", name);
  288. #endif
  289. p->path = asset::pluginPath(name);
  290. const std::string manifestFilename = asset::pluginManifest(name);
  291. if ((file = std::fopen(manifestFilename.c_str(), "r")) == nullptr)
  292. {
  293. d_stderr2("Manifest file %s does not exist", manifestFilename.c_str());
  294. return;
  295. }
  296. json_error_t error;
  297. if ((rootJ = json_loadf(file, 0, &error)) == nullptr)
  298. {
  299. d_stderr2("JSON parsing error at %s %d:%d %s", manifestFilename.c_str(), error.line, error.column, error.text);
  300. return;
  301. }
  302. // force ABI, we use static plugins so this doesnt matter as long as it builds
  303. json_t* const version = json_string((APP_VERSION_MAJOR + ".0").c_str());
  304. json_object_set(rootJ, "version", version);
  305. json_decref(version);
  306. }
  307. ~StaticPluginLoader()
  308. {
  309. if (rootJ != nullptr)
  310. {
  311. plugin->fromJson(rootJ);
  312. json_decref(rootJ);
  313. plugins.push_back(plugin);
  314. }
  315. if (file != nullptr)
  316. std::fclose(file);
  317. }
  318. bool ok() const noexcept
  319. {
  320. return rootJ != nullptr;
  321. }
  322. };
  323. static void initStatic__Core()
  324. {
  325. Plugin* const p = new Plugin;
  326. const StaticPluginLoader spl(p, "Core");
  327. if (spl.ok())
  328. {
  329. p->addModel(rack::core::modelAudioInterface);
  330. p->addModel(rack::core::modelAudioInterface2);
  331. p->addModel(rack::core::modelAudioInterface16);
  332. p->addModel(rack::core::modelMIDI_CV);
  333. p->addModel(rack::core::modelMIDI_CC);
  334. p->addModel(rack::core::modelMIDI_Gate);
  335. p->addModel(rack::core::modelMIDI_Map);
  336. p->addModel(rack::core::modelCV_MIDI);
  337. p->addModel(rack::core::modelCV_CC);
  338. p->addModel(rack::core::modelCV_Gate);
  339. p->addModel(rack::core::modelBlank);
  340. p->addModel(rack::core::modelNotes);
  341. }
  342. }
  343. static void initStatic__Cardinal()
  344. {
  345. Plugin* const p = new Plugin;
  346. pluginInstance__Cardinal = p;
  347. const StaticPluginLoader spl(p, "Cardinal");
  348. if (spl.ok())
  349. {
  350. p->addModel(modelGlBars);
  351. p->addModel(modelHostParameters);
  352. p->addModel(modelHostTime);
  353. }
  354. }
  355. #ifndef NOPLUGINS
  356. static void initStatic__AmalgamatedHarmonics()
  357. {
  358. Plugin* const p = new Plugin;
  359. pluginInstance__AmalgamatedHarmonics = p;
  360. const StaticPluginLoader spl(p, "AmalgamatedHarmonics");
  361. if (spl.ok())
  362. {
  363. p->addModel(modelArp31);
  364. p->addModel(modelArp32);
  365. p->addModel(modelBombe);
  366. p->addModel(modelChord);
  367. p->addModel(modelCircle);
  368. p->addModel(modelGalaxy);
  369. p->addModel(modelGenerative);
  370. p->addModel(modelImp);
  371. p->addModel(modelImperfect2);
  372. p->addModel(modelProgress2);
  373. p->addModel(modelRuckus);
  374. p->addModel(modelScaleQuantizer2);
  375. p->addModel(modelSLN);
  376. p->addModel(modelMuxDeMux);
  377. p->addModel(modelPolyProbe);
  378. p->addModel(modelPolyScope);
  379. p->addModel(modelPolyUtils);
  380. p->addModel(modelPolyVolt);
  381. p->addModel(modelScaleQuantizer);
  382. p->addModel(modelArpeggiator2);
  383. p->addModel(modelProgress);
  384. }
  385. }
  386. static void initStatic__AnimatedCircuits()
  387. {
  388. Plugin* const p = new Plugin;
  389. pluginInstance__AnimatedCircuits = p;
  390. const StaticPluginLoader spl(p, "AnimatedCircuits");
  391. if (spl.ok())
  392. {
  393. p->addModel(model_AC_Folding);
  394. }
  395. }
  396. static void initStatic__AS()
  397. {
  398. Plugin* const p = new Plugin;
  399. pluginInstance__AS = p;
  400. const StaticPluginLoader spl(p, "AS");
  401. if (spl.ok())
  402. {
  403. #define modelADSR modelASADSR
  404. #define modelVCA modelASVCA
  405. //OSCILLATORS
  406. p->addModel(modelSineOsc);
  407. p->addModel(modelSawOsc);
  408. //TOOLS
  409. p->addModel(modelADSR);
  410. p->addModel(modelVCA);
  411. p->addModel(modelQuadVCA);
  412. p->addModel(modelTriLFO);
  413. p->addModel(modelAtNuVrTr);
  414. p->addModel(modelBPMClock);
  415. p->addModel(modelSEQ16);
  416. p->addModel(modelMixer2ch);
  417. p->addModel(modelMixer4ch);
  418. p->addModel(modelMixer8ch);
  419. p->addModel(modelMonoVUmeter);
  420. p->addModel(modelStereoVUmeter);
  421. p->addModel(modelMultiple2_5);
  422. p->addModel(modelMerge2_5);
  423. p->addModel(modelSteps);
  424. p->addModel(modelLaunchGate);
  425. p->addModel(modelKillGate);
  426. p->addModel(modelFlow);
  427. p->addModel(modelSignalDelay);
  428. p->addModel(modelTriggersMKI);
  429. p->addModel(modelTriggersMKII);
  430. p->addModel(modelTriggersMKIII);
  431. p->addModel(modelBPMCalc);
  432. p->addModel(modelBPMCalc2);
  433. p->addModel(modelCv2T);
  434. p->addModel(modelZeroCV2T);
  435. p->addModel(modelReScale);
  436. //EFFECTS
  437. p->addModel(modelDelayPlusFx);
  438. p->addModel(modelDelayPlusStereoFx);
  439. p->addModel(modelPhaserFx);
  440. p->addModel(modelReverbFx);
  441. p->addModel(modelReverbStereoFx);
  442. p->addModel(modelSuperDriveFx);
  443. p->addModel(modelSuperDriveStereoFx);
  444. p->addModel(modelTremoloFx);
  445. p->addModel(modelTremoloStereoFx);
  446. p->addModel(modelWaveShaper);
  447. p->addModel(modelWaveShaperStereo);
  448. //BLANK PANELS
  449. p->addModel(modelBlankPanel4);
  450. p->addModel(modelBlankPanel6);
  451. p->addModel(modelBlankPanel8);
  452. p->addModel(modelBlankPanelSpecial);
  453. #undef modelADSR
  454. #undef modelVCA
  455. }
  456. }
  457. static void initStatic__AudibleInstruments()
  458. {
  459. Plugin* const p = new Plugin;
  460. pluginInstance__AudibleInstruments = p;
  461. const StaticPluginLoader spl(p, "AudibleInstruments");
  462. if (spl.ok())
  463. {
  464. p->addModel(modelBraids);
  465. p->addModel(modelPlaits);
  466. p->addModel(modelElements);
  467. p->addModel(modelTides);
  468. p->addModel(modelTides2);
  469. p->addModel(modelClouds);
  470. p->addModel(modelWarps);
  471. p->addModel(modelRings);
  472. p->addModel(modelLinks);
  473. p->addModel(modelKinks);
  474. p->addModel(modelShades);
  475. p->addModel(modelBranches);
  476. p->addModel(modelBlinds);
  477. p->addModel(modelVeils);
  478. p->addModel(modelFrames);
  479. p->addModel(modelMarbles);
  480. p->addModel(modelStages);
  481. p->addModel(modelRipples);
  482. p->addModel(modelShelves);
  483. p->addModel(modelStreams);
  484. }
  485. }
  486. static void initStatic__Befaco()
  487. {
  488. Plugin* const p = new Plugin;
  489. pluginInstance__Befaco = p;
  490. const StaticPluginLoader spl(p, "Befaco");
  491. if (spl.ok())
  492. {
  493. p->addModel(modelEvenVCO);
  494. p->addModel(modelRampage);
  495. p->addModel(modelABC);
  496. p->addModel(modelSpringReverb);
  497. p->addModel(modelMixer);
  498. p->addModel(modelSlewLimiter);
  499. p->addModel(modelDualAtenuverter);
  500. }
  501. }
  502. static void initStatic__Bidoo()
  503. {
  504. Plugin* const p = new Plugin;
  505. pluginInstance__Bidoo = p;
  506. const StaticPluginLoader spl(p, "Bidoo");
  507. if (spl.ok())
  508. {
  509. p->addModel(modelTOCANTE);
  510. p->addModel(modelLATE);
  511. p->addModel(modelDIKTAT);
  512. p->addModel(modelDTROY);
  513. p->addModel(modelBORDL);
  514. p->addModel(modelZOUMAI);
  515. p->addModel(modelMU);
  516. p->addModel(modelCHUTE);
  517. p->addModel(modelLOURDE);
  518. p->addModel(modelACNE);
  519. p->addModel(modelMS);
  520. p->addModel(modelDUKE);
  521. p->addModel(modelMOIRE);
  522. p->addModel(modelPILOT);
  523. p->addModel(modelHUITRE);
  524. p->addModel(modelOUAIVE);
  525. p->addModel(modelPOUPRE);
  526. p->addModel(modelMAGMA);
  527. p->addModel(modelOAI);
  528. p->addModel(modelCANARD);
  529. p->addModel(modelEMILE);
  530. p->addModel(modelFORK);
  531. p->addModel(modelTIARE);
  532. //p->addModel(modelCLACOS);
  533. //p->addModel(modelPENEQUE);
  534. p->addModel(modelLIMONADE);
  535. p->addModel(modelLIMBO);
  536. p->addModel(modelPERCO);
  537. p->addModel(modelBAFIS);
  538. p->addModel(modelFFILTR);
  539. p->addModel(modelBAR);
  540. p->addModel(modelMINIBAR);
  541. p->addModel(modelZINC);
  542. p->addModel(modelFREIN);
  543. p->addModel(modelHCTIP);
  544. //p->addModel(modelCURT);
  545. p->addModel(modelDFUZE);
  546. p->addModel(modelREI);
  547. p->addModel(modelRABBIT);
  548. p->addModel(modelBISTROT);
  549. p->addModel(modelSIGMA);
  550. p->addModel(modelGARCON);
  551. p->addModel(modelVOID);
  552. // NOTE disabled in Cardinal due to curl usage
  553. // p->addModel(modelANTN);
  554. // intentionally remove known bad plugin
  555. if (json_t* const modules = json_object_get(spl.rootJ, "modules"))
  556. {
  557. size_t i;
  558. json_t* v;
  559. json_array_foreach(modules, i, v)
  560. {
  561. if (json_t* const slug = json_object_get(v, "slug"))
  562. {
  563. if (const char* const value = json_string_value(slug))
  564. {
  565. if (std::strcmp(value, "antN") == 0)
  566. {
  567. json_array_remove(modules, i);
  568. break;
  569. }
  570. }
  571. }
  572. }
  573. }
  574. }
  575. }
  576. static void initStatic__BogaudioModules()
  577. {
  578. Plugin* const p = new Plugin;
  579. pluginInstance__BogaudioModules = p;
  580. const StaticPluginLoader spl(p, "BogaudioModules");
  581. if (spl.ok())
  582. {
  583. #define modelADSR modelBogaudioADSR
  584. #define modelLFO modelBogaudioLFO
  585. #define modelNoise modelBogaudioNoise
  586. #define modelVCA modelBogaudioVCA
  587. #define modelVCF modelBogaudioVCF
  588. #define modelVCO modelBogaudioVCO
  589. p->addModel(modelVCO);
  590. p->addModel(modelLVCO);
  591. p->addModel(modelSine);
  592. p->addModel(modelPulse);
  593. p->addModel(modelXCO);
  594. p->addModel(modelAdditator);
  595. p->addModel(modelFMOp);
  596. p->addModel(modelChirp);
  597. p->addModel(modelLFO);
  598. p->addModel(modelLLFO);
  599. p->addModel(modelFourFO);
  600. p->addModel(modelEightFO);
  601. p->addModel(modelVCF);
  602. p->addModel(modelLVCF);
  603. p->addModel(modelFFB);
  604. p->addModel(modelEQ);
  605. p->addModel(modelEQS);
  606. p->addModel(modelLPG);
  607. p->addModel(modelLLPG);
  608. p->addModel(modelMegaGate);
  609. p->addModel(modelPEQ);
  610. p->addModel(modelPEQ6);
  611. p->addModel(modelPEQ6XF);
  612. p->addModel(modelPEQ14);
  613. p->addModel(modelPEQ14XF);
  614. p->addModel(modelDADSRH);
  615. p->addModel(modelDADSRHPlus);
  616. p->addModel(modelShaper);
  617. p->addModel(modelShaperPlus);
  618. p->addModel(modelAD);
  619. p->addModel(modelASR);
  620. p->addModel(modelADSR);
  621. p->addModel(modelVish);
  622. p->addModel(modelFollow);
  623. p->addModel(modelDGate);
  624. p->addModel(modelRGate);
  625. p->addModel(modelEdge);
  626. p->addModel(modelNoise);
  627. p->addModel(modelSampleHold);
  628. p->addModel(modelWalk2);
  629. p->addModel(modelWalk);
  630. p->addModel(modelMix8);
  631. p->addModel(modelMix8x);
  632. p->addModel(modelMix4);
  633. p->addModel(modelMix4x);
  634. p->addModel(modelMix2);
  635. p->addModel(modelMix1);
  636. p->addModel(modelVCM);
  637. p->addModel(modelMute8);
  638. p->addModel(modelPan);
  639. p->addModel(modelXFade);
  640. p->addModel(modelVCA);
  641. p->addModel(modelVCAmp);
  642. p->addModel(modelVelo);
  643. p->addModel(modelUMix);
  644. p->addModel(modelMumix);
  645. p->addModel(modelMatrix81);
  646. p->addModel(modelMatrix18);
  647. p->addModel(modelMatrix44);
  648. p->addModel(modelMatrix44Cvm);
  649. p->addModel(modelMatrix88);
  650. p->addModel(modelMatrix88Cv);
  651. p->addModel(modelMatrix88M);
  652. p->addModel(modelSwitch81);
  653. p->addModel(modelSwitch18);
  654. p->addModel(modelSwitch44);
  655. p->addModel(modelSwitch88);
  656. p->addModel(modelSwitch1616);
  657. p->addModel(modelAMRM);
  658. p->addModel(modelPressor);
  659. p->addModel(modelClpr);
  660. p->addModel(modelLmtr);
  661. p->addModel(modelNsgt);
  662. p->addModel(modelCmpDist);
  663. p->addModel(modelOneEight);
  664. p->addModel(modelEightOne);
  665. p->addModel(modelAddrSeq);
  666. p->addModel(modelAddrSeqX);
  667. p->addModel(modelPgmr);
  668. p->addModel(modelPgmrX);
  669. p->addModel(modelVU);
  670. p->addModel(modelAnalyzer);
  671. p->addModel(modelAnalyzerXL);
  672. p->addModel(modelRanalyzer);
  673. p->addModel(modelDetune);
  674. p->addModel(modelStack);
  675. p->addModel(modelReftone);
  676. p->addModel(modelMono);
  677. p->addModel(modelArp);
  678. p->addModel(modelAssign);
  679. p->addModel(modelUnison);
  680. p->addModel(modelPolyCon8);
  681. p->addModel(modelPolyCon16);
  682. p->addModel(modelPolyOff8);
  683. p->addModel(modelPolyOff16);
  684. p->addModel(modelPolyMult);
  685. p->addModel(modelBool);
  686. p->addModel(modelCmp);
  687. p->addModel(modelCVD);
  688. p->addModel(modelFlipFlop);
  689. p->addModel(modelInv);
  690. p->addModel(modelManual);
  691. p->addModel(modelFourMan);
  692. p->addModel(modelMult);
  693. p->addModel(modelOffset);
  694. p->addModel(modelSlew);
  695. p->addModel(modelSums);
  696. p->addModel(modelSwitch);
  697. p->addModel(modelLgsw);
  698. p->addModel(modelBlank3);
  699. p->addModel(modelBlank6);
  700. #ifdef EXPERIMENTAL
  701. p->addModel(modelLag);
  702. p->addModel(modelPEQ14XR);
  703. p->addModel(modelPEQ14XV);
  704. #endif
  705. #ifdef TEST
  706. p->addModel(modelTest);
  707. p->addModel(modelTest2);
  708. p->addModel(modelTestExpanderBase);
  709. p->addModel(modelTestExpanderExtension);
  710. p->addModel(modelTestGl);
  711. p->addModel(modelTestVCF);
  712. #endif
  713. #undef modelADSR
  714. #undef modelLFO
  715. #undef modelNoise
  716. #undef modelVCA
  717. #undef modelVCF
  718. #undef modelVCO
  719. }
  720. }
  721. static void initStatic__cf()
  722. {
  723. Plugin* const p = new Plugin;
  724. pluginInstance__cf = p;
  725. const StaticPluginLoader spl(p, "cf");
  726. if (spl.ok())
  727. {
  728. p->addModel(modelMETRO);
  729. p->addModel(modelEACH);
  730. p->addModel(modeltrSEQ);
  731. p->addModel(modelLEDSEQ);
  732. p->addModel(modelL3DS3Q);
  733. p->addModel(modelSLIDERSEQ);
  734. p->addModel(modelPLAYER);
  735. p->addModel(modelPLAY);
  736. p->addModel(modelMONO);
  737. p->addModel(modelSTEREO);
  738. p->addModel(modelSUB);
  739. p->addModel(modelMASTER);
  740. p->addModel(modelVARIABLE);
  741. p->addModel(modelALGEBRA);
  742. p->addModel(modelFUNKTION);
  743. p->addModel(modelCHOKE);
  744. p->addModel(modelFOUR);
  745. p->addModel(modelSTEPS);
  746. p->addModel(modelPEAK);
  747. p->addModel(modelCUTS);
  748. p->addModel(modelBUFFER);
  749. p->addModel(modelDISTO);
  750. p->addModel(modelCUBE);
  751. p->addModel(modelPATCH);
  752. p->addModel(modelLABEL);
  753. p->addModel(modelDAVE);
  754. }
  755. }
  756. static void initStatic__ESeries()
  757. {
  758. Plugin* const p = new Plugin;
  759. pluginInstance__ESeries = p;
  760. const StaticPluginLoader spl(p, "ESeries");
  761. if (spl.ok())
  762. {
  763. p->addModel(modelE340);
  764. }
  765. }
  766. static void initStatic__Fundamental()
  767. {
  768. Plugin* const p = new Plugin;
  769. pluginInstance__Fundamental = p;
  770. const StaticPluginLoader spl(p, "Fundamental");
  771. if (spl.ok())
  772. {
  773. p->addModel(modelVCO);
  774. p->addModel(modelVCO2);
  775. p->addModel(modelVCF);
  776. p->addModel(modelVCA_1);
  777. p->addModel(modelVCA);
  778. p->addModel(modelLFO);
  779. p->addModel(modelLFO2);
  780. p->addModel(modelDelay);
  781. p->addModel(modelADSR);
  782. p->addModel(modelVCMixer);
  783. p->addModel(model_8vert);
  784. p->addModel(modelUnity);
  785. p->addModel(modelMutes);
  786. p->addModel(modelPulses);
  787. p->addModel(modelScope);
  788. p->addModel(modelSEQ3);
  789. p->addModel(modelSequentialSwitch1);
  790. p->addModel(modelSequentialSwitch2);
  791. p->addModel(modelOctave);
  792. p->addModel(modelQuantizer);
  793. p->addModel(modelSplit);
  794. p->addModel(modelMerge);
  795. p->addModel(modelSum);
  796. p->addModel(modelViz);
  797. p->addModel(modelMidSide);
  798. p->addModel(modelNoise);
  799. p->addModel(modelRandom);
  800. }
  801. }
  802. static void initStatic__GrandeModular()
  803. {
  804. Plugin* const p = new Plugin;
  805. pluginInstance__GrandeModular = p;
  806. const StaticPluginLoader spl(p, "GrandeModular");
  807. if (spl.ok())
  808. {
  809. p->addModel(modelClip);
  810. p->addModel(modelMergeSplit4);
  811. p->addModel(modelMicrotonalChords);
  812. p->addModel(modelMicrotonalNotes);
  813. p->addModel(modelNoteMT);
  814. p->addModel(modelPolyMergeResplit);
  815. p->addModel(modelQuant);
  816. p->addModel(modelQuantIntervals);
  817. p->addModel(modelQuantMT);
  818. p->addModel(modelSampleDelays);
  819. p->addModel(modelScale);
  820. p->addModel(modelTails);
  821. p->addModel(modelVarSampleDelays);
  822. }
  823. }
  824. static void initStatic__ImpromptuModular()
  825. {
  826. Plugin* const p = new Plugin;
  827. pluginInstance__ImpromptuModular = p;
  828. const StaticPluginLoader spl(p, "ImpromptuModular");
  829. if (spl.ok())
  830. {
  831. p->addModel(modelBigButtonSeq);
  832. p->addModel(modelBigButtonSeq2);
  833. p->addModel(modelChordKey);
  834. p->addModel(modelChordKeyExpander);
  835. p->addModel(modelClocked);
  836. p->addModel(modelClockedExpander);
  837. p->addModel(modelClkd);
  838. p->addModel(modelCvPad);
  839. p->addModel(modelFoundry);
  840. p->addModel(modelFoundryExpander);
  841. p->addModel(modelFourView);
  842. p->addModel(modelGateSeq64);
  843. p->addModel(modelGateSeq64Expander);
  844. p->addModel(modelHotkey);
  845. p->addModel(modelPart);
  846. p->addModel(modelPhraseSeq16);
  847. p->addModel(modelPhraseSeq32);
  848. p->addModel(modelPhraseSeqExpander);
  849. p->addModel(modelProbKey);
  850. // p->addModel(modelProbKeyExpander);
  851. p->addModel(modelSemiModularSynth);
  852. p->addModel(modelTact);
  853. p->addModel(modelTact1);
  854. p->addModel(modelTactG);
  855. p->addModel(modelTwelveKey);
  856. p->addModel(modelWriteSeq32);
  857. p->addModel(modelWriteSeq64);
  858. p->addModel(modelBlankPanel);
  859. }
  860. }
  861. static void initStatic__JW()
  862. {
  863. Plugin* const p = new Plugin;
  864. pluginInstance__JW = p;
  865. const StaticPluginLoader spl(p, "JW-Modules");
  866. if (spl.ok())
  867. {
  868. #define modelQuantizer modelJWQuantizer
  869. p->addModel(modelAdd5);
  870. p->addModel(modelBouncyBalls);
  871. p->addModel(modelCat);
  872. p->addModel(modelTree);
  873. p->addModel(modelFullScope);
  874. p->addModel(modelGridSeq);
  875. p->addModel(modelEightSeq);
  876. p->addModel(modelDivSeq);
  877. p->addModel(modelMinMax);
  878. p->addModel(modelNoteSeq);
  879. p->addModel(modelNoteSeqFu);
  880. p->addModel(modelNoteSeq16);
  881. p->addModel(modelTrigs);
  882. p->addModel(modelOnePattern);
  883. p->addModel(modelPatterns);
  884. p->addModel(modelQuantizer);
  885. p->addModel(modelSimpleClock);
  886. p->addModel(modelStr1ker);
  887. p->addModel(modelD1v1de);
  888. p->addModel(modelPres1t);
  889. p->addModel(modelThingThing);
  890. p->addModel(modelWavHead);
  891. p->addModel(modelXYPad);
  892. p->addModel(modelBlankPanel1hp);
  893. p->addModel(modelBlankPanelSmall);
  894. p->addModel(modelBlankPanelMedium);
  895. p->addModel(modelBlankPanelLarge);
  896. p->addModel(modelCoolBreeze);
  897. p->addModel(modelPete);
  898. #undef modelQuantizer
  899. }
  900. }
  901. static void initStatic__MindMeld()
  902. {
  903. Plugin* const p = new Plugin;
  904. pluginInstance__MindMeld = p;
  905. const StaticPluginLoader spl(p, "MindMeldModular");
  906. if (spl.ok())
  907. {
  908. p->addModel(modelMixMasterJr);
  909. p->addModel(modelAuxExpanderJr);
  910. p->addModel(modelMixMaster);
  911. p->addModel(modelAuxExpander);
  912. p->addModel(modelMeld);
  913. p->addModel(modelUnmeld);
  914. p->addModel(modelEqMaster);
  915. p->addModel(modelEqExpander);
  916. p->addModel(modelBassMaster);
  917. p->addModel(modelBassMasterJr);
  918. p->addModel(modelShapeMaster);
  919. }
  920. }
  921. static void initStatic__rackwindows()
  922. {
  923. Plugin* const p = new Plugin;
  924. pluginInstance__rackwindows = p;
  925. const StaticPluginLoader spl(p, "rackwindows");
  926. if (spl.ok())
  927. {
  928. // p->addModel(modelAcceleration);
  929. p->addModel(modelBitshiftgain);
  930. p->addModel(modelCapacitor);
  931. p->addModel(modelCapacitor_stereo);
  932. p->addModel(modelChorus);
  933. p->addModel(modelConsole);
  934. p->addModel(modelConsole_mm);
  935. p->addModel(modelDistance);
  936. p->addModel(modelGolem);
  937. p->addModel(modelHolt);
  938. p->addModel(modelHombre);
  939. p->addModel(modelInterstage);
  940. p->addModel(modelMonitoring);
  941. p->addModel(modelMv);
  942. p->addModel(modelRasp);
  943. p->addModel(modelReseq);
  944. p->addModel(modelTape);
  945. p->addModel(modelTremolo);
  946. p->addModel(modelVibrato);
  947. }
  948. }
  949. static void initStatic__ValleyAudio()
  950. {
  951. Plugin* const p = new Plugin;
  952. pluginInstance__ValleyAudio = p;
  953. const StaticPluginLoader spl(p, "ValleyAudio");
  954. if (spl.ok())
  955. {
  956. p->addModel(modelTopograph);
  957. p->addModel(modelUGraph);
  958. p->addModel(modelDexter);
  959. p->addModel(modelPlateau);
  960. p->addModel(modelInterzone);
  961. p->addModel(modelAmalgam);
  962. p->addModel(modelFeline);
  963. p->addModel(modelTerrorform);
  964. }
  965. }
  966. static void initStatic__ZetaCarinaeModules()
  967. {
  968. Plugin* p = new Plugin;
  969. pluginInstance__ZetaCarinaeModules = p;
  970. const StaticPluginLoader spl(p, "ZetaCarinaeModules");
  971. if (spl.ok())
  972. {
  973. p->addModel(modelBrownianBridge);
  974. p->addModel(modelOrnsteinUhlenbeck);
  975. p->addModel(modelIOU);
  976. p->addModel(modelWarbler);
  977. p->addModel(modelRosenchance);
  978. p->addModel(modelGuildensTurn);
  979. p->addModel(modelRosslerRustler);
  980. p->addModel(modelFirefly);
  981. }
  982. }
  983. #endif // NOPLUGINS
  984. void initStaticPlugins()
  985. {
  986. initStatic__Core();
  987. initStatic__Cardinal();
  988. #ifndef NOPLUGINS
  989. initStatic__AmalgamatedHarmonics();
  990. initStatic__AnimatedCircuits();
  991. initStatic__AS();
  992. initStatic__AudibleInstruments();
  993. initStatic__Befaco();
  994. initStatic__Bidoo();
  995. initStatic__BogaudioModules();
  996. initStatic__cf();
  997. initStatic__ESeries();
  998. initStatic__Fundamental();
  999. initStatic__GrandeModular();
  1000. initStatic__ImpromptuModular();
  1001. initStatic__JW();
  1002. initStatic__MindMeld();
  1003. initStatic__rackwindows();
  1004. initStatic__ValleyAudio();
  1005. initStatic__ZetaCarinaeModules();
  1006. #endif // NOPLUGINS
  1007. }
  1008. void destroyStaticPlugins()
  1009. {
  1010. for (Plugin* p : plugins)
  1011. delete p;
  1012. plugins.clear();
  1013. }
  1014. }
  1015. }