Browse Source

Added more variables to score GUI to reflect performance information.

master
kevin 12 years ago
parent
commit
6194c00c56
2 changed files with 62 additions and 13 deletions
  1. 45
    9
      src/kc/kcApp.cpp
  2. 17
    4
      src/kc/kcApp.h

+ 45
- 9
src/kc/kcApp.cpp View File

1182
   {
1182
   {
1183
     _tlCtl = new tlCtl(_ctx,this,_menu,this);
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
   Fl_Widget* wdgt = cp->u.scor.tlctl->initScoreCtlr(x,y,w,h);
1189
   Fl_Widget* wdgt = cp->u.scor.tlctl->initScoreCtlr(x,y,w,h);
1217
           }
1218
           }
1218
           break;
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
         default:
1262
         default:
1221
           { assert(0); }
1263
           { assert(0); }
1222
       }
1264
       }
1748
 // that are waiting in the audio DSP msg queue.
1790
 // that are waiting in the audio DSP msg queue.
1749
 void kcApp::_getEngMsg()
1791
 void kcApp::_getEngMsg()
1750
 {
1792
 {
1751
-
1752
-
1753
   if( cmAdIfIsValid(_aiH) )
1793
   if( cmAdIfIsValid(_aiH) )
1754
   {
1794
   {
1755
     unsigned i;
1795
     unsigned i;
1878
   return _stopTimerFl==false || cmTsMp1cIsValid(_printqH);
1918
   return _stopTimerFl==false || cmTsMp1cIsValid(_printqH);
1879
 }
1919
 }
1880
 
1920
 
1881
-
1882
-
1883
-
1884
 void kcApp::_s_menu_cb(Fl_Widget *w, void *data) 
1921
 void kcApp::_s_menu_cb(Fl_Widget *w, void *data) 
1885
 { }
1922
 { }
1886
 
1923
 
1887
-
1888
 void kcApp::_s_tab_cb(Fl_Widget* w, void* data)
1924
 void kcApp::_s_tab_cb(Fl_Widget* w, void* data)
1889
 { ((kcApp*)data)->_tab_cb(w); }
1925
 { ((kcApp*)data)->_tab_cb(w); }
1890
 
1926
 
2014
 
2050
 
2015
     case kTmlnTypeId:
2051
     case kTmlnTypeId:
2016
       {
2052
       {
2017
-        instVarId = cp->u.text.varIdArray[ kTmlnSelArgIdx ];
2053
+        instVarId = cp->u.tmln.varIdArray[ kTmlnSelArgIdx ];
2018
         unsigned selMarkerId = cp->u.tmln.tlctl->timeLineSelectedMarkerId();
2054
         unsigned selMarkerId = cp->u.tmln.tlctl->timeLineSelectedMarkerId();
2019
         cmDsvSetUInt(&value, selMarkerId );
2055
         cmDsvSetUInt(&value, selMarkerId );
2020
       }
2056
       }
2022
 
2058
 
2023
     case kScorTypeId:
2059
     case kScorTypeId:
2024
       {
2060
       {
2025
-        instVarId = cp->u.text.varIdArray[ kScorSelArgIdx ];
2061
+        instVarId = cp->u.scor.varIdArray[ kScorSelArgIdx ];
2026
         unsigned selEleIdx = cp->u.scor.tlctl->scoreSelectedEleIndex();
2062
         unsigned selEleIdx = cp->u.scor.tlctl->scoreSelectedEleIndex();
2027
         cmDsvSetUInt(&value, selEleIdx );
2063
         cmDsvSetUInt(&value, selEleIdx );
2028
       }
2064
       }

+ 17
- 4
src/kc/kcApp.h View File

123
     kTmlnCursArgIdx= 3,
123
     kTmlnCursArgIdx= 3,
124
     kTmlnVarCnt    = 4,
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
   typedef struct scor_str
226
   typedef struct scor_str
219
   {
227
   {
220
     tlCtl*     tlctl;
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
     unsigned   varIdArray[ kScorVarCnt ];
235
     unsigned   varIdArray[ kScorVarCnt ];
223
   } scor_t;
236
   } scor_t;
224
 
237
 

Loading…
Cancel
Save