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.4KB

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