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.

815 lines
21KB

  1. /*
  2. * Carla Native Plugins
  3. * Copyright (C) 2012-2014 Filipe Coelho <falktx@falktx.com>
  4. *
  5. * This program is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU General Public License as
  7. * published by the Free Software Foundation; either version 2 of
  8. * the License, or any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * For a full copy of the GNU General Public License see the doc/GPL.txt file.
  16. */
  17. #include "CarlaNative.hpp"
  18. #include "CarlaMIDI.h"
  19. #include "CarlaThread.hpp"
  20. #include "LinkedList.hpp"
  21. #include "CarlaMathUtils.hpp"
  22. #include "zynaddsubfx/DSP/FFTwrapper.h"
  23. #include "zynaddsubfx/Misc/Master.h"
  24. #include "zynaddsubfx/Misc/Part.h"
  25. #include "zynaddsubfx/Misc/Util.h"
  26. #ifdef WANT_ZYNADDSUBFX_UI
  27. # ifdef override
  28. # define override_hack
  29. # undef override
  30. # endif
  31. # include "zynaddsubfx/UI/common.H"
  32. # include "zynaddsubfx/UI/MasterUI.h"
  33. # include <FL/Fl_Shared_Image.H>
  34. # include <FL/Fl_Tiled_Image.H>
  35. # include <FL/Fl_Theme.H>
  36. # ifdef override_hack
  37. # define override
  38. # undef override_hack
  39. # endif
  40. #endif
  41. #include <ctime>
  42. #include <set>
  43. #include <string>
  44. #ifdef WANT_ZYNADDSUBFX_UI
  45. static Fl_Tiled_Image* gModuleBackdrop = nullptr;
  46. static CarlaString gPixmapPath;
  47. extern CarlaString gUiPixmapPath;
  48. void set_module_parameters(Fl_Widget* o)
  49. {
  50. CARLA_ASSERT(gModuleBackdrop != nullptr);
  51. o->box(FL_DOWN_FRAME);
  52. o->align(o->align() | FL_ALIGN_IMAGE_BACKDROP);
  53. o->color(FL_BLACK);
  54. o->labeltype(FL_SHADOW_LABEL);
  55. if (gModuleBackdrop != nullptr)
  56. o->image(gModuleBackdrop);
  57. }
  58. #endif
  59. // -----------------------------------------------------------------------
  60. class ZynAddSubFxPrograms
  61. {
  62. public:
  63. ZynAddSubFxPrograms()
  64. : fInitiated(false)
  65. {
  66. }
  67. ~ZynAddSubFxPrograms()
  68. {
  69. if (! fInitiated)
  70. return;
  71. for (LinkedList<const ProgramInfo*>::Itenerator it = fPrograms.begin(); it.valid(); it.next())
  72. {
  73. const ProgramInfo* const& pInfo(it.getValue());
  74. delete pInfo;
  75. }
  76. fPrograms.clear();
  77. FFT_cleanup();
  78. }
  79. void init()
  80. {
  81. if (fInitiated)
  82. return;
  83. fInitiated = true;
  84. fPrograms.append(new ProgramInfo(0, 0, "default"));
  85. Master& master(Master::getInstance());
  86. pthread_mutex_lock(&master.mutex);
  87. // refresh banks
  88. master.bank.rescanforbanks();
  89. for (uint32_t i=0, size = master.bank.banks.size(); i < size; ++i)
  90. {
  91. if (master.bank.banks[i].dir.empty())
  92. continue;
  93. master.bank.loadbank(master.bank.banks[i].dir);
  94. for (unsigned int instrument = 0; instrument < BANK_SIZE; ++instrument)
  95. {
  96. const std::string insName(master.bank.getname(instrument));
  97. if (insName.empty() || insName[0] == '\0' || insName[0] == ' ')
  98. continue;
  99. fPrograms.append(new ProgramInfo(i+1, instrument, insName.c_str()));
  100. }
  101. }
  102. pthread_mutex_unlock(&master.mutex);
  103. }
  104. void load(Master* const master, const uint8_t channel, const uint32_t bank, const uint32_t program)
  105. {
  106. if (bank == 0)
  107. {
  108. pthread_mutex_lock(&master->mutex);
  109. master->partonoff(channel, 1);
  110. master->part[channel]->defaults();
  111. master->part[channel]->applyparameters(false);
  112. pthread_mutex_unlock(&master->mutex);
  113. return;
  114. }
  115. const std::string& bankdir(master->bank.banks[bank-1].dir);
  116. if (! bankdir.empty())
  117. {
  118. pthread_mutex_lock(&master->mutex);
  119. master->partonoff(channel, 1);
  120. master->bank.loadbank(bankdir);
  121. master->bank.loadfromslot(program, master->part[channel]);
  122. master->part[channel]->applyparameters(false);
  123. pthread_mutex_unlock(&master->mutex);
  124. }
  125. }
  126. uint32_t count()
  127. {
  128. return fPrograms.count();
  129. }
  130. const NativeMidiProgram* getInfo(const uint32_t index)
  131. {
  132. if (index >= fPrograms.count())
  133. return nullptr;
  134. const ProgramInfo* const pInfo(fPrograms.getAt(index));
  135. fRetProgram.bank = pInfo->bank;
  136. fRetProgram.program = pInfo->prog;
  137. fRetProgram.name = pInfo->name;
  138. return &fRetProgram;
  139. }
  140. private:
  141. struct ProgramInfo {
  142. uint32_t bank;
  143. uint32_t prog;
  144. const char* name;
  145. ProgramInfo(uint32_t bank_, uint32_t prog_, const char* name_)
  146. : bank(bank_),
  147. prog(prog_),
  148. name(carla_strdup(name_)) {}
  149. ~ProgramInfo()
  150. {
  151. if (name != nullptr)
  152. {
  153. delete[] name;
  154. name = nullptr;
  155. }
  156. }
  157. #ifdef CARLA_PROPER_CPP11_SUPPORT
  158. ProgramInfo() = delete;
  159. ProgramInfo(ProgramInfo&) = delete;
  160. ProgramInfo(const ProgramInfo&) = delete;
  161. ProgramInfo& operator=(ProgramInfo&);
  162. ProgramInfo& operator=(const ProgramInfo&);
  163. #endif
  164. };
  165. bool fInitiated;
  166. NativeMidiProgram fRetProgram;
  167. LinkedList<const ProgramInfo*> fPrograms;
  168. CARLA_DECLARE_NON_COPY_CLASS(ZynAddSubFxPrograms)
  169. };
  170. static ZynAddSubFxPrograms sPrograms;
  171. // -----------------------------------------------------------------------
  172. class ZynAddSubFxInstanceCount
  173. {
  174. public:
  175. ZynAddSubFxInstanceCount()
  176. : fCount(0)
  177. {
  178. }
  179. ~ZynAddSubFxInstanceCount()
  180. {
  181. CARLA_ASSERT(fCount == 0);
  182. }
  183. void addOne(const NativeHostDescriptor* const host)
  184. {
  185. if (fCount++ == 0)
  186. {
  187. CARLA_ASSERT(synth == nullptr);
  188. CARLA_ASSERT(denormalkillbuf == nullptr);
  189. reinit(host);
  190. #ifdef WANT_ZYNADDSUBFX_UI
  191. if (gPixmapPath.isEmpty())
  192. {
  193. gPixmapPath = host->resourceDir;
  194. gPixmapPath += "/zynaddsubfx/";
  195. gUiPixmapPath = gPixmapPath;
  196. }
  197. #endif
  198. }
  199. }
  200. void removeOne()
  201. {
  202. if (--fCount == 0)
  203. {
  204. CARLA_ASSERT(synth != nullptr);
  205. CARLA_ASSERT(denormalkillbuf != nullptr);
  206. Master::deleteInstance();
  207. delete[] denormalkillbuf;
  208. denormalkillbuf = nullptr;
  209. delete synth;
  210. synth = nullptr;
  211. }
  212. }
  213. void reinit(const NativeHostDescriptor* const host)
  214. {
  215. Master::deleteInstance();
  216. if (denormalkillbuf != nullptr)
  217. {
  218. delete[] denormalkillbuf;
  219. denormalkillbuf = nullptr;
  220. }
  221. if (synth != nullptr)
  222. {
  223. delete synth;
  224. synth = nullptr;
  225. }
  226. synth = new SYNTH_T();
  227. synth->buffersize = host->get_buffer_size(host->handle);
  228. synth->samplerate = host->get_sample_rate(host->handle);
  229. if (synth->buffersize > 32)
  230. synth->buffersize = 32;
  231. synth->alias();
  232. config.init();
  233. config.cfg.SoundBufferSize = synth->buffersize;
  234. config.cfg.SampleRate = synth->samplerate;
  235. config.cfg.GzipCompression = 0;
  236. sprng(std::time(nullptr));
  237. denormalkillbuf = new float[synth->buffersize];
  238. for (int i=0; i < synth->buffersize; ++i)
  239. denormalkillbuf[i] = (RND - 0.5f) * 1e-16;
  240. Master::getInstance();
  241. }
  242. void maybeReinit(const NativeHostDescriptor* const host)
  243. {
  244. if (host->get_buffer_size(host->handle) == static_cast<uint32_t>(synth->buffersize) &&
  245. host->get_sample_rate(host->handle) == static_cast<double>(synth->samplerate))
  246. return;
  247. reinit(host);
  248. }
  249. private:
  250. int fCount;
  251. CARLA_DECLARE_NON_COPY_CLASS(ZynAddSubFxInstanceCount)
  252. };
  253. static ZynAddSubFxInstanceCount sInstanceCount;
  254. // -----------------------------------------------------------------------
  255. class ZynAddSubFxThread : public CarlaThread
  256. {
  257. public:
  258. ZynAddSubFxThread(Master* const master, const NativeHostDescriptor* const host)
  259. : CarlaThread("ZynAddSubFxThread"),
  260. fMaster(master),
  261. kHost(host),
  262. #ifdef WANT_ZYNADDSUBFX_UI
  263. fUi(nullptr),
  264. fUiClosed(0),
  265. fNextUiAction(-1),
  266. #endif
  267. fChangeProgram(false),
  268. fNextChannel(0),
  269. fNextBank(0),
  270. fNextProgram(0)
  271. {
  272. }
  273. ~ZynAddSubFxThread()
  274. {
  275. #ifdef WANT_ZYNADDSUBFX_UI
  276. // must be closed by now
  277. CARLA_ASSERT(fUi == nullptr);
  278. #endif
  279. }
  280. void loadProgramLater(const uint8_t channel, const uint32_t bank, const uint32_t program)
  281. {
  282. fNextChannel = channel;
  283. fNextBank = bank;
  284. fNextProgram = program;
  285. fChangeProgram = true;
  286. }
  287. void stopLoadProgramLater()
  288. {
  289. fChangeProgram = false;
  290. fNextChannel = 0;
  291. fNextBank = 0;
  292. fNextProgram = 0;
  293. }
  294. void setMaster(Master* const master)
  295. {
  296. fMaster = master;
  297. }
  298. #ifdef WANT_ZYNADDSUBFX_UI
  299. void uiHide()
  300. {
  301. fNextUiAction = 0;
  302. }
  303. void uiShow()
  304. {
  305. fNextUiAction = 1;
  306. }
  307. void uiRepaint()
  308. {
  309. if (fUi != nullptr)
  310. fNextUiAction = 2;
  311. }
  312. void uiChangeName(const char* const name)
  313. {
  314. if (fUi != nullptr)
  315. {
  316. Fl::lock();
  317. fUi->masterwindow->label(name);
  318. Fl::unlock();
  319. }
  320. }
  321. #endif
  322. protected:
  323. void run() override
  324. {
  325. while (! shouldThreadExit())
  326. {
  327. #ifdef WANT_ZYNADDSUBFX_UI
  328. Fl::lock();
  329. if (fNextUiAction == 2) // repaint
  330. {
  331. CARLA_ASSERT(fUi != nullptr);
  332. if (fUi != nullptr)
  333. fUi->refresh_master_ui();
  334. }
  335. else if (fNextUiAction == 1) // init/show
  336. {
  337. static bool initialized = false;
  338. if (! initialized)
  339. {
  340. initialized = true;
  341. fl_register_images();
  342. Fl_Dial::default_style(Fl_Dial::PIXMAP_DIAL);
  343. if (Fl_Shared_Image* const img = Fl_Shared_Image::get(gPixmapPath + "knob.png"))
  344. Fl_Dial::default_image(img);
  345. if (Fl_Shared_Image* const img = Fl_Shared_Image::get(gPixmapPath + "window_backdrop.png"))
  346. Fl::scheme_bg(new Fl_Tiled_Image(img));
  347. if(Fl_Shared_Image* const img = Fl_Shared_Image::get(gPixmapPath + "module_backdrop.png"))
  348. gModuleBackdrop = new Fl_Tiled_Image(img);
  349. Fl::background(50, 50, 50);
  350. Fl::background2(70, 70, 70);
  351. Fl::foreground(255, 255, 255);
  352. Fl_Theme::set("Cairo");
  353. }
  354. if (fUi == nullptr)
  355. {
  356. fUiClosed = 0;
  357. fUi = new MasterUI(fMaster, &fUiClosed);
  358. fUi->masterwindow->label(kHost->uiName);
  359. fUi->showUI();
  360. }
  361. else
  362. fUi->showUI();
  363. }
  364. else if (fNextUiAction == 0) // close
  365. {
  366. CARLA_ASSERT(fUi != nullptr);
  367. if (fUi != nullptr)
  368. {
  369. delete fUi;
  370. fUi = nullptr;
  371. }
  372. }
  373. fNextUiAction = -1;
  374. if (fUiClosed != 0)
  375. {
  376. fUiClosed = 0;
  377. fNextUiAction = 0;
  378. kHost->ui_closed(kHost->handle);
  379. }
  380. Fl::check();
  381. Fl::unlock();
  382. #endif
  383. if (fChangeProgram)
  384. {
  385. fChangeProgram = false;
  386. sPrograms.load(fMaster, fNextChannel, fNextBank, fNextProgram);
  387. fNextChannel = 0;
  388. fNextBank = 0;
  389. fNextProgram = 0;
  390. #ifdef WANT_ZYNADDSUBFX_UI
  391. if (fUi != nullptr)
  392. {
  393. Fl::lock();
  394. fUi->refresh_master_ui();
  395. Fl::unlock();
  396. }
  397. #endif
  398. carla_msleep(15);
  399. }
  400. else
  401. {
  402. carla_msleep(30);
  403. }
  404. }
  405. #ifdef WANT_ZYNADDSUBFX_UI
  406. if (shouldThreadExit() || fUi != nullptr)
  407. {
  408. Fl::lock();
  409. delete fUi;
  410. fUi = nullptr;
  411. Fl::check();
  412. Fl::unlock();
  413. }
  414. #endif
  415. }
  416. private:
  417. Master* fMaster;
  418. const NativeHostDescriptor* const kHost;
  419. #ifdef WANT_ZYNADDSUBFX_UI
  420. MasterUI* fUi;
  421. int fUiClosed;
  422. volatile int fNextUiAction;
  423. #endif
  424. volatile bool fChangeProgram;
  425. volatile uint8_t fNextChannel;
  426. volatile uint32_t fNextBank;
  427. volatile uint32_t fNextProgram;
  428. };
  429. // -----------------------------------------------------------------------
  430. class ZynAddSubFxPlugin : public NativePluginClass
  431. {
  432. public:
  433. ZynAddSubFxPlugin(const NativeHostDescriptor* const host)
  434. : NativePluginClass(host),
  435. fMaster(new Master()),
  436. fSampleRate(getSampleRate()),
  437. fIsActive(false),
  438. fThread(fMaster, host)
  439. {
  440. fThread.startThread();
  441. for (int i = 0; i < NUM_MIDI_PARTS; ++i)
  442. fMaster->partonoff(i, 1);
  443. sPrograms.init();
  444. }
  445. ~ZynAddSubFxPlugin() override
  446. {
  447. deleteMaster();
  448. }
  449. protected:
  450. // -------------------------------------------------------------------
  451. // Plugin midi-program calls
  452. uint32_t getMidiProgramCount() const override
  453. {
  454. return sPrograms.count();
  455. }
  456. const NativeMidiProgram* getMidiProgramInfo(const uint32_t index) const override
  457. {
  458. return sPrograms.getInfo(index);
  459. }
  460. // -------------------------------------------------------------------
  461. // Plugin state calls
  462. void setMidiProgram(const uint8_t channel, const uint32_t bank, const uint32_t program) override
  463. {
  464. if (bank >= fMaster->bank.banks.size())
  465. return;
  466. if (program >= BANK_SIZE)
  467. return;
  468. if (isOffline() || ! fIsActive)
  469. {
  470. sPrograms.load(fMaster, channel, bank, program);
  471. #ifdef WANT_ZYNADDSUBFX_UI
  472. fThread.uiRepaint();
  473. #endif
  474. }
  475. else
  476. fThread.loadProgramLater(channel, bank, program);
  477. }
  478. void setCustomData(const char* const key, const char* const value) override
  479. {
  480. CARLA_SAFE_ASSERT_RETURN(key != nullptr,);
  481. CARLA_SAFE_ASSERT_RETURN(value != nullptr,);
  482. if (std::strcmp(key, "CarlaAlternateFile1") == 0) // xmz
  483. fMaster->loadXML(value);
  484. else if (std::strcmp(key, "CarlaAlternateFile2") == 0) // xiz
  485. fMaster->part[0]->loadXMLinstrument(value);
  486. }
  487. // -------------------------------------------------------------------
  488. // Plugin process calls
  489. void activate() override
  490. {
  491. fIsActive = true;
  492. }
  493. void deactivate() override
  494. {
  495. fIsActive = false;
  496. }
  497. void process(float**, float** const outBuffer, const uint32_t frames, const NativeMidiEvent* const midiEvents, const uint32_t midiEventCount) override
  498. {
  499. if (pthread_mutex_trylock(&fMaster->mutex) != 0)
  500. {
  501. FLOAT_CLEAR(outBuffer[0], frames);
  502. FLOAT_CLEAR(outBuffer[1], frames);
  503. return;
  504. }
  505. for (uint32_t i=0; i < midiEventCount; ++i)
  506. {
  507. const NativeMidiEvent* const midiEvent(&midiEvents[i]);
  508. const uint8_t status = MIDI_GET_STATUS_FROM_DATA(midiEvent->data);
  509. const uint8_t channel = MIDI_GET_CHANNEL_FROM_DATA(midiEvent->data);
  510. if (MIDI_IS_STATUS_NOTE_OFF(status))
  511. {
  512. const uint8_t note = midiEvent->data[1];
  513. fMaster->noteOff(channel, note);
  514. }
  515. else if (MIDI_IS_STATUS_NOTE_ON(status))
  516. {
  517. const uint8_t note = midiEvent->data[1];
  518. const uint8_t velo = midiEvent->data[2];
  519. fMaster->noteOn(channel, note, velo);
  520. }
  521. else if (MIDI_IS_STATUS_POLYPHONIC_AFTERTOUCH(status))
  522. {
  523. const uint8_t note = midiEvent->data[1];
  524. const uint8_t pressure = midiEvent->data[2];
  525. fMaster->polyphonicAftertouch(channel, note, pressure);
  526. }
  527. else if (MIDI_IS_STATUS_CONTROL_CHANGE(status))
  528. {
  529. const uint8_t control = midiEvent->data[1];
  530. const uint8_t value = midiEvent->data[2];
  531. fMaster->setController(channel, control, value);
  532. }
  533. else if (MIDI_IS_STATUS_PITCH_WHEEL_CONTROL(status))
  534. {
  535. const uint8_t lsb = midiEvent->data[1];
  536. const uint8_t msb = midiEvent->data[2];
  537. const int value = ((msb << 7) | lsb) - 8192;
  538. fMaster->setController(channel, C_pitchwheel, value);
  539. }
  540. }
  541. fMaster->GetAudioOutSamples(frames, fSampleRate, outBuffer[0], outBuffer[1]);
  542. pthread_mutex_unlock(&fMaster->mutex);
  543. }
  544. #ifdef WANT_ZYNADDSUBFX_UI
  545. // -------------------------------------------------------------------
  546. // Plugin UI calls
  547. void uiShow(const bool show) override
  548. {
  549. if (show)
  550. fThread.uiShow();
  551. else
  552. fThread.uiHide();
  553. }
  554. #endif
  555. // -------------------------------------------------------------------
  556. // Plugin state calls
  557. char* getState() const override
  558. {
  559. config.save();
  560. char* data = nullptr;
  561. fMaster->getalldata(&data);
  562. return data;
  563. }
  564. void setState(const char* const data) override
  565. {
  566. fThread.stopLoadProgramLater();
  567. fMaster->putalldata((char*)data, 0);
  568. fMaster->applyparameters(true);
  569. }
  570. // -------------------------------------------------------------------
  571. // Plugin dispatcher
  572. // TODO - save&load current state
  573. void bufferSizeChanged(const uint32_t) final
  574. {
  575. deleteMaster();
  576. sInstanceCount.maybeReinit(getHostHandle());
  577. initMaster();
  578. }
  579. void sampleRateChanged(const double sampleRate) final
  580. {
  581. fSampleRate = sampleRate;
  582. deleteMaster();
  583. sInstanceCount.maybeReinit(getHostHandle());
  584. initMaster();
  585. }
  586. void initMaster()
  587. {
  588. fMaster = new Master();
  589. fThread.setMaster(fMaster);
  590. fThread.startThread();
  591. for (int i = 0; i < NUM_MIDI_PARTS; ++i)
  592. fMaster->partonoff(i, 1);
  593. }
  594. void deleteMaster()
  595. {
  596. //ensure that everything has stopped
  597. pthread_mutex_lock(&fMaster->mutex);
  598. pthread_mutex_unlock(&fMaster->mutex);
  599. fThread.stopThread(-1);
  600. delete fMaster;
  601. fMaster = nullptr;
  602. }
  603. #ifdef WANT_ZYNADDSUBFX_UI
  604. void uiNameChanged(const char* const uiName) override
  605. {
  606. fThread.uiChangeName(uiName);
  607. }
  608. #endif
  609. // -------------------------------------------------------------------
  610. private:
  611. Master* fMaster;
  612. unsigned fSampleRate;
  613. bool fIsActive;
  614. ZynAddSubFxThread fThread;
  615. public:
  616. static NativePluginHandle _instantiate(const NativeHostDescriptor* host)
  617. {
  618. sInstanceCount.addOne(host);
  619. return new ZynAddSubFxPlugin(host);
  620. }
  621. static void _cleanup(NativePluginHandle handle)
  622. {
  623. delete (ZynAddSubFxPlugin*)handle;
  624. sInstanceCount.removeOne();
  625. }
  626. CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(ZynAddSubFxPlugin)
  627. };
  628. // -----------------------------------------------------------------------
  629. static const NativePluginDescriptor zynaddsubfxDesc = {
  630. /* category */ PLUGIN_CATEGORY_SYNTH,
  631. #ifdef WANT_ZYNADDSUBFX_UI
  632. /* hints */ static_cast<NativePluginHints>(PLUGIN_IS_SYNTH|PLUGIN_HAS_UI|PLUGIN_USES_MULTI_PROGS|PLUGIN_USES_STATE),
  633. #else
  634. /* hints */ static_cast<NativePluginHints>(PLUGIN_IS_SYNTH|PLUGIN_USES_MULTI_PROGS|PLUGIN_USES_STATE),
  635. #endif
  636. /* supports */ static_cast<NativePluginSupports>(PLUGIN_SUPPORTS_CONTROL_CHANGES|PLUGIN_SUPPORTS_NOTE_AFTERTOUCH|PLUGIN_SUPPORTS_PITCHBEND|PLUGIN_SUPPORTS_ALL_SOUND_OFF),
  637. /* audioIns */ 0,
  638. /* audioOuts */ 2,
  639. /* midiIns */ 1,
  640. /* midiOuts */ 0,
  641. /* paramIns */ 0,
  642. /* paramOuts */ 0,
  643. /* name */ "ZynAddSubFX",
  644. /* label */ "zynaddsubfx",
  645. /* maker */ "falkTX, Mark McCurry, Nasca Octavian Paul",
  646. /* copyright */ "GNU GPL v2+",
  647. PluginDescriptorFILL(ZynAddSubFxPlugin)
  648. };
  649. // -----------------------------------------------------------------------
  650. CARLA_EXPORT
  651. void carla_register_native_plugin_zynaddsubfx_synth()
  652. {
  653. carla_register_native_plugin(&zynaddsubfxDesc);
  654. }
  655. // -----------------------------------------------------------------------