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.

399 lines
14KB

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