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.

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