libcm is a C development framework with an emphasis on audio signal processing applications.
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.

cmScoreMatchGraphic.h 1.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #ifndef cmScoreMatchGraphic_h
  2. #define cmScoreMatchGraphic_h
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. enum
  7. {
  8. kOkSmgRC = cmOkRC,
  9. kFileSmgRC,
  10. kScoreFailSmgRC,
  11. kMidiFileFailSmgRC,
  12. kOpFailSmgRC,
  13. kMatchFailSmgRC
  14. };
  15. typedef cmRC_t cmSmgRC_t;
  16. typedef cmHandle_t cmSmgH_t;
  17. extern cmSmgH_t cmSmgNullHandle;
  18. cmSmgRC_t cmScoreMatchGraphicAlloc( cmCtx_t* ctx, cmSmgH_t* hp, const cmChar_t* scoreFn, const cmChar_t* midiFn );
  19. cmSmgRC_t cmScoreMatchGraphicFree( cmSmgH_t* hp );
  20. bool cmScoreMatchGraphicIsValid( cmSmgH_t h );
  21. cmSmgRC_t cmScoreMatchGraphicInsertMidi( cmSmgH_t h, unsigned midiUid, unsigned midiPitch, unsigned midiVel, unsigned csvScoreEventId );
  22. cmSmgRC_t cmScoreMatchGraphicWrite( cmSmgH_t h, const cmChar_t* fn );
  23. // Generate a set of markers for use in a cmTimeLine file which forms a marked area
  24. // beginning at each bar line and ends at the end of the file.
  25. cmSmgRC_t cmScoreMatchGraphicGenTimeLineBars( cmSmgH_t h, const cmChar_t* fn, unsigned srate );
  26. // Update the MIDI file velocity values and insert pedal events
  27. // from from score into MIDI file and then write the updated MIDI
  28. // file to 'newMidiFn'.
  29. cmSmgRC_t cmScoreMatchGraphicUpdateMidiFromScore( cmCtx_t* ctx, cmSmgH_t h, const cmChar_t* newMidiFn );
  30. #ifdef __cplusplus
  31. }
  32. #endif
  33. #endif