Browse Source

cmDspKr.c:Added 'rewind' command to _cmDspActiveMeas.

master
kevin 11 years ago
parent
commit
fbf2b570a9
1 changed files with 9 additions and 4 deletions
  1. 9
    4
      dsp/cmDspKr.c

+ 9
- 4
dsp/cmDspKr.c View File

903
     { "d1",    kD1SfId,       0, 0, kInDsvFl | kUIntDsvFl,                    "MIDI data byte 1"},
903
     { "d1",    kD1SfId,       0, 0, kInDsvFl | kUIntDsvFl,                    "MIDI data byte 1"},
904
     { "smpidx",kSmpIdxSfId,   0, 0, kInDsvFl | kUIntDsvFl,                    "MIDI time tag as a sample index"},
904
     { "smpidx",kSmpIdxSfId,   0, 0, kInDsvFl | kUIntDsvFl,                    "MIDI time tag as a sample index"},
905
     { "cmd",   kCmdSfId,      0, 0, kInDsvFl | kSymDsvFl,                     "Command input: print | quiet"},
905
     { "cmd",   kCmdSfId,      0, 0, kInDsvFl | kSymDsvFl,                     "Command input: print | quiet"},
906
-    { "out",   kOutSfId,      0, 0, kOutDsvFl| kUIntDsvFl,                    "Current score index."},
906
+    { "out",   kOutSfId,      0, 0, kOutDsvFl| kUIntDsvFl,                    "Current score location index."},
907
     { "dyn",   kDynSfId,      0, 0, kOutDsvFl| kDoubleDsvFl,                  "Dynamic value."},
907
     { "dyn",   kDynSfId,      0, 0, kOutDsvFl| kDoubleDsvFl,                  "Dynamic value."},
908
     { "even",  kEvenSfId,     0, 0, kOutDsvFl| kDoubleDsvFl,                  "Evenness value."},
908
     { "even",  kEvenSfId,     0, 0, kOutDsvFl| kDoubleDsvFl,                  "Evenness value."},
909
     { "tempo", kTempoSfId,    0, 0, kOutDsvFl| kDoubleDsvFl,                  "Tempo value."},
909
     { "tempo", kTempoSfId,    0, 0, kOutDsvFl| kDoubleDsvFl,                  "Tempo value."},
1660
   cmDspInst_t            inst;
1660
   cmDspInst_t            inst;
1661
   unsigned               addSymId;
1661
   unsigned               addSymId;
1662
   unsigned               clearSymId;
1662
   unsigned               clearSymId;
1663
-  unsigned               printSymId;    
1663
+  unsigned               printSymId;
1664
+  unsigned               rewindSymId;
1664
   cmDspActiveMeasRecd_t* array; // array[cnt]
1665
   cmDspActiveMeasRecd_t* array; // array[cnt]
1665
   unsigned               cnt;   
1666
   unsigned               cnt;   
1666
   unsigned               nextEmptyIdx;
1667
   unsigned               nextEmptyIdx;
1678
     { "type",     kTypeAmId,     0,0, kInDsvFl  | kUIntDsvFl,    "Meas. Type." },
1679
     { "type",     kTypeAmId,     0,0, kInDsvFl  | kUIntDsvFl,    "Meas. Type." },
1679
     { "val",      kValueAmId,    0,0, kInDsvFl  | kDoubleDsvFl,  "Meas. Value."},
1680
     { "val",      kValueAmId,    0,0, kInDsvFl  | kDoubleDsvFl,  "Meas. Value."},
1680
     { "cst",      kCstAmId,      0,0, kInDsvFl  | kDoubleDsvFl,  "Meas. Cost."},
1681
     { "cst",      kCstAmId,      0,0, kInDsvFl  | kDoubleDsvFl,  "Meas. Cost."},
1681
-    { "cmd",      kCmdAmId,      0,0, kInDsvFl  | kSymDsvFl,     "Commands:add | clear | print"}, 
1682
+    { "cmd",      kCmdAmId,      0,0, kInDsvFl  | kSymDsvFl,     "Commands:add | clear | dump | rewind"}, 
1682
     { "even",     kEvenAmId,     0,0, kOutDsvFl | kDoubleDsvFl,  "Even out"},
1683
     { "even",     kEvenAmId,     0,0, kOutDsvFl | kDoubleDsvFl,  "Even out"},
1683
     { "dyn",      kDynAmId,      0,0, kOutDsvFl | kDoubleDsvFl,  "Dyn out"},
1684
     { "dyn",      kDynAmId,      0,0, kOutDsvFl | kDoubleDsvFl,  "Dyn out"},
1684
     { "tempo",    kTempoAmId,    0,0, kOutDsvFl | kDoubleDsvFl,  "Tempo out"},
1685
     { "tempo",    kTempoAmId,    0,0, kOutDsvFl | kDoubleDsvFl,  "Tempo out"},
1692
 
1693
 
1693
   p->addSymId   = cmSymTblRegisterStaticSymbol(ctx->stH,"add");
1694
   p->addSymId   = cmSymTblRegisterStaticSymbol(ctx->stH,"add");
1694
   p->clearSymId = cmSymTblRegisterStaticSymbol(ctx->stH,"clear");
1695
   p->clearSymId = cmSymTblRegisterStaticSymbol(ctx->stH,"clear");
1695
-  p->printSymId = cmSymTblRegisterStaticSymbol(ctx->stH,"print");
1696
+  p->printSymId = cmSymTblRegisterStaticSymbol(ctx->stH,"dump");
1697
+  p->rewindSymId= cmSymTblRegisterStaticSymbol(ctx->stH,"rewind");
1696
 
1698
 
1697
   cmDspSetDefaultUInt(  ctx,&p->inst,kCntAmId,  0,100);
1699
   cmDspSetDefaultUInt(  ctx,&p->inst,kCntAmId,  0,100);
1698
   cmDspSetDefaultDouble(ctx,&p->inst,kEvenAmId, 0,0);
1700
   cmDspSetDefaultDouble(ctx,&p->inst,kEvenAmId, 0,0);
1821
         else
1823
         else
1822
           if( cmdSymId == p->printSymId )
1824
           if( cmdSymId == p->printSymId )
1823
             rc = _cmDspActiveMeasPrint(ctx,p);
1825
             rc = _cmDspActiveMeasPrint(ctx,p);
1826
+          else
1827
+            if(cmdSymId == p->rewindSymId )
1828
+              p->nextFullIdx = 0;
1824
       }
1829
       }
1825
       break;
1830
       break;
1826
 
1831
 

Loading…
Cancel
Save