libcm is a C development framework with an emphasis on audio signal processing applications.
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

cmXScore.h 2.5KB

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