libcm is a C development framework with an emphasis on audio signal processing applications.
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

cmXScore.h 1.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. #ifndef cmXScore_h
  2. #define cmXScore_h
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. enum
  7. {
  8. kOkXsRC = cmOkRC,
  9. kXmlFailXsRC,
  10. kLHeapFailXsRC,
  11. kSyntaxErrorXsRC,
  12. kCsvFailXsRC,
  13. kUnterminatedTieXsRC,
  14. kUnterminatedSlurXsRC,
  15. kUnterminatedOctaveShiftXsrRC,
  16. kPedalStateErrorXsRc,
  17. kMidiFailXsRC,
  18. kFileFailXsRC,
  19. kSvgFailXsRC,
  20. kOverlapWarnXsRC,
  21. kZeroLengthEventXsRC
  22. };
  23. typedef cmRC_t cmXsRC_t;
  24. typedef cmHandle_t cmXsH_t;
  25. extern cmXsH_t cmXsNullHandle;
  26. // Prepare the MusicXML file:
  27. //
  28. // 1) Convert XML to UTF-8:
  29. // a. Change: encoding = 'UTF-16' to encoding='UTF-8'
  30. // b. Emacs C-x <RET> f utf-8 <RET>
  31. // c. Change: <?xml ... encoding = 'UTF-16' to encoding='UTF-8' ...?>
  32. //
  33. // 2) Replace "DoletSibelius Unknown Symbol Index" with "DoletSibelius unknownSymIdx"
  34. //
  35. // Steps 1) and 2) can be automated by in emacs by:
  36. //
  37. // M-x load-file ~/src/emacs/proc_music_xml.el
  38. //
  39. // Initialize an cmXScore object from a Sibelius generated MusicXML file.
  40. // Optionally include an 'edit' file to attach additional score information.
  41. // Note that the 'edit' file is created by marking up a file created via
  42. // cmXScoreReport().
  43. cmXsRC_t cmXScoreInitialize( cmCtx_t* ctx, cmXsH_t* hp, const cmChar_t* xmlFn, const cmChar_t* editFn );
  44. cmXsRC_t cmXScoreFinalize( cmXsH_t* hp );
  45. bool cmXScoreIsValid( cmXsH_t h );
  46. cmXsRC_t cmXScoreWriteCsv( cmXsH_t h, const cmChar_t* csvFn );
  47. void cmXScoreReport( cmXsH_t h, cmRpt_t* rpt, bool sortFl );
  48. // Generate the CSV file suitable for use by cmScore.
  49. cmXsRC_t cmXScoreTest( cmCtx_t* ctx, const cmChar_t* xmlFn, const cmChar_t* reorderFn, const cmChar_t* csvOutFn, const cmChar_t* midiOutFn );
  50. #ifdef __cplusplus
  51. }
  52. #endif
  53. #endif