Browse Source

cmMidiFile.h : Added cmMidiFileIs???() macros.

master
kevin 8 years ago
parent
commit
ade31a2e79
1 changed files with 9 additions and 1 deletions
  1. 9
    1
      cmMidiFile.h

+ 9
- 1
cmMidiFile.h View File

88
     } u;
88
     } u;
89
   } cmMidiTrackMsg_t;
89
   } cmMidiTrackMsg_t;
90
 
90
 
91
+#define cmMidiFileIsNoteOn(m)         (cmMidiIsNoteOn((m)->status) && (m)->u.chMsgPtr->d1>0)
92
+#define cmMidiFileIsNoteOff(m)        (cmMidiIsNoteOff((m)->status,(m)->u.chMsgPtr->d1))
93
+#define cmMidiFileIsSustainPedal(m)   (cmMidiIsSustainPedal((m)->status,(m)->u.chMsgPtr->d0))
94
+#define cmMidiFileIsSostenutoPedal(m) (cmMidiIsSostenutoPedal((m)->status,(m)->u.chMsgPtr->d0))
95
+#define cmMidiFileIsPedalDown(m)      (cmMidiIsPedalDown((m)->status, (m)->u.chMsgPtr->d0, (m)->u.chMsgPtr->d1))
96
+#define cmMidiFileIsPedalUp(m)        (cmMidiIsPedalUp(  (m)->status, (m)->u.chMsgPtr->d0, (m)->u.chMsgPtr->d1))  
97
+  
91
   enum
98
   enum
92
   {
99
   {
93
     kOkMfRC = cmOkRC,    //  0
100
     kOkMfRC = cmOkRC,    //  0
101
     kMissingNoteOffMfRC, //  8
108
     kMissingNoteOffMfRC, //  8
102
     kInvalidStatusMfRC,  //  9
109
     kInvalidStatusMfRC,  //  9
103
     kSustainPedalMfRC,   // 10
110
     kSustainPedalMfRC,   // 10
104
-    kLargeDeltaTickMfRC  // 11 (a large delta tick value was filtered)
111
+    kSostenutoPedalMfRC, // 11
112
+    kLargeDeltaTickMfRC  // 12 (a large delta tick value was filtered)
105
   };
113
   };
106
 
114
 
107
   extern cmMidiFileH_t cmMidiFileNullHandle;
115
   extern cmMidiFileH_t cmMidiFileNullHandle;

Loading…
Cancel
Save