|
@@ -1092,7 +1092,8 @@ enum
|
1092
|
1092
|
kPortMoId,
|
1093
|
1093
|
kStatusMoId,
|
1094
|
1094
|
kD0MoId,
|
1095
|
|
- kD1MoId
|
|
1095
|
+ kD1MoId,
|
|
1096
|
+ kResetMoId
|
1096
|
1097
|
};
|
1097
|
1098
|
|
1098
|
1099
|
cmDspClass_t _cmMidiOutDC;
|
|
@@ -1142,6 +1143,7 @@ cmDspInst_t* _cmDspMidiOutAlloc(cmDspCtx_t* ctx, cmDspClass_t* classPtr, unsign
|
1142
|
1143
|
{ "status", kStatusMoId, 0, 0, kInDsvFl | kUIntDsvFl, "MIDI status" },
|
1143
|
1144
|
{ "d0", kD0MoId, 0, 0, kInDsvFl | kUIntDsvFl, "MIDI channel message d0" },
|
1144
|
1145
|
{ "d1", kD1MoId, 0, 0, kInDsvFl | kUIntDsvFl, "MIDI channel message d1" },
|
|
1146
|
+ { "reset", kResetMoId, 0, 0, kInDsvFl | kTypeDsvMask,"All notes off" },
|
1145
|
1147
|
{ NULL, 0, 0, 0, 0 }
|
1146
|
1148
|
};
|
1147
|
1149
|
|
|
@@ -1195,6 +1197,19 @@ cmDspRC_t _cmDspMidiOutRecv(cmDspCtx_t* ctx, cmDspInst_t* inst, const cmDspEvt_t
|
1195
|
1197
|
}
|
1196
|
1198
|
break;
|
1197
|
1199
|
|
|
1200
|
+ case kResetMoId:
|
|
1201
|
+ {
|
|
1202
|
+ unsigned i;
|
|
1203
|
+
|
|
1204
|
+ for(i=0; i<kMidiChCnt; ++i)
|
|
1205
|
+ {
|
|
1206
|
+ cmMpDeviceSend(p->devIdx,p->portIdx,kCtlMdId,121,0); // reset all controllers
|
|
1207
|
+ cmMpDeviceSend(p->devIdx,p->portIdx,kCtlMdId,123,0); // turn all notes off
|
|
1208
|
+ cmSleepMs(15);
|
|
1209
|
+ }
|
|
1210
|
+ }
|
|
1211
|
+ break;
|
|
1212
|
+
|
1198
|
1213
|
default:
|
1199
|
1214
|
cmDspSetEvent(ctx,inst,evt);
|
1200
|
1215
|
break;
|