From 39021c4c3bddb1221d126c37072babc89d28a949 Mon Sep 17 00:00:00 2001 From: Kevin Larke Date: Wed, 25 Feb 2015 15:19:44 -0800 Subject: [PATCH] cmDspKr.c : Added 'muid' as in input to cmDspScFol to accept a unique identifier for each incoming MIDI message. This is then used as the 'muid' arg. to cmScMatcherExec() to support definitively matching score events and particular MIDI events. --- dsp/cmDspKr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dsp/cmDspKr.c b/dsp/cmDspKr.c index 887de27..af421d7 100644 --- a/dsp/cmDspKr.c +++ b/dsp/cmDspKr.c @@ -889,6 +889,7 @@ enum kMinVelSfId, kMeasflSfId, kIndexSfId, + kMuidSfId, kStatusSfId, kD0SfId, kD1SfId, @@ -935,6 +936,7 @@ cmDspInst_t* _cmDspScFolAlloc(cmDspCtx_t* ctx, cmDspClass_t* classPtr, unsigned { "minvel",kMinVelSfId, 0, 0, kInDsvFl | kUIntDsvFl | kOptArgDsvFl, "Minimum velocity."}, { "measfl",kMeasflSfId, 0, 0, kInDsvFl | kBoolDsvFl | kOptArgDsvFl, "Enable measurements"}, { "index", kIndexSfId, 0, 0, kInDsvFl | kUIntDsvFl, "Tracking start location."}, + { "muid", kMuidSfId, 0, 0, kInDsvFl | kUIntDsvFl, "MIDI msg file unique id"}, { "status",kStatusSfId, 0, 0, kInDsvFl | kUIntDsvFl, "MIDI status byte"}, { "d0", kD0SfId, 0, 0, kInDsvFl | kUIntDsvFl, "MIDI data byte 0"}, { "d1", kD1SfId, 0, 0, kInDsvFl | kUIntDsvFl, "MIDI data byte 1"}, @@ -1142,7 +1144,7 @@ cmDspRC_t _cmDspScFolRecv(cmDspCtx_t* ctx, cmDspInst_t* inst, const cmDspEvt_t* p->sfp->cbArg = &p->arg; // this call may result in a callback to _cmScFolMatcherCb() - if( cmScMatcherExec(p->sfp, cmDspUInt(inst,kSmpIdxSfId), cmDspUInt(inst,kStatusSfId), cmDspUInt(inst,kD0SfId), cmDspUInt(inst,kD1SfId), &scLocIdx) == cmOkRC ) + if( cmScMatcherExec(p->sfp, cmDspUInt(inst,kSmpIdxSfId), cmDspUInt(inst,kMuidSfId), cmDspUInt(inst,kStatusSfId), cmDspUInt(inst,kD0SfId), cmDspUInt(inst,kD1SfId), &scLocIdx) == cmOkRC ) if( scLocIdx != cmInvalidIdx ) { // It is possible that the internal score follower may go backwards.