2016-03-24 16:12:54 +00:00
|
|
|
#ifndef cmScoreMatchGraphic_h
|
|
|
|
#define cmScoreMatchGraphic_h
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
kOkSmgRC = cmOkRC,
|
|
|
|
kFileSmgRC,
|
|
|
|
kScoreFailSmgRC,
|
2016-06-16 16:55:34 +00:00
|
|
|
kMidiFileFailSmgRC,
|
2016-06-29 23:11:17 +00:00
|
|
|
kOpFailSmgRC,
|
|
|
|
kMatchFailSmgRC
|
2016-03-24 16:12:54 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
typedef cmRC_t cmSmgRC_t;
|
|
|
|
typedef cmHandle_t cmSmgH_t;
|
|
|
|
|
|
|
|
extern cmSmgH_t cmSmgNullHandle;
|
|
|
|
|
|
|
|
cmSmgRC_t cmScoreMatchGraphicAlloc( cmCtx_t* ctx, cmSmgH_t* hp, const cmChar_t* scoreFn, const cmChar_t* midiFn );
|
|
|
|
cmSmgRC_t cmScoreMatchGraphicFree( cmSmgH_t* hp );
|
|
|
|
bool cmScoreMatchGraphicIsValid( cmSmgH_t h );
|
2016-03-24 23:22:39 +00:00
|
|
|
cmSmgRC_t cmScoreMatchGraphicInsertMidi( cmSmgH_t h, unsigned midiUid, unsigned midiPitch, unsigned midiVel, unsigned csvScoreEventId );
|
2016-03-24 16:12:54 +00:00
|
|
|
cmSmgRC_t cmScoreMatchGraphicWrite( cmSmgH_t h, const cmChar_t* fn );
|
2016-04-20 22:51:33 +00:00
|
|
|
|
|
|
|
// Generate a set of markers for use in a cmTimeLine file which forms a marked area
|
|
|
|
// beginning at each bar line and ends at the end of the file.
|
|
|
|
cmSmgRC_t cmScoreMatchGraphicGenTimeLineBars( cmSmgH_t h, const cmChar_t* fn, unsigned srate );
|
2016-06-16 16:55:34 +00:00
|
|
|
|
|
|
|
// Update the MIDI file velocity values and insert pedal events
|
|
|
|
// from from score into MIDI file and then write the updated MIDI
|
|
|
|
// file to 'newMidiFn'.
|
|
|
|
cmSmgRC_t cmScoreMatchGraphicUpdateMidiFromScore( cmCtx_t* ctx, cmSmgH_t h, const cmChar_t* newMidiFn );
|
2016-03-24 16:12:54 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|