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.

midnam.h 1.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*
  2. Copyright 2016 Robin Gareus <robin@gareus.org>
  3. Permission to use, copy, modify, and/or distribute this software for any
  4. purpose with or without fee is hereby granted, provided that the above
  5. copyright notice and this permission notice appear in all copies.
  6. THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  7. WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  8. MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  9. ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  10. WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  11. ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  12. OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  13. */
  14. #ifndef LV2_MIDNAM_H
  15. #define LV2_MIDNAM_H
  16. #include "lv2.h"
  17. /**
  18. @defgroup lv2midnam MIDI Naming
  19. @{
  20. */
  21. #define LV2_MIDNAM_URI "http://ardour.org/lv2/midnam"
  22. #define LV2_MIDNAM_PREFIX LV2_MIDNAM_URI "#"
  23. #define LV2_MIDNAM__interface LV2_MIDNAM_PREFIX "interface"
  24. #define LV2_MIDNAM__update LV2_MIDNAM_PREFIX "update"
  25. typedef void* LV2_Midnam_Handle;
  26. /** a LV2 Feature provided by the Host to the plugin */
  27. typedef struct {
  28. /** Opaque host data */
  29. LV2_Midnam_Handle handle;
  30. /** Request from run() that the host should re-read the midnam */
  31. void (*update)(LV2_Midnam_Handle handle);
  32. } LV2_Midnam;
  33. typedef struct {
  34. /** Query midnam document. The plugin
  35. * is expected to return a null-terminated XML
  36. * text which is a valid midnam desciption
  37. * (or NULL in case of error).
  38. *
  39. * The midnam \<Model\> must be unique and
  40. * specific for the given plugin-instance.
  41. */
  42. char* (*midnam)(LV2_Handle instance);
  43. /** The unique model id used ith the midnam,
  44. * (or NULL).
  45. */
  46. char* (*model)(LV2_Handle instance);
  47. /** free allocated strings. The host
  48. * calls this for every value returned by
  49. * \ref midnam and \ref model.
  50. */
  51. void (*free)(char*);
  52. } LV2_Midnam_Interface;
  53. #endif