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

cmXScore.h 2.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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. kMidiFailXsRC,
  17. kFileFailXsRC
  18. };
  19. typedef cmRC_t cmXsRC_t;
  20. typedef cmHandle_t cmXsH_t;
  21. extern cmXsH_t cmXsNullHandle;
  22. // Prepare the MusicXML file:
  23. //
  24. // 1) Convert XML to UTF-8:
  25. // a. Change: encoding = 'UTF-16' to encoding='UTF-8'
  26. // b. Emacs C-x <RET> f utf-8 <RET>
  27. // c. Change: <?xml ... encoding = 'UTF-16' to encoding='UTF-8' ...?>
  28. //
  29. // 2) Replace "DoletSibelius Unknown Symbol Index" with "DoletSibelius unknownSymIdx"
  30. //
  31. // Steps 1) and 2) can be automated by in emacs by:
  32. //
  33. // M-x load-file ~/src/emacs/proc_music_xml.el
  34. //
  35. // 3) How to assigned dynamic markings (they are not attached to notes). (from MIDI file?)
  36. // 4) Tempo syntax is inconsistent (only a problem in full part2 score)
  37. // 5) Heel is being parsed but not used.
  38. // 6) Sostenuto pedal events are not being parsed because they are not pedal events.
  39. // 7) What is a 'pedal-change' event vs. a 'pedal-stop' event.
  40. // 8) Verify the colors. (done)
  41. // 9) Remove blank bars at end (done in xml - do in score)
  42. //10) Need to assign section targets (always default to next section)
  43. //11) Mark tied notes for skip. (done)
  44. //12) Determine note off locations based on ties and slurs - defer 'pedal' to player
  45. //13) Check that the measures are given in sorted order.
  46. //14) Current implementation assumes meter changes only occur at measure boundaries.
  47. //15) Score Fixes: Add meter to bar 1, fix time errors (shown in voice report)
  48. //16) The order of notes is now correct (4/6/16) after applying
  49. // the grace note ordering changed specified in 'score_print_mk_edit.txt',
  50. // via cmXScoreReorder() however the ticks are now incorrect - fix them.
  51. cmXsRC_t cmXScoreInitialize( cmCtx_t* ctx, cmXsH_t* hp, const cmChar_t* xmlFn, const cmChar_t* midiFn );
  52. cmXsRC_t cmXScoreFinalize( cmXsH_t* hp );
  53. bool cmXScoreIsValid( cmXsH_t h );
  54. cmXsRC_t cmXScoreWriteCsv( cmXsH_t h, const cmChar_t* csvFn );
  55. cmXsRC_t cmXScoreWriteMidi( cmXsH_t h, const cmChar_t* fn );
  56. void cmXScoreReport( cmXsH_t h, cmRpt_t* rpt, bool sortFl );
  57. cmXsRC_t cmXScoreTest( cmCtx_t* ctx, const cmChar_t* xmlFn, const cmChar_t* midiFn, const cmChar_t* outFn, const cmChar_t* reorderFn );
  58. #ifdef __cplusplus
  59. }
  60. #endif
  61. #endif