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.

365 lines
13KB

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