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.

544 lines
10KB

  1. /*
  2. * Carla Native Plugins
  3. * Copyright (C) 2012-2016 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 "CarlaDefines.h"
  18. #define PLUGINVERSION
  19. #define SOURCE_DIR "/usr/share/zynaddsubfx/examples"
  20. #undef override
  21. // base c-style headers
  22. #include "zynaddsubfx/tlsf/tlsf.h"
  23. #include "zynaddsubfx/rtosc/rtosc.h"
  24. // C-code includes
  25. extern "C" {
  26. #include "zynaddsubfx/tlsf/tlsf.c"
  27. #undef TLSF_64BIT
  28. #undef tlsf_decl
  29. #undef tlsf_fls_sizet
  30. #undef tlsf_cast
  31. #undef tlsf_min
  32. #undef tlsf_max
  33. #undef tlsf_assert
  34. #undef _tlsf_glue2
  35. #undef _tlsf_glue
  36. #undef tlsf_static_assert
  37. #undef tlsf_insist
  38. #include "zynaddsubfx/rtosc/dispatch.c"
  39. #include "zynaddsubfx/rtosc/rtosc.c"
  40. }
  41. // rtosc includes
  42. #include "zynaddsubfx/rtosc/cpp/midimapper.cpp"
  43. #include "zynaddsubfx/rtosc/cpp/miditable.cpp"
  44. #undef RTOSC_INVALID_MIDI
  45. #undef MAX_UNHANDLED_PATH
  46. #include "zynaddsubfx/rtosc/cpp/ports.cpp"
  47. #undef __builtin_expect
  48. #include "zynaddsubfx/rtosc/cpp/subtree-serialize.cpp"
  49. #include "zynaddsubfx/rtosc/cpp/thread-link.cpp"
  50. #undef off_t
  51. #include "zynaddsubfx/rtosc/cpp/undo-history.cpp"
  52. // zynaddsubfx includes
  53. #include "zynaddsubfx/version.cpp"
  54. #include "zynaddsubfx/Containers/MultiPseudoStack.cpp"
  55. #undef rBegin
  56. #undef rObject
  57. #undef rStdString
  58. #undef rStdStringCb
  59. #undef rChangeCb
  60. #define rChangeCb
  61. #include "zynaddsubfx/Containers/NotePool.cpp"
  62. #undef rBegin
  63. #undef rObject
  64. #undef rStdString
  65. #undef rStdStringCb
  66. #undef rChangeCb
  67. #define rChangeCb
  68. #include "zynaddsubfx/Containers/ScratchString.cpp"
  69. #undef rBegin
  70. #undef rObject
  71. #undef rStdString
  72. #undef rStdStringCb
  73. #undef rChangeCb
  74. #define rChangeCb
  75. #include "zynaddsubfx/DSP/AnalogFilter.cpp"
  76. #undef rBegin
  77. #undef rObject
  78. #undef rStdString
  79. #undef rStdStringCb
  80. #undef rChangeCb
  81. #define rChangeCb
  82. #include "zynaddsubfx/DSP/FFTwrapper.cpp"
  83. #undef rBegin
  84. #undef rObject
  85. #undef rStdString
  86. #undef rStdStringCb
  87. #undef rChangeCb
  88. #define rChangeCb
  89. #include "zynaddsubfx/DSP/Filter.cpp"
  90. #undef rBegin
  91. #undef rObject
  92. #undef rStdString
  93. #undef rStdStringCb
  94. #undef rChangeCb
  95. #define rChangeCb
  96. #include "zynaddsubfx/DSP/FormantFilter.cpp"
  97. #undef rBegin
  98. #undef rObject
  99. #undef rStdString
  100. #undef rStdStringCb
  101. #undef rChangeCb
  102. #define rChangeCb
  103. #include "zynaddsubfx/DSP/SVFilter.cpp"
  104. #undef rBegin
  105. #undef rObject
  106. #undef rStdString
  107. #undef rStdStringCb
  108. #undef rChangeCb
  109. #define rChangeCb
  110. #include "zynaddsubfx/DSP/Unison.cpp"
  111. #undef rBegin
  112. #undef rObject
  113. #undef rStdString
  114. #undef rStdStringCb
  115. #undef rChangeCb
  116. #define rChangeCb
  117. #include "zynaddsubfx/Effects/Alienwah.cpp"
  118. #undef rBegin
  119. #undef rObject
  120. #undef rStdString
  121. #undef rStdStringCb
  122. #undef rChangeCb
  123. #define rChangeCb
  124. #include "zynaddsubfx/Effects/Chorus.cpp"
  125. #undef rBegin
  126. #undef rObject
  127. #undef rStdString
  128. #undef rStdStringCb
  129. #undef rChangeCb
  130. #define rChangeCb
  131. #include "zynaddsubfx/Effects/Distorsion.cpp"
  132. #undef rBegin
  133. #undef rObject
  134. #undef rStdString
  135. #undef rStdStringCb
  136. #undef rChangeCb
  137. #define rChangeCb
  138. #include "zynaddsubfx/Effects/DynamicFilter.cpp"
  139. #undef rBegin
  140. #undef rObject
  141. #undef rStdString
  142. #undef rStdStringCb
  143. #undef rChangeCb
  144. #define rChangeCb
  145. #include "zynaddsubfx/Effects/Echo.cpp"
  146. #undef MAX_DELAY
  147. #undef rBegin
  148. #undef rObject
  149. #undef rStdString
  150. #undef rStdStringCb
  151. #undef rChangeCb
  152. #define rChangeCb
  153. #include "zynaddsubfx/Effects/Effect.cpp"
  154. #undef rBegin
  155. #undef rObject
  156. #undef rStdString
  157. #undef rStdStringCb
  158. #undef rChangeCb
  159. #define rChangeCb
  160. #include "zynaddsubfx/Effects/EffectLFO.cpp"
  161. #undef rBegin
  162. #undef rObject
  163. #undef rStdString
  164. #undef rStdStringCb
  165. #undef rChangeCb
  166. #define rChangeCb
  167. #include "zynaddsubfx/Effects/EffectMgr.cpp"
  168. #undef rBegin
  169. #undef rObject
  170. #undef rStdString
  171. #undef rStdStringCb
  172. #undef rChangeCb
  173. #define rChangeCb
  174. #include "zynaddsubfx/Effects/EQ.cpp"
  175. #undef rBegin
  176. #undef rObject
  177. #undef rStdString
  178. #undef rStdStringCb
  179. #undef rChangeCb
  180. #define rChangeCb
  181. #include "zynaddsubfx/Effects/Phaser.cpp"
  182. #undef PHASER_LFO_SHAPE
  183. #undef ONE_
  184. #undef ZERO_
  185. #undef rBegin
  186. #undef rObject
  187. #undef rStdString
  188. #undef rStdStringCb
  189. #undef rChangeCb
  190. #define rChangeCb
  191. #include "zynaddsubfx/Effects/Reverb.cpp"
  192. #undef rBegin
  193. #undef rObject
  194. #undef rStdString
  195. #undef rStdStringCb
  196. #undef rChangeCb
  197. #define rChangeCb
  198. #include "zynaddsubfx/Misc/Allocator.cpp"
  199. #undef rBegin
  200. #undef rObject
  201. #undef rStdString
  202. #undef rStdStringCb
  203. #undef rChangeCb
  204. #define rChangeCb
  205. #include "zynaddsubfx/Misc/Bank.cpp"
  206. #undef INSTRUMENT_EXTENSION
  207. #undef FORCE_BANK_DIR_FILE
  208. #undef rBegin
  209. #undef rObject
  210. #undef rStdString
  211. #undef rStdStringCb
  212. #undef rChangeCb
  213. #define rChangeCb
  214. #include "zynaddsubfx/Misc/BankDb.cpp"
  215. #undef rBegin
  216. #undef rObject
  217. #undef rStdString
  218. #undef rStdStringCb
  219. #undef rChangeCb
  220. #define rChangeCb
  221. #include "zynaddsubfx/Misc/CallbackRepeater.cpp"
  222. #undef rBegin
  223. #undef rObject
  224. #undef rStdString
  225. #undef rStdStringCb
  226. #undef rChangeCb
  227. #define rChangeCb
  228. #include "zynaddsubfx/Misc/Config.cpp"
  229. #undef rBegin
  230. #undef rObject
  231. #undef rStdString
  232. #undef rStdStringCb
  233. #undef rChangeCb
  234. #define rChangeCb
  235. #include "zynaddsubfx/Misc/Master.cpp"
  236. #undef rObject
  237. #undef rStdString
  238. #undef rStdStringCb
  239. #undef rChangeCb
  240. #define rChangeCb
  241. #include "zynaddsubfx/Misc/Microtonal.cpp"
  242. #undef MAX_LINE_SIZE
  243. #undef rBegin
  244. #undef rObject
  245. #undef rStdString
  246. #undef rStdStringCb
  247. #undef rChangeCb
  248. #define rChangeCb
  249. #include "zynaddsubfx/Misc/MiddleWare.cpp"
  250. #undef rBegin
  251. #undef rObject
  252. #undef rStdString
  253. #undef rStdStringCb
  254. #undef rChangeCb
  255. #define rChangeCb
  256. #include "zynaddsubfx/Misc/Part.cpp"
  257. #undef CLONE
  258. #undef rBegin
  259. #undef rObject
  260. #undef rStdString
  261. #undef rStdStringCb
  262. #undef rChangeCb
  263. #define rChangeCb
  264. #include "zynaddsubfx/Misc/PresetExtractor.cpp"
  265. #undef rBegin
  266. #undef rObject
  267. #undef rStdString
  268. #undef rStdStringCb
  269. #undef rChangeCb
  270. #define rChangeCb
  271. #include "zynaddsubfx/Misc/Recorder.cpp"
  272. #undef rBegin
  273. #undef rObject
  274. #undef rStdString
  275. #undef rStdStringCb
  276. #undef rChangeCb
  277. #define rChangeCb
  278. #include "zynaddsubfx/Misc/Util.cpp"
  279. #undef rBegin
  280. #undef rObject
  281. #undef rStdString
  282. #undef rStdStringCb
  283. #undef rChangeCb
  284. #define rChangeCb
  285. #include "zynaddsubfx/Misc/WavFile.cpp"
  286. #undef rBegin
  287. #undef rObject
  288. #undef rStdString
  289. #undef rStdStringCb
  290. #undef rChangeCb
  291. #define rChangeCb
  292. #include "zynaddsubfx/Misc/WaveShapeSmps.cpp"
  293. #undef rBegin
  294. #undef rObject
  295. #undef rStdString
  296. #undef rStdStringCb
  297. #undef rChangeCb
  298. #define rChangeCb
  299. #include "zynaddsubfx/Misc/XMLwrapper.cpp"
  300. #undef rBegin
  301. #undef rObject
  302. #undef rStdString
  303. #undef rStdStringCb
  304. #undef rChangeCb
  305. #define rChangeCb
  306. #include "zynaddsubfx/Params/ADnoteParameters.cpp"
  307. #undef EXPAND
  308. #undef rBegin
  309. #undef rObject
  310. #undef rStdString
  311. #undef rStdStringCb
  312. #undef rChangeCb
  313. #define rChangeCb
  314. #include "zynaddsubfx/Params/Controller.cpp"
  315. #undef rBegin
  316. #undef rObject
  317. #undef rStdString
  318. #undef rStdStringCb
  319. #undef rChangeCb
  320. #define rChangeCb
  321. #include "zynaddsubfx/Params/EnvelopeParams.cpp"
  322. #undef rBegin
  323. #undef rObject
  324. #undef rStdString
  325. #undef rStdStringCb
  326. #undef rChangeCb
  327. #define rChangeCb
  328. #include "zynaddsubfx/Params/FilterParams.cpp"
  329. #undef rBegin
  330. #undef rObject
  331. #undef rStdString
  332. #undef rStdStringCb
  333. #undef rChangeCb
  334. #define rChangeCb
  335. #include "zynaddsubfx/Params/LFOParams.cpp"
  336. #undef rBegin
  337. #undef rObject
  338. #undef rStdString
  339. #undef rStdStringCb
  340. #undef rChangeCb
  341. #define rChangeCb
  342. #include "zynaddsubfx/Params/PADnoteParameters.cpp"
  343. #undef PC
  344. #undef P_C
  345. #undef rBegin
  346. #undef rObject
  347. #undef rStdString
  348. #undef rStdStringCb
  349. #undef rChangeCb
  350. #define rChangeCb
  351. #include "zynaddsubfx/Params/Presets.cpp"
  352. #undef rBegin
  353. #undef rObject
  354. #undef rStdString
  355. #undef rStdStringCb
  356. #undef rChangeCb
  357. #define rChangeCb
  358. #include "zynaddsubfx/Params/PresetsArray.cpp"
  359. #undef rBegin
  360. #undef rObject
  361. #undef rStdString
  362. #undef rStdStringCb
  363. #undef rChangeCb
  364. #define rChangeCb
  365. #include "zynaddsubfx/Params/PresetsStore.cpp"
  366. #undef rBegin
  367. #undef rObject
  368. #undef rStdString
  369. #undef rStdStringCb
  370. #undef rChangeCb
  371. #define rChangeCb
  372. #include "zynaddsubfx/Params/SUBnoteParameters.cpp"
  373. #undef doPaste
  374. #undef doPPaste
  375. #undef rBegin
  376. #undef rObject
  377. #undef rStdString
  378. #undef rStdStringCb
  379. #undef rChangeCb
  380. #define rChangeCb
  381. #include "zynaddsubfx/Synth/ADnote.cpp"
  382. #undef rBegin
  383. #undef rObject
  384. #undef rStdString
  385. #undef rStdStringCb
  386. #undef rChangeCb
  387. #define rChangeCb
  388. #include "zynaddsubfx/Synth/Envelope.cpp"
  389. #undef rBegin
  390. #undef rObject
  391. #undef rStdString
  392. #undef rStdStringCb
  393. #undef rChangeCb
  394. #define rChangeCb
  395. #include "zynaddsubfx/Synth/LFO.cpp"
  396. #undef rBegin
  397. #undef rObject
  398. #undef rStdString
  399. #undef rStdStringCb
  400. #undef rChangeCb
  401. #define rChangeCb
  402. #include "zynaddsubfx/Synth/ModFilter.cpp"
  403. #undef rBegin
  404. #undef rObject
  405. #undef rStdString
  406. #undef rStdStringCb
  407. #undef rChangeCb
  408. #define rChangeCb
  409. #include "zynaddsubfx/Synth/OscilGen.cpp"
  410. #undef PC
  411. #undef DIFF
  412. #undef PRESERVE
  413. #undef RESTORE
  414. #undef FUNC
  415. #undef FILTER
  416. #undef rBegin
  417. #undef rObject
  418. #undef rStdString
  419. #undef rStdStringCb
  420. #undef rChangeCb
  421. #define rChangeCb
  422. #include "zynaddsubfx/Synth/PADnote.cpp"
  423. #undef rBegin
  424. #undef rObject
  425. #undef rStdString
  426. #undef rStdStringCb
  427. #undef rChangeCb
  428. #define rChangeCb
  429. #include "zynaddsubfx/Synth/Resonance.cpp"
  430. #undef rBegin
  431. #undef rObject
  432. #undef rStdString
  433. #undef rStdStringCb
  434. #undef rChangeCb
  435. #define rChangeCb
  436. #include "zynaddsubfx/Synth/SUBnote.cpp"
  437. #undef rBegin
  438. #undef rObject
  439. #undef rStdString
  440. #undef rStdStringCb
  441. #undef rChangeCb
  442. #define rChangeCb
  443. #include "zynaddsubfx/Synth/SynthNote.cpp"
  444. #undef rBegin
  445. #undef rObject
  446. #undef rStdString
  447. #undef rStdStringCb
  448. #undef rChangeCb
  449. #define rChangeCb
  450. #include "zynaddsubfx/Synth/WatchPoint.cpp"
  451. #undef rBegin
  452. #undef rObject
  453. #undef rStdString
  454. #undef rStdStringCb
  455. #undef rChangeCb
  456. #define rChangeCb
  457. #include "zynaddsubfx/UI/ConnectionDummy.cpp"
  458. #undef rBegin
  459. #undef rObject
  460. #undef rStdString
  461. #undef rStdStringCb
  462. #undef rChangeCb
  463. #define rChangeCb
  464. #include "zynaddsubfx/globals.cpp"
  465. // Dummy variables and functions for linking purposes
  466. class WavFile;
  467. namespace Nio {
  468. void masterSwap(Master*){}
  469. bool setSource(std::string){return true;}
  470. bool setSink(std::string){return true;}
  471. std::set<std::string> getSources(void){return std::set<std::string>();}
  472. std::set<std::string> getSinks(void){return std::set<std::string>();}
  473. std::string getSource(void){return "";}
  474. std::string getSink(void){return "";}
  475. void waveNew(WavFile*){}
  476. void waveStart(){}
  477. void waveStop(){}
  478. }