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.

483 lines
16KB

  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_UTILITY,
  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 */ 1,
  39. /* paramOuts */ 0,
  40. /* name */ "Audio Gain (Mono)",
  41. /* label */ "audiogain",
  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 */ 2,
  51. /* audioOuts */ 2,
  52. /* midiIns */ 0,
  53. /* midiOuts */ 0,
  54. /* paramIns */ 3,
  55. /* paramOuts */ 0,
  56. /* name */ "Audio Gain (Stereo)",
  57. /* label */ "audiogain_s",
  58. /* maker */ "falkTX",
  59. /* copyright */ "GNU GPL v2+",
  60. DESCFUNCS
  61. },
  62. {
  63. /* category */ NATIVE_PLUGIN_CATEGORY_NONE,
  64. /* hints */ NATIVE_PLUGIN_IS_RTSAFE,
  65. /* supports */ NATIVE_PLUGIN_SUPPORTS_NOTHING,
  66. /* audioIns */ 1,
  67. /* audioOuts */ 1,
  68. /* midiIns */ 0,
  69. /* midiOuts */ 0,
  70. /* paramIns */ 0,
  71. /* paramOuts */ 0,
  72. /* name */ "Bypass",
  73. /* label */ "bypass",
  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_NOTHING,
  82. /* audioIns */ 0,
  83. /* audioOuts */ 0,
  84. /* midiIns */ 0,
  85. /* midiOuts */ 0,
  86. /* paramIns */ 5-1,
  87. /* paramOuts */ 1,
  88. /* name */ "LFO",
  89. /* label */ "lfo",
  90. /* maker */ "falkTX",
  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 Channel Filter",
  105. /* label */ "midichanfilter",
  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 */ 1,
  117. /* midiOuts */ 2,
  118. /* paramIns */ 0,
  119. /* paramOuts */ 0,
  120. /* name */ "MIDI Channel A/B",
  121. /* label */ "midichanab",
  122. /* maker */ "Milk Brewster",
  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 */ 1,
  134. /* paramIns */ 0,
  135. /* paramOuts */ 0,
  136. /* name */ "MIDI Gain",
  137. /* label */ "midigain",
  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 */ MAX_MIDI_CHANNELS,
  149. /* midiOuts */ 1,
  150. /* paramIns */ 0,
  151. /* paramOuts */ 0,
  152. /* name */ "MIDI Join",
  153. /* label */ "midijoin",
  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 */ MAX_MIDI_CHANNELS,
  166. /* paramIns */ 0,
  167. /* paramOuts */ 0,
  168. /* name */ "MIDI Split",
  169. /* label */ "midisplit",
  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 */ 0,
  183. /* paramOuts */ 0,
  184. /* name */ "MIDI Through",
  185. /* label */ "midithrough",
  186. /* maker */ "falkTX",
  187. /* copyright */ "GNU GPL v2+",
  188. DESCFUNCS
  189. },
  190. {
  191. /* category */ NATIVE_PLUGIN_CATEGORY_UTILITY,
  192. /* hints */ NATIVE_PLUGIN_IS_RTSAFE,
  193. /* supports */ NATIVE_PLUGIN_SUPPORTS_EVERYTHING,
  194. /* audioIns */ 0,
  195. /* audioOuts */ 0,
  196. /* midiIns */ 1,
  197. /* midiOuts */ 1,
  198. /* paramIns */ 2,
  199. /* paramOuts */ 0,
  200. /* name */ "MIDI Transpose",
  201. /* label */ "miditranspose",
  202. /* maker */ "falkTX",
  203. /* copyright */ "GNU GPL v2+",
  204. DESCFUNCS
  205. },
  206. {
  207. /* category */ NATIVE_PLUGIN_CATEGORY_UTILITY,
  208. /* hints */ NATIVE_PLUGIN_IS_RTSAFE,
  209. /* supports */ NATIVE_PLUGIN_SUPPORTS_EVERYTHING,
  210. /* audioIns */ 0,
  211. /* audioOuts */ 0,
  212. /* midiIns */ 1,
  213. /* midiOuts */ 1,
  214. /* paramIns */ 1,
  215. /* paramOuts */ 0,
  216. /* name */ "MIDI Channelize",
  217. /* label */ "midichannelize",
  218. /* maker */ "falkTX",
  219. /* copyright */ "GNU GPL v2+",
  220. DESCFUNCS
  221. },
  222. // --------------------------------------------------------------------------------------------------------------------
  223. // Audio file
  224. {
  225. /* category */ NATIVE_PLUGIN_CATEGORY_UTILITY,
  226. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_RTSAFE
  227. |NATIVE_PLUGIN_HAS_UI
  228. |NATIVE_PLUGIN_NEEDS_UI_OPEN_SAVE
  229. |NATIVE_PLUGIN_USES_TIME),
  230. /* supports */ NATIVE_PLUGIN_SUPPORTS_NOTHING,
  231. /* audioIns */ 0,
  232. /* audioOuts */ 2,
  233. /* midiIns */ 0,
  234. /* midiOuts */ 0,
  235. /* paramIns */ 1,
  236. /* paramOuts */ 0,
  237. /* name */ "Audio File",
  238. /* label */ "audiofile",
  239. /* maker */ "falkTX",
  240. /* copyright */ "GNU GPL v2+",
  241. DESCFUNCS
  242. },
  243. // --------------------------------------------------------------------------------------------------------------------
  244. // MIDI file and sequencer
  245. {
  246. /* category */ NATIVE_PLUGIN_CATEGORY_UTILITY,
  247. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_RTSAFE
  248. |NATIVE_PLUGIN_HAS_UI
  249. |NATIVE_PLUGIN_NEEDS_UI_OPEN_SAVE
  250. |NATIVE_PLUGIN_USES_STATE
  251. |NATIVE_PLUGIN_USES_TIME),
  252. /* supports */ NATIVE_PLUGIN_SUPPORTS_NOTHING,
  253. /* audioIns */ 0,
  254. /* audioOuts */ 0,
  255. /* midiIns */ 0,
  256. /* midiOuts */ 1,
  257. /* paramIns */ 0,
  258. /* paramOuts */ 0,
  259. /* name */ "MIDI File",
  260. /* label */ "midifile",
  261. /* maker */ "falkTX",
  262. /* copyright */ "GNU GPL v2+",
  263. DESCFUNCS
  264. },
  265. #ifdef HAVE_PYQT
  266. {
  267. /* category */ NATIVE_PLUGIN_CATEGORY_UTILITY,
  268. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_RTSAFE
  269. |NATIVE_PLUGIN_HAS_UI
  270. |NATIVE_PLUGIN_USES_STATE
  271. |NATIVE_PLUGIN_USES_TIME),
  272. /* supports */ NATIVE_PLUGIN_SUPPORTS_NOTHING,
  273. /* audioIns */ 0,
  274. /* audioOuts */ 0,
  275. /* midiIns */ 0,
  276. /* midiOuts */ 1,
  277. /* paramIns */ 4,
  278. /* paramOuts */ 0,
  279. /* name */ "MIDI Pattern",
  280. /* label */ "midipattern",
  281. /* maker */ "falkTX, tatch",
  282. /* copyright */ "GNU GPL v2+",
  283. DESCFUNCS
  284. },
  285. #endif
  286. // --------------------------------------------------------------------------------------------------------------------
  287. // Carla
  288. #ifdef HAVE_PYQT
  289. {
  290. /* category */ NATIVE_PLUGIN_CATEGORY_OTHER,
  291. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_SYNTH
  292. |NATIVE_PLUGIN_HAS_UI
  293. |NATIVE_PLUGIN_NEEDS_UI_MAIN_THREAD
  294. |NATIVE_PLUGIN_USES_STATE
  295. |NATIVE_PLUGIN_USES_TIME),
  296. /* supports */ static_cast<NativePluginSupports>(NATIVE_PLUGIN_SUPPORTS_EVERYTHING),
  297. /* audioIns */ 2,
  298. /* audioOuts */ 2,
  299. /* midiIns */ 1,
  300. /* midiOuts */ 1,
  301. /* paramIns */ 100,
  302. /* paramOuts */ 10,
  303. /* name */ "Carla-Rack",
  304. /* label */ "carlarack",
  305. /* maker */ "falkTX",
  306. /* copyright */ "GNU GPL v2+",
  307. DESCFUNCS
  308. },
  309. {
  310. /* category */ NATIVE_PLUGIN_CATEGORY_OTHER,
  311. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_SYNTH
  312. |NATIVE_PLUGIN_HAS_UI
  313. |NATIVE_PLUGIN_NEEDS_UI_MAIN_THREAD
  314. |NATIVE_PLUGIN_USES_STATE
  315. |NATIVE_PLUGIN_USES_TIME),
  316. /* supports */ static_cast<NativePluginSupports>(NATIVE_PLUGIN_SUPPORTS_EVERYTHING),
  317. /* audioIns */ 2,
  318. /* audioOuts */ 2,
  319. /* midiIns */ 1,
  320. /* midiOuts */ 0,
  321. /* paramIns */ 100,
  322. /* paramOuts */ 10,
  323. /* name */ "Carla-Rack (no midi out)",
  324. /* label */ "carlarack-nomidiout",
  325. /* maker */ "falkTX",
  326. /* copyright */ "GNU GPL v2+",
  327. DESCFUNCS
  328. },
  329. {
  330. /* category */ NATIVE_PLUGIN_CATEGORY_OTHER,
  331. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_SYNTH
  332. |NATIVE_PLUGIN_HAS_UI
  333. |NATIVE_PLUGIN_NEEDS_UI_MAIN_THREAD
  334. |NATIVE_PLUGIN_USES_STATE
  335. |NATIVE_PLUGIN_USES_TIME),
  336. /* supports */ static_cast<NativePluginSupports>(NATIVE_PLUGIN_SUPPORTS_EVERYTHING),
  337. /* audioIns */ 2,
  338. /* audioOuts */ 2,
  339. /* midiIns */ 1,
  340. /* midiOuts */ 1,
  341. /* paramIns */ 100,
  342. /* paramOuts */ 10,
  343. /* name */ "Carla-Patchbay",
  344. /* label */ "carlapatchbay",
  345. /* maker */ "falkTX",
  346. /* copyright */ "GNU GPL v2+",
  347. DESCFUNCS
  348. },
  349. {
  350. /* category */ NATIVE_PLUGIN_CATEGORY_OTHER,
  351. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_SYNTH
  352. |NATIVE_PLUGIN_HAS_UI
  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 */ 3,
  358. /* audioOuts */ 2,
  359. /* midiIns */ 1,
  360. /* midiOuts */ 1,
  361. /* paramIns */ 100,
  362. /* paramOuts */ 10,
  363. /* name */ "Carla-Patchbay (sidechain)",
  364. /* label */ "carlapatchbay3s",
  365. /* maker */ "falkTX",
  366. /* copyright */ "GNU GPL v2+",
  367. DESCFUNCS
  368. },
  369. {
  370. /* category */ NATIVE_PLUGIN_CATEGORY_OTHER,
  371. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_SYNTH
  372. |NATIVE_PLUGIN_HAS_UI
  373. |NATIVE_PLUGIN_NEEDS_UI_MAIN_THREAD
  374. |NATIVE_PLUGIN_USES_STATE
  375. |NATIVE_PLUGIN_USES_TIME),
  376. /* supports */ static_cast<NativePluginSupports>(NATIVE_PLUGIN_SUPPORTS_EVERYTHING),
  377. /* audioIns */ 16,
  378. /* audioOuts */ 16,
  379. /* midiIns */ 1,
  380. /* midiOuts */ 1,
  381. /* paramIns */ 100,
  382. /* paramOuts */ 10,
  383. /* name */ "Carla-Patchbay (16chan)",
  384. /* label */ "carlapatchbay16",
  385. /* maker */ "falkTX",
  386. /* copyright */ "GNU GPL v2+",
  387. DESCFUNCS
  388. },
  389. {
  390. /* category */ NATIVE_PLUGIN_CATEGORY_OTHER,
  391. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_SYNTH
  392. |NATIVE_PLUGIN_HAS_UI
  393. |NATIVE_PLUGIN_NEEDS_UI_MAIN_THREAD
  394. |NATIVE_PLUGIN_USES_STATE
  395. |NATIVE_PLUGIN_USES_TIME),
  396. /* supports */ static_cast<NativePluginSupports>(NATIVE_PLUGIN_SUPPORTS_EVERYTHING),
  397. /* audioIns */ 32,
  398. /* audioOuts */ 32,
  399. /* midiIns */ 1,
  400. /* midiOuts */ 1,
  401. /* paramIns */ 100,
  402. /* paramOuts */ 10,
  403. /* name */ "Carla-Patchbay (32chan)",
  404. /* label */ "carlapatchbay32",
  405. /* maker */ "falkTX",
  406. /* copyright */ "GNU GPL v2+",
  407. DESCFUNCS
  408. },
  409. #endif
  410. // --------------------------------------------------------------------------------------------------------------------
  411. // External-UI plugins
  412. #ifdef HAVE_PYQT
  413. {
  414. /* category */ NATIVE_PLUGIN_CATEGORY_UTILITY,
  415. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_RTSAFE
  416. |NATIVE_PLUGIN_HAS_UI
  417. |NATIVE_PLUGIN_NEEDS_FIXED_BUFFERS),
  418. /* supports */ NATIVE_PLUGIN_SUPPORTS_NOTHING,
  419. /* audioIns */ 2,
  420. /* audioOuts */ 0,
  421. /* midiIns */ 0,
  422. /* midiOuts */ 0,
  423. /* paramIns */ 2,
  424. /* paramOuts */ 2,
  425. /* name */ "Big Meter",
  426. /* label */ "bigmeter",
  427. /* maker */ "falkTX",
  428. /* copyright */ "GNU GPL v2+",
  429. DESCFUNCS
  430. },
  431. {
  432. /* category */ NATIVE_PLUGIN_CATEGORY_UTILITY,
  433. /* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_RTSAFE
  434. |NATIVE_PLUGIN_HAS_UI),
  435. /* supports */ NATIVE_PLUGIN_SUPPORTS_NOTHING,
  436. /* audioIns */ 0,
  437. /* audioOuts */ 0,
  438. /* midiIns */ 0,
  439. /* midiOuts */ 0,
  440. /* paramIns */ 1,
  441. /* paramOuts */ 0,
  442. /* name */ "Notes",
  443. /* label */ "notes",
  444. /* maker */ "falkTX",
  445. /* copyright */ "GNU GPL v2+",
  446. DESCFUNCS
  447. },
  448. #endif
  449. #ifdef HAVE_EXTERNAL_PLUGINS
  450. # define CARLA_EXTERNAL_PLUGINS_INCLUDED_DIRECTLY
  451. # include "external/_data.cpp"
  452. #endif
  453. };
  454. #undef DESCFUNCS
  455. // --------------------------------------------------------------------------------------------------------------------
  456. const NativePluginDescriptor* carla_get_native_plugins_data(uint32_t* count)
  457. {
  458. CARLA_SAFE_ASSERT_RETURN(count != nullptr, nullptr);
  459. *count = static_cast<uint32_t>(sizeof(sNativePluginDescriptors)/sizeof(NativePluginDescriptor));
  460. return sNativePluginDescriptors;
  461. }
  462. // --------------------------------------------------------------------------------------------------------------------