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.

440 lines
15KB

  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_FIXED_BUFFERS
  245. |NATIVE_PLUGIN_NEEDS_UI_MAIN_THREAD
  246. |NATIVE_PLUGIN_USES_STATE
  247. |NATIVE_PLUGIN_USES_TIME),
  248. /* supports */ static_cast<NativePluginSupports>(NATIVE_PLUGIN_SUPPORTS_EVERYTHING),
  249. /* audioIns */ 2,
  250. /* audioOuts */ 2,
  251. /* midiIns */ 1,
  252. /* midiOuts */ 1,
  253. /* paramIns */ 0,
  254. /* paramOuts */ 0,
  255. /* name */ "Carla-Rack",
  256. /* label */ "carlarack",
  257. /* maker */ "falkTX",
  258. /* copyright */ "GNU GPL v2+",
  259. DESCFUNCS
  260. },
  261. {
  262. /* category */ NATIVE_PLUGIN_CATEGORY_OTHER,
  263. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_SYNTH
  264. |NATIVE_PLUGIN_HAS_UI
  265. //|NATIVE_PLUGIN_NEEDS_FIXED_BUFFERS
  266. |NATIVE_PLUGIN_NEEDS_UI_MAIN_THREAD
  267. |NATIVE_PLUGIN_USES_STATE
  268. |NATIVE_PLUGIN_USES_TIME),
  269. /* supports */ static_cast<NativePluginSupports>(NATIVE_PLUGIN_SUPPORTS_EVERYTHING),
  270. /* audioIns */ 2,
  271. /* audioOuts */ 2,
  272. /* midiIns */ 1,
  273. /* midiOuts */ 0,
  274. /* paramIns */ 0,
  275. /* paramOuts */ 0,
  276. /* name */ "Carla-Rack (no midi out)",
  277. /* label */ "carlarack-nomidiout",
  278. /* maker */ "falkTX",
  279. /* copyright */ "GNU GPL v2+",
  280. DESCFUNCS
  281. },
  282. {
  283. /* category */ NATIVE_PLUGIN_CATEGORY_OTHER,
  284. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_SYNTH
  285. |NATIVE_PLUGIN_HAS_UI
  286. //|NATIVE_PLUGIN_NEEDS_FIXED_BUFFERS
  287. |NATIVE_PLUGIN_NEEDS_UI_MAIN_THREAD
  288. |NATIVE_PLUGIN_USES_STATE
  289. |NATIVE_PLUGIN_USES_TIME),
  290. /* supports */ static_cast<NativePluginSupports>(NATIVE_PLUGIN_SUPPORTS_EVERYTHING),
  291. /* audioIns */ 2,
  292. /* audioOuts */ 2,
  293. /* midiIns */ 1,
  294. /* midiOuts */ 1,
  295. /* paramIns */ 0,
  296. /* paramOuts */ 0,
  297. /* name */ "Carla-Patchbay",
  298. /* label */ "carlapatchbay",
  299. /* maker */ "falkTX",
  300. /* copyright */ "GNU GPL v2+",
  301. DESCFUNCS
  302. },
  303. {
  304. /* category */ NATIVE_PLUGIN_CATEGORY_OTHER,
  305. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_SYNTH
  306. |NATIVE_PLUGIN_HAS_UI
  307. //|NATIVE_PLUGIN_NEEDS_FIXED_BUFFERS
  308. |NATIVE_PLUGIN_NEEDS_UI_MAIN_THREAD
  309. |NATIVE_PLUGIN_USES_STATE
  310. |NATIVE_PLUGIN_USES_TIME),
  311. /* supports */ static_cast<NativePluginSupports>(NATIVE_PLUGIN_SUPPORTS_EVERYTHING),
  312. /* audioIns */ 3,
  313. /* audioOuts */ 2,
  314. /* midiIns */ 1,
  315. /* midiOuts */ 1,
  316. /* paramIns */ 0,
  317. /* paramOuts */ 0,
  318. /* name */ "Carla-Patchbay (sidechain)",
  319. /* label */ "carlapatchbay3s",
  320. /* maker */ "falkTX",
  321. /* copyright */ "GNU GPL v2+",
  322. DESCFUNCS
  323. },
  324. {
  325. /* category */ NATIVE_PLUGIN_CATEGORY_OTHER,
  326. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_SYNTH
  327. |NATIVE_PLUGIN_HAS_UI
  328. //|NATIVE_PLUGIN_NEEDS_FIXED_BUFFERS
  329. |NATIVE_PLUGIN_NEEDS_UI_MAIN_THREAD
  330. |NATIVE_PLUGIN_USES_STATE
  331. |NATIVE_PLUGIN_USES_TIME),
  332. /* supports */ static_cast<NativePluginSupports>(NATIVE_PLUGIN_SUPPORTS_EVERYTHING),
  333. /* audioIns */ 16,
  334. /* audioOuts */ 16,
  335. /* midiIns */ 1,
  336. /* midiOuts */ 1,
  337. /* paramIns */ 0,
  338. /* paramOuts */ 0,
  339. /* name */ "Carla-Patchbay (16chan)",
  340. /* label */ "carlapatchbay16",
  341. /* maker */ "falkTX",
  342. /* copyright */ "GNU GPL v2+",
  343. DESCFUNCS
  344. },
  345. {
  346. /* category */ NATIVE_PLUGIN_CATEGORY_OTHER,
  347. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_SYNTH
  348. |NATIVE_PLUGIN_HAS_UI
  349. //|NATIVE_PLUGIN_NEEDS_FIXED_BUFFERS
  350. |NATIVE_PLUGIN_NEEDS_UI_MAIN_THREAD
  351. |NATIVE_PLUGIN_USES_STATE
  352. |NATIVE_PLUGIN_USES_TIME),
  353. /* supports */ static_cast<NativePluginSupports>(NATIVE_PLUGIN_SUPPORTS_EVERYTHING),
  354. /* audioIns */ 32,
  355. /* audioOuts */ 32,
  356. /* midiIns */ 1,
  357. /* midiOuts */ 1,
  358. /* paramIns */ 0,
  359. /* paramOuts */ 0,
  360. /* name */ "Carla-Patchbay (32chan)",
  361. /* label */ "carlapatchbay32",
  362. /* maker */ "falkTX",
  363. /* copyright */ "GNU GPL v2+",
  364. DESCFUNCS
  365. },
  366. #endif
  367. // --------------------------------------------------------------------------------------------------------------------
  368. // External-UI plugins
  369. #ifdef HAVE_PYQT
  370. {
  371. /* category */ NATIVE_PLUGIN_CATEGORY_UTILITY,
  372. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_RTSAFE
  373. |NATIVE_PLUGIN_HAS_UI
  374. |NATIVE_PLUGIN_NEEDS_FIXED_BUFFERS),
  375. /* supports */ NATIVE_PLUGIN_SUPPORTS_NOTHING,
  376. /* audioIns */ 2,
  377. /* audioOuts */ 0,
  378. /* midiIns */ 0,
  379. /* midiOuts */ 0,
  380. /* paramIns */ 2,
  381. /* paramOuts */ 2,
  382. /* name */ "Big Meter",
  383. /* label */ "bigmeter",
  384. /* maker */ "falkTX",
  385. /* copyright */ "GNU GPL v2+",
  386. DESCFUNCS
  387. },
  388. {
  389. /* category */ NATIVE_PLUGIN_CATEGORY_UTILITY,
  390. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_RTSAFE
  391. |NATIVE_PLUGIN_HAS_UI),
  392. /* supports */ NATIVE_PLUGIN_SUPPORTS_NOTHING,
  393. /* audioIns */ 0,
  394. /* audioOuts */ 0,
  395. /* midiIns */ 0,
  396. /* midiOuts */ 0,
  397. /* paramIns */ 1,
  398. /* paramOuts */ 0,
  399. /* name */ "Notes",
  400. /* label */ "notes",
  401. /* maker */ "falkTX",
  402. /* copyright */ "GNU GPL v2+",
  403. DESCFUNCS
  404. },
  405. #endif
  406. #ifdef HAVE_EXTERNAL_PLUGINS
  407. # define CARLA_EXTERNAL_PLUGINS_INCLUDED_DIRECTLY
  408. # include "external/_data.cpp"
  409. #endif
  410. };
  411. #undef DESCFUNCS
  412. // --------------------------------------------------------------------------------------------------------------------
  413. const NativePluginDescriptor* carla_get_native_plugins_data(uint32_t* count)
  414. {
  415. CARLA_SAFE_ASSERT_RETURN(count != nullptr, nullptr);
  416. *count = static_cast<uint32_t>(sizeof(sNativePluginDescriptors)/sizeof(NativePluginDescriptor));
  417. return sNativePluginDescriptors;
  418. }
  419. // --------------------------------------------------------------------------------------------------------------------