libcm is a C development framework with an emphasis on audio signal processing applications.
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #ifndef cmTakeSeqBldr_h
  2. #define cmTakeSeqBldr_h
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. enum
  7. {
  8. kOkTsbRC = cmOkRC,
  9. kJsonFailTsbRC,
  10. kParseFailTsbRC,
  11. kTimeLineFailTsbRC,
  12. kScoreFailTsbRC
  13. };
  14. typedef cmRC_t cmTsbRC_t;
  15. typedef cmHandle_t cmTakeSeqBldrH_t;
  16. extern cmTakeSeqBldrH_t cmTakeSeqBldrNullHandle;
  17. cmTsbRC_t cmTakeSeqBldrAlloc( cmCtx_t* ctx, cmTakeSeqBldrH_t* hp );
  18. cmTsbRC_t cmTakeSeqBldrAllocFn( cmCtx_t* ctx, cmTakeSeqBldrH_t* hp, const cmChar_t* scoreTrkFn );
  19. cmTsbRC_t cmTakeSeqBldrFree( cmTakeSeqBldrH_t* hp );
  20. bool cmTakeSeqBldrIsValid( cmTakeSeqBldrH_t h );
  21. cmTsbRC_t cmTakeSeqBldrInitialize( cmTakeSeqBldrH_t h, const cmChar_t* scoreTrkFn );
  22. // Load a group of notes delinated by a time-line marker into the sequence.
  23. // If notes overlap with existing notes according to their 'scEvtIdx' attribute:
  24. // a. If 'overWriteFl' is set then the incoming overlapped notes are enabled
  25. // and the existing overlapped notes are disabled, otherwise the incoming
  26. // overlapped notes are disabled and the existing notes remain enabled.
  27. // b. The incoming section is time aligned with the first or last existing
  28. // note depending on whether the new section aligns best with the beginning
  29. // or ending of the existing notes.
  30. //
  31. // If no overlapping notes exist then the incoming section is aligned by estimating
  32. // the alignment with existing notes using the score alone.
  33. cmTsbRC_t cmTakeSeqBldrLoadTake( cmTakeSeqBldrH_t h, unsigned tlMarkUid, bool overwriteFL );
  34. cmTsbRC_t cmTakeSeqBldrUnloadTake( cmTakeSeqBldrH_t h, unsigned tlMarkUid );
  35. // Fill in missing notes from the score.
  36. cmTsbRC_t cmTakeSeqBldrInsertScoreNotes( cmTakeSeqBldrH_t h, unsigned begScEvtIdx, unsigned endScEvtId );
  37. cmTsbRC_t cmTakeSeqBldrRemoveScoreNotes( cmTakeSeqBldrH_t h, unsigned begScEvtIdx, unsigned endScEvtId );
  38. enum { kMarkTsbFl = 0x01, kTlNoteTsbFl=0x02, kScoreNoteTsbFl = 0x04, kPedalTsbFl = 0x08 };
  39. cmTsbRC_t cmTakeSeqBldrSelectEnable( cmTakeSeqBldrH_t h, unsigned flags, unsigned id, bool selectFl );
  40. cmTsbRC_t cmTakeSeqBldrEnableNote( cmTakeSeqBldrH_t h, unsigned ssqId, bool enableFl );
  41. cmTsbRC_t cmTakeSeqBldrMoveNote( cmTakeSeqBldrH_t h, unsigned ssqId, int deltaSmpIdx );
  42. cmTsbRC_t cmTakeSeqBldrWriteMidiFile( cmTakeSeqBldrH_t h, const char* fn );
  43. cmTsbRC_t cmTakeSeqBldrTest( cmCtx_t* ctx );
  44. #ifdef __cplusplus
  45. }
  46. #endif
  47. #endif