From ade31a2e79603e688bb47ca29b7283c14125fc5d Mon Sep 17 00:00:00 2001 From: kevin Date: Thu, 12 May 2016 19:04:55 -0400 Subject: [PATCH] cmMidiFile.h : Added cmMidiFileIs???() macros. --- cmMidiFile.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/cmMidiFile.h b/cmMidiFile.h index b65dd8a..6bb4f0c 100644 --- a/cmMidiFile.h +++ b/cmMidiFile.h @@ -88,6 +88,13 @@ extern "C" { } u; } cmMidiTrackMsg_t; +#define cmMidiFileIsNoteOn(m) (cmMidiIsNoteOn((m)->status) && (m)->u.chMsgPtr->d1>0) +#define cmMidiFileIsNoteOff(m) (cmMidiIsNoteOff((m)->status,(m)->u.chMsgPtr->d1)) +#define cmMidiFileIsSustainPedal(m) (cmMidiIsSustainPedal((m)->status,(m)->u.chMsgPtr->d0)) +#define cmMidiFileIsSostenutoPedal(m) (cmMidiIsSostenutoPedal((m)->status,(m)->u.chMsgPtr->d0)) +#define cmMidiFileIsPedalDown(m) (cmMidiIsPedalDown((m)->status, (m)->u.chMsgPtr->d0, (m)->u.chMsgPtr->d1)) +#define cmMidiFileIsPedalUp(m) (cmMidiIsPedalUp( (m)->status, (m)->u.chMsgPtr->d0, (m)->u.chMsgPtr->d1)) + enum { kOkMfRC = cmOkRC, // 0 @@ -101,7 +108,8 @@ extern "C" { kMissingNoteOffMfRC, // 8 kInvalidStatusMfRC, // 9 kSustainPedalMfRC, // 10 - kLargeDeltaTickMfRC // 11 (a large delta tick value was filtered) + kSostenutoPedalMfRC, // 11 + kLargeDeltaTickMfRC // 12 (a large delta tick value was filtered) }; extern cmMidiFileH_t cmMidiFileNullHandle;