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;