Small utility library for MIDI functions.
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #ifndef MIDI_UTILS_H
  2. #define MIDI_UTILS_H
  3. #include <stdio.h>
  4. #include <string.h>
  5. /**
  6. * MIDI message type for note on.
  7. */
  8. #define MIDI_MESSAGE_NOTEON 0x90u
  9. /**
  10. * MIDI message type for note off.
  11. */
  12. #define MIDI_MESSAGE_NOTEOFF 0x80u
  13. /**
  14. * Continuous control number for sustain, or damper (right pedal).
  15. */
  16. #define MIDI_CC_SUSTAIN 0x40u
  17. /**
  18. * Continuous control number for sostenuto (center pedal).
  19. */
  20. #define MIDI_CC_SOSTENUTO 0x42u
  21. /**
  22. * Continuous control number for una corda (left pedal).
  23. */
  24. #define MIDI_CC_UNACORDA 0x43u
  25. #if defined __cplusplus
  26. extern "C" {
  27. #endif
  28. /**
  29. * Gets the name of a MIDI note value.
  30. * @return The MIDI note name.
  31. * @see MIDI_GetNoteFromName()
  32. */
  33. char* MIDI_GetNoteName(unsigned char);
  34. /**
  35. * Gets the note value from a MIDI note name
  36. * @return The MIDI note value.
  37. * @see MIDI_GetNoteName()
  38. */
  39. unsigned char MIDI_GetNoteFromName(const char*);
  40. #if defined __cplusplus
  41. }
  42. #endif
  43. #endif