Collection of tools useful for audio production
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.

496 lines
19KB

  1. /*
  2. * Custom types to store LV2 information
  3. * Copyright (C) 2011-2012 Filipe Coelho <falktx@gmail.com>
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; either version 2 of the License, or
  8. * 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 COPYING file
  16. */
  17. #ifndef LV2_RDF_INCLUDED
  18. #define LV2_RDF_INCLUDED
  19. // TODO - presets
  20. #include <cstdint>
  21. // Base Types
  22. typedef float LV2_Data;
  23. typedef const char* LV2_URI;
  24. typedef uint32_t LV2_Property;
  25. typedef unsigned long long LV2_PluginType;
  26. // Port Midi Map Types
  27. #define LV2_PORT_MIDI_MAP_CC 0x1
  28. #define LV2_PORT_MIDI_MAP_NRPN 0x2
  29. #define LV2_IS_PORT_MIDI_MAP_CC(x) ((x) == LV2_PORT_MIDI_MAP_CC)
  30. #define LV2_IS_PORT_MIDI_MAP_NRPN(x) ((x) == LV2_PORT_MIDI_MAP_NRPN)
  31. // Port Point Hints
  32. #define LV2_PORT_POINT_DEFAULT 0x1
  33. #define LV2_PORT_POINT_MINIMUM 0x2
  34. #define LV2_PORT_POINT_MAXIMUM 0x4
  35. #define LV2_HAVE_DEFAULT_PORT_POINT(x) ((x) & LV2_PORT_POINT_DEFAULT)
  36. #define LV2_HAVE_MINIMUM_PORT_POINT(x) ((x) & LV2_PORT_POINT_MINIMUM)
  37. #define LV2_HAVE_MAXIMUM_PORT_POINT(x) ((x) & LV2_PORT_POINT_MAXIMUM)
  38. // Port Unit Types
  39. #define LV2_UNIT_BAR 0x01
  40. #define LV2_UNIT_BEAT 0x02
  41. #define LV2_UNIT_BPM 0x03
  42. #define LV2_UNIT_CENT 0x04
  43. #define LV2_UNIT_CM 0x05
  44. #define LV2_UNIT_COEF 0x06
  45. #define LV2_UNIT_DB 0x07
  46. #define LV2_UNIT_DEGREE 0x08
  47. #define LV2_UNIT_FRAME 0x09
  48. #define LV2_UNIT_HZ 0x0A
  49. #define LV2_UNIT_INCH 0x0B
  50. #define LV2_UNIT_KHZ 0x0C
  51. #define LV2_UNIT_KM 0x0D
  52. #define LV2_UNIT_M 0x0E
  53. #define LV2_UNIT_MHZ 0x0F
  54. #define LV2_UNIT_MIDINOTE 0x10
  55. #define LV2_UNIT_MILE 0x11
  56. #define LV2_UNIT_MIN 0x12
  57. #define LV2_UNIT_MM 0x13
  58. #define LV2_UNIT_MS 0x14
  59. #define LV2_UNIT_OCT 0x15
  60. #define LV2_UNIT_PC 0x16
  61. #define LV2_UNIT_S 0x17
  62. #define LV2_UNIT_SEMITONE 0x18
  63. #define LV2_IS_UNIT_BAR(x) ((x) == LV2_UNIT_BAR)
  64. #define LV2_IS_UNIT_BEAT(x) ((x) == LV2_UNIT_BEAT)
  65. #define LV2_IS_UNIT_BPM(x) ((x) == LV2_UNIT_BPM)
  66. #define LV2_IS_UNIT_CENT(x) ((x) == LV2_UNIT_CENT)
  67. #define LV2_IS_UNIT_CM(x) ((x) == LV2_UNIT_CM)
  68. #define LV2_IS_UNIT_COEF(x) ((x) == LV2_UNIT_COEF)
  69. #define LV2_IS_UNIT_DB(x) ((x) == LV2_UNIT_DB)
  70. #define LV2_IS_UNIT_DEGREE(x) ((x) == LV2_UNIT_DEGREE)
  71. #define LV2_IS_UNIT_FRAME(x) ((x) == LV2_UNIT_FRAME)
  72. #define LV2_IS_UNIT_HZ(x) ((x) == LV2_UNIT_HZ)
  73. #define LV2_IS_UNIT_INCH(x) ((x) == LV2_UNIT_INCH)
  74. #define LV2_IS_UNIT_KHZ(x) ((x) == LV2_UNIT_KHZ)
  75. #define LV2_IS_UNIT_KM(x) ((x) == LV2_UNIT_KM)
  76. #define LV2_IS_UNIT_M(x) ((x) == LV2_UNIT_M)
  77. #define LV2_IS_UNIT_MHZ(x) ((x) == LV2_UNIT_MHZ)
  78. #define LV2_IS_UNIT_MIDINOTE(x) ((x) == LV2_UNIT_MIDINOTE)
  79. #define LV2_IS_UNIT_MILE(x) ((x) == LV2_UNIT_MILE)
  80. #define LV2_IS_UNIT_MIN(x) ((x) == LV2_UNIT_MIN)
  81. #define LV2_IS_UNIT_MM(x) ((x) == LV2_UNIT_MM)
  82. #define LV2_IS_UNIT_MS(x) ((x) == LV2_UNIT_MS)
  83. #define LV2_IS_UNIT_OCT(x) ((x) == LV2_UNIT_OCT)
  84. #define LV2_IS_UNIT_PC(x) ((x) == LV2_UNIT_PC)
  85. #define LV2_IS_UNIT_S(x) ((x) == LV2_UNIT_S)
  86. #define LV2_IS_UNIT_SEMITONE(x) ((x) == LV2_UNIT_SEMITONE)
  87. // Port Unit Hints
  88. #define LV2_PORT_UNIT 0x1
  89. #define LV2_PORT_UNIT_NAME 0x2
  90. #define LV2_PORT_UNIT_RENDER 0x4
  91. #define LV2_PORT_UNIT_SYMBOL 0x8
  92. #define LV2_HAVE_UNIT(x) ((x) & LV2_PORT_UNIT)
  93. #define LV2_HAVE_UNIT_NAME(x) ((x) & LV2_PORT_UNIT_NAME)
  94. #define LV2_HAVE_UNIT_RENDER(x) ((x) & LV2_PORT_UNIT_RENDER)
  95. #define LV2_HAVE_UNIT_SYMBOL(x) ((x) & LV2_PORT_UNIT_SYMBOL)
  96. // Port Types
  97. #define LV2_PORT_INPUT 0x01
  98. #define LV2_PORT_OUTPUT 0x02
  99. #define LV2_PORT_CONTROL 0x04
  100. #define LV2_PORT_AUDIO 0x08
  101. #define LV2_PORT_CV 0x10
  102. #define LV2_PORT_ATOM 0x20
  103. #define LV2_PORT_ATOM_SEQUENCE (0x40 | LV2_PORT_ATOM)
  104. #define LV2_PORT_EVENT 0x80
  105. #define LV2_PORT_MIDI_LL 0x100
  106. // Port Support Types
  107. #define LV2_PORT_SUPPORTS_MIDI_EVENT 0x1000
  108. #define LV2_PORT_SUPPORTS_PATCH_MESSAGE 0x2000
  109. #define LV2_IS_PORT_INPUT(x) ((x) & LV2_PORT_INPUT)
  110. #define LV2_IS_PORT_OUTPUT(x) ((x) & LV2_PORT_OUTPUT)
  111. #define LV2_IS_PORT_CONTROL(x) ((x) & LV2_PORT_CONTROL)
  112. #define LV2_IS_PORT_AUDIO(x) ((x) & LV2_PORT_AUDIO)
  113. #define LV2_IS_PORT_ATOM_SEQUENCE(x) ((x) & LV2_PORT_ATOM_SEQUENCE)
  114. #define LV2_IS_PORT_CV(x) ((x) & LV2_PORT_CV)
  115. #define LV2_IS_PORT_EVENT(x) ((x) & LV2_PORT_EVENT)
  116. #define LV2_IS_PORT_MIDI_LL(x) ((x) & LV2_PORT_MIDI_LL)
  117. // Port Properties
  118. #define LV2_PORT_OPTIONAL 0x0001
  119. #define LV2_PORT_ENUMERATION 0x0002
  120. #define LV2_PORT_INTEGER 0x0004
  121. #define LV2_PORT_SAMPLE_RATE 0x0008
  122. #define LV2_PORT_TOGGLED 0x0010
  123. #define LV2_PORT_CAUSES_ARTIFACTS 0x0020
  124. #define LV2_PORT_CONTINUOUS_CV 0x0040
  125. #define LV2_PORT_DISCRETE_CV 0x0080
  126. #define LV2_PORT_EXPENSIVE 0x0100
  127. #define LV2_PORT_STRICT_BOUNDS 0x0200
  128. #define LV2_PORT_LOGARITHMIC 0x0400
  129. #define LV2_PORT_NOT_AUTOMATIC 0x0800
  130. #define LV2_PORT_NOT_ON_GUI 0x1000
  131. #define LV2_PORT_TRIGGER 0x2000
  132. #define LV2_IS_PORT_OPTIONAL(x) ((x) & LV2_PORT_OPTIONAL)
  133. #define LV2_IS_PORT_ENUMERATION(x) ((x) & LV2_PORT_ENUMERATION)
  134. #define LV2_IS_PORT_INTEGER(x) ((x) & LV2_PORT_INTEGER)
  135. #define LV2_IS_PORT_SAMPLE_RATE(x) ((x) & LV2_PORT_SAMPLE_RATE)
  136. #define LV2_IS_PORT_TOGGLED(x) ((x) & LV2_PORT_TOGGLED)
  137. #define LV2_IS_PORT_CAUSES_ARTIFACTS(x) ((x) & LV2_PORT_CAUSES_ARTIFACTS)
  138. #define LV2_IS_PORT_CONTINUOUS_CV(x) ((x) & LV2_PORT_CONTINUOUS_CV)
  139. #define LV2_IS_PORT_DISCRETE_CV(x) ((x) & LV2_PORT_DISCRETE_CV)
  140. #define LV2_IS_PORT_EXPENSIVE(x) ((x) & LV2_PORT_EXPENSIVE)
  141. #define LV2_IS_PORT_STRICT_BOUNDS(x) ((x) & LV2_PORT_STRICT_BOUNDS)
  142. #define LV2_IS_PORT_LOGARITHMIC(x) ((x) & LV2_PORT_LOGARITHMIC)
  143. #define LV2_IS_PORT_NOT_AUTOMATIC(x) ((x) & LV2_PORT_NOT_AUTOMATIC)
  144. #define LV2_IS_PORT_NOT_ON_GUI(x) ((x) & LV2_PORT_NOT_ON_GUI)
  145. #define LV2_IS_PORT_TRIGGER(x) ((x) & LV2_PORT_TRIGGER)
  146. // Port Designation
  147. #define LV2_PORT_DESIGNATION_FREEWHEELING 0x1
  148. #define LV2_PORT_DESIGNATION_LATENCY 0x2
  149. #define LV2_PORT_DESIGNATION_SAMPLE_RATE 0x3
  150. #define LV2_PORT_DESIGNATION_TIME_BAR 0x4
  151. #define LV2_PORT_DESIGNATION_TIME_BAR_BEAT 0x5
  152. #define LV2_PORT_DESIGNATION_TIME_BEAT 0x6
  153. #define LV2_PORT_DESIGNATION_TIME_BEAT_UNIT 0x7
  154. #define LV2_PORT_DESIGNATION_TIME_BEATS_PER_BAR 0x8
  155. #define LV2_PORT_DESIGNATION_TIME_BEATS_PER_MINUTE 0x9
  156. #define LV2_PORT_DESIGNATION_TIME_FRAME 0xA
  157. #define LV2_PORT_DESIGNATION_TIME_FRAMES_PER_SECOND 0xB
  158. #define LV2_PORT_DESIGNATION_TIME_POSITION 0xC
  159. #define LV2_PORT_DESIGNATION_TIME_SPEED 0xD
  160. #define LV2_IS_PORT_DESIGNATION_FREEWHEELING(x) ((x) == LV2_PORT_DESIGNATION_FREEWHEELING)
  161. #define LV2_IS_PORT_DESIGNATION_LATENCY(x) ((x) == LV2_PORT_DESIGNATION_LATENCY)
  162. #define LV2_IS_PORT_DESIGNATION_SAMPLE_RATE(x) ((x) == LV2_PORT_DESIGNATION_SAMPLE_RATE)
  163. #define LV2_IS_PORT_DESIGNATION_TIME_BAR(x) ((x) == LV2_PORT_DESIGNATION_TIME_BAR)
  164. #define LV2_IS_PORT_DESIGNATION_TIME_BAR_BEAT(x) ((x) == LV2_PORT_DESIGNATION_TIME_BAR_BEAT)
  165. #define LV2_IS_PORT_DESIGNATION_TIME_BEAT(x) ((x) == LV2_PORT_DESIGNATION_TIME_BEAT)
  166. #define LV2_IS_PORT_DESIGNATION_TIME_BEAT_UNIT(x) ((x) == LV2_PORT_DESIGNATION_TIME_BEAT_UNIT)
  167. #define LV2_IS_PORT_DESIGNATION_TIME_BEATS_PER_BAR(x) ((x) == LV2_PORT_DESIGNATION_TIME_BEATS_PER_BAR)
  168. #define LV2_IS_PORT_DESIGNATION_TIME_BEATS_PER_MINUTE(x) ((x) == LV2_PORT_DESIGNATION_TIME_BEATS_PER_MINUTE)
  169. #define LV2_IS_PORT_DESIGNATION_TIME_FRAME(x) ((x) == LV2_PORT_DESIGNATION_TIME_FRAME)
  170. #define LV2_IS_PORT_DESIGNATION_TIME_FRAMES_PER_SECOND(x) ((x) == LV2_PORT_DESIGNATION_TIME_FRAMES_PER_SECOND)
  171. #define LV2_IS_PORT_DESIGNATION_TIME_POSITION(x) ((x) == LV2_PORT_DESIGNATION_TIME_POSITION)
  172. #define LV2_IS_PORT_DESIGNATION_TIME_SPEED(x) ((x) == LV2_PORT_DESIGNATION_TIME_SPEED)
  173. #define LV2_IS_PORT_DESIGNATION_TIME(x) ((x) == LV2_PORT_DESIGNATION_TIME_BAR || (x) == LV2_PORT_DESIGNATION_TIME_BAR_BEAT || \
  174. (x) == LV2_PORT_DESIGNATION_TIME_BEAT || (x) == LV2_PORT_DESIGNATION_TIME_BEAT_UNIT || \
  175. (x) == LV2_PORT_DESIGNATION_TIME_BEATS_PER_BAR || (x) == LV2_PORT_DESIGNATION_TIME_BEATS_PER_MINUTE || \
  176. (x) == LV2_PORT_DESIGNATION_TIME_FRAME || (x) == LV2_PORT_DESIGNATION_TIME_FRAMES_PER_SECOND || \
  177. (x) == LV2_PORT_DESIGNATION_TIME_POSITION || (x) == LV2_PORT_DESIGNATION_TIME_SPEED)
  178. // Preset State Types (TODO: Null is not a type, this is just a placeholder)
  179. #define LV2_PRESET_STATE_NULL 0x0
  180. #define LV2_IS_PRESET_STATE_NULL(x) ((x) == LV2_PRESET_STATE_NULL)
  181. // Feature Types
  182. #define LV2_FEATURE_OPTIONAL 0x1
  183. #define LV2_FEATURE_REQUIRED 0x2
  184. #define LV2_IS_FEATURE_OPTIONAL(x) ((x) == LV2_FEATURE_OPTIONAL)
  185. #define LV2_IS_FEATURE_REQUIRED(x) ((x) == LV2_FEATURE_REQUIRED)
  186. // UI Types
  187. #define LV2_UI_GTK2 0x1
  188. #define LV2_UI_GTK3 0x2
  189. #define LV2_UI_QT4 0x3
  190. #define LV2_UI_COCOA 0x4
  191. #define LV2_UI_WINDOWS 0x5
  192. #define LV2_UI_X11 0x6
  193. #define LV2_UI_EXTERNAL 0x7
  194. #define LV2_UI_OLD_EXTERNAL 0x8
  195. #define LV2_IS_UI_GTK2(x) ((x) == LV2_UI_GTK2)
  196. #define LV2_IS_UI_GTK3(x) ((x) == LV2_UI_GTK3)
  197. #define LV2_IS_UI_QT4(x) ((x) == LV2_UI_QT4)
  198. #define LV2_IS_UI_COCOA(x) ((x) == LV2_UI_COCOA)
  199. #define LV2_IS_UI_WINDOWS(x) ((x) == LV2_UI_WINDOWS)
  200. #define LV2_IS_UI_X11(x) ((x) == LV2_UI_X11)
  201. #define LV2_IS_UI_EXTERNAL(x) ((x) == LV2_UI_EXTERNAL)
  202. #define LV2_IS_UI_OLD_EXTERNAL(x) ((x) == LV2_UI_OLD_EXTERNAL)
  203. // Plugin Types
  204. #define LV2_CLASS_ALLPASS 0x000000001LL
  205. #define LV2_CLASS_AMPLIFIER 0x000000002LL
  206. #define LV2_CLASS_ANALYSER 0x000000004LL
  207. #define LV2_CLASS_BANDPASS 0x000000008LL
  208. #define LV2_CLASS_CHORUS 0x000000010LL
  209. #define LV2_CLASS_COMB 0x000000020LL
  210. #define LV2_CLASS_COMPRESSOR 0x000000040LL
  211. #define LV2_CLASS_CONSTANT 0x000000080LL
  212. #define LV2_CLASS_CONVERTER 0x000000100LL
  213. #define LV2_CLASS_DELAY 0x000000200LL
  214. #define LV2_CLASS_DISTORTION 0x000000400LL
  215. #define LV2_CLASS_DYNAMICS 0x000000800LL
  216. #define LV2_CLASS_EQ 0x000001000LL
  217. #define LV2_CLASS_EXPANDER 0x000002000LL
  218. #define LV2_CLASS_FILTER 0x000004000LL
  219. #define LV2_CLASS_FLANGER 0x000008000LL
  220. #define LV2_CLASS_FUNCTION 0x000010000LL
  221. #define LV2_CLASS_GATE 0x000020000LL
  222. #define LV2_CLASS_GENERATOR 0x000040000LL
  223. #define LV2_CLASS_HIGHPASS 0x000080000LL
  224. #define LV2_CLASS_INSTRUMENT 0x000100000LL
  225. #define LV2_CLASS_LIMITER 0x000200000LL
  226. #define LV2_CLASS_LOWPASS 0x000400000LL
  227. #define LV2_CLASS_MIXER 0x000800000LL
  228. #define LV2_CLASS_MODULATOR 0x001000000LL
  229. #define LV2_CLASS_MULTI_EQ 0x002000000LL
  230. #define LV2_CLASS_OSCILLATOR 0x004000000LL
  231. #define LV2_CLASS_PARA_EQ 0x008000000LL
  232. #define LV2_CLASS_PHASER 0x010000000LL
  233. #define LV2_CLASS_PITCH 0x020000000LL
  234. #define LV2_CLASS_REVERB 0x040000000LL
  235. #define LV2_CLASS_SIMULATOR 0x080000000LL
  236. #define LV2_CLASS_SPATIAL 0x100000000LL
  237. #define LV2_CLASS_SPECTRAL 0x200000000LL
  238. #define LV2_CLASS_UTILITY 0x400000000LL
  239. #define LV2_CLASS_WAVESHAPER 0x800000000LL
  240. #define LV2_GROUP_DELAY (LV2_CLASS_DELAY|LV2_CLASS_REVERB)
  241. #define LV2_GROUP_DISTORTION (LV2_CLASS_DISTORTION|LV2_CLASS_WAVESHAPER)
  242. #define LV2_GROUP_DYNAMICS (LV2_CLASS_DYNAMICS|LV2_CLASS_AMPLIFIER|LV2_CLASS_COMPRESSOR|LV2_CLASS_EXPANDER|LV2_CLASS_GATE|LV2_CLASS_LIMITER)
  243. #define LV2_GROUP_EQ (LV2_CLASS_EQ|LV2_CLASS_PARA_EQ|LV2_CLASS_MULTI_EQ)
  244. #define LV2_GROUP_FILTER (LV2_CLASS_FILTER|LV2_CLASS_ALLPASS|LV2_CLASS_BANDPASS|LV2_CLASS_COMB|LV2_GROUP_EQ|LV2_CLASS_HIGHPASS|LV2_CLASS_LOWPASS)
  245. #define LV2_GROUP_GENERATOR (LV2_CLASS_GENERATOR|LV2_CLASS_CONSTANT|LV2_CLASS_INSTRUMENT|LV2_CLASS_OSCILLATOR)
  246. #define LV2_GROUP_MODULATOR (LV2_CLASS_MODULATOR|LV2_CLASS_CHORUS|LV2_CLASS_FLANGER|LV2_CLASS_PHASER)
  247. #define LV2_GROUP_REVERB (LV2_CLASS_REVERB)
  248. #define LV2_GROUP_SIMULATOR (LV2_CLASS_SIMULATOR|LV2_CLASS_REVERB)
  249. #define LV2_GROUP_SPATIAL (LV2_CLASS_SPATIAL)
  250. #define LV2_GROUP_SPECTRAL (LV2_CLASS_SPECTRAL|LV2_CLASS_PITCH)
  251. #define LV2_GROUP_UTILITY (LV2_CLASS_UTILITY|LV2_CLASS_ANALYSER|LV2_CLASS_CONVERTER|LV2_CLASS_FUNCTION|LV2_CLASS_MIXER)
  252. #define LV2_IS_DELAY(x) ((x) & LV2_GROUP_DELAY)
  253. #define LV2_IS_DISTORTION(x) ((x) & LV2_GROUP_DISTORTION)
  254. #define LV2_IS_DYNAMICS(x) ((x) & LV2_GROUP_DYNAMICS)
  255. #define LV2_IS_EQ(x) ((x) & LV2_GROUP_EQ)
  256. #define LV2_IS_FILTER(x) ((x) & LV2_GROUP_FILTER)
  257. #define LV2_IS_GENERATOR(x) ((x) & LV2_GROUP_GENERATOR)
  258. #define LV2_IS_MODULATOR(x) ((x) & LV2_GROUP_MODULATOR)
  259. #define LV2_IS_REVERB(x) ((x) & LV2_GROUP_REVERB)
  260. #define LV2_IS_SIMULATOR(x) ((x) & LV2_GROUP_SIMULATOR)
  261. #define LV2_IS_SPATIAL(x) ((x) & LV2_GROUP_SPATIAL)
  262. #define LV2_IS_SPECTRAL(x) ((x) & LV2_GROUP_SPECTRAL)
  263. #define LV2_IS_UTILITY(x) ((x) & LV2_GROUP_UTILITY)
  264. // Port Midi Map
  265. struct LV2_RDF_PortMidiMap {
  266. LV2_Property Type;
  267. uint32_t Number;
  268. LV2_RDF_PortMidiMap()
  269. : Type(0),
  270. Number(0) {}
  271. };
  272. // Port Points
  273. struct LV2_RDF_PortPoints {
  274. LV2_Property Hints;
  275. LV2_Data Default;
  276. LV2_Data Minimum;
  277. LV2_Data Maximum;
  278. LV2_RDF_PortPoints()
  279. : Hints(0),
  280. Default(0.0f),
  281. Minimum(0.0f),
  282. Maximum(1.0f) {}
  283. };
  284. // Port Unit
  285. struct LV2_RDF_PortUnit {
  286. LV2_Property Type;
  287. LV2_Property Hints;
  288. const char* Name;
  289. const char* Render;
  290. const char* Symbol;
  291. LV2_RDF_PortUnit()
  292. : Type(0),
  293. Hints(0),
  294. Name(nullptr),
  295. Render(nullptr),
  296. Symbol(nullptr) {}
  297. };
  298. // Port Scale Point
  299. struct LV2_RDF_PortScalePoint {
  300. const char* Label;
  301. LV2_Data Value;
  302. LV2_RDF_PortScalePoint()
  303. : Label(nullptr),
  304. Value(0.0f) {}
  305. };
  306. // Port
  307. struct LV2_RDF_Port {
  308. LV2_Property Type;
  309. LV2_Property Properties;
  310. LV2_Property Designation;
  311. const char* Name;
  312. const char* Symbol;
  313. LV2_RDF_PortMidiMap MidiMap;
  314. LV2_RDF_PortPoints Points;
  315. LV2_RDF_PortUnit Unit;
  316. uint32_t ScalePointCount;
  317. LV2_RDF_PortScalePoint* ScalePoints;
  318. LV2_RDF_Port()
  319. : Type(0),
  320. Properties(0),
  321. Designation(0),
  322. Name(nullptr),
  323. Symbol(nullptr),
  324. MidiMap(),
  325. Points(),
  326. Unit(),
  327. ScalePointCount(0),
  328. ScalePoints(nullptr) {}
  329. };
  330. // Preset Port
  331. struct LV2_RDF_PresetPort {
  332. const char* Symbol;
  333. LV2_Data Value;
  334. LV2_RDF_PresetPort()
  335. : Symbol(nullptr),
  336. Value(0.0f) {}
  337. };
  338. // Preset State
  339. struct LV2_RDF_PresetState {
  340. LV2_Property Type;
  341. const char* Key;
  342. union {
  343. // TODO
  344. } Value;
  345. LV2_RDF_PresetState()
  346. : Type(0),
  347. Key(nullptr) {}
  348. };
  349. // Preset
  350. struct LV2_RDF_Preset {
  351. LV2_URI URI;
  352. const char* Label;
  353. uint32_t PortCount;
  354. LV2_RDF_PresetPort* Ports;
  355. uint32_t StateCount;
  356. LV2_RDF_PresetState* States;
  357. LV2_RDF_Preset()
  358. : URI(nullptr),
  359. Label(nullptr),
  360. PortCount(0),
  361. Ports(nullptr),
  362. StateCount(0),
  363. States(nullptr) {}
  364. };
  365. // Feature
  366. struct LV2_RDF_Feature {
  367. LV2_Property Type;
  368. LV2_URI URI;
  369. LV2_RDF_Feature()
  370. : Type(0),
  371. URI(nullptr) {}
  372. };
  373. // UI
  374. struct LV2_RDF_UI {
  375. LV2_Property Type;
  376. LV2_URI URI;
  377. const char* Binary;
  378. const char* Bundle;
  379. uint32_t FeatureCount;
  380. LV2_RDF_Feature* Features;
  381. uint32_t ExtensionCount;
  382. LV2_URI* Extensions;
  383. LV2_RDF_UI()
  384. : Type(0),
  385. URI(nullptr),
  386. Binary(nullptr),
  387. Bundle(nullptr),
  388. FeatureCount(0),
  389. Features(nullptr),
  390. ExtensionCount(0),
  391. Extensions(nullptr) {}
  392. };
  393. // Plugin
  394. struct LV2_RDF_Descriptor {
  395. LV2_PluginType Type;
  396. LV2_URI URI;
  397. const char* Name;
  398. const char* Author;
  399. const char* License;
  400. const char* Binary;
  401. const char* Bundle;
  402. unsigned long UniqueID;
  403. uint32_t PortCount;
  404. LV2_RDF_Port* Ports;
  405. uint32_t PresetCount;
  406. LV2_RDF_Preset* Presets;
  407. uint32_t FeatureCount;
  408. LV2_RDF_Feature* Features;
  409. uint32_t ExtensionCount;
  410. LV2_URI* Extensions;
  411. uint32_t UICount;
  412. LV2_RDF_UI* UIs;
  413. LV2_RDF_Descriptor()
  414. : Type(0),
  415. URI(nullptr),
  416. Name(nullptr),
  417. Author(nullptr),
  418. License(nullptr),
  419. Binary(nullptr),
  420. Bundle(nullptr),
  421. UniqueID(0),
  422. PortCount(0),
  423. Ports(nullptr),
  424. PresetCount(0),
  425. Presets(nullptr),
  426. FeatureCount(0),
  427. Features(nullptr),
  428. ExtensionCount(0),
  429. Extensions(nullptr),
  430. UICount(0),
  431. UIs(nullptr) {}
  432. };
  433. #endif /* LV2_RDF_INCLUDED */