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.

364 lines
12KB

  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_UTILITY,
  34. /* hints */ NATIVE_PLUGIN_IS_RTSAFE,
  35. /* supports */ NATIVE_PLUGIN_SUPPORTS_NOTHING,
  36. /* audioIns */ 0,
  37. /* audioOuts */ 0,
  38. /* midiIns */ 0,
  39. /* midiOuts */ 0,
  40. /* paramIns */ 5-1,
  41. /* paramOuts */ 1,
  42. /* name */ "LFO",
  43. /* label */ "lfo",
  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_EVERYTHING,
  52. /* audioIns */ 0,
  53. /* audioOuts */ 0,
  54. /* midiIns */ 1,
  55. /* midiOuts */ 1,
  56. /* paramIns */ 0,
  57. /* paramOuts */ 0,
  58. /* name */ "MIDI Channel Filter",
  59. /* label */ "midichanfilter",
  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 Gain",
  75. /* label */ "midigain",
  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 */ MAX_MIDI_CHANNELS,
  87. /* midiOuts */ 1,
  88. /* paramIns */ 0,
  89. /* paramOuts */ 0,
  90. /* name */ "MIDI Join",
  91. /* label */ "midijoin",
  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 */ 1,
  103. /* midiOuts */ MAX_MIDI_CHANNELS,
  104. /* paramIns */ 0,
  105. /* paramOuts */ 0,
  106. /* name */ "MIDI Split",
  107. /* label */ "midisplit",
  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 */ 1,
  120. /* paramIns */ 0,
  121. /* paramOuts */ 0,
  122. /* name */ "MIDI Through",
  123. /* label */ "midithrough",
  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 */ 2,
  137. /* paramOuts */ 0,
  138. /* name */ "MIDI Transpose",
  139. /* label */ "miditranspose",
  140. /* maker */ "falkTX",
  141. /* copyright */ "GNU GPL v2+",
  142. DESCFUNCS
  143. },
  144. // --------------------------------------------------------------------------------------------------------------------
  145. // MIDI sequencer
  146. #ifdef HAVE_PYQT
  147. {
  148. /* category */ NATIVE_PLUGIN_CATEGORY_UTILITY,
  149. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_RTSAFE
  150. |NATIVE_PLUGIN_HAS_UI
  151. |NATIVE_PLUGIN_USES_STATE
  152. |NATIVE_PLUGIN_USES_TIME),
  153. /* supports */ NATIVE_PLUGIN_SUPPORTS_NOTHING,
  154. /* audioIns */ 0,
  155. /* audioOuts */ 0,
  156. /* midiIns */ 0,
  157. /* midiOuts */ 1,
  158. /* paramIns */ 4,
  159. /* paramOuts */ 0,
  160. /* name */ "MIDI Pattern",
  161. /* label */ "midipattern",
  162. /* maker */ "falkTX, tatch",
  163. /* copyright */ "GNU GPL v2+",
  164. DESCFUNCS
  165. },
  166. #endif
  167. // --------------------------------------------------------------------------------------------------------------------
  168. // Carla
  169. #ifdef HAVE_PYQT
  170. {
  171. /* category */ NATIVE_PLUGIN_CATEGORY_OTHER,
  172. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_SYNTH
  173. |NATIVE_PLUGIN_HAS_UI
  174. //|NATIVE_PLUGIN_NEEDS_FIXED_BUFFERS
  175. |NATIVE_PLUGIN_NEEDS_UI_MAIN_THREAD
  176. |NATIVE_PLUGIN_USES_STATE
  177. |NATIVE_PLUGIN_USES_TIME),
  178. /* supports */ static_cast<NativePluginSupports>(NATIVE_PLUGIN_SUPPORTS_EVERYTHING),
  179. /* audioIns */ 2,
  180. /* audioOuts */ 2,
  181. /* midiIns */ 1,
  182. /* midiOuts */ 1,
  183. /* paramIns */ 0,
  184. /* paramOuts */ 0,
  185. /* name */ "Carla-Rack",
  186. /* label */ "carlarack",
  187. /* maker */ "falkTX",
  188. /* copyright */ "GNU GPL v2+",
  189. DESCFUNCS
  190. },
  191. {
  192. /* category */ NATIVE_PLUGIN_CATEGORY_OTHER,
  193. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_SYNTH
  194. |NATIVE_PLUGIN_HAS_UI
  195. //|NATIVE_PLUGIN_NEEDS_FIXED_BUFFERS
  196. |NATIVE_PLUGIN_NEEDS_UI_MAIN_THREAD
  197. |NATIVE_PLUGIN_USES_STATE
  198. |NATIVE_PLUGIN_USES_TIME),
  199. /* supports */ static_cast<NativePluginSupports>(NATIVE_PLUGIN_SUPPORTS_EVERYTHING),
  200. /* audioIns */ 2,
  201. /* audioOuts */ 2,
  202. /* midiIns */ 1,
  203. /* midiOuts */ 0,
  204. /* paramIns */ 0,
  205. /* paramOuts */ 0,
  206. /* name */ "Carla-Rack (no midi out)",
  207. /* label */ "carlarack-nomidiout",
  208. /* maker */ "falkTX",
  209. /* copyright */ "GNU GPL v2+",
  210. DESCFUNCS
  211. },
  212. {
  213. /* category */ NATIVE_PLUGIN_CATEGORY_OTHER,
  214. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_SYNTH
  215. |NATIVE_PLUGIN_HAS_UI
  216. //|NATIVE_PLUGIN_NEEDS_FIXED_BUFFERS
  217. |NATIVE_PLUGIN_NEEDS_UI_MAIN_THREAD
  218. |NATIVE_PLUGIN_USES_STATE
  219. |NATIVE_PLUGIN_USES_TIME),
  220. /* supports */ static_cast<NativePluginSupports>(NATIVE_PLUGIN_SUPPORTS_EVERYTHING),
  221. /* audioIns */ 2,
  222. /* audioOuts */ 2,
  223. /* midiIns */ 1,
  224. /* midiOuts */ 1,
  225. /* paramIns */ 0,
  226. /* paramOuts */ 0,
  227. /* name */ "Carla-Patchbay",
  228. /* label */ "carlapatchbay",
  229. /* maker */ "falkTX",
  230. /* copyright */ "GNU GPL v2+",
  231. DESCFUNCS
  232. },
  233. {
  234. /* category */ NATIVE_PLUGIN_CATEGORY_OTHER,
  235. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_SYNTH
  236. |NATIVE_PLUGIN_HAS_UI
  237. //|NATIVE_PLUGIN_NEEDS_FIXED_BUFFERS
  238. |NATIVE_PLUGIN_NEEDS_UI_MAIN_THREAD
  239. |NATIVE_PLUGIN_USES_STATE
  240. |NATIVE_PLUGIN_USES_TIME),
  241. /* supports */ static_cast<NativePluginSupports>(NATIVE_PLUGIN_SUPPORTS_EVERYTHING),
  242. /* audioIns */ 3,
  243. /* audioOuts */ 2,
  244. /* midiIns */ 1,
  245. /* midiOuts */ 1,
  246. /* paramIns */ 0,
  247. /* paramOuts */ 0,
  248. /* name */ "Carla-Patchbay (sidechain)",
  249. /* label */ "carlapatchbay3s",
  250. /* maker */ "falkTX",
  251. /* copyright */ "GNU GPL v2+",
  252. DESCFUNCS
  253. },
  254. {
  255. /* category */ NATIVE_PLUGIN_CATEGORY_OTHER,
  256. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_SYNTH
  257. |NATIVE_PLUGIN_HAS_UI
  258. //|NATIVE_PLUGIN_NEEDS_FIXED_BUFFERS
  259. |NATIVE_PLUGIN_NEEDS_UI_MAIN_THREAD
  260. |NATIVE_PLUGIN_USES_STATE
  261. |NATIVE_PLUGIN_USES_TIME),
  262. /* supports */ static_cast<NativePluginSupports>(NATIVE_PLUGIN_SUPPORTS_EVERYTHING),
  263. /* audioIns */ 16,
  264. /* audioOuts */ 16,
  265. /* midiIns */ 1,
  266. /* midiOuts */ 1,
  267. /* paramIns */ 0,
  268. /* paramOuts */ 0,
  269. /* name */ "Carla-Patchbay (16chan)",
  270. /* label */ "carlapatchbay16",
  271. /* maker */ "falkTX",
  272. /* copyright */ "GNU GPL v2+",
  273. DESCFUNCS
  274. },
  275. {
  276. /* category */ NATIVE_PLUGIN_CATEGORY_OTHER,
  277. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_SYNTH
  278. |NATIVE_PLUGIN_HAS_UI
  279. //|NATIVE_PLUGIN_NEEDS_FIXED_BUFFERS
  280. |NATIVE_PLUGIN_NEEDS_UI_MAIN_THREAD
  281. |NATIVE_PLUGIN_USES_STATE
  282. |NATIVE_PLUGIN_USES_TIME),
  283. /* supports */ static_cast<NativePluginSupports>(NATIVE_PLUGIN_SUPPORTS_EVERYTHING),
  284. /* audioIns */ 32,
  285. /* audioOuts */ 32,
  286. /* midiIns */ 1,
  287. /* midiOuts */ 1,
  288. /* paramIns */ 0,
  289. /* paramOuts */ 0,
  290. /* name */ "Carla-Patchbay (32chan)",
  291. /* label */ "carlapatchbay32",
  292. /* maker */ "falkTX",
  293. /* copyright */ "GNU GPL v2+",
  294. DESCFUNCS
  295. },
  296. #endif
  297. // --------------------------------------------------------------------------------------------------------------------
  298. // External-UI plugins
  299. #ifdef HAVE_PYQT
  300. {
  301. /* category */ NATIVE_PLUGIN_CATEGORY_UTILITY,
  302. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_RTSAFE
  303. |NATIVE_PLUGIN_HAS_UI
  304. |NATIVE_PLUGIN_NEEDS_FIXED_BUFFERS),
  305. /* supports */ NATIVE_PLUGIN_SUPPORTS_NOTHING,
  306. /* audioIns */ 2,
  307. /* audioOuts */ 0,
  308. /* midiIns */ 0,
  309. /* midiOuts */ 0,
  310. /* paramIns */ 2,
  311. /* paramOuts */ 2,
  312. /* name */ "Big Meter",
  313. /* label */ "bigmeter",
  314. /* maker */ "falkTX",
  315. /* copyright */ "GNU GPL v2+",
  316. DESCFUNCS
  317. },
  318. {
  319. /* category */ NATIVE_PLUGIN_CATEGORY_UTILITY,
  320. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_RTSAFE
  321. |NATIVE_PLUGIN_HAS_UI),
  322. /* supports */ NATIVE_PLUGIN_SUPPORTS_NOTHING,
  323. /* audioIns */ 0,
  324. /* audioOuts */ 0,
  325. /* midiIns */ 0,
  326. /* midiOuts */ 0,
  327. /* paramIns */ 1,
  328. /* paramOuts */ 0,
  329. /* name */ "Notes",
  330. /* label */ "notes",
  331. /* maker */ "falkTX",
  332. /* copyright */ "GNU GPL v2+",
  333. DESCFUNCS
  334. },
  335. #endif
  336. };
  337. #undef DESCFUNCS
  338. // --------------------------------------------------------------------------------------------------------------------
  339. const NativePluginDescriptor* carla_get_native_plugins_data(uint32_t* count)
  340. {
  341. CARLA_SAFE_ASSERT_RETURN(count != nullptr, nullptr);
  342. *count = static_cast<uint32_t>(sizeof(sNativePluginDescriptors)/sizeof(NativePluginDescriptor));
  343. return sNativePluginDescriptors;
  344. }
  345. // --------------------------------------------------------------------------------------------------------------------