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.

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