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.

837 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, nullptr));
  135. CARLA_SAFE_ASSERT_RETURN(pInfo != nullptr, nullptr);
  136. fRetProgram.bank = pInfo->bank;
  137. fRetProgram.program = pInfo->prog;
  138. fRetProgram.name = pInfo->name;
  139. return &fRetProgram;
  140. }
  141. private:
  142. struct ProgramInfo {
  143. uint32_t bank;
  144. uint32_t prog;
  145. const char* name;
  146. ProgramInfo(uint32_t bank_, uint32_t prog_, const char* name_)
  147. : bank(bank_),
  148. prog(prog_),
  149. name(carla_strdup(name_)) {}
  150. ~ProgramInfo()
  151. {
  152. if (name != nullptr)
  153. {
  154. delete[] name;
  155. name = nullptr;
  156. }
  157. }
  158. #ifdef CARLA_PROPER_CPP11_SUPPORT
  159. ProgramInfo() = delete;
  160. ProgramInfo(ProgramInfo&) = delete;
  161. ProgramInfo(const ProgramInfo&) = delete;
  162. ProgramInfo& operator=(ProgramInfo&);
  163. ProgramInfo& operator=(const ProgramInfo&);
  164. #endif
  165. };
  166. bool fInitiated;
  167. NativeMidiProgram fRetProgram;
  168. LinkedList<const ProgramInfo*> fPrograms;
  169. CARLA_DECLARE_NON_COPY_CLASS(ZynAddSubFxPrograms)
  170. };
  171. static ZynAddSubFxPrograms sPrograms;
  172. // -----------------------------------------------------------------------
  173. class ZynAddSubFxInstanceCount
  174. {
  175. public:
  176. ZynAddSubFxInstanceCount()
  177. : fCount(0)
  178. {
  179. }
  180. ~ZynAddSubFxInstanceCount()
  181. {
  182. CARLA_ASSERT(fCount == 0);
  183. }
  184. void addOne(const NativeHostDescriptor* const host)
  185. {
  186. if (fCount++ == 0)
  187. {
  188. CARLA_ASSERT(synth == nullptr);
  189. CARLA_ASSERT(denormalkillbuf == nullptr);
  190. reinit(host);
  191. #ifdef WANT_ZYNADDSUBFX_UI
  192. if (gPixmapPath.isEmpty())
  193. {
  194. gPixmapPath = host->resourceDir;
  195. gPixmapPath += "/zynaddsubfx/";
  196. gUiPixmapPath = gPixmapPath;
  197. }
  198. #endif
  199. }
  200. }
  201. void removeOne()
  202. {
  203. if (--fCount == 0)
  204. {
  205. CARLA_ASSERT(synth != nullptr);
  206. CARLA_ASSERT(denormalkillbuf != nullptr);
  207. Master::deleteInstance();
  208. delete[] denormalkillbuf;
  209. denormalkillbuf = nullptr;
  210. delete synth;
  211. synth = nullptr;
  212. }
  213. }
  214. void reinit(const NativeHostDescriptor* const host)
  215. {
  216. Master::deleteInstance();
  217. if (denormalkillbuf != nullptr)
  218. {
  219. delete[] denormalkillbuf;
  220. denormalkillbuf = nullptr;
  221. }
  222. if (synth != nullptr)
  223. {
  224. delete synth;
  225. synth = nullptr;
  226. }
  227. synth = new SYNTH_T();
  228. synth->buffersize = host->get_buffer_size(host->handle);
  229. synth->samplerate = host->get_sample_rate(host->handle);
  230. if (synth->buffersize > 32)
  231. synth->buffersize = 32;
  232. synth->alias();
  233. config.init();
  234. config.cfg.SoundBufferSize = synth->buffersize;
  235. config.cfg.SampleRate = synth->samplerate;
  236. config.cfg.GzipCompression = 0;
  237. sprng(std::time(nullptr));
  238. denormalkillbuf = new float[synth->buffersize];
  239. for (int i=0; i < synth->buffersize; ++i)
  240. denormalkillbuf[i] = (RND - 0.5f) * 1e-16;
  241. Master::getInstance();
  242. }
  243. void maybeReinit(const NativeHostDescriptor* const host)
  244. {
  245. if (host->get_buffer_size(host->handle) == static_cast<uint32_t>(synth->buffersize) &&
  246. host->get_sample_rate(host->handle) == static_cast<double>(synth->samplerate))
  247. return;
  248. reinit(host);
  249. }
  250. private:
  251. int fCount;
  252. CARLA_DECLARE_NON_COPY_CLASS(ZynAddSubFxInstanceCount)
  253. };
  254. static ZynAddSubFxInstanceCount sInstanceCount;
  255. // -----------------------------------------------------------------------
  256. class ZynAddSubFxThread : public CarlaThread
  257. {
  258. public:
  259. ZynAddSubFxThread(Master* const master, const NativeHostDescriptor* const host)
  260. : CarlaThread("ZynAddSubFxThread"),
  261. fMaster(master),
  262. kHost(host),
  263. #ifdef WANT_ZYNADDSUBFX_UI
  264. fUi(nullptr),
  265. fUiClosed(0),
  266. fNextUiAction(-1),
  267. #endif
  268. fChangeProgram(false),
  269. fNextChannel(0),
  270. fNextBank(0),
  271. fNextProgram(0)
  272. {
  273. }
  274. ~ZynAddSubFxThread()
  275. {
  276. #ifdef WANT_ZYNADDSUBFX_UI
  277. // must be closed by now
  278. CARLA_ASSERT(fUi == nullptr);
  279. #endif
  280. }
  281. void loadProgramLater(const uint8_t channel, const uint32_t bank, const uint32_t program)
  282. {
  283. fNextChannel = channel;
  284. fNextBank = bank;
  285. fNextProgram = program;
  286. fChangeProgram = true;
  287. }
  288. void stopLoadProgramLater()
  289. {
  290. fChangeProgram = false;
  291. fNextChannel = 0;
  292. fNextBank = 0;
  293. fNextProgram = 0;
  294. }
  295. void setMaster(Master* const master)
  296. {
  297. fMaster = master;
  298. }
  299. #ifdef WANT_ZYNADDSUBFX_UI
  300. void uiHide()
  301. {
  302. fNextUiAction = 0;
  303. }
  304. void uiShow()
  305. {
  306. fNextUiAction = 1;
  307. }
  308. void uiRepaint()
  309. {
  310. if (fUi != nullptr)
  311. fNextUiAction = 2;
  312. }
  313. void uiChangeName(const char* const name)
  314. {
  315. if (fUi != nullptr)
  316. {
  317. Fl::lock();
  318. fUi->masterwindow->label(name);
  319. Fl::unlock();
  320. }
  321. }
  322. #endif
  323. protected:
  324. void run() override
  325. {
  326. while (! shouldThreadExit())
  327. {
  328. #ifdef WANT_ZYNADDSUBFX_UI
  329. Fl::lock();
  330. if (fNextUiAction == 2) // repaint
  331. {
  332. CARLA_ASSERT(fUi != nullptr);
  333. if (fUi != nullptr)
  334. fUi->refresh_master_ui();
  335. }
  336. else if (fNextUiAction == 1) // init/show
  337. {
  338. static bool initialized = false;
  339. if (! initialized)
  340. {
  341. initialized = true;
  342. fl_register_images();
  343. Fl_Dial::default_style(Fl_Dial::PIXMAP_DIAL);
  344. if (Fl_Shared_Image* const img = Fl_Shared_Image::get(gPixmapPath + "knob.png"))
  345. Fl_Dial::default_image(img);
  346. if (Fl_Shared_Image* const img = Fl_Shared_Image::get(gPixmapPath + "window_backdrop.png"))
  347. Fl::scheme_bg(new Fl_Tiled_Image(img));
  348. if(Fl_Shared_Image* const img = Fl_Shared_Image::get(gPixmapPath + "module_backdrop.png"))
  349. gModuleBackdrop = new Fl_Tiled_Image(img);
  350. Fl::background(50, 50, 50);
  351. Fl::background2(70, 70, 70);
  352. Fl::foreground(255, 255, 255);
  353. Fl_Theme::set("Cairo");
  354. }
  355. if (fUi == nullptr)
  356. {
  357. fUiClosed = 0;
  358. fUi = new MasterUI(fMaster, &fUiClosed);
  359. fUi->masterwindow->label(kHost->uiName);
  360. fUi->showUI();
  361. }
  362. else
  363. fUi->showUI();
  364. }
  365. else if (fNextUiAction == 0) // close
  366. {
  367. CARLA_ASSERT(fUi != nullptr);
  368. if (fUi != nullptr)
  369. {
  370. delete fUi;
  371. fUi = nullptr;
  372. }
  373. }
  374. fNextUiAction = -1;
  375. if (fUiClosed != 0)
  376. {
  377. fUiClosed = 0;
  378. fNextUiAction = 0;
  379. kHost->ui_closed(kHost->handle);
  380. }
  381. Fl::check();
  382. Fl::unlock();
  383. #endif
  384. if (fChangeProgram)
  385. {
  386. fChangeProgram = false;
  387. sPrograms.load(fMaster, fNextChannel, fNextBank, fNextProgram);
  388. fNextChannel = 0;
  389. fNextBank = 0;
  390. fNextProgram = 0;
  391. #ifdef WANT_ZYNADDSUBFX_UI
  392. if (fUi != nullptr)
  393. {
  394. Fl::lock();
  395. fUi->refresh_master_ui();
  396. Fl::unlock();
  397. }
  398. #endif
  399. carla_msleep(15);
  400. }
  401. else
  402. {
  403. carla_msleep(30);
  404. }
  405. }
  406. #ifdef WANT_ZYNADDSUBFX_UI
  407. if (shouldThreadExit() || fUi != nullptr)
  408. {
  409. Fl::lock();
  410. delete fUi;
  411. fUi = nullptr;
  412. Fl::check();
  413. Fl::unlock();
  414. }
  415. #endif
  416. }
  417. private:
  418. Master* fMaster;
  419. const NativeHostDescriptor* const kHost;
  420. #ifdef WANT_ZYNADDSUBFX_UI
  421. MasterUI* fUi;
  422. int fUiClosed;
  423. volatile int fNextUiAction;
  424. #endif
  425. volatile bool fChangeProgram;
  426. volatile uint8_t fNextChannel;
  427. volatile uint32_t fNextBank;
  428. volatile uint32_t fNextProgram;
  429. };
  430. // -----------------------------------------------------------------------
  431. class ZynAddSubFxPlugin : public NativePluginClass
  432. {
  433. public:
  434. ZynAddSubFxPlugin(const NativeHostDescriptor* const host)
  435. : NativePluginClass(host),
  436. fMaster(new Master()),
  437. fSampleRate(getSampleRate()),
  438. fIsActive(false),
  439. fThread(fMaster, host)
  440. {
  441. fThread.startThread();
  442. for (int i = 0; i < NUM_MIDI_PARTS; ++i)
  443. fMaster->partonoff(i, 1);
  444. sPrograms.init();
  445. #if 0
  446. // create instance if needed
  447. getGlobalMutex();
  448. #endif
  449. }
  450. ~ZynAddSubFxPlugin() override
  451. {
  452. deleteMaster();
  453. }
  454. protected:
  455. // -------------------------------------------------------------------
  456. // Plugin midi-program calls
  457. uint32_t getMidiProgramCount() const override
  458. {
  459. return sPrograms.count();
  460. }
  461. const NativeMidiProgram* getMidiProgramInfo(const uint32_t index) const override
  462. {
  463. return sPrograms.getInfo(index);
  464. }
  465. // -------------------------------------------------------------------
  466. // Plugin state calls
  467. void setMidiProgram(const uint8_t channel, const uint32_t bank, const uint32_t program) override
  468. {
  469. if (bank >= fMaster->bank.banks.size())
  470. return;
  471. if (program >= BANK_SIZE)
  472. return;
  473. if (isOffline() || ! fIsActive)
  474. {
  475. sPrograms.load(fMaster, channel, bank, program);
  476. #ifdef WANT_ZYNADDSUBFX_UI
  477. fThread.uiRepaint();
  478. #endif
  479. }
  480. else
  481. fThread.loadProgramLater(channel, bank, program);
  482. }
  483. void setCustomData(const char* const key, const char* const value) override
  484. {
  485. CARLA_SAFE_ASSERT_RETURN(key != nullptr,);
  486. CARLA_SAFE_ASSERT_RETURN(value != nullptr,);
  487. if (std::strcmp(key, "CarlaAlternateFile1") == 0) // xmz
  488. fMaster->loadXML(value);
  489. else if (std::strcmp(key, "CarlaAlternateFile2") == 0) // xiz
  490. fMaster->part[0]->loadXMLinstrument(value);
  491. }
  492. // -------------------------------------------------------------------
  493. // Plugin process calls
  494. void activate() override
  495. {
  496. fIsActive = true;
  497. }
  498. void deactivate() override
  499. {
  500. fIsActive = false;
  501. }
  502. void process(float**, float** const outBuffer, const uint32_t frames, const NativeMidiEvent* const midiEvents, const uint32_t midiEventCount) override
  503. {
  504. if (pthread_mutex_trylock(&fMaster->mutex) != 0)
  505. {
  506. FLOAT_CLEAR(outBuffer[0], frames);
  507. FLOAT_CLEAR(outBuffer[1], frames);
  508. return;
  509. }
  510. #if 0
  511. const CarlaMutexLocker csm(getGlobalMutex());
  512. #endif
  513. for (uint32_t i=0; i < midiEventCount; ++i)
  514. {
  515. const NativeMidiEvent* const midiEvent(&midiEvents[i]);
  516. const uint8_t status = MIDI_GET_STATUS_FROM_DATA(midiEvent->data);
  517. const uint8_t channel = MIDI_GET_CHANNEL_FROM_DATA(midiEvent->data);
  518. if (MIDI_IS_STATUS_NOTE_OFF(status))
  519. {
  520. const uint8_t note = midiEvent->data[1];
  521. fMaster->noteOff(channel, note);
  522. }
  523. else if (MIDI_IS_STATUS_NOTE_ON(status))
  524. {
  525. const uint8_t note = midiEvent->data[1];
  526. const uint8_t velo = midiEvent->data[2];
  527. fMaster->noteOn(channel, note, velo);
  528. }
  529. else if (MIDI_IS_STATUS_POLYPHONIC_AFTERTOUCH(status))
  530. {
  531. const uint8_t note = midiEvent->data[1];
  532. const uint8_t pressure = midiEvent->data[2];
  533. fMaster->polyphonicAftertouch(channel, note, pressure);
  534. }
  535. else if (MIDI_IS_STATUS_CONTROL_CHANGE(status))
  536. {
  537. const uint8_t control = midiEvent->data[1];
  538. const uint8_t value = midiEvent->data[2];
  539. fMaster->setController(channel, control, value);
  540. }
  541. else if (MIDI_IS_STATUS_PITCH_WHEEL_CONTROL(status))
  542. {
  543. const uint8_t lsb = midiEvent->data[1];
  544. const uint8_t msb = midiEvent->data[2];
  545. const int value = ((msb << 7) | lsb) - 8192;
  546. fMaster->setController(channel, C_pitchwheel, value);
  547. }
  548. }
  549. fMaster->GetAudioOutSamples(frames, fSampleRate, outBuffer[0], outBuffer[1]);
  550. pthread_mutex_unlock(&fMaster->mutex);
  551. }
  552. #ifdef WANT_ZYNADDSUBFX_UI
  553. // -------------------------------------------------------------------
  554. // Plugin UI calls
  555. void uiShow(const bool show) override
  556. {
  557. if (show)
  558. fThread.uiShow();
  559. else
  560. fThread.uiHide();
  561. }
  562. #endif
  563. // -------------------------------------------------------------------
  564. // Plugin state calls
  565. char* getState() const override
  566. {
  567. config.save();
  568. char* data = nullptr;
  569. fMaster->getalldata(&data);
  570. return data;
  571. }
  572. void setState(const char* const data) override
  573. {
  574. fThread.stopLoadProgramLater();
  575. fMaster->putalldata((char*)data, 0);
  576. fMaster->applyparameters(true);
  577. }
  578. // -------------------------------------------------------------------
  579. // Plugin dispatcher
  580. // TODO - save&load current state
  581. void bufferSizeChanged(const uint32_t) final
  582. {
  583. deleteMaster();
  584. sInstanceCount.maybeReinit(getHostHandle());
  585. initMaster();
  586. }
  587. void sampleRateChanged(const double sampleRate) final
  588. {
  589. fSampleRate = sampleRate;
  590. deleteMaster();
  591. sInstanceCount.maybeReinit(getHostHandle());
  592. initMaster();
  593. }
  594. void initMaster()
  595. {
  596. fMaster = new Master();
  597. fThread.setMaster(fMaster);
  598. fThread.startThread();
  599. for (int i = 0; i < NUM_MIDI_PARTS; ++i)
  600. fMaster->partonoff(i, 1);
  601. }
  602. void deleteMaster()
  603. {
  604. //ensure that everything has stopped
  605. pthread_mutex_lock(&fMaster->mutex);
  606. pthread_mutex_unlock(&fMaster->mutex);
  607. fThread.stopThread(-1);
  608. delete fMaster;
  609. fMaster = nullptr;
  610. }
  611. #ifdef WANT_ZYNADDSUBFX_UI
  612. void uiNameChanged(const char* const uiName) override
  613. {
  614. fThread.uiChangeName(uiName);
  615. }
  616. #endif
  617. // -------------------------------------------------------------------
  618. private:
  619. Master* fMaster;
  620. unsigned fSampleRate;
  621. bool fIsActive;
  622. ZynAddSubFxThread fThread;
  623. #if 0
  624. // -------------------------------------------------------------------
  625. static CarlaMutex& getGlobalMutex() noexcept
  626. {
  627. static CarlaMutex m;
  628. return m;
  629. }
  630. #endif
  631. // -------------------------------------------------------------------
  632. public:
  633. static NativePluginHandle _instantiate(const NativeHostDescriptor* host)
  634. {
  635. sInstanceCount.addOne(host);
  636. return new ZynAddSubFxPlugin(host);
  637. }
  638. static void _cleanup(NativePluginHandle handle)
  639. {
  640. delete (ZynAddSubFxPlugin*)handle;
  641. sInstanceCount.removeOne();
  642. }
  643. CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(ZynAddSubFxPlugin)
  644. };
  645. // -----------------------------------------------------------------------
  646. static const NativePluginDescriptor zynaddsubfxDesc = {
  647. /* category */ PLUGIN_CATEGORY_SYNTH,
  648. #ifdef WANT_ZYNADDSUBFX_UI
  649. /* hints */ static_cast<NativePluginHints>(PLUGIN_IS_SYNTH|PLUGIN_HAS_UI|PLUGIN_USES_MULTI_PROGS|PLUGIN_USES_STATE),
  650. #else
  651. /* hints */ static_cast<NativePluginHints>(PLUGIN_IS_SYNTH|PLUGIN_USES_MULTI_PROGS|PLUGIN_USES_STATE),
  652. #endif
  653. /* supports */ static_cast<NativePluginSupports>(PLUGIN_SUPPORTS_CONTROL_CHANGES|PLUGIN_SUPPORTS_NOTE_AFTERTOUCH|PLUGIN_SUPPORTS_PITCHBEND|PLUGIN_SUPPORTS_ALL_SOUND_OFF),
  654. /* audioIns */ 0,
  655. /* audioOuts */ 2,
  656. /* midiIns */ 1,
  657. /* midiOuts */ 0,
  658. /* paramIns */ 0,
  659. /* paramOuts */ 0,
  660. /* name */ "ZynAddSubFX",
  661. /* label */ "zynaddsubfx",
  662. /* maker */ "falkTX, Mark McCurry, Nasca Octavian Paul",
  663. /* copyright */ "GNU GPL v2+",
  664. PluginDescriptorFILL(ZynAddSubFxPlugin)
  665. };
  666. // -----------------------------------------------------------------------
  667. CARLA_EXPORT
  668. void carla_register_native_plugin_zynaddsubfx_synth()
  669. {
  670. carla_register_native_plugin(&zynaddsubfxDesc);
  671. }
  672. // -----------------------------------------------------------------------