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.

451 lines
15KB

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