12 #define MUSICNOTELIB_API __declspec(dllexport)
20 LPFNTRACEPROC lpfnTraceProc;
21 LPFNERRORPROC lpfnErrorProc;
28 pCallbackData->lpfnTraceProc(pCallbackData->lpUserData, pEvArgs->
szTraceMsg);
33 const PARSETRACEARGS* pCallbackData = (
const PARSETRACEARGS*) pParser->GetUserData();
34 pCallbackData->lpfnErrorProc(pCallbackData->lpUserData, pEvArgs->
errCode, pEvArgs->
szErrMsg, pEvArgs->
szToken);
74 LPFNTRACEPROC traceCallbackProc,
75 LPFNERRORPROC errorCallbackProc,
79 callbackArgs.lpfnTraceProc = traceCallbackProc;
80 callbackArgs.lpfnErrorProc = errorCallbackProc;
81 callbackArgs.lpUserData = pCallbackData;
84 playerObj.
Parser().SetUserData(&callbackArgs);
87 return playerObj.
Play(szNotes);
92 Player playerObj(nMidiOutPortID, nTimerResMS);
93 return playerObj.
Play(szMusicNotes);
98 unsigned int nTimerResMS,
99 LPFNTRACEPROC traceCallbackProc,
100 LPFNERRORPROC errorCallbackProc,
104 callbackArgs.lpfnTraceProc = traceCallbackProc;
105 callbackArgs.lpfnErrorProc = errorCallbackProc;
106 callbackArgs.lpUserData = pCallbackData;
108 Player playerObj(nMidiOutPortID, nTimerResMS);
109 playerObj.
Parser().SetUserData(&callbackArgs);
112 return playerObj.
Play(szMusicNotes);
MUSICNOTELIB_API bool PlayMusicString(const TCHAR *szMusicNotes)
MUSICNOTELIB_API MStringPlayer * CreateMusicStringPlayer()
Implements a MusicString Parsing functionality
bool Play(const MString &strMusicNotes)
MIDI Player for Music Strings
OIL::CEventT< const CParser, TraceEventHandlerArgs > evTrace
Raised by Parser during the Parsing.
OIL::CEventT< const CParser, ErrorEventHandlerArgs > evError
Raised when a parse error happens.
const TCHAR * szToken
Token the error is applicable for.
Main header file for accessing the CFugue Library.
const ErrorCode errCode
Error Code.
const TCHAR * szTraceMsg
The Error message sent by Parser.
Base class that represents a Parser Object.
bool SaveAsMidiFile(const MString &strMusicNotes, const char *szOutputFilePath)
MusicStringParser & Parser()
Returns the associated Parser object.
MUSICNOTELIB_API bool PlayMusicStringWithOpts(const TCHAR *szMusicNotes, int nMidiOutPortID, unsigned int nTimerResMS)
const TCHAR * szErrMsg
The Error message sent by Parser.
MUSICNOTELIB_API bool PlayMusicStringCB(const TCHAR *szMusicNotes, LPFNTRACEPROC traceCallbackProc, LPFNERRORPROC errorCallbackProc, void *pUserData)
MUSICNOTELIB_API bool PlayMusicStringWithOptsCB(const TCHAR *szMusicNotes, int nMidiOutPortID, unsigned int nTimerResMS, LPFNTRACEPROC traceCallbackProc, LPFNERRORPROC errorCallbackProc, void *pUserData)
MUSICNOTELIB_API bool SaveAsMidiFile(const TCHAR *szMusicNotes, const char *szOutputFilePath)