Browse Source

cmDspPgmKr.c:Inital insert of 'Active Meas' in cmDspSysPgm_TimeLine.

master
kpl 11 years ago
parent
commit
55c2b254c6
1 changed files with 16 additions and 1 deletions
  1. 16
    1
      dsp/cmDspPgmKr.c

+ 16
- 1
dsp/cmDspPgmKr.c View File

39
   const cmChar_t* audPath;
39
   const cmChar_t* audPath;
40
   const cmChar_t* scFn;
40
   const cmChar_t* scFn;
41
   const cmChar_t* modFn;
41
   const cmChar_t* modFn;
42
+  const cmChar_t* measFn;
42
 } krRsrc_t;
43
 } krRsrc_t;
43
 
44
 
44
 cmDspRC_t krLoadRsrc(cmDspSysH_t h, cmErr_t* err, krRsrc_t* r)
45
 cmDspRC_t krLoadRsrc(cmDspSysH_t h, cmErr_t* err, krRsrc_t* r)
51
   cmDspRsrcString(h,&r->audPath,"tlAudioFilePath", NULL);
52
   cmDspRsrcString(h,&r->audPath,"tlAudioFilePath", NULL);
52
   cmDspRsrcString(h,&r->scFn,   "scoreFn",         NULL);
53
   cmDspRsrcString(h,&r->scFn,   "scoreFn",         NULL);
53
   cmDspRsrcString(h,&r->modFn,  "modFn",           NULL);
54
   cmDspRsrcString(h,&r->modFn,  "modFn",           NULL);
55
+  cmDspRsrcString(h,&r->measFn, "measFn",          NULL);
54
 
56
 
55
   if((rc = cmDspSysLastRC(h)) != kOkDspRC )
57
   if((rc = cmDspSysLastRC(h)) != kOkDspRC )
56
     cmErrMsg(err,rc,"A KR DSP resource load failed.");
58
     cmErrMsg(err,rc,"A KR DSP resource load failed.");
104
   cmDspInst_t* mfp  = cmDspSysAllocInst(h,"MidiFilePlay",NULL,  0 );
106
   cmDspInst_t* mfp  = cmDspSysAllocInst(h,"MidiFilePlay",NULL,  0 );
105
   //cmDspInst_t* mip  = cmDspSysAllocInst(h,"MidiIn",      NULL,  0 );
107
   //cmDspInst_t* mip  = cmDspSysAllocInst(h,"MidiIn",      NULL,  0 );
106
   cmDspInst_t* sfp  = cmDspSysAllocInst(h,"ScFol",       NULL,  1, r.scFn );
108
   cmDspInst_t* sfp  = cmDspSysAllocInst(h,"ScFol",       NULL,  1, r.scFn );
109
+  cmDspInst_t* amp  = cmDspSysAllocInst(h,"ActiveMeas",  NULL,  1, 100 );
107
   cmDspInst_t* modp = cmDspSysAllocInst(h,"ScMod",       NULL,  2, r.modFn, "m1" );
110
   cmDspInst_t* modp = cmDspSysAllocInst(h,"ScMod",       NULL,  2, r.modFn, "m1" );
108
 
111
 
109
   cmDspInst_t* even_sr  = cmDspSysAllocInst(h, "ScaleRange",  NULL,  4,  0.8,   1.1, 0.0, 1.0 );
112
   cmDspInst_t* even_sr  = cmDspSysAllocInst(h, "ScaleRange",  NULL,  4,  0.8,   1.1, 0.0, 1.0 );
157
   cmDspSysInstallCb(   h, recallBtn, "sym", preset, "cmd", NULL );
160
   cmDspSysInstallCb(   h, recallBtn, "sym", preset, "cmd", NULL );
158
   
161
   
159
 
162
 
160
-  cmDspInst_t* adir = cmDspSysAllocInst(h,"Fname",  "audDir",   3, true,NULL,r.audPath);
163
+  cmDspInst_t* adir    = cmDspSysAllocInst(   h, "Fname",  "audDir",   3, true,NULL,r.audPath);
164
+  cmDspInst_t* clrBtn  = cmDspSysAllocButton( h, "clear",  0);
165
+  cmDspInst_t* prtBtn  = cmDspSysAllocButton( h, "print",  0);
166
+  cmDspInst_t* mlst    = cmDspSysAllocInst(   h, "MsgList",   NULL, 3, "meas", r.measFn, 2);
167
+  cmDspInst_t* addSym  = cmDspSysAllocInst(   h, "PortToSym", NULL, 1, "add" );  
168
+
169
+  cmDspSysInstallCb( h, clrBtn, "sym",   amp, "cmd",  NULL );
170
+  cmDspSysInstallCb( h, prtBtn, "sym",   amp, "cmd",  NULL );
171
+  cmDspSysInstallCb( h, addSym, "out-1", amp, "cmd",  NULL );
172
+  cmDspSysInstallCb( h, mlst,   "loc",    amp, "loc", NULL );
173
+  cmDspSysInstallCb( h, mlst,   "typeId", amp, "type",NULL );
174
+  cmDspSysInstallCb( h, mlst,   "val",    amp, "val", NULL );
175
+  cmDspSysInstallCb( h, mlst,   "cost",   amp, "cst", NULL );
161
 
176
 
162
   cmDspSysNewColumn(h,0);
177
   cmDspSysNewColumn(h,0);
163
 
178
 

Loading…
Cancel
Save