瀏覽代碼

Added more variables to score GUI to reflect performance information.

master
kevin 12 年之前
父節點
當前提交
6194c00c56
共有 2 個檔案被更改,包括 62 行新增13 行删除
  1. 45
    9
      src/kc/kcApp.cpp
  2. 17
    4
      src/kc/kcApp.h

+ 45
- 9
src/kc/kcApp.cpp 查看文件

@@ -1182,7 +1182,8 @@ void kcApp::_createScor(  const cmDspUiHdr_t* m )
1182 1182
   {
1183 1183
     _tlCtl = new tlCtl(_ctx,this,_menu,this);
1184 1184
 
1185
-    cp->u.scor.tlctl = _tlCtl; 
1185
+    cp->u.scor.tlctl  = _tlCtl; 
1186
+    cp->u.scor.smpIdx = cmInvalidIdx;
1186 1187
   }
1187 1188
 
1188 1189
   Fl_Widget* wdgt = cp->u.scor.tlctl->initScoreCtlr(x,y,w,h);
@@ -1217,6 +1218,47 @@ void kcApp::_setScorValue( ctl_t* cp, unsigned instVarId, const cmDspValue_t* vp
1217 1218
           }
1218 1219
           break;
1219 1220
 
1221
+        case kScorSmpIdxArgIdx:
1222
+          cp->u.scor.smpIdx = cmDsvUInt(vp);
1223
+          break;
1224
+
1225
+        case kScorPitchArgIdx:
1226
+          cp->u.scor.pitch = cmDsvUInt(vp);
1227
+          break;
1228
+
1229
+        case kScorVelArgIdx:
1230
+          cp->u.scor.vel = cmDsvUInt(vp);
1231
+          break;
1232
+
1233
+        case kScorEvtIdxArgIdx:
1234
+          cp->u.scor.evtIdx = cmDsvUInt(vp);
1235
+          break;
1236
+
1237
+        case kScorDynArgIdx:
1238
+          {
1239
+            assert(cp->u.scor.evtIdx!=cmInvalidIdx);
1240
+            _tlCtl->setScoreDynLevel(cp->u.scor.evtIdx,cmDsvUInt(vp));
1241
+            cp->u.scor.evtIdx = cmInvalidIdx;
1242
+          }
1243
+          break;
1244
+
1245
+        case kScorLocIdxArgIdx:
1246
+          {
1247
+            assert( cp->u.scor.smpIdx != cmInvalidIdx );
1248
+            cp->u.scor.locIdx = cmDsvUInt(vp);
1249
+            _tlCtl->setScoreLocation(cp->u.scor.locIdx,cp->u.scor.smpIdx,cp->u.scor.pitch,cp->u.scor.vel);
1250
+            cp->u.scor.smpIdx = cmInvalidIdx;
1251
+          }
1252
+          break;
1253
+
1254
+        case kScorValTypeArgIdx:
1255
+          cp->u.scor.varId = cmDsvUInt(vp);
1256
+          break;
1257
+
1258
+        case kScorValueArgIdx:
1259
+          _tlCtl->setScoreVarValue(cp->u.scor.locIdx,cp->u.scor.varId, cmDsvDouble(vp));
1260
+          break;
1261
+
1220 1262
         default:
1221 1263
           { assert(0); }
1222 1264
       }
@@ -1748,8 +1790,6 @@ void kcApp::_handleUiMsg( const cmDspUiHdr_t* m )
1748 1790
 // that are waiting in the audio DSP msg queue.
1749 1791
 void kcApp::_getEngMsg()
1750 1792
 {
1751
-
1752
-
1753 1793
   if( cmAdIfIsValid(_aiH) )
1754 1794
   {
1755 1795
     unsigned i;
@@ -1878,13 +1918,9 @@ bool kcApp::_status_timeout_cb()
1878 1918
   return _stopTimerFl==false || cmTsMp1cIsValid(_printqH);
1879 1919
 }
1880 1920
 
1881
-
1882
-
1883
-
1884 1921
 void kcApp::_s_menu_cb(Fl_Widget *w, void *data) 
1885 1922
 { }
1886 1923
 
1887
-
1888 1924
 void kcApp::_s_tab_cb(Fl_Widget* w, void* data)
1889 1925
 { ((kcApp*)data)->_tab_cb(w); }
1890 1926
 
@@ -2014,7 +2050,7 @@ void kcApp::_ctl_cb(ctl_t* cp)
2014 2050
 
2015 2051
     case kTmlnTypeId:
2016 2052
       {
2017
-        instVarId = cp->u.text.varIdArray[ kTmlnSelArgIdx ];
2053
+        instVarId = cp->u.tmln.varIdArray[ kTmlnSelArgIdx ];
2018 2054
         unsigned selMarkerId = cp->u.tmln.tlctl->timeLineSelectedMarkerId();
2019 2055
         cmDsvSetUInt(&value, selMarkerId );
2020 2056
       }
@@ -2022,7 +2058,7 @@ void kcApp::_ctl_cb(ctl_t* cp)
2022 2058
 
2023 2059
     case kScorTypeId:
2024 2060
       {
2025
-        instVarId = cp->u.text.varIdArray[ kScorSelArgIdx ];
2061
+        instVarId = cp->u.scor.varIdArray[ kScorSelArgIdx ];
2026 2062
         unsigned selEleIdx = cp->u.scor.tlctl->scoreSelectedEleIndex();
2027 2063
         cmDsvSetUInt(&value, selEleIdx );
2028 2064
       }

+ 17
- 4
src/kc/kcApp.h 查看文件

@@ -123,9 +123,17 @@ private:
123 123
     kTmlnCursArgIdx= 3,
124 124
     kTmlnVarCnt    = 4,
125 125
 
126
-    kScorFileArgIdx = 0,
127
-    kScorSelArgIdx  = 1,
128
-    kScorVarCnt     = 2
126
+    kScorFileArgIdx    = 0,
127
+    kScorSelArgIdx     = 1,
128
+    kScorSmpIdxArgIdx  = 2,
129
+    kScorPitchArgIdx   = 3,
130
+    kScorVelArgIdx     = 4,
131
+    kScorLocIdxArgIdx  = 5,
132
+    kScorEvtIdxArgIdx  = 6,
133
+    kScorDynArgIdx     = 7,
134
+    kScorValTypeArgIdx = 8,
135
+    kScorValueArgIdx   = 9,
136
+    kScorVarCnt        = 10
129 137
 
130 138
   }; 
131 139
 
@@ -218,7 +226,12 @@ private:
218 226
   typedef struct scor_str
219 227
   {
220 228
     tlCtl*     tlctl;
221
-    char*      val;
229
+    unsigned   smpIdx;
230
+    unsigned   pitch;
231
+    unsigned   vel;
232
+    unsigned   evtIdx;
233
+    unsigned   locIdx;
234
+    unsigned   varId;
222 235
     unsigned   varIdArray[ kScorVarCnt ];
223 236
   } scor_t;
224 237
 

Loading…
取消
儲存