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.

428 lines
15KB

  1. /*
  2. * Carla Native Plugins
  3. * Copyright (C) 2012-2018 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.h"
  18. #include "CarlaMIDI.h"
  19. #include "CarlaUtils.hpp"
  20. #ifdef CARLA_OS_WIN
  21. # undef HAVE_PYQT
  22. #endif
  23. #undef DESCFUNCS
  24. #define DESCFUNCS \
  25. nullptr, nullptr, nullptr, nullptr, nullptr, \
  26. nullptr, nullptr, nullptr, nullptr, nullptr, \
  27. nullptr, nullptr, nullptr, nullptr, nullptr, \
  28. nullptr, nullptr, nullptr, nullptr, nullptr, nullptr
  29. static const NativePluginDescriptor sNativePluginDescriptors[] = {
  30. // --------------------------------------------------------------------------------------------------------------------
  31. // Simple plugins
  32. {
  33. /* category */ NATIVE_PLUGIN_CATEGORY_NONE,
  34. /* hints */ NATIVE_PLUGIN_IS_RTSAFE,
  35. /* supports */ NATIVE_PLUGIN_SUPPORTS_NOTHING,
  36. /* audioIns */ 1,
  37. /* audioOuts */ 1,
  38. /* midiIns */ 0,
  39. /* midiOuts */ 0,
  40. /* paramIns */ 0,
  41. /* paramOuts */ 0,
  42. /* name */ "Bypass",
  43. /* label */ "bypass",
  44. /* maker */ "falkTX",
  45. /* copyright */ "GNU GPL v2+",
  46. DESCFUNCS
  47. },
  48. {
  49. /* category */ NATIVE_PLUGIN_CATEGORY_UTILITY,
  50. /* hints */ NATIVE_PLUGIN_IS_RTSAFE,
  51. /* supports */ NATIVE_PLUGIN_SUPPORTS_NOTHING,
  52. /* audioIns */ 0,
  53. /* audioOuts */ 0,
  54. /* midiIns */ 0,
  55. /* midiOuts */ 0,
  56. /* paramIns */ 5-1,
  57. /* paramOuts */ 1,
  58. /* name */ "LFO",
  59. /* label */ "lfo",
  60. /* maker */ "falkTX",
  61. /* copyright */ "GNU GPL v2+",
  62. DESCFUNCS
  63. },
  64. {
  65. /* category */ NATIVE_PLUGIN_CATEGORY_UTILITY,
  66. /* hints */ NATIVE_PLUGIN_IS_RTSAFE,
  67. /* supports */ NATIVE_PLUGIN_SUPPORTS_EVERYTHING,
  68. /* audioIns */ 0,
  69. /* audioOuts */ 0,
  70. /* midiIns */ 1,
  71. /* midiOuts */ 1,
  72. /* paramIns */ 0,
  73. /* paramOuts */ 0,
  74. /* name */ "MIDI Channel Filter",
  75. /* label */ "midichanfilter",
  76. /* maker */ "falkTX",
  77. /* copyright */ "GNU GPL v2+",
  78. DESCFUNCS
  79. },
  80. {
  81. /* category */ NATIVE_PLUGIN_CATEGORY_UTILITY,
  82. /* hints */ NATIVE_PLUGIN_IS_RTSAFE,
  83. /* supports */ NATIVE_PLUGIN_SUPPORTS_EVERYTHING,
  84. /* audioIns */ 0,
  85. /* audioOuts */ 0,
  86. /* midiIns */ 1,
  87. /* midiOuts */ 1,
  88. /* paramIns */ 0,
  89. /* paramOuts */ 0,
  90. /* name */ "MIDI Gain",
  91. /* label */ "midigain",
  92. /* maker */ "falkTX",
  93. /* copyright */ "GNU GPL v2+",
  94. DESCFUNCS
  95. },
  96. {
  97. /* category */ NATIVE_PLUGIN_CATEGORY_UTILITY,
  98. /* hints */ NATIVE_PLUGIN_IS_RTSAFE,
  99. /* supports */ NATIVE_PLUGIN_SUPPORTS_EVERYTHING,
  100. /* audioIns */ 0,
  101. /* audioOuts */ 0,
  102. /* midiIns */ MAX_MIDI_CHANNELS,
  103. /* midiOuts */ 1,
  104. /* paramIns */ 0,
  105. /* paramOuts */ 0,
  106. /* name */ "MIDI Join",
  107. /* label */ "midijoin",
  108. /* maker */ "falkTX",
  109. /* copyright */ "GNU GPL v2+",
  110. DESCFUNCS
  111. },
  112. {
  113. /* category */ NATIVE_PLUGIN_CATEGORY_UTILITY,
  114. /* hints */ NATIVE_PLUGIN_IS_RTSAFE,
  115. /* supports */ NATIVE_PLUGIN_SUPPORTS_EVERYTHING,
  116. /* audioIns */ 0,
  117. /* audioOuts */ 0,
  118. /* midiIns */ 1,
  119. /* midiOuts */ MAX_MIDI_CHANNELS,
  120. /* paramIns */ 0,
  121. /* paramOuts */ 0,
  122. /* name */ "MIDI Split",
  123. /* label */ "midisplit",
  124. /* maker */ "falkTX",
  125. /* copyright */ "GNU GPL v2+",
  126. DESCFUNCS
  127. },
  128. {
  129. /* category */ NATIVE_PLUGIN_CATEGORY_UTILITY,
  130. /* hints */ NATIVE_PLUGIN_IS_RTSAFE,
  131. /* supports */ NATIVE_PLUGIN_SUPPORTS_EVERYTHING,
  132. /* audioIns */ 0,
  133. /* audioOuts */ 0,
  134. /* midiIns */ 1,
  135. /* midiOuts */ 1,
  136. /* paramIns */ 0,
  137. /* paramOuts */ 0,
  138. /* name */ "MIDI Through",
  139. /* label */ "midithrough",
  140. /* maker */ "falkTX",
  141. /* copyright */ "GNU GPL v2+",
  142. DESCFUNCS
  143. },
  144. {
  145. /* category */ NATIVE_PLUGIN_CATEGORY_UTILITY,
  146. /* hints */ NATIVE_PLUGIN_IS_RTSAFE,
  147. /* supports */ NATIVE_PLUGIN_SUPPORTS_EVERYTHING,
  148. /* audioIns */ 0,
  149. /* audioOuts */ 0,
  150. /* midiIns */ 1,
  151. /* midiOuts */ 1,
  152. /* paramIns */ 2,
  153. /* paramOuts */ 0,
  154. /* name */ "MIDI Transpose",
  155. /* label */ "miditranspose",
  156. /* maker */ "falkTX",
  157. /* copyright */ "GNU GPL v2+",
  158. DESCFUNCS
  159. },
  160. // --------------------------------------------------------------------------------------------------------------------
  161. // Audio file
  162. {
  163. /* category */ NATIVE_PLUGIN_CATEGORY_UTILITY,
  164. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_RTSAFE
  165. |NATIVE_PLUGIN_HAS_UI
  166. |NATIVE_PLUGIN_NEEDS_UI_OPEN_SAVE
  167. |NATIVE_PLUGIN_USES_TIME),
  168. /* supports */ NATIVE_PLUGIN_SUPPORTS_NOTHING,
  169. /* audioIns */ 0,
  170. /* audioOuts */ 2,
  171. /* midiIns */ 0,
  172. /* midiOuts */ 0,
  173. /* paramIns */ 1,
  174. /* paramOuts */ 0,
  175. /* name */ "Audio File",
  176. /* label */ "audiofile",
  177. /* maker */ "falkTX",
  178. /* copyright */ "GNU GPL v2+",
  179. DESCFUNCS
  180. },
  181. // --------------------------------------------------------------------------------------------------------------------
  182. // MIDI file and sequencer
  183. {
  184. /* category */ NATIVE_PLUGIN_CATEGORY_UTILITY,
  185. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_RTSAFE
  186. |NATIVE_PLUGIN_HAS_UI
  187. |NATIVE_PLUGIN_NEEDS_UI_OPEN_SAVE
  188. |NATIVE_PLUGIN_USES_STATE
  189. |NATIVE_PLUGIN_USES_TIME),
  190. /* supports */ NATIVE_PLUGIN_SUPPORTS_NOTHING,
  191. /* audioIns */ 0,
  192. /* audioOuts */ 0,
  193. /* midiIns */ 0,
  194. /* midiOuts */ 1,
  195. /* paramIns */ 0,
  196. /* paramOuts */ 0,
  197. /* name */ "MIDI File",
  198. /* label */ "midifile",
  199. /* maker */ "falkTX",
  200. /* copyright */ "GNU GPL v2+",
  201. DESCFUNCS
  202. },
  203. #ifdef HAVE_PYQT
  204. {
  205. /* category */ NATIVE_PLUGIN_CATEGORY_UTILITY,
  206. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_RTSAFE
  207. |NATIVE_PLUGIN_HAS_UI
  208. |NATIVE_PLUGIN_USES_STATE
  209. |NATIVE_PLUGIN_USES_TIME),
  210. /* supports */ NATIVE_PLUGIN_SUPPORTS_NOTHING,
  211. /* audioIns */ 0,
  212. /* audioOuts */ 0,
  213. /* midiIns */ 0,
  214. /* midiOuts */ 1,
  215. /* paramIns */ 4,
  216. /* paramOuts */ 0,
  217. /* name */ "MIDI Pattern",
  218. /* label */ "midipattern",
  219. /* maker */ "falkTX, tatch",
  220. /* copyright */ "GNU GPL v2+",
  221. DESCFUNCS
  222. },
  223. #endif
  224. // --------------------------------------------------------------------------------------------------------------------
  225. // Carla
  226. #ifdef HAVE_PYQT
  227. {
  228. /* category */ NATIVE_PLUGIN_CATEGORY_OTHER,
  229. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_SYNTH
  230. |NATIVE_PLUGIN_HAS_UI
  231. //|NATIVE_PLUGIN_NEEDS_FIXED_BUFFERS
  232. |NATIVE_PLUGIN_NEEDS_UI_MAIN_THREAD
  233. |NATIVE_PLUGIN_USES_STATE
  234. |NATIVE_PLUGIN_USES_TIME),
  235. /* supports */ static_cast<NativePluginSupports>(NATIVE_PLUGIN_SUPPORTS_EVERYTHING),
  236. /* audioIns */ 2,
  237. /* audioOuts */ 2,
  238. /* midiIns */ 1,
  239. /* midiOuts */ 1,
  240. /* paramIns */ 0,
  241. /* paramOuts */ 0,
  242. /* name */ "Carla-Rack",
  243. /* label */ "carlarack",
  244. /* maker */ "falkTX",
  245. /* copyright */ "GNU GPL v2+",
  246. DESCFUNCS
  247. },
  248. {
  249. /* category */ NATIVE_PLUGIN_CATEGORY_OTHER,
  250. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_SYNTH
  251. |NATIVE_PLUGIN_HAS_UI
  252. //|NATIVE_PLUGIN_NEEDS_FIXED_BUFFERS
  253. |NATIVE_PLUGIN_NEEDS_UI_MAIN_THREAD
  254. |NATIVE_PLUGIN_USES_STATE
  255. |NATIVE_PLUGIN_USES_TIME),
  256. /* supports */ static_cast<NativePluginSupports>(NATIVE_PLUGIN_SUPPORTS_EVERYTHING),
  257. /* audioIns */ 2,
  258. /* audioOuts */ 2,
  259. /* midiIns */ 1,
  260. /* midiOuts */ 0,
  261. /* paramIns */ 0,
  262. /* paramOuts */ 0,
  263. /* name */ "Carla-Rack (no midi out)",
  264. /* label */ "carlarack-nomidiout",
  265. /* maker */ "falkTX",
  266. /* copyright */ "GNU GPL v2+",
  267. DESCFUNCS
  268. },
  269. {
  270. /* category */ NATIVE_PLUGIN_CATEGORY_OTHER,
  271. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_SYNTH
  272. |NATIVE_PLUGIN_HAS_UI
  273. //|NATIVE_PLUGIN_NEEDS_FIXED_BUFFERS
  274. |NATIVE_PLUGIN_NEEDS_UI_MAIN_THREAD
  275. |NATIVE_PLUGIN_USES_STATE
  276. |NATIVE_PLUGIN_USES_TIME),
  277. /* supports */ static_cast<NativePluginSupports>(NATIVE_PLUGIN_SUPPORTS_EVERYTHING),
  278. /* audioIns */ 2,
  279. /* audioOuts */ 2,
  280. /* midiIns */ 1,
  281. /* midiOuts */ 1,
  282. /* paramIns */ 0,
  283. /* paramOuts */ 0,
  284. /* name */ "Carla-Patchbay",
  285. /* label */ "carlapatchbay",
  286. /* maker */ "falkTX",
  287. /* copyright */ "GNU GPL v2+",
  288. DESCFUNCS
  289. },
  290. {
  291. /* category */ NATIVE_PLUGIN_CATEGORY_OTHER,
  292. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_SYNTH
  293. |NATIVE_PLUGIN_HAS_UI
  294. //|NATIVE_PLUGIN_NEEDS_FIXED_BUFFERS
  295. |NATIVE_PLUGIN_NEEDS_UI_MAIN_THREAD
  296. |NATIVE_PLUGIN_USES_STATE
  297. |NATIVE_PLUGIN_USES_TIME),
  298. /* supports */ static_cast<NativePluginSupports>(NATIVE_PLUGIN_SUPPORTS_EVERYTHING),
  299. /* audioIns */ 3,
  300. /* audioOuts */ 2,
  301. /* midiIns */ 1,
  302. /* midiOuts */ 1,
  303. /* paramIns */ 0,
  304. /* paramOuts */ 0,
  305. /* name */ "Carla-Patchbay (sidechain)",
  306. /* label */ "carlapatchbay3s",
  307. /* maker */ "falkTX",
  308. /* copyright */ "GNU GPL v2+",
  309. DESCFUNCS
  310. },
  311. {
  312. /* category */ NATIVE_PLUGIN_CATEGORY_OTHER,
  313. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_SYNTH
  314. |NATIVE_PLUGIN_HAS_UI
  315. //|NATIVE_PLUGIN_NEEDS_FIXED_BUFFERS
  316. |NATIVE_PLUGIN_NEEDS_UI_MAIN_THREAD
  317. |NATIVE_PLUGIN_USES_STATE
  318. |NATIVE_PLUGIN_USES_TIME),
  319. /* supports */ static_cast<NativePluginSupports>(NATIVE_PLUGIN_SUPPORTS_EVERYTHING),
  320. /* audioIns */ 16,
  321. /* audioOuts */ 16,
  322. /* midiIns */ 1,
  323. /* midiOuts */ 1,
  324. /* paramIns */ 0,
  325. /* paramOuts */ 0,
  326. /* name */ "Carla-Patchbay (16chan)",
  327. /* label */ "carlapatchbay16",
  328. /* maker */ "falkTX",
  329. /* copyright */ "GNU GPL v2+",
  330. DESCFUNCS
  331. },
  332. {
  333. /* category */ NATIVE_PLUGIN_CATEGORY_OTHER,
  334. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_SYNTH
  335. |NATIVE_PLUGIN_HAS_UI
  336. //|NATIVE_PLUGIN_NEEDS_FIXED_BUFFERS
  337. |NATIVE_PLUGIN_NEEDS_UI_MAIN_THREAD
  338. |NATIVE_PLUGIN_USES_STATE
  339. |NATIVE_PLUGIN_USES_TIME),
  340. /* supports */ static_cast<NativePluginSupports>(NATIVE_PLUGIN_SUPPORTS_EVERYTHING),
  341. /* audioIns */ 32,
  342. /* audioOuts */ 32,
  343. /* midiIns */ 1,
  344. /* midiOuts */ 1,
  345. /* paramIns */ 0,
  346. /* paramOuts */ 0,
  347. /* name */ "Carla-Patchbay (32chan)",
  348. /* label */ "carlapatchbay32",
  349. /* maker */ "falkTX",
  350. /* copyright */ "GNU GPL v2+",
  351. DESCFUNCS
  352. },
  353. #endif
  354. // --------------------------------------------------------------------------------------------------------------------
  355. // External-UI plugins
  356. #ifdef HAVE_PYQT
  357. {
  358. /* category */ NATIVE_PLUGIN_CATEGORY_UTILITY,
  359. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_RTSAFE
  360. |NATIVE_PLUGIN_HAS_UI
  361. |NATIVE_PLUGIN_NEEDS_FIXED_BUFFERS),
  362. /* supports */ NATIVE_PLUGIN_SUPPORTS_NOTHING,
  363. /* audioIns */ 2,
  364. /* audioOuts */ 0,
  365. /* midiIns */ 0,
  366. /* midiOuts */ 0,
  367. /* paramIns */ 2,
  368. /* paramOuts */ 2,
  369. /* name */ "Big Meter",
  370. /* label */ "bigmeter",
  371. /* maker */ "falkTX",
  372. /* copyright */ "GNU GPL v2+",
  373. DESCFUNCS
  374. },
  375. {
  376. /* category */ NATIVE_PLUGIN_CATEGORY_UTILITY,
  377. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_RTSAFE
  378. |NATIVE_PLUGIN_HAS_UI),
  379. /* supports */ NATIVE_PLUGIN_SUPPORTS_NOTHING,
  380. /* audioIns */ 0,
  381. /* audioOuts */ 0,
  382. /* midiIns */ 0,
  383. /* midiOuts */ 0,
  384. /* paramIns */ 1,
  385. /* paramOuts */ 0,
  386. /* name */ "Notes",
  387. /* label */ "notes",
  388. /* maker */ "falkTX",
  389. /* copyright */ "GNU GPL v2+",
  390. DESCFUNCS
  391. },
  392. #endif
  393. #ifdef HAVE_EXTERNAL_PLUGINS
  394. # define CARLA_EXTERNAL_PLUGINS_INCLUDED_DIRECTLY
  395. # include "external/_data.cpp"
  396. #endif
  397. };
  398. #undef DESCFUNCS
  399. // --------------------------------------------------------------------------------------------------------------------
  400. const NativePluginDescriptor* carla_get_native_plugins_data(uint32_t* count)
  401. {
  402. CARLA_SAFE_ASSERT_RETURN(count != nullptr, nullptr);
  403. *count = static_cast<uint32_t>(sizeof(sNativePluginDescriptors)/sizeof(NativePluginDescriptor));
  404. return sNativePluginDescriptors;
  405. }
  406. // --------------------------------------------------------------------------------------------------------------------