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.

670 lines
20KB

  1. /*
  2. * DISTRHO Cardinal Plugin
  3. * Copyright (C) 2021-2023 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 "rack.hpp"
  18. #include "plugin.hpp"
  19. #include "DistrhoUtils.hpp"
  20. // Cardinal (built-in)
  21. #include "Cardinal/src/plugin.hpp"
  22. // Fundamental
  23. #include "Fundamental/src/plugin.hpp"
  24. // Aria
  25. extern Model* modelSpleet;
  26. extern Model* modelSwerge;
  27. // AudibleInstruments
  28. #include "AudibleInstruments/src/plugin.hpp"
  29. // BogaudioModules - integrate theme/skin support
  30. #include <mutex>
  31. #include <string>
  32. #include <unordered_map>
  33. #include <unordered_set>
  34. #include <vector>
  35. #define private public
  36. #include "BogaudioModules/src/skins.hpp"
  37. #undef private
  38. // BogaudioModules
  39. extern Model* modelBogaudioLFO;
  40. extern Model* modelBogaudioNoise;
  41. extern Model* modelBogaudioVCA;
  42. extern Model* modelBogaudioVCF;
  43. extern Model* modelBogaudioVCO;
  44. extern Model* modelOffset;
  45. extern Model* modelSampleHold;
  46. extern Model* modelSwitch;
  47. extern Model* modelSwitch18;
  48. extern Model* modelUnison;
  49. // MockbaModular
  50. #include "MockbaModular/src/plugin.hpp"
  51. #include "MockbaModular/src/MockbaModular.hpp"
  52. #undef min
  53. #define saveBack ignoreMockbaModular1
  54. #define loadBack ignoreMockbaModular2
  55. #include "MockbaModular/src/MockbaModular.cpp"
  56. #undef saveBack
  57. #undef loadBack
  58. std::string loadBack(int) { return "res/Empty_gray.svg"; }
  59. // surgext
  60. #include "surgext/src/SurgeXT.h"
  61. void surgext_rack_initialize();
  62. void surgext_rack_update_theme();
  63. // ValleyAudio
  64. #include "ValleyAudio/src/Valley.hpp"
  65. // known terminal modules
  66. std::vector<Model*> hostTerminalModels;
  67. // plugin instances
  68. Plugin* pluginInstance__Cardinal;
  69. Plugin* pluginInstance__Fundamental;
  70. Plugin* pluginInstance__Aria;
  71. Plugin* pluginInstance__AudibleInstruments;
  72. Plugin* pluginInstance__BogaudioModules;
  73. Plugin* pluginInstance__MockbaModular;
  74. Plugin* pluginInstance__surgext;
  75. Plugin* pluginInstance__ValleyAudio;
  76. namespace rack {
  77. namespace asset {
  78. std::string pluginManifest(const std::string& dirname);
  79. std::string pluginPath(const std::string& dirname);
  80. }
  81. namespace plugin {
  82. struct StaticPluginLoader {
  83. Plugin* const plugin;
  84. FILE* file;
  85. json_t* rootJ;
  86. StaticPluginLoader(Plugin* const p, const char* const name)
  87. : plugin(p),
  88. file(nullptr),
  89. rootJ(nullptr)
  90. {
  91. #ifdef DEBUG
  92. DEBUG("Loading plugin module %s", name);
  93. #endif
  94. p->path = asset::pluginPath(name);
  95. const std::string manifestFilename = asset::pluginManifest(name);
  96. if ((file = std::fopen(manifestFilename.c_str(), "r")) == nullptr)
  97. {
  98. d_stderr2("Manifest file %s does not exist", manifestFilename.c_str());
  99. return;
  100. }
  101. json_error_t error;
  102. if ((rootJ = json_loadf(file, 0, &error)) == nullptr)
  103. {
  104. d_stderr2("JSON parsing error at %s %d:%d %s", manifestFilename.c_str(), error.line, error.column, error.text);
  105. return;
  106. }
  107. // force ABI, we use static plugins so this doesnt matter as long as it builds
  108. json_t* const version = json_string((APP_VERSION_MAJOR + ".0").c_str());
  109. json_object_set(rootJ, "version", version);
  110. json_decref(version);
  111. // Load manifest
  112. p->fromJson(rootJ);
  113. // Reject plugin if slug already exists
  114. if (Plugin* const existingPlugin = getPlugin(p->slug))
  115. throw Exception("Plugin %s is already loaded, not attempting to load it again", p->slug.c_str());
  116. }
  117. ~StaticPluginLoader()
  118. {
  119. if (rootJ != nullptr)
  120. {
  121. // Load modules manifest
  122. json_t* const modulesJ = json_object_get(rootJ, "modules");
  123. plugin->modulesFromJson(modulesJ);
  124. json_decref(rootJ);
  125. plugins.push_back(plugin);
  126. }
  127. if (file != nullptr)
  128. std::fclose(file);
  129. }
  130. bool ok() const noexcept
  131. {
  132. return rootJ != nullptr;
  133. }
  134. void removeModule(const char* const slugToRemove) const noexcept
  135. {
  136. json_t* const modules = json_object_get(rootJ, "modules");
  137. DISTRHO_SAFE_ASSERT_RETURN(modules != nullptr,);
  138. size_t i;
  139. json_t* v;
  140. json_array_foreach(modules, i, v)
  141. {
  142. if (json_t* const slug = json_object_get(v, "slug"))
  143. {
  144. if (const char* const value = json_string_value(slug))
  145. {
  146. if (std::strcmp(value, slugToRemove) == 0)
  147. {
  148. json_array_remove(modules, i);
  149. break;
  150. }
  151. }
  152. }
  153. }
  154. }
  155. };
  156. static void initStatic__Cardinal()
  157. {
  158. Plugin* const p = new Plugin;
  159. pluginInstance__Cardinal = p;
  160. const StaticPluginLoader spl(p, "Cardinal");
  161. if (spl.ok())
  162. {
  163. p->addModel(modelHostAudio2);
  164. p->addModel(modelHostCV);
  165. p->addModel(modelHostMIDI);
  166. p->addModel(modelHostMIDICC);
  167. p->addModel(modelHostMIDIGate);
  168. p->addModel(modelHostMIDIMap);
  169. p->addModel(modelHostParameters);
  170. p->addModel(modelHostParametersMap);
  171. p->addModel(modelHostTime);
  172. p->addModel(modelTextEditor);
  173. /* TODO
  174. #ifdef HAVE_FFTW3F
  175. p->addModel(modelAudioToCVPitch);
  176. #else
  177. */
  178. spl.removeModule("AudioToCVPitch");
  179. /*
  180. #endif
  181. */
  182. spl.removeModule("AIDA-X");
  183. spl.removeModule("AudioFile");
  184. spl.removeModule("Blank");
  185. spl.removeModule("Carla");
  186. spl.removeModule("ExpanderInputMIDI");
  187. spl.removeModule("ExpanderOutputMIDI");
  188. spl.removeModule("HostAudio8");
  189. spl.removeModule("Ildaeil");
  190. spl.removeModule("MPV");
  191. spl.removeModule("SassyScope");
  192. spl.removeModule("glBars");
  193. hostTerminalModels = {
  194. modelHostAudio2,
  195. modelHostCV,
  196. modelHostMIDI,
  197. modelHostMIDICC,
  198. modelHostMIDIGate,
  199. modelHostMIDIMap,
  200. modelHostParameters,
  201. modelHostParametersMap,
  202. modelHostTime,
  203. };
  204. }
  205. }
  206. static void initStatic__Fundamental()
  207. {
  208. Plugin* const p = new Plugin;
  209. pluginInstance__Fundamental = p;
  210. const StaticPluginLoader spl(p, "Fundamental");
  211. if (spl.ok())
  212. {
  213. p->addModel(modelADSR);
  214. p->addModel(modelLFO);
  215. p->addModel(modelMerge);
  216. p->addModel(modelMidSide);
  217. p->addModel(modelNoise);
  218. p->addModel(modelQuantizer);
  219. p->addModel(modelRandom);
  220. p->addModel(modelScope);
  221. p->addModel(modelSplit);
  222. p->addModel(modelSum);
  223. p->addModel(modelVCA_1);
  224. p->addModel(modelVCF);
  225. p->addModel(modelVCMixer);
  226. p->addModel(modelVCO);
  227. spl.removeModule("8vert");
  228. spl.removeModule("Delay");
  229. spl.removeModule("LFO2");
  230. spl.removeModule("Mixer");
  231. spl.removeModule("Mutes");
  232. spl.removeModule("Octave");
  233. spl.removeModule("Pulses");
  234. spl.removeModule("SEQ3");
  235. spl.removeModule("SequentialSwitch1");
  236. spl.removeModule("SequentialSwitch2");
  237. spl.removeModule("VCA");
  238. spl.removeModule("VCO2");
  239. }
  240. }
  241. static void initStatic__Aria()
  242. {
  243. Plugin* const p = new Plugin;
  244. pluginInstance__Aria = p;
  245. const StaticPluginLoader spl(p, "AriaModules");
  246. if (spl.ok())
  247. {
  248. p->addModel(modelSpleet);
  249. p->addModel(modelSwerge);
  250. spl.removeModule("Aleister");
  251. spl.removeModule("Arcane");
  252. spl.removeModule("Atout");
  253. spl.removeModule("Blank");
  254. spl.removeModule("Darius");
  255. spl.removeModule("Grabby");
  256. spl.removeModule("Pokies4");
  257. spl.removeModule("Psychopump");
  258. spl.removeModule("Q");
  259. spl.removeModule("Qqqq");
  260. spl.removeModule("Quack");
  261. spl.removeModule("Quale");
  262. spl.removeModule("Rotatoes4");
  263. spl.removeModule("Smerge");
  264. spl.removeModule("Solomon16");
  265. spl.removeModule("Solomon4");
  266. spl.removeModule("Solomon8");
  267. spl.removeModule("Splirge");
  268. spl.removeModule("Splort");
  269. spl.removeModule("Undular");
  270. }
  271. }
  272. static void initStatic__AudibleInstruments()
  273. {
  274. Plugin* const p = new Plugin;
  275. pluginInstance__AudibleInstruments = p;
  276. const StaticPluginLoader spl(p, "AudibleInstruments");
  277. if (spl.ok())
  278. {
  279. p->addModel(modelPlaits);
  280. spl.removeModule("Blinds");
  281. spl.removeModule("Braids");
  282. spl.removeModule("Branches");
  283. spl.removeModule("Clouds");
  284. spl.removeModule("Elements");
  285. spl.removeModule("Frames");
  286. spl.removeModule("Kinks");
  287. spl.removeModule("Links");
  288. spl.removeModule("Marbles");
  289. spl.removeModule("Rings");
  290. spl.removeModule("Ripples");
  291. spl.removeModule("Shades");
  292. spl.removeModule("Shelves");
  293. spl.removeModule("Stages");
  294. spl.removeModule("Streams");
  295. spl.removeModule("Tides");
  296. spl.removeModule("Tides2");
  297. spl.removeModule("Veils");
  298. spl.removeModule("Warps");
  299. }
  300. }
  301. static void initStatic__BogaudioModules()
  302. {
  303. Plugin* const p = new Plugin;
  304. pluginInstance__BogaudioModules = p;
  305. const StaticPluginLoader spl(p, "BogaudioModules");
  306. if (spl.ok())
  307. {
  308. // Make sure to use match Cardinal theme
  309. Skins& skins(Skins::skins());
  310. skins._default = settings::darkMode ? "dark" : "light";
  311. p->addModel(modelBogaudioLFO);
  312. p->addModel(modelBogaudioNoise);
  313. p->addModel(modelBogaudioVCA);
  314. p->addModel(modelBogaudioVCF);
  315. p->addModel(modelBogaudioVCO);
  316. p->addModel(modelOffset);
  317. p->addModel(modelSampleHold);
  318. p->addModel(modelSwitch);
  319. p->addModel(modelSwitch18);
  320. p->addModel(modelUnison);
  321. // cat plugins/BogaudioModules/plugin.json | jq -r .modules[].slug - | sort
  322. spl.removeModule("Bogaudio-AD");
  323. spl.removeModule("Bogaudio-Additator");
  324. spl.removeModule("Bogaudio-AddrSeq");
  325. spl.removeModule("Bogaudio-AddrSeqX");
  326. spl.removeModule("Bogaudio-ADSR");
  327. spl.removeModule("Bogaudio-AMRM");
  328. spl.removeModule("Bogaudio-Analyzer");
  329. spl.removeModule("Bogaudio-AnalyzerXL");
  330. spl.removeModule("Bogaudio-Arp");
  331. spl.removeModule("Bogaudio-ASR");
  332. spl.removeModule("Bogaudio-Assign");
  333. spl.removeModule("Bogaudio-Blank3");
  334. spl.removeModule("Bogaudio-Blank6");
  335. spl.removeModule("Bogaudio-Bool");
  336. spl.removeModule("Bogaudio-Chirp");
  337. spl.removeModule("Bogaudio-Clpr");
  338. spl.removeModule("Bogaudio-Cmp");
  339. spl.removeModule("Bogaudio-CmpDist");
  340. spl.removeModule("Bogaudio-CVD");
  341. spl.removeModule("Bogaudio-DADSRH");
  342. spl.removeModule("Bogaudio-DADSRHPlus");
  343. spl.removeModule("Bogaudio-Detune");
  344. spl.removeModule("Bogaudio-DGate");
  345. spl.removeModule("Bogaudio-Edge");
  346. spl.removeModule("Bogaudio-EightFO");
  347. spl.removeModule("Bogaudio-EightOne");
  348. spl.removeModule("Bogaudio-EQ");
  349. spl.removeModule("Bogaudio-EQS");
  350. spl.removeModule("Bogaudio-FFB");
  351. spl.removeModule("Bogaudio-FlipFlop");
  352. spl.removeModule("Bogaudio-FMOp");
  353. spl.removeModule("Bogaudio-Follow");
  354. spl.removeModule("Bogaudio-FourFO");
  355. spl.removeModule("Bogaudio-FourMan");
  356. spl.removeModule("Bogaudio-Inv");
  357. spl.removeModule("Bogaudio-Lgsw");
  358. spl.removeModule("Bogaudio-LLFO");
  359. spl.removeModule("Bogaudio-LLPG");
  360. spl.removeModule("Bogaudio-Lmtr");
  361. spl.removeModule("Bogaudio-LPG");
  362. spl.removeModule("Bogaudio-LVCF");
  363. spl.removeModule("Bogaudio-LVCO");
  364. spl.removeModule("Bogaudio-Manual");
  365. spl.removeModule("Bogaudio-Matrix18");
  366. spl.removeModule("Bogaudio-Matrix44");
  367. spl.removeModule("Bogaudio-Matrix44Cvm");
  368. spl.removeModule("Bogaudio-Matrix81");
  369. spl.removeModule("Bogaudio-Matrix88");
  370. spl.removeModule("Bogaudio-Matrix88Cv");
  371. spl.removeModule("Bogaudio-Matrix88M");
  372. spl.removeModule("Bogaudio-MegaGate");
  373. spl.removeModule("Bogaudio-Mix1");
  374. spl.removeModule("Bogaudio-Mix2");
  375. spl.removeModule("Bogaudio-Mix4");
  376. spl.removeModule("Bogaudio-Mix4x");
  377. spl.removeModule("Bogaudio-Mix8");
  378. spl.removeModule("Bogaudio-Mix8x");
  379. spl.removeModule("Bogaudio-Mono");
  380. spl.removeModule("Bogaudio-Mult");
  381. spl.removeModule("Bogaudio-Mumix");
  382. spl.removeModule("Bogaudio-Mute8");
  383. spl.removeModule("Bogaudio-Nsgt");
  384. spl.removeModule("Bogaudio-OneEight");
  385. spl.removeModule("Bogaudio-Pan");
  386. spl.removeModule("Bogaudio-PEQ");
  387. spl.removeModule("Bogaudio-PEQ14");
  388. spl.removeModule("Bogaudio-PEQ14XF");
  389. spl.removeModule("Bogaudio-PEQ6");
  390. spl.removeModule("Bogaudio-PEQ6XF");
  391. spl.removeModule("Bogaudio-Pgmr");
  392. spl.removeModule("Bogaudio-PgmrX");
  393. spl.removeModule("Bogaudio-PolyCon");
  394. spl.removeModule("Bogaudio-PolyCon8");
  395. spl.removeModule("Bogaudio-PolyMult");
  396. spl.removeModule("Bogaudio-PolyOff16");
  397. spl.removeModule("Bogaudio-PolyOff8");
  398. spl.removeModule("Bogaudio-Pressor");
  399. spl.removeModule("Bogaudio-Pulse");
  400. spl.removeModule("Bogaudio-Ranalyzer");
  401. spl.removeModule("Bogaudio-Reftone");
  402. spl.removeModule("Bogaudio-RGate");
  403. spl.removeModule("Bogaudio-Shaper");
  404. spl.removeModule("Bogaudio-ShaperPlus");
  405. spl.removeModule("Bogaudio-Sine");
  406. spl.removeModule("Bogaudio-Slew");
  407. spl.removeModule("Bogaudio-Stack");
  408. spl.removeModule("Bogaudio-Sums");
  409. spl.removeModule("Bogaudio-Switch1616");
  410. spl.removeModule("Bogaudio-Switch44");
  411. spl.removeModule("Bogaudio-Switch81");
  412. spl.removeModule("Bogaudio-Switch88");
  413. spl.removeModule("Bogaudio-UMix");
  414. spl.removeModule("Bogaudio-VCAmp");
  415. spl.removeModule("Bogaudio-VCM");
  416. spl.removeModule("Bogaudio-Velo");
  417. spl.removeModule("Bogaudio-Vish");
  418. spl.removeModule("Bogaudio-VU");
  419. spl.removeModule("Bogaudio-Walk");
  420. spl.removeModule("Bogaudio-Walk2");
  421. spl.removeModule("Bogaudio-XCO");
  422. spl.removeModule("Bogaudio-XFade");
  423. }
  424. }
  425. static void initStatic__MockbaModular()
  426. {
  427. Plugin* const p = new Plugin;
  428. pluginInstance__MockbaModular = p;
  429. const StaticPluginLoader spl(p, "MockbaModular");
  430. if (spl.ok())
  431. {
  432. p->addModel(modelCZOsc);
  433. p->addModel(modelFiltah);
  434. p->addModel(modelMaugOsc);
  435. p->addModel(modelMixah);
  436. p->addModel(modelPannah);
  437. p->addModel(modelReVoltah);
  438. p->addModel(modelShapah);
  439. spl.removeModule("Blank");
  440. spl.removeModule("Comparator");
  441. spl.removeModule("Countah");
  442. spl.removeModule("CZDblSine");
  443. spl.removeModule("CZPulse");
  444. spl.removeModule("CZReso1");
  445. spl.removeModule("CZReso2");
  446. spl.removeModule("CZReso3");
  447. spl.removeModule("CZSaw");
  448. spl.removeModule("CZSawPulse");
  449. spl.removeModule("CZSquare");
  450. spl.removeModule("Dividah");
  451. spl.removeModule("DualBUFFER");
  452. spl.removeModule("DualNOT");
  453. spl.removeModule("DualOR");
  454. spl.removeModule("DualNOR");
  455. spl.removeModule("DualAND");
  456. spl.removeModule("DualNAND");
  457. spl.removeModule("DualXOR");
  458. spl.removeModule("DualXNOR");
  459. spl.removeModule("Feidah");
  460. spl.removeModule("FeidahS");
  461. spl.removeModule("Holdah");
  462. spl.removeModule("MaugSaw");
  463. spl.removeModule("MaugSaw2");
  464. spl.removeModule("MaugShark");
  465. spl.removeModule("MaugSquare");
  466. spl.removeModule("MaugSquare2");
  467. spl.removeModule("MaugSquare3");
  468. spl.removeModule("MaugTriangle");
  469. spl.removeModule("Mixah3");
  470. spl.removeModule("PSelectah");
  471. spl.removeModule("Selectah");
  472. spl.removeModule("UDPClockMaster");
  473. spl.removeModule("UDPClockSlave");
  474. }
  475. }
  476. static void initStatic__surgext()
  477. {
  478. Plugin* const p = new Plugin;
  479. pluginInstance__surgext = p;
  480. const StaticPluginLoader spl(p, "surgext");
  481. if (spl.ok())
  482. {
  483. p->addModel(modelVCOModern);
  484. p->addModel(modelVCOSine);
  485. /*
  486. p->addModel(modelVCOAlias);
  487. p->addModel(modelVCOClassic);
  488. p->addModel(modelVCOFM2);
  489. p->addModel(modelVCOFM3);
  490. p->addModel(modelVCOSHNoise);
  491. p->addModel(modelVCOString);
  492. p->addModel(modelVCOTwist);
  493. p->addModel(modelVCOWavetable);
  494. p->addModel(modelVCOWindow);
  495. */
  496. spl.removeModule("SurgeXTOSCAlias");
  497. spl.removeModule("SurgeXTOSCClassic");
  498. spl.removeModule("SurgeXTOSCFM2");
  499. spl.removeModule("SurgeXTOSCFM3");
  500. spl.removeModule("SurgeXTOSCSHNoise");
  501. spl.removeModule("SurgeXTOSCString");
  502. spl.removeModule("SurgeXTOSCTwist");
  503. spl.removeModule("SurgeXTOSCWavetable");
  504. spl.removeModule("SurgeXTOSCWindow");
  505. // Add the ported ones
  506. p->addModel(modelSurgeLFO);
  507. p->addModel(modelSurgeMixer);
  508. p->addModel(modelSurgeModMatrix);
  509. p->addModel(modelSurgeWaveshaper);
  510. /*
  511. p->addModel(modelSurgeDelay);
  512. p->addModel(modelSurgeDelayLineByFreq);
  513. p->addModel(modelSurgeDelayLineByFreqExpanded);
  514. p->addModel(modelSurgeVCF);
  515. */
  516. spl.removeModule("SurgeXTDelay");
  517. spl.removeModule("SurgeXTDelayLineByFreq");
  518. spl.removeModule("SurgeXTDelayLineByFreqExpanded");
  519. spl.removeModule("SurgeXTVCF");
  520. spl.removeModule("SurgeXTFXChorus");
  521. spl.removeModule("SurgeXTFXChow");
  522. spl.removeModule("SurgeXTFXCombulator");
  523. spl.removeModule("SurgeXTFXDistortion");
  524. spl.removeModule("SurgeXTFXExciter");
  525. spl.removeModule("SurgeXTFXEnsemble");
  526. spl.removeModule("SurgeXTFXFlanger");
  527. spl.removeModule("SurgeXTFXFrequencyShifter");
  528. spl.removeModule("SurgeXTFXNeuron");
  529. spl.removeModule("SurgeXTFXPhaser");
  530. spl.removeModule("SurgeXTFXResonator");
  531. spl.removeModule("SurgeXTFXReverb");
  532. spl.removeModule("SurgeXTFXReverb2");
  533. spl.removeModule("SurgeXTFXRingMod");
  534. spl.removeModule("SurgeXTFXRotarySpeaker");
  535. spl.removeModule("SurgeXTFXSpringReverb");
  536. spl.removeModule("SurgeXTFXTreeMonster");
  537. spl.removeModule("SurgeXTFXVocoder");
  538. /*
  539. p->addModel(modelEGxVCA);
  540. p->addModel(modelQuadAD);
  541. p->addModel(modelQuadLFO);
  542. */
  543. spl.removeModule("SurgeXTEGxVCA");
  544. spl.removeModule("SurgeXTQuadAD");
  545. spl.removeModule("SurgeXTQuadLFO");
  546. surgext_rack_initialize();
  547. }
  548. }
  549. /*
  550. static void initStatic__ValleyAudio()
  551. {
  552. Plugin* const p = new Plugin;
  553. pluginInstance__ValleyAudio = p;
  554. const StaticPluginLoader spl(p, "ValleyAudio");
  555. if (spl.ok())
  556. {
  557. p->addModel(modelDexter);
  558. p->addModel(modelInterzone);
  559. spl.removeModule("Amalgam");
  560. spl.removeModule("Feline");
  561. spl.removeModule("Plateau");
  562. spl.removeModule("Terrorform");
  563. spl.removeModule("Topograph");
  564. spl.removeModule("uGraph");
  565. }
  566. }
  567. */
  568. void initStaticPlugins()
  569. {
  570. initStatic__Cardinal();
  571. initStatic__Fundamental();
  572. initStatic__Aria();
  573. initStatic__AudibleInstruments();
  574. initStatic__BogaudioModules();
  575. initStatic__MockbaModular();
  576. initStatic__surgext();
  577. /*
  578. initStatic__ValleyAudio();
  579. */
  580. }
  581. void destroyStaticPlugins()
  582. {
  583. for (Plugin* p : plugins)
  584. delete p;
  585. plugins.clear();
  586. }
  587. void updateStaticPluginsDarkMode()
  588. {
  589. const bool darkMode = settings::darkMode;
  590. // bogaudio
  591. {
  592. Skins& skins(Skins::skins());
  593. skins._default = darkMode ? "dark" : "light";
  594. std::lock_guard<std::mutex> lock(skins._defaultSkinListenersLock);
  595. for (auto listener : skins._defaultSkinListeners) {
  596. listener->defaultSkinChanged(skins._default);
  597. }
  598. }
  599. // surgext
  600. {
  601. surgext_rack_update_theme();
  602. }
  603. }
  604. }
  605. }