libcm/app/cmXScore.h

71 lines
1.9 KiB
C
Raw Normal View History

#ifndef cmXScore_h
#define cmXScore_h
#ifdef __cplusplus
extern "C" {
#endif
enum
{
kOkXsRC = cmOkRC,
kXmlFailXsRC,
kLHeapFailXsRC,
kSyntaxErrorXsRC,
2016-02-12 00:23:42 +00:00
kCsvFailXsRC,
kUnterminatedTieXsRC,
kUnterminatedSlurXsRC,
kUnterminatedOctaveShiftXsrRC,
kPedalStateErrorXsRc,
kMidiFailXsRC,
kFileFailXsRC,
kSvgFailXsRC,
kOverlapWarnXsRC,
kZeroLengthEventXsRC
};
typedef cmRC_t cmXsRC_t;
typedef cmHandle_t cmXsH_t;
extern cmXsH_t cmXsNullHandle;
// Prepare the MusicXML file:
//
// 1) Convert XML to UTF-8:
// a. Change: encoding = 'UTF-16' to encoding='UTF-8'
// b. Emacs C-x <RET> f utf-8 <RET>
// c. Change: <?xml ... encoding = 'UTF-16' to encoding='UTF-8' ...?>
//
// 2) Replace "DoletSibelius Unknown Symbol Index" with "DoletSibelius unknownSymIdx"
//
// Steps 1) and 2) can be automated by in emacs by:
2016-03-16 22:34:38 +00:00
//
// M-x load-file ~/src/emacs/proc_music_xml.el
2016-03-16 22:34:38 +00:00
//
// Initialize an cmXScore object from a Sibelius generated MusicXML file.
// Optionally include an 'edit' file to attach additional score information.
// Note that the 'edit' file is created by marking up a file created via
// cmXScoreReport().
cmXsRC_t cmXScoreInitialize( cmCtx_t* ctx, cmXsH_t* hp, const cmChar_t* xmlFn, const cmChar_t* editFn );
cmXsRC_t cmXScoreFinalize( cmXsH_t* hp );
bool cmXScoreIsValid( cmXsH_t h );
cmXsRC_t cmXScoreWriteCsv( cmXsH_t h, const cmChar_t* csvFn );
void cmXScoreReport( cmXsH_t h, cmRpt_t* rpt, bool sortFl );
cmXsRC_t cmXScoreGenEditFile( cmCtx_t* ctx, const cmChar_t* xmlFn, const cmChar_t* outFn );
// Generate the CSV file suitable for use by cmScore.
cmXsRC_t cmXScoreTest( cmCtx_t* ctx, const cmChar_t* xmlFn, const cmChar_t* reorderFn, const cmChar_t* csvOutFn, const cmChar_t* midiOutFn );
#ifdef __cplusplus
}
#endif
#endif