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.

434 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_NONE,
  31. /* hints */ NATIVE_PLUGIN_IS_RTSAFE,
  32. /* supports */ NATIVE_PLUGIN_SUPPORTS_NOTHING,
  33. /* audioIns */ 1,
  34. /* audioOuts */ 1,
  35. /* midiIns */ 0,
  36. /* midiOuts */ 0,
  37. /* paramIns */ 0,
  38. /* paramOuts */ 0,
  39. /* name */ "Bypass",
  40. /* label */ "bypass",
  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_NOTHING,
  49. /* audioIns */ 0,
  50. /* audioOuts */ 0,
  51. /* midiIns */ 0,
  52. /* midiOuts */ 0,
  53. /* paramIns */ 5-1,
  54. /* paramOuts */ 1,
  55. /* name */ "LFO",
  56. /* label */ "lfo",
  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 */ 1,
  69. /* paramIns */ 0,
  70. /* paramOuts */ 0,
  71. /* name */ "MIDI Channel Filter",
  72. /* label */ "midichanfilter",
  73. /* maker */ "falkTX",
  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 */ 2,
  85. /* paramIns */ 0,
  86. /* paramOuts */ 0,
  87. /* name */ "MIDI Channel A/B",
  88. /* label */ "midichanab",
  89. /* maker */ "Milk Brewster",
  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 */ 1,
  100. /* midiOuts */ 1,
  101. /* paramIns */ 0,
  102. /* paramOuts */ 0,
  103. /* name */ "MIDI Gain",
  104. /* label */ "midigain",
  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 */ MAX_MIDI_CHANNELS,
  116. /* midiOuts */ 1,
  117. /* paramIns */ 0,
  118. /* paramOuts */ 0,
  119. /* name */ "MIDI Join",
  120. /* label */ "midijoin",
  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 */ MAX_MIDI_CHANNELS,
  133. /* paramIns */ 0,
  134. /* paramOuts */ 0,
  135. /* name */ "MIDI Split",
  136. /* label */ "midisplit",
  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 */ 0,
  150. /* paramOuts */ 0,
  151. /* name */ "MIDI Through",
  152. /* label */ "midithrough",
  153. /* maker */ "falkTX",
  154. /* copyright */ "GNU GPL v2+",
  155. DESCFUNCS
  156. },
  157. {
  158. /* category */ NATIVE_PLUGIN_CATEGORY_UTILITY,
  159. /* hints */ NATIVE_PLUGIN_IS_RTSAFE,
  160. /* supports */ NATIVE_PLUGIN_SUPPORTS_EVERYTHING,
  161. /* audioIns */ 0,
  162. /* audioOuts */ 0,
  163. /* midiIns */ 1,
  164. /* midiOuts */ 1,
  165. /* paramIns */ 2,
  166. /* paramOuts */ 0,
  167. /* name */ "MIDI Transpose",
  168. /* label */ "miditranspose",
  169. /* maker */ "falkTX",
  170. /* copyright */ "GNU GPL v2+",
  171. DESCFUNCS
  172. },
  173. // --------------------------------------------------------------------------------------------------------------------
  174. // Audio file
  175. {
  176. /* category */ NATIVE_PLUGIN_CATEGORY_UTILITY,
  177. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_RTSAFE
  178. |NATIVE_PLUGIN_HAS_UI
  179. |NATIVE_PLUGIN_NEEDS_UI_OPEN_SAVE
  180. |NATIVE_PLUGIN_USES_TIME),
  181. /* supports */ NATIVE_PLUGIN_SUPPORTS_NOTHING,
  182. /* audioIns */ 0,
  183. /* audioOuts */ 2,
  184. /* midiIns */ 0,
  185. /* midiOuts */ 0,
  186. /* paramIns */ 1,
  187. /* paramOuts */ 0,
  188. /* name */ "Audio File",
  189. /* label */ "audiofile",
  190. /* maker */ "falkTX",
  191. /* copyright */ "GNU GPL v2+",
  192. DESCFUNCS
  193. },
  194. // --------------------------------------------------------------------------------------------------------------------
  195. // MIDI file and sequencer
  196. {
  197. /* category */ NATIVE_PLUGIN_CATEGORY_UTILITY,
  198. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_RTSAFE
  199. |NATIVE_PLUGIN_HAS_UI
  200. |NATIVE_PLUGIN_NEEDS_UI_OPEN_SAVE
  201. |NATIVE_PLUGIN_USES_STATE
  202. |NATIVE_PLUGIN_USES_TIME),
  203. /* supports */ NATIVE_PLUGIN_SUPPORTS_NOTHING,
  204. /* audioIns */ 0,
  205. /* audioOuts */ 0,
  206. /* midiIns */ 0,
  207. /* midiOuts */ 1,
  208. /* paramIns */ 0,
  209. /* paramOuts */ 0,
  210. /* name */ "MIDI File",
  211. /* label */ "midifile",
  212. /* maker */ "falkTX",
  213. /* copyright */ "GNU GPL v2+",
  214. DESCFUNCS
  215. },
  216. #ifdef HAVE_PYQT
  217. {
  218. /* category */ NATIVE_PLUGIN_CATEGORY_UTILITY,
  219. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_RTSAFE
  220. |NATIVE_PLUGIN_HAS_UI
  221. |NATIVE_PLUGIN_USES_STATE
  222. |NATIVE_PLUGIN_USES_TIME),
  223. /* supports */ NATIVE_PLUGIN_SUPPORTS_NOTHING,
  224. /* audioIns */ 0,
  225. /* audioOuts */ 0,
  226. /* midiIns */ 0,
  227. /* midiOuts */ 1,
  228. /* paramIns */ 4,
  229. /* paramOuts */ 0,
  230. /* name */ "MIDI Pattern",
  231. /* label */ "midipattern",
  232. /* maker */ "falkTX, tatch",
  233. /* copyright */ "GNU GPL v2+",
  234. DESCFUNCS
  235. },
  236. #endif
  237. // --------------------------------------------------------------------------------------------------------------------
  238. // Carla
  239. #ifdef HAVE_PYQT
  240. {
  241. /* category */ NATIVE_PLUGIN_CATEGORY_OTHER,
  242. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_SYNTH
  243. |NATIVE_PLUGIN_HAS_UI
  244. |NATIVE_PLUGIN_NEEDS_UI_MAIN_THREAD
  245. |NATIVE_PLUGIN_USES_STATE
  246. |NATIVE_PLUGIN_USES_TIME),
  247. /* supports */ static_cast<NativePluginSupports>(NATIVE_PLUGIN_SUPPORTS_EVERYTHING),
  248. /* audioIns */ 2,
  249. /* audioOuts */ 2,
  250. /* midiIns */ 1,
  251. /* midiOuts */ 1,
  252. /* paramIns */ 0,
  253. /* paramOuts */ 0,
  254. /* name */ "Carla-Rack",
  255. /* label */ "carlarack",
  256. /* maker */ "falkTX",
  257. /* copyright */ "GNU GPL v2+",
  258. DESCFUNCS
  259. },
  260. {
  261. /* category */ NATIVE_PLUGIN_CATEGORY_OTHER,
  262. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_SYNTH
  263. |NATIVE_PLUGIN_HAS_UI
  264. |NATIVE_PLUGIN_NEEDS_UI_MAIN_THREAD
  265. |NATIVE_PLUGIN_USES_STATE
  266. |NATIVE_PLUGIN_USES_TIME),
  267. /* supports */ static_cast<NativePluginSupports>(NATIVE_PLUGIN_SUPPORTS_EVERYTHING),
  268. /* audioIns */ 2,
  269. /* audioOuts */ 2,
  270. /* midiIns */ 1,
  271. /* midiOuts */ 0,
  272. /* paramIns */ 0,
  273. /* paramOuts */ 0,
  274. /* name */ "Carla-Rack (no midi out)",
  275. /* label */ "carlarack-nomidiout",
  276. /* maker */ "falkTX",
  277. /* copyright */ "GNU GPL v2+",
  278. DESCFUNCS
  279. },
  280. {
  281. /* category */ NATIVE_PLUGIN_CATEGORY_OTHER,
  282. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_SYNTH
  283. |NATIVE_PLUGIN_HAS_UI
  284. |NATIVE_PLUGIN_NEEDS_UI_MAIN_THREAD
  285. |NATIVE_PLUGIN_USES_STATE
  286. |NATIVE_PLUGIN_USES_TIME),
  287. /* supports */ static_cast<NativePluginSupports>(NATIVE_PLUGIN_SUPPORTS_EVERYTHING),
  288. /* audioIns */ 2,
  289. /* audioOuts */ 2,
  290. /* midiIns */ 1,
  291. /* midiOuts */ 1,
  292. /* paramIns */ 0,
  293. /* paramOuts */ 0,
  294. /* name */ "Carla-Patchbay",
  295. /* label */ "carlapatchbay",
  296. /* maker */ "falkTX",
  297. /* copyright */ "GNU GPL v2+",
  298. DESCFUNCS
  299. },
  300. {
  301. /* category */ NATIVE_PLUGIN_CATEGORY_OTHER,
  302. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_SYNTH
  303. |NATIVE_PLUGIN_HAS_UI
  304. |NATIVE_PLUGIN_NEEDS_UI_MAIN_THREAD
  305. |NATIVE_PLUGIN_USES_STATE
  306. |NATIVE_PLUGIN_USES_TIME),
  307. /* supports */ static_cast<NativePluginSupports>(NATIVE_PLUGIN_SUPPORTS_EVERYTHING),
  308. /* audioIns */ 3,
  309. /* audioOuts */ 2,
  310. /* midiIns */ 1,
  311. /* midiOuts */ 1,
  312. /* paramIns */ 0,
  313. /* paramOuts */ 0,
  314. /* name */ "Carla-Patchbay (sidechain)",
  315. /* label */ "carlapatchbay3s",
  316. /* maker */ "falkTX",
  317. /* copyright */ "GNU GPL v2+",
  318. DESCFUNCS
  319. },
  320. {
  321. /* category */ NATIVE_PLUGIN_CATEGORY_OTHER,
  322. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_SYNTH
  323. |NATIVE_PLUGIN_HAS_UI
  324. |NATIVE_PLUGIN_NEEDS_UI_MAIN_THREAD
  325. |NATIVE_PLUGIN_USES_STATE
  326. |NATIVE_PLUGIN_USES_TIME),
  327. /* supports */ static_cast<NativePluginSupports>(NATIVE_PLUGIN_SUPPORTS_EVERYTHING),
  328. /* audioIns */ 16,
  329. /* audioOuts */ 16,
  330. /* midiIns */ 1,
  331. /* midiOuts */ 1,
  332. /* paramIns */ 0,
  333. /* paramOuts */ 0,
  334. /* name */ "Carla-Patchbay (16chan)",
  335. /* label */ "carlapatchbay16",
  336. /* maker */ "falkTX",
  337. /* copyright */ "GNU GPL v2+",
  338. DESCFUNCS
  339. },
  340. {
  341. /* category */ NATIVE_PLUGIN_CATEGORY_OTHER,
  342. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_SYNTH
  343. |NATIVE_PLUGIN_HAS_UI
  344. |NATIVE_PLUGIN_NEEDS_UI_MAIN_THREAD
  345. |NATIVE_PLUGIN_USES_STATE
  346. |NATIVE_PLUGIN_USES_TIME),
  347. /* supports */ static_cast<NativePluginSupports>(NATIVE_PLUGIN_SUPPORTS_EVERYTHING),
  348. /* audioIns */ 32,
  349. /* audioOuts */ 32,
  350. /* midiIns */ 1,
  351. /* midiOuts */ 1,
  352. /* paramIns */ 0,
  353. /* paramOuts */ 0,
  354. /* name */ "Carla-Patchbay (32chan)",
  355. /* label */ "carlapatchbay32",
  356. /* maker */ "falkTX",
  357. /* copyright */ "GNU GPL v2+",
  358. DESCFUNCS
  359. },
  360. #endif
  361. // --------------------------------------------------------------------------------------------------------------------
  362. // External-UI plugins
  363. #ifdef HAVE_PYQT
  364. {
  365. /* category */ NATIVE_PLUGIN_CATEGORY_UTILITY,
  366. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_RTSAFE
  367. |NATIVE_PLUGIN_HAS_UI
  368. |NATIVE_PLUGIN_NEEDS_FIXED_BUFFERS),
  369. /* supports */ NATIVE_PLUGIN_SUPPORTS_NOTHING,
  370. /* audioIns */ 2,
  371. /* audioOuts */ 0,
  372. /* midiIns */ 0,
  373. /* midiOuts */ 0,
  374. /* paramIns */ 2,
  375. /* paramOuts */ 2,
  376. /* name */ "Big Meter",
  377. /* label */ "bigmeter",
  378. /* maker */ "falkTX",
  379. /* copyright */ "GNU GPL v2+",
  380. DESCFUNCS
  381. },
  382. {
  383. /* category */ NATIVE_PLUGIN_CATEGORY_UTILITY,
  384. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_RTSAFE
  385. |NATIVE_PLUGIN_HAS_UI),
  386. /* supports */ NATIVE_PLUGIN_SUPPORTS_NOTHING,
  387. /* audioIns */ 0,
  388. /* audioOuts */ 0,
  389. /* midiIns */ 0,
  390. /* midiOuts */ 0,
  391. /* paramIns */ 1,
  392. /* paramOuts */ 0,
  393. /* name */ "Notes",
  394. /* label */ "notes",
  395. /* maker */ "falkTX",
  396. /* copyright */ "GNU GPL v2+",
  397. DESCFUNCS
  398. },
  399. #endif
  400. #ifdef HAVE_EXTERNAL_PLUGINS
  401. # define CARLA_EXTERNAL_PLUGINS_INCLUDED_DIRECTLY
  402. # include "external/_data.cpp"
  403. #endif
  404. };
  405. #undef DESCFUNCS
  406. // --------------------------------------------------------------------------------------------------------------------
  407. const NativePluginDescriptor* carla_get_native_plugins_data(uint32_t* count)
  408. {
  409. CARLA_SAFE_ASSERT_RETURN(count != nullptr, nullptr);
  410. *count = static_cast<uint32_t>(sizeof(sNativePluginDescriptors)/sizeof(NativePluginDescriptor));
  411. return sNativePluginDescriptors;
  412. }
  413. // --------------------------------------------------------------------------------------------------------------------