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.

403 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. #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. // 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 sequencer
  183. #ifdef HAVE_PYQT
  184. {
  185. /* category */ NATIVE_PLUGIN_CATEGORY_UTILITY,
  186. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_RTSAFE
  187. |NATIVE_PLUGIN_HAS_UI
  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 */ 4,
  196. /* paramOuts */ 0,
  197. /* name */ "MIDI Pattern",
  198. /* label */ "midipattern",
  199. /* maker */ "falkTX, tatch",
  200. /* copyright */ "GNU GPL v2+",
  201. DESCFUNCS
  202. },
  203. #endif
  204. // --------------------------------------------------------------------------------------------------------------------
  205. // Carla
  206. #ifdef HAVE_PYQT
  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 */ 1,
  220. /* paramIns */ 0,
  221. /* paramOuts */ 0,
  222. /* name */ "Carla-Rack",
  223. /* label */ "carlarack",
  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 */ 0,
  241. /* paramIns */ 0,
  242. /* paramOuts */ 0,
  243. /* name */ "Carla-Rack (no midi out)",
  244. /* label */ "carlarack-nomidiout",
  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 */ 2,
  259. /* audioOuts */ 2,
  260. /* midiIns */ 1,
  261. /* midiOuts */ 1,
  262. /* paramIns */ 0,
  263. /* paramOuts */ 0,
  264. /* name */ "Carla-Patchbay",
  265. /* label */ "carlapatchbay",
  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 */ 3,
  280. /* audioOuts */ 2,
  281. /* midiIns */ 1,
  282. /* midiOuts */ 1,
  283. /* paramIns */ 0,
  284. /* paramOuts */ 0,
  285. /* name */ "Carla-Patchbay (sidechain)",
  286. /* label */ "carlapatchbay3s",
  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 */ 16,
  301. /* audioOuts */ 16,
  302. /* midiIns */ 1,
  303. /* midiOuts */ 1,
  304. /* paramIns */ 0,
  305. /* paramOuts */ 0,
  306. /* name */ "Carla-Patchbay (16chan)",
  307. /* label */ "carlapatchbay16",
  308. /* maker */ "falkTX",
  309. /* copyright */ "GNU GPL v2+",
  310. DESCFUNCS
  311. },
  312. {
  313. /* category */ NATIVE_PLUGIN_CATEGORY_OTHER,
  314. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_SYNTH
  315. |NATIVE_PLUGIN_HAS_UI
  316. //|NATIVE_PLUGIN_NEEDS_FIXED_BUFFERS
  317. |NATIVE_PLUGIN_NEEDS_UI_MAIN_THREAD
  318. |NATIVE_PLUGIN_USES_STATE
  319. |NATIVE_PLUGIN_USES_TIME),
  320. /* supports */ static_cast<NativePluginSupports>(NATIVE_PLUGIN_SUPPORTS_EVERYTHING),
  321. /* audioIns */ 32,
  322. /* audioOuts */ 32,
  323. /* midiIns */ 1,
  324. /* midiOuts */ 1,
  325. /* paramIns */ 0,
  326. /* paramOuts */ 0,
  327. /* name */ "Carla-Patchbay (32chan)",
  328. /* label */ "carlapatchbay32",
  329. /* maker */ "falkTX",
  330. /* copyright */ "GNU GPL v2+",
  331. DESCFUNCS
  332. },
  333. #endif
  334. // --------------------------------------------------------------------------------------------------------------------
  335. // External-UI plugins
  336. #ifdef HAVE_PYQT
  337. {
  338. /* category */ NATIVE_PLUGIN_CATEGORY_UTILITY,
  339. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_RTSAFE
  340. |NATIVE_PLUGIN_HAS_UI
  341. |NATIVE_PLUGIN_NEEDS_FIXED_BUFFERS),
  342. /* supports */ NATIVE_PLUGIN_SUPPORTS_NOTHING,
  343. /* audioIns */ 2,
  344. /* audioOuts */ 0,
  345. /* midiIns */ 0,
  346. /* midiOuts */ 0,
  347. /* paramIns */ 2,
  348. /* paramOuts */ 2,
  349. /* name */ "Big Meter",
  350. /* label */ "bigmeter",
  351. /* maker */ "falkTX",
  352. /* copyright */ "GNU GPL v2+",
  353. DESCFUNCS
  354. },
  355. {
  356. /* category */ NATIVE_PLUGIN_CATEGORY_UTILITY,
  357. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_RTSAFE
  358. |NATIVE_PLUGIN_HAS_UI),
  359. /* supports */ NATIVE_PLUGIN_SUPPORTS_NOTHING,
  360. /* audioIns */ 0,
  361. /* audioOuts */ 0,
  362. /* midiIns */ 0,
  363. /* midiOuts */ 0,
  364. /* paramIns */ 1,
  365. /* paramOuts */ 0,
  366. /* name */ "Notes",
  367. /* label */ "notes",
  368. /* maker */ "falkTX",
  369. /* copyright */ "GNU GPL v2+",
  370. DESCFUNCS
  371. },
  372. #endif
  373. };
  374. #undef DESCFUNCS
  375. // --------------------------------------------------------------------------------------------------------------------
  376. const NativePluginDescriptor* carla_get_native_plugins_data(uint32_t* count)
  377. {
  378. CARLA_SAFE_ASSERT_RETURN(count != nullptr, nullptr);
  379. *count = static_cast<uint32_t>(sizeof(sNativePluginDescriptors)/sizeof(NativePluginDescriptor));
  380. return sNativePluginDescriptors;
  381. }
  382. // --------------------------------------------------------------------------------------------------------------------