From 0a71501780552c67874b03ad8d241c739caf2d9a Mon Sep 17 00:00:00 2001 From: kevin Date: Wed, 18 Dec 2013 10:01:47 -0500 Subject: [PATCH] cmDspKr.c : Added 'cmd' input to cmDspScore object to print score location report upon reception of 'dump' symbol. f --- dsp/cmDspKr.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/dsp/cmDspKr.c b/dsp/cmDspKr.c index 7d12a7c..9a14f8f 100644 --- a/dsp/cmDspKr.c +++ b/dsp/cmDspKr.c @@ -473,6 +473,7 @@ enum kD1ScId, kSmpIdxScId, kLocIdxScId, + kCmdScId, kEvtIdxScId, kDynScId, kValTypeScId, @@ -486,6 +487,7 @@ typedef struct cmDspInst_t inst; cmScH_t scH; cmDspCtx_t* ctx; // temporary ctx ptr used during cmScore callback in _cmDspScoreRecv() + unsigned printSymId; } cmDspScore_t; cmDspInst_t* _cmDspScoreAlloc(cmDspCtx_t* ctx, cmDspClass_t* classPtr, unsigned storeSymId, unsigned instSymId, unsigned id, unsigned va_cnt, va_list vl ) @@ -500,6 +502,7 @@ cmDspInst_t* _cmDspScoreAlloc(cmDspCtx_t* ctx, cmDspClass_t* classPtr, unsigned { "d1", kD1ScId, 0, 0, kInDsvFl | kUIntDsvFl, "Performed MIDI msg data byte 1" }, { "smpidx", kSmpIdxScId, 0, 0, kInDsvFl | kUIntDsvFl, "Performed MIDi msg time tag as a sample index." }, { "loc", kLocIdxScId, 0, 0, kInDsvFl | kUIntDsvFl, "Performance score location."}, + { "cmd", kCmdScId, 0, 0, kInDsvFl | kSymDsvFl, "cmd: dump "}, { "evtidx", kEvtIdxScId, 0, 0, kOutDsvFl | kUIntDsvFl, "Performed event index of following dynamcis level."}, { "dyn", kDynScId, 0, 0, kOutDsvFl | kUIntDsvFl, "Dynamic level of previous event index."}, { "type", kValTypeScId,0, 0, kOutDsvFl | kUIntDsvFl, "Output variable type."}, @@ -511,6 +514,8 @@ cmDspInst_t* _cmDspScoreAlloc(cmDspCtx_t* ctx, cmDspClass_t* classPtr, unsigned cmDspSetDefaultUInt( ctx, &p->inst, kSelScId, 0, cmInvalidId); + p->printSymId = cmSymTblRegisterStaticSymbol(ctx->stH,"dump"); + // create the UI control cmDspUiScoreCreate(ctx,&p->inst,kFnScId,kSelScId,kSmpIdxScId,kD0ScId,kD1ScId,kLocIdxScId,kEvtIdxScId,kDynScId,kValTypeScId,kValueScId); @@ -621,6 +626,11 @@ cmDspRC_t _cmDspScoreRecv(cmDspCtx_t* ctx, cmDspInst_t* inst, const cmDspEvt_t* } break; + case kCmdScId: + if( cmDspSymbol(inst,kCmdScId) == p->printSymId ) + cmScorePrintLoc(p->scH); + break; + } return kOkDspRC;