|
@@ -4,16 +4,12 @@
|
4
|
4
|
#include "cmMidi.h"
|
5
|
5
|
|
6
|
6
|
|
7
|
|
-enum
|
8
|
|
-{
|
9
|
|
- mdStatusDescLabelCharCnt = 5
|
10
|
|
-};
|
11
|
7
|
|
12
|
8
|
typedef struct
|
13
|
9
|
{
|
14
|
10
|
cmMidiByte_t status;
|
15
|
11
|
cmMidiByte_t byteCnt;
|
16
|
|
- char label[ mdStatusDescLabelCharCnt+1 ];
|
|
12
|
+ const char* label;
|
17
|
13
|
} cmMidiStatusDesc;
|
18
|
14
|
|
19
|
15
|
cmMidiStatusDesc _cmMidiStatusDescArray[] =
|
|
@@ -72,6 +68,16 @@ cmMidiStatusDesc _cmMidiMetaStatusDescArray[] =
|
72
|
68
|
{ kInvalidMetaMdId, kInvalidMidiByte, "ERROR"}
|
73
|
69
|
};
|
74
|
70
|
|
|
71
|
+cmMidiStatusDesc _cmMidiPedalLabel[] =
|
|
72
|
+{
|
|
73
|
+ { kSustainCtlMdId, 0, "sustn" },
|
|
74
|
+ { kPortamentoCtlMdId, 0, "porta" },
|
|
75
|
+ { kSostenutoCtlMdId, 0, "sostn" },
|
|
76
|
+ { kSoftPedalCtlMdId, 0, "soft" },
|
|
77
|
+ { kLegatoCtlMdId, 0, "legat" },
|
|
78
|
+ { kInvalidMidiByte, kInvalidMidiByte, "ERROR"}
|
|
79
|
+};
|
|
80
|
+
|
75
|
81
|
//====================================================================================================
|
76
|
82
|
|
77
|
83
|
const char* cmMidiStatusToLabel( cmMidiByte_t status )
|
|
@@ -102,6 +108,16 @@ const char* cmMidiMetaStatusToLabel( cmMidiByte_t metaStatus )
|
102
|
108
|
return _cmMidiMetaStatusDescArray[i].label;
|
103
|
109
|
}
|
104
|
110
|
|
|
111
|
+const char* cmMidiPedalLabel( cmMidiByte_t d0 )
|
|
112
|
+{
|
|
113
|
+ int i;
|
|
114
|
+ for(i=0; _cmMidiPedalLabel[i].status != kInvalidMidiByte; ++i)
|
|
115
|
+ if( _cmMidiPedalLabel[i].status == d0 )
|
|
116
|
+ break;
|
|
117
|
+
|
|
118
|
+ return _cmMidiPedalLabel[i].label;
|
|
119
|
+}
|
|
120
|
+
|
105
|
121
|
cmMidiByte_t cmMidiStatusToByteCount( cmMidiByte_t status )
|
106
|
122
|
{
|
107
|
123
|
unsigned i;
|