KORG microX utility.
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.

71 lines
1.9 KiB

  1. /*
  2. * asysex - A SysEx Utility
  3. * Copyright (C) 2012,2016 Damien Goutte-Gattat
  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 3 of the License, or
  8. * (at your option) 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. * You should have received a copy of the GNU General Public License
  16. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. #ifndef ICP20120401_SYSEX_H
  19. #define ICP20120401_SYSEX_H
  20. #include <midi.h>
  21. /**
  22. * Informations about a MIDI device.
  23. * This structure holds the informations that a device is expected
  24. * to send in response to an universal Device Inquiry System
  25. * Exclusive message.
  26. */
  27. typedef struct midi_device_id
  28. {
  29. /** The identifier of the manufacturer of the device. */
  30. unsigned int manufacturer;
  31. /** A manufacturer-specific code identifying the device
  32. * family among all the products from that manufacturer. */
  33. unsigned int family;
  34. /** A family-specific code identifying the device among
  35. * all the products of that family. */
  36. unsigned int model;
  37. /** A version number for the device. */
  38. unsigned int version;
  39. /** The global MIDI channel used by this device. */
  40. unsigned int global_channel;
  41. } midi_device_id_t;
  42. #ifdef __cpluscplus
  43. extern "C" {
  44. #endif
  45. ssize_t
  46. sysex_read(midi_io_t *, unsigned char *, size_t);
  47. ssize_t
  48. sysex_query(midi_io_t *, unsigned char *, size_t, unsigned char *, size_t);
  49. int
  50. sysex_identify(midi_io_t *, midi_device_id_t *);
  51. const char *
  52. sysex_get_manufacturer(unsigned int);
  53. #ifdef __cplusplus
  54. }
  55. #endif
  56. #endif /* !ICP20120401_SYSEX_H */