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.

380 lines
13KB

  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 */ 2,
  72. /* paramIns */ 0,
  73. /* paramOuts */ 0,
  74. /* name */ "MIDI Channel A/B",
  75. /* label */ "midichanab",
  76. /* maker */ "Milk Brewster",
  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. // MIDI sequencer
  162. #ifdef HAVE_PYQT
  163. {
  164. /* category */ NATIVE_PLUGIN_CATEGORY_UTILITY,
  165. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_RTSAFE
  166. |NATIVE_PLUGIN_HAS_UI
  167. |NATIVE_PLUGIN_USES_STATE
  168. |NATIVE_PLUGIN_USES_TIME),
  169. /* supports */ NATIVE_PLUGIN_SUPPORTS_NOTHING,
  170. /* audioIns */ 0,
  171. /* audioOuts */ 0,
  172. /* midiIns */ 0,
  173. /* midiOuts */ 1,
  174. /* paramIns */ 4,
  175. /* paramOuts */ 0,
  176. /* name */ "MIDI Pattern",
  177. /* label */ "midipattern",
  178. /* maker */ "falkTX, tatch",
  179. /* copyright */ "GNU GPL v2+",
  180. DESCFUNCS
  181. },
  182. #endif
  183. // --------------------------------------------------------------------------------------------------------------------
  184. // Carla
  185. #ifdef HAVE_PYQT
  186. {
  187. /* category */ NATIVE_PLUGIN_CATEGORY_OTHER,
  188. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_SYNTH
  189. |NATIVE_PLUGIN_HAS_UI
  190. //|NATIVE_PLUGIN_NEEDS_FIXED_BUFFERS
  191. |NATIVE_PLUGIN_NEEDS_UI_MAIN_THREAD
  192. |NATIVE_PLUGIN_USES_STATE
  193. |NATIVE_PLUGIN_USES_TIME),
  194. /* supports */ static_cast<NativePluginSupports>(NATIVE_PLUGIN_SUPPORTS_EVERYTHING),
  195. /* audioIns */ 2,
  196. /* audioOuts */ 2,
  197. /* midiIns */ 1,
  198. /* midiOuts */ 1,
  199. /* paramIns */ 0,
  200. /* paramOuts */ 0,
  201. /* name */ "Carla-Rack",
  202. /* label */ "carlarack",
  203. /* maker */ "falkTX",
  204. /* copyright */ "GNU GPL v2+",
  205. DESCFUNCS
  206. },
  207. {
  208. /* category */ NATIVE_PLUGIN_CATEGORY_OTHER,
  209. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_SYNTH
  210. |NATIVE_PLUGIN_HAS_UI
  211. //|NATIVE_PLUGIN_NEEDS_FIXED_BUFFERS
  212. |NATIVE_PLUGIN_NEEDS_UI_MAIN_THREAD
  213. |NATIVE_PLUGIN_USES_STATE
  214. |NATIVE_PLUGIN_USES_TIME),
  215. /* supports */ static_cast<NativePluginSupports>(NATIVE_PLUGIN_SUPPORTS_EVERYTHING),
  216. /* audioIns */ 2,
  217. /* audioOuts */ 2,
  218. /* midiIns */ 1,
  219. /* midiOuts */ 0,
  220. /* paramIns */ 0,
  221. /* paramOuts */ 0,
  222. /* name */ "Carla-Rack (no midi out)",
  223. /* label */ "carlarack-nomidiout",
  224. /* maker */ "falkTX",
  225. /* copyright */ "GNU GPL v2+",
  226. DESCFUNCS
  227. },
  228. {
  229. /* category */ NATIVE_PLUGIN_CATEGORY_OTHER,
  230. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_SYNTH
  231. |NATIVE_PLUGIN_HAS_UI
  232. //|NATIVE_PLUGIN_NEEDS_FIXED_BUFFERS
  233. |NATIVE_PLUGIN_NEEDS_UI_MAIN_THREAD
  234. |NATIVE_PLUGIN_USES_STATE
  235. |NATIVE_PLUGIN_USES_TIME),
  236. /* supports */ static_cast<NativePluginSupports>(NATIVE_PLUGIN_SUPPORTS_EVERYTHING),
  237. /* audioIns */ 2,
  238. /* audioOuts */ 2,
  239. /* midiIns */ 1,
  240. /* midiOuts */ 1,
  241. /* paramIns */ 0,
  242. /* paramOuts */ 0,
  243. /* name */ "Carla-Patchbay",
  244. /* label */ "carlapatchbay",
  245. /* maker */ "falkTX",
  246. /* copyright */ "GNU GPL v2+",
  247. DESCFUNCS
  248. },
  249. {
  250. /* category */ NATIVE_PLUGIN_CATEGORY_OTHER,
  251. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_SYNTH
  252. |NATIVE_PLUGIN_HAS_UI
  253. //|NATIVE_PLUGIN_NEEDS_FIXED_BUFFERS
  254. |NATIVE_PLUGIN_NEEDS_UI_MAIN_THREAD
  255. |NATIVE_PLUGIN_USES_STATE
  256. |NATIVE_PLUGIN_USES_TIME),
  257. /* supports */ static_cast<NativePluginSupports>(NATIVE_PLUGIN_SUPPORTS_EVERYTHING),
  258. /* audioIns */ 3,
  259. /* audioOuts */ 2,
  260. /* midiIns */ 1,
  261. /* midiOuts */ 1,
  262. /* paramIns */ 0,
  263. /* paramOuts */ 0,
  264. /* name */ "Carla-Patchbay (sidechain)",
  265. /* label */ "carlapatchbay3s",
  266. /* maker */ "falkTX",
  267. /* copyright */ "GNU GPL v2+",
  268. DESCFUNCS
  269. },
  270. {
  271. /* category */ NATIVE_PLUGIN_CATEGORY_OTHER,
  272. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_SYNTH
  273. |NATIVE_PLUGIN_HAS_UI
  274. //|NATIVE_PLUGIN_NEEDS_FIXED_BUFFERS
  275. |NATIVE_PLUGIN_NEEDS_UI_MAIN_THREAD
  276. |NATIVE_PLUGIN_USES_STATE
  277. |NATIVE_PLUGIN_USES_TIME),
  278. /* supports */ static_cast<NativePluginSupports>(NATIVE_PLUGIN_SUPPORTS_EVERYTHING),
  279. /* audioIns */ 16,
  280. /* audioOuts */ 16,
  281. /* midiIns */ 1,
  282. /* midiOuts */ 1,
  283. /* paramIns */ 0,
  284. /* paramOuts */ 0,
  285. /* name */ "Carla-Patchbay (16chan)",
  286. /* label */ "carlapatchbay16",
  287. /* maker */ "falkTX",
  288. /* copyright */ "GNU GPL v2+",
  289. DESCFUNCS
  290. },
  291. {
  292. /* category */ NATIVE_PLUGIN_CATEGORY_OTHER,
  293. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_SYNTH
  294. |NATIVE_PLUGIN_HAS_UI
  295. //|NATIVE_PLUGIN_NEEDS_FIXED_BUFFERS
  296. |NATIVE_PLUGIN_NEEDS_UI_MAIN_THREAD
  297. |NATIVE_PLUGIN_USES_STATE
  298. |NATIVE_PLUGIN_USES_TIME),
  299. /* supports */ static_cast<NativePluginSupports>(NATIVE_PLUGIN_SUPPORTS_EVERYTHING),
  300. /* audioIns */ 32,
  301. /* audioOuts */ 32,
  302. /* midiIns */ 1,
  303. /* midiOuts */ 1,
  304. /* paramIns */ 0,
  305. /* paramOuts */ 0,
  306. /* name */ "Carla-Patchbay (32chan)",
  307. /* label */ "carlapatchbay32",
  308. /* maker */ "falkTX",
  309. /* copyright */ "GNU GPL v2+",
  310. DESCFUNCS
  311. },
  312. #endif
  313. // --------------------------------------------------------------------------------------------------------------------
  314. // External-UI plugins
  315. #ifdef HAVE_PYQT
  316. {
  317. /* category */ NATIVE_PLUGIN_CATEGORY_UTILITY,
  318. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_RTSAFE
  319. |NATIVE_PLUGIN_HAS_UI
  320. |NATIVE_PLUGIN_NEEDS_FIXED_BUFFERS),
  321. /* supports */ NATIVE_PLUGIN_SUPPORTS_NOTHING,
  322. /* audioIns */ 2,
  323. /* audioOuts */ 0,
  324. /* midiIns */ 0,
  325. /* midiOuts */ 0,
  326. /* paramIns */ 2,
  327. /* paramOuts */ 2,
  328. /* name */ "Big Meter",
  329. /* label */ "bigmeter",
  330. /* maker */ "falkTX",
  331. /* copyright */ "GNU GPL v2+",
  332. DESCFUNCS
  333. },
  334. {
  335. /* category */ NATIVE_PLUGIN_CATEGORY_UTILITY,
  336. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_RTSAFE
  337. |NATIVE_PLUGIN_HAS_UI),
  338. /* supports */ NATIVE_PLUGIN_SUPPORTS_NOTHING,
  339. /* audioIns */ 0,
  340. /* audioOuts */ 0,
  341. /* midiIns */ 0,
  342. /* midiOuts */ 0,
  343. /* paramIns */ 1,
  344. /* paramOuts */ 0,
  345. /* name */ "Notes",
  346. /* label */ "notes",
  347. /* maker */ "falkTX",
  348. /* copyright */ "GNU GPL v2+",
  349. DESCFUNCS
  350. },
  351. #endif
  352. };
  353. #undef DESCFUNCS
  354. // --------------------------------------------------------------------------------------------------------------------
  355. const NativePluginDescriptor* carla_get_native_plugins_data(uint32_t* count)
  356. {
  357. CARLA_SAFE_ASSERT_RETURN(count != nullptr, nullptr);
  358. *count = static_cast<uint32_t>(sizeof(sNativePluginDescriptors)/sizeof(NativePluginDescriptor));
  359. return sNativePluginDescriptors;
  360. }
  361. // --------------------------------------------------------------------------------------------------------------------