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.

cmMidiScoreFollow.h 1.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #ifndef cmMidiScoreFollow_h
  2. #define cmMidiScoreFollow_h
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. //( { file_desc:"Score follow a MIDI files." kw[score] }
  7. //
  8. // This function uses a CSV score file generated from cmXScoreTest() to score follow a MIDI file.
  9. // Output filesL
  10. // - MIDI file with velocities from the score applied to the associated notes in the MIDI file.
  11. // - A text file, for use with cmTimeLine, which describes the bar positions as absolute times into the score.
  12. // - An SVG file which shows the score match results over time for each note in the score.
  13. // - A report file which lists the score match status over time.
  14. enum
  15. {
  16. kOkMsfRC = cmOkRC,
  17. kFailMsfRC
  18. };
  19. typedef cmRC_t cmMsfRC_t;
  20. cmMsfRC_t cmMidiScoreFollowMain(
  21. cmCtx_t* ctx,
  22. const cmChar_t* scoreCsvFn, // score CSV file as generated from cmXScoreTest().
  23. const cmChar_t* midiFn, // MIDI file to track
  24. const cmChar_t* matchRptOutFn, // Score follow status report
  25. const cmChar_t* matchSvgOutFn, // Score follow graphic report
  26. const cmChar_t* midiOutFn, // (optional) midiFn with apply sostenuto and velocities from the score to the MIDI file
  27. const cmChar_t* tlBarOutFn // (optional) bar positions sutiable for use in a cmTimeLine description file.
  28. );
  29. //)
  30. #ifdef __cplusplus
  31. }
  32. #endif
  33. #endif