libcm is a C development framework with an emphasis on audio signal processing applications.
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

cmDspPgmKrTksb.c 63KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186
  1. #include "cmPrefix.h"
  2. #include "cmGlobal.h"
  3. #include "cmFloatTypes.h"
  4. #include "cmRpt.h"
  5. #include "cmErr.h"
  6. #include "cmCtx.h"
  7. #include "cmMem.h"
  8. #include "cmMallocDebug.h"
  9. #include "cmLinkedHeap.h"
  10. #include "cmText.h"
  11. #include "cmFileSys.h"
  12. #include "cmSymTbl.h"
  13. #include "cmJson.h"
  14. #include "cmPrefs.h"
  15. #include "cmDspValue.h"
  16. #include "cmMsgProtocol.h"
  17. #include "cmThread.h"
  18. #include "cmUdpPort.h"
  19. #include "cmUdpNet.h"
  20. #include "cmSerialPort.h"
  21. #include "cmTime.h"
  22. #include "cmAudioSys.h"
  23. #include "cmProcObj.h"
  24. #include "cmDspCtx.h"
  25. #include "cmDspClass.h"
  26. #include "cmDspSys.h"
  27. #include "cmDspPgm.h"
  28. #include "cmAudioFile.h"
  29. #include "cmProcObj.h"
  30. #include "cmProc.h"
  31. #include "cmProc3.h"
  32. #include "cmVectOpsTemplateMain.h"
  33. #include "cmVectOps.h"
  34. #include "cmDspPgmKrChain.h"
  35. //( { label:cmDspPgm_Tksb file_desc:"Audio/MIDI sequencer for analyzing the score vs. the performance from user selected MIDI fragments and generating related audio transforms." kw:[spgm] }
  36. cmDspRC_t _cmDspSysPgm_Tksb(cmDspSysH_t h, void** userPtrPtr )
  37. {
  38. cmDspRC_t rc = kOkDspRC;
  39. cmCtx_t* cmCtx = cmDspSysPgmCtx(h);
  40. cmErr_t err;
  41. krRsrc_t r;
  42. bool fragFl = false;
  43. bool useWtFl = false;
  44. bool useChain1Fl = true;
  45. bool useInputEqFl = false;
  46. bool useInCompFl = true;
  47. unsigned sfBufCnt = 7; // length of the MIDI event buffer
  48. unsigned sfMaxWndCnt = 10; // length of the score event buffer
  49. unsigned sfMinVel = 5; // ignore MIDI events below this velocity
  50. bool sfEnaMeasFl = false;
  51. double recdPlayInitAllocSecs = 10.0;
  52. double recdPlayMaxLaSecs = 2.0;
  53. double recdPlayCurLaSecs = 0.1;
  54. double recdPlayFadeRateDbPerSec = 4.0;
  55. bool eqBypassFl = false;
  56. unsigned eqLpSymId = cmSymTblRegisterStaticSymbol(cmDspSysSymbolTable(h),"LP");
  57. double eqLpF0hz = 200.0;
  58. double eqLpQ = 0.5;
  59. double eqLpGain = 0.9;
  60. unsigned eqBpSymId = cmSymTblRegisterStaticSymbol(cmDspSysSymbolTable(h),"BP");
  61. double eqBpF0hz = 350.0;
  62. double eqBpQ = 0.6;
  63. double eqBpGain = 1.0;
  64. unsigned eqHpSymId = cmSymTblRegisterStaticSymbol(cmDspSysSymbolTable(h),"HP");
  65. double eqHpF0hz = 600.0;
  66. double eqHpQ = 0.5;
  67. double eqHpGain = 0.9;
  68. bool apfBypassFl = false;
  69. unsigned apfModeSymId = cmSymTblRegisterStaticSymbol(cmDspSysSymbolTable(h),"AP");
  70. double apfF0hz = 100.0;
  71. double apfQ = 1.0;
  72. double apfGain = 1.0;
  73. // input compressor default parameters
  74. bool cmpBypassFl = false;
  75. double cmpInGain = 3.0;
  76. double cmpThreshDb = -40.0;
  77. double cmpRatio_num = 5.0;
  78. double cmpAtkMs = 20.0;
  79. double cmpRlsMs = 100.0;
  80. double cmpMakeup = 1.0;
  81. double cmpWndMaxMs = 1000.0;
  82. double cmpWndMs = 200.0;
  83. memset(&r,0,sizeof(r));
  84. cmErrSetup(&err,&cmCtx->rpt,"Kr Timeline");
  85. if( krLoadRsrc(h,&err,&r) != kOkDspRC )
  86. return rc;
  87. cmDspInst_t* ai0p = cmDspSysAllocInst(h,"AudioIn", NULL, 1, 0);
  88. cmDspInst_t* ai1p = cmDspSysAllocInst(h,"AudioIn", NULL, 1, 1);
  89. cmDspInst_t* ai2p = cmDspSysAllocInst(h,"AudioIn", NULL, 1, 2);
  90. cmDspInst_t* ai3p = cmDspSysAllocInst(h,"AudioIn", NULL, 1, 3);
  91. cmDspInst_t* ec0 = cmDspSysAllocInst(h,"EchoCancel", NULL, 1, 0,1 );
  92. cmDspInst_t* ec1 = cmDspSysAllocInst(h,"EchoCancel", NULL, 1, 0,1 );
  93. cmDspInst_t* eqLpf_0 = useInputEqFl ? cmDspSysAllocInst(h,"BiQuadEq",NULL, 5, eqBypassFl, eqLpSymId,eqLpF0hz, eqLpQ, eqLpGain ) : NULL;
  94. cmDspInst_t* eqLpf_1 = useInputEqFl ? cmDspSysAllocInst(h,"BiQuadEq",NULL, 5, eqBypassFl, eqLpSymId,eqLpF0hz, eqLpQ, eqLpGain ) : NULL;
  95. cmDspInst_t* eqLpf_2 = useInputEqFl ? cmDspSysAllocInst(h,"BiQuadEq",NULL, 5, eqBypassFl, eqLpSymId,eqLpF0hz, eqLpQ, eqLpGain ) : NULL;
  96. cmDspInst_t* eqLpf_3 = useInputEqFl ? cmDspSysAllocInst(h,"BiQuadEq",NULL, 5, eqBypassFl, eqLpSymId,eqLpF0hz, eqLpQ, eqLpGain ) : NULL;
  97. cmDspInst_t* eqBpf_0 = useInputEqFl ? cmDspSysAllocInst(h,"BiQuadEq",NULL, 5, eqBypassFl, eqBpSymId,eqBpF0hz, eqBpQ, eqBpGain ) : NULL;
  98. cmDspInst_t* eqBpf_1 = useInputEqFl ? cmDspSysAllocInst(h,"BiQuadEq",NULL, 5, eqBypassFl, eqBpSymId,eqBpF0hz, eqBpQ, eqBpGain ) : NULL;
  99. cmDspInst_t* eqBpf_2 = useInputEqFl ? cmDspSysAllocInst(h,"BiQuadEq",NULL, 5, eqBypassFl, eqBpSymId,eqBpF0hz, eqBpQ, eqBpGain ) : NULL;
  100. cmDspInst_t* eqBpf_3 = useInputEqFl ? cmDspSysAllocInst(h,"BiQuadEq",NULL, 5, eqBypassFl, eqBpSymId,eqBpF0hz, eqBpQ, eqBpGain ) : NULL;
  101. cmDspInst_t* eqHpf_0 = useInputEqFl ? cmDspSysAllocInst(h,"BiQuadEq",NULL, 5, eqBypassFl, eqHpSymId,eqHpF0hz, eqHpQ, eqHpGain ) : NULL;
  102. cmDspInst_t* eqHpf_1 = useInputEqFl ? cmDspSysAllocInst(h,"BiQuadEq",NULL, 5, eqBypassFl, eqHpSymId,eqHpF0hz, eqHpQ, eqHpGain ) : NULL;
  103. cmDspInst_t* eqHpf_2 = useInputEqFl ? cmDspSysAllocInst(h,"BiQuadEq",NULL, 5, eqBypassFl, eqHpSymId,eqHpF0hz, eqHpQ, eqHpGain ) : NULL;
  104. cmDspInst_t* eqHpf_3 = useInputEqFl ? cmDspSysAllocInst(h,"BiQuadEq",NULL, 5, eqBypassFl, eqHpSymId,eqHpF0hz, eqHpQ, eqHpGain ) : NULL;
  105. double eqMixGain = 1.0/3.0;
  106. cmDspInst_t* eqMx_0 = useInputEqFl ? cmDspSysAllocInst( h, "AMix", NULL, 4, 3, eqMixGain, eqMixGain, eqMixGain) : NULL;
  107. cmDspInst_t* eqMx_1 = useInputEqFl ? cmDspSysAllocInst( h, "AMix", NULL, 4, 3, eqMixGain, eqMixGain, eqMixGain) : NULL;
  108. cmDspInst_t* eqMx_2 = useInputEqFl ? cmDspSysAllocInst( h, "AMix", NULL, 4, 3, eqMixGain, eqMixGain, eqMixGain) : NULL;
  109. cmDspInst_t* eqMx_3 = useInputEqFl ? cmDspSysAllocInst( h, "AMix", NULL, 4, 3, eqMixGain, eqMixGain, eqMixGain) : NULL;
  110. cmDspInst_t* mx0p = cmDspSysAllocInst( h, "AMix", NULL, 3, 2, 0.5, 0.5);
  111. cmDspInst_t* mx1p = cmDspSysAllocInst( h, "AMix", NULL, 3, 2, 0.5, 0.5);
  112. cmDspInst_t* ci0p = NULL;
  113. cmDspInst_t* ci1p = NULL;
  114. if( useInCompFl )
  115. {
  116. ci0p = cmDspSysAllocInst(h,"Compressor", NULL, 8, cmpBypassFl, cmpThreshDb, cmpRatio_num, cmpAtkMs, cmpRlsMs, cmpMakeup, cmpWndMs, cmpWndMaxMs );
  117. ci1p = cmDspSysAllocInst(h,"Compressor", NULL, 8, cmpBypassFl, cmpThreshDb, cmpRatio_num, cmpAtkMs, cmpRlsMs, cmpMakeup, cmpWndMs, cmpWndMaxMs );
  118. }
  119. cmDspInst_t* bldr = cmDspSysAllocInst( h,"TakeSeqBldr", NULL, 1, r.tksbFn );
  120. cmDspInst_t* rndr = cmDspSysAllocInst( h,"TakeSeqRend", NULL, 0 );
  121. cmDspInst_t* pts = cmDspSysAllocInst(h,"PortToSym", NULL, 2, "on", "off" );
  122. //cmDspInst_t* mip = cmDspSysAllocInst(h,"MidiIn", NULL, 0 );
  123. //cmDspInst_t* mfp = cmDspSysAllocInst(h,"MidiFilePlay",NULL, 0 );
  124. cmDspInst_t* nmp = cmDspSysAllocInst(h,"NanoMap", NULL, 0 );
  125. cmDspInst_t* mop = cmDspSysAllocInst(h,"MidiOut", NULL, 2, r.midiDevice,r.midiOutPort);
  126. cmDspInst_t* mo2p = cmDspSysAllocInst(h,"MidiOut", NULL, 2, r.midiDevice,r.midiOutPort2);
  127. cmDspInst_t* sfp = cmDspSysAllocInst(h,"ScFol", NULL, 1, r.scFn, sfBufCnt, sfMaxWndCnt, sfMinVel, sfEnaMeasFl );
  128. cmDspInst_t* amp = cmDspSysAllocInst(h,"ActiveMeas", NULL, 1, 100 );
  129. cmDspInst_t* rpp = cmDspSysAllocInst(h,"RecdPlay", NULL, 6, 2, r.scFn, recdPlayInitAllocSecs, recdPlayMaxLaSecs, recdPlayCurLaSecs, recdPlayFadeRateDbPerSec);
  130. cmDspInst_t* modp = cmDspSysAllocInst(h,"ScMod", NULL, 2, r.modFn, "m1" );
  131. cmDspInst_t* modr = cmDspSysAllocInst(h,"ScMod", NULL, 2, r.modFn, "m1" );
  132. unsigned preGrpSymId = cmDspSysPresetRegisterGroup(h,"tl");
  133. unsigned cmpPreGrpSymId = cmDspSysPresetRegisterGroup(h,"tl_cmp");
  134. cmDspTlXform_t c0,c1,c2,c3;
  135. cmDspSysNewPage(h,"Controls-0");
  136. _cmDspSys_TlXformChain(h, &c0, preGrpSymId, cmpPreGrpSymId, amp, modp, 0, 0 );
  137. if( useChain1Fl )
  138. {
  139. cmDspSysNewPage(h,"Controls-1");
  140. _cmDspSys_TlXformChain(h, &c1, preGrpSymId, cmpPreGrpSymId, amp, modp, 1, 1 );
  141. }
  142. cmDspInst_t* mix0 = NULL;
  143. cmDspInst_t* mix1 = NULL;
  144. if( fragFl )
  145. {
  146. cmDspSysNewPage(h,"Ctl-R/P-0");
  147. _cmDspSys_TlXformChain(h, &c2, preGrpSymId, cmpPreGrpSymId, amp, modr, 2, 0 );
  148. cmDspSysNewPage(h,"Ctl-R/P-1");
  149. _cmDspSys_TlXformChain(h, &c3, preGrpSymId, cmpPreGrpSymId, amp, modr, 3, 1 );
  150. mix0 = cmDspSysAllocInst(h,"AMix", NULL, 3, 2, 1.0, 1.0 );
  151. mix1 = cmDspSysAllocInst(h,"AMix", NULL, 3, 2, 1.0, 1.0 );
  152. }
  153. if( useInCompFl )
  154. {
  155. cmDspSysNewPage(h,"InComp");
  156. cmDspInst_t* cmp0_byp = cmDspSysAllocCheckP( h, cmpPreGrpSymId, NULL, ("0-Bypass"), 0.0 );
  157. cmDspInst_t* cmp0_igain = cmDspSysAllocScalarP( h, cmpPreGrpSymId, NULL, ("0-In Gain"), 0.0, 10.0, 0.1, cmpInGain);
  158. cmDspInst_t* cmp0_thr = cmDspSysAllocScalarP( h, cmpPreGrpSymId, NULL, ("0-ThreshDb"), -100.0, 0.0, 0.1, cmpThreshDb);
  159. cmDspInst_t* cmp0_rat = cmDspSysAllocScalarP( h, cmpPreGrpSymId, NULL, ("0-Ratio"), 0.1, 100, 0.1, cmpRatio_num);
  160. cmDspInst_t* cmp0_atk = cmDspSysAllocScalarP( h, cmpPreGrpSymId, NULL, ("0-Atk Ms"), 0.0, 1000.0, 0.1, cmpAtkMs);
  161. cmDspInst_t* cmp0_rls = cmDspSysAllocScalarP( h, cmpPreGrpSymId, NULL, ("0-Rls Ms"), 0.0, 1000.0, 0.1, cmpRlsMs);
  162. cmDspInst_t* cmp0_mkup = cmDspSysAllocScalarP( h, cmpPreGrpSymId, NULL, ("0-Makeup"), 0.0, 10.0, 0.01, cmpMakeup);
  163. cmDspInst_t* cmp0_wnd = cmDspSysAllocScalarP( h, cmpPreGrpSymId, NULL, ("0-Wnd Ms"), 1.0, cmpWndMaxMs, 1.0, cmpWndMs );
  164. cmDspInst_t* cmp0_mtr = cmDspSysAllocInst(h,"Meter",("0-Env"), 3, 0.0, 0.0, 1.0);
  165. cmDspSysInstallCb(h, cmp0_byp, "out", ci0p, "bypass", NULL );
  166. cmDspSysInstallCb(h, cmp0_igain,"val", ci0p, "igain", NULL );
  167. cmDspSysInstallCb(h, cmp0_thr, "val", ci0p, "thr", NULL );
  168. cmDspSysInstallCb(h, cmp0_rat, "val", ci0p, "ratio", NULL );
  169. cmDspSysInstallCb(h, cmp0_atk, "val", ci0p, "atk", NULL );
  170. cmDspSysInstallCb(h, cmp0_rls, "val", ci0p, "rls", NULL );
  171. cmDspSysInstallCb(h, cmp0_mkup, "val", ci0p, "ogain", NULL );
  172. cmDspSysInstallCb(h, cmp0_wnd, "val", ci0p, "wnd", NULL );
  173. cmDspSysInstallCb(h, ci0p, "env", cmp0_mtr, "in", NULL );
  174. cmDspSysNewColumn(h,0);
  175. cmDspInst_t* cmp1_byp = cmDspSysAllocCheckP( h, cmpPreGrpSymId, NULL, ("1-Bypass"), 0.0 );
  176. cmDspInst_t* cmp1_igain = cmDspSysAllocScalarP( h, cmpPreGrpSymId, NULL, ("1-In Gain"), 0.0, 10.0, 0.1, cmpInGain);
  177. cmDspInst_t* cmp1_thr = cmDspSysAllocScalarP( h, cmpPreGrpSymId, NULL, ("1-ThreshDb"), -100.0, 0.0, 0.1, cmpThreshDb);
  178. cmDspInst_t* cmp1_rat = cmDspSysAllocScalarP( h, cmpPreGrpSymId, NULL, ("1-Ratio"), 0.1, 100, 0.1, cmpRatio_num);
  179. cmDspInst_t* cmp1_atk = cmDspSysAllocScalarP( h, cmpPreGrpSymId, NULL, ("1-Atk Ms"), 0.0, 1000.0, 0.1, cmpAtkMs);
  180. cmDspInst_t* cmp1_rls = cmDspSysAllocScalarP( h, cmpPreGrpSymId, NULL, ("1-Rls Ms"), 0.0, 1000.0, 0.1, cmpRlsMs);
  181. cmDspInst_t* cmp1_mkup = cmDspSysAllocScalarP( h, cmpPreGrpSymId, NULL, ("1-Makeup"), 0.0, 10.0, 0.01, cmpMakeup);
  182. cmDspInst_t* cmp1_wnd = cmDspSysAllocScalarP( h, cmpPreGrpSymId, NULL, ("1-Wnd Ms"), 1.0, cmpWndMaxMs, 1.0, cmpWndMs );
  183. cmDspInst_t* cmp1_mtr = cmDspSysAllocInst(h,"Meter",("1-Env"), 3, 0.0, 0.0, 1.0);
  184. cmDspSysInstallCb(h, cmp1_byp, "out", ci1p, "bypass", NULL );
  185. cmDspSysInstallCb(h, cmp1_igain,"val", ci1p, "igain", NULL );
  186. cmDspSysInstallCb(h, cmp1_thr, "val", ci1p, "thr", NULL );
  187. cmDspSysInstallCb(h, cmp1_rat, "val", ci1p, "ratio", NULL );
  188. cmDspSysInstallCb(h, cmp1_atk, "val", ci1p, "atk", NULL );
  189. cmDspSysInstallCb(h, cmp1_rls, "val", ci1p, "rls", NULL );
  190. cmDspSysInstallCb(h, cmp1_mkup, "val", ci1p, "ogain", NULL );
  191. cmDspSysInstallCb(h, cmp1_wnd, "val", ci1p, "wnd", NULL );
  192. cmDspSysInstallCb(h, ci1p, "env", cmp1_mtr, "in", NULL );
  193. }
  194. cmDspInst_t* apf0 = cmDspSysAllocInst(h,"BiQuadEq",NULL, 5, apfBypassFl, apfModeSymId, apfF0hz+0, apfQ, apfGain );
  195. cmDspInst_t* apf1 = cmDspSysAllocInst(h,"BiQuadEq",NULL, 5, apfBypassFl, apfModeSymId, apfF0hz+100.0, apfQ, apfGain );
  196. cmDspInst_t* apf2 = cmDspSysAllocInst(h,"BiQuadEq",NULL, 5, apfBypassFl, apfModeSymId, apfF0hz+200.0, apfQ, apfGain );
  197. cmDspInst_t* apf3 = cmDspSysAllocInst(h,"BiQuadEq",NULL, 5, apfBypassFl, apfModeSymId, apfF0hz+300.0, apfQ, apfGain );
  198. cmDspInst_t* ao0p = cmDspSysAllocInst(h,"AudioOut", NULL, 1, 2 );
  199. cmDspInst_t* ao1p = cmDspSysAllocInst(h,"AudioOut", NULL, 1, 3 );
  200. cmDspInst_t* ao2p = cmDspSysAllocInst(h,"AudioOut", NULL, 1, 4 );
  201. cmDspInst_t* ao3p = cmDspSysAllocInst(h,"AudioOut", NULL, 1, 5 );
  202. cmDspSysNewPage(h,"Main");
  203. cmDspInst_t* liveb= cmDspSysAllocInst(h,"Button", "live", 2, kCheckDuiId, 0.0 );
  204. cmDspInst_t* simb = cmDspSysAllocInst(h,"Button", "simulate",2, kCheckDuiId, 0.0 );
  205. cmDspInst_t* ainb = cmDspSysAllocInst(h,"Button", "audio in",2, kCheckDuiId, 0.0 );
  206. cmDspInst_t* measb= cmDspSysAllocInst(h,"Button", "meas", 2, kCheckDuiId, 0.0 );
  207. cmDspInst_t* onb = cmDspSysAllocInst(h,"Button", "start", 2, kButtonDuiId, 1.0 );
  208. cmDspInst_t* offb = cmDspSysAllocInst(h,"Button", "stop", 2, kButtonDuiId, 1.0 );
  209. //cmDspInst_t* prtb = cmDspSysAllocInst(h,"Button", "print", 2, kButtonDuiId, 1.0 );
  210. //cmDspInst_t* qtb = cmDspSysAllocInst(h,"Button", "quiet", 2, kButtonDuiId, 1.0 );
  211. cmDspInst_t* mutm = cmDspSysAllocInst(h,"Checkbox","main", 1, "main","on","off",1.0,0.0,1.0 );
  212. cmDspInst_t* mutr = cmDspSysAllocInst(h,"Checkbox","frag", 1, "frag","on","off",1.0,0.0,1.0 );
  213. cmDspInst_t* prp = cmDspSysAllocInst(h,"Printer", NULL, 1, ">" );
  214. cmDspInst_t* prd = cmDspSysAllocInst(h,"Printer", NULL, 1, "DYN:" );
  215. cmDspInst_t* pre = cmDspSysAllocInst(h,"Printer", NULL, 1, "EVEN:" );
  216. cmDspInst_t* prt = cmDspSysAllocInst(h,"Printer", NULL, 1, "TEMPO:");
  217. cmDspInst_t* prc = cmDspSysAllocInst(h,"Printer", NULL, 1, "COST:");
  218. //cmDspInst_t* prv = cmDspSysAllocInst(h,"Printer", NULL, 1, "Value:");
  219. // Record <-> Live switches
  220. cmDspInst_t* tlRt = cmDspSysAllocInst(h,"Router", NULL, 2, 2, 0); // time line swich
  221. cmDspInst_t* wtRt = cmDspSysAllocInst(h,"Router", NULL, 2, 2, 0);
  222. cmDspInst_t* mfpRt = cmDspSysAllocInst(h,"Router", NULL, 2, 2, 0);
  223. cmDspInst_t* amRt = cmDspSysAllocInst(h,"Router", NULL, 2, 2, 0);
  224. cmDspInst_t* au0Sw = cmDspSysAllocInst(h,"1ofN", NULL, 2, 2, 0);
  225. cmDspInst_t* au1Sw = cmDspSysAllocInst(h,"1ofN", NULL, 2, 2, 0);
  226. cmDspInst_t* siRt = cmDspSysAllocInst(h,"Router", NULL, 2, 2, 0);
  227. cmDspInst_t* muRt = cmDspSysAllocInst(h,"Router", NULL, 2, 2, 0);
  228. cmDspInst_t* d0Rt = cmDspSysAllocInst(h,"Router", NULL, 2, 2, 0);
  229. cmDspInst_t* d1Rt = cmDspSysAllocInst(h,"Router", NULL, 2, 2, 0);
  230. cmDspInst_t* stRt = cmDspSysAllocInst(h,"Router", NULL, 2, 2, 0);
  231. cmDspSysNewColumn(h,0);
  232. cmDspInst_t* igain0 = cmDspSysAllocInst(h,"Scalar", "In Gain-0", 5, kNumberDuiId, 0.0, 100.0,0.01, 0.0 );
  233. cmDspInst_t* igain1 = cmDspSysAllocInst(h,"Scalar", "In Gain-1", 5, kNumberDuiId, 0.0, 100.0,0.01, 0.0 );
  234. cmDspInst_t* igain2 = cmDspSysAllocInst(h,"Scalar", "In Gain-2", 5, kNumberDuiId, 0.0, 100.0,0.01, 0.0 );
  235. cmDspInst_t* igain3 = cmDspSysAllocInst(h,"Scalar", "In Gain-3", 5, kNumberDuiId, 0.0, 100.0,0.01, 0.0 );
  236. cmDspInst_t* lasecs = cmDspSysAllocInst(h,"Scalar", "LA Secs", 5, kNumberDuiId, 0.0, recdPlayMaxLaSecs,0.01, recdPlayCurLaSecs );
  237. cmDspInst_t* dbpsec = cmDspSysAllocInst(h,"Scalar", "Fade dBpSec", 5, kNumberDuiId, 0.0, 24.0, 0.01, recdPlayFadeRateDbPerSec);
  238. cmDspInst_t* apfByp = cmDspSysAllocCheck( h, "APF-Bypass", 0.0 );
  239. cmDspSysNewColumn(h,0);
  240. cmDspInst_t* ogain0 = cmDspSysAllocInst(h,"Scalar", "Out Gain-0", 5, kNumberDuiId, 0.0, 10.0,0.01, 0.0 );
  241. cmDspInst_t* ogain1 = cmDspSysAllocInst(h,"Scalar", "Out Gain-1", 5, kNumberDuiId, 0.0, 10.0,0.01, 0.0 );
  242. cmDspInst_t* ogain2 = cmDspSysAllocInst(h,"Scalar", "Out Gain-2", 5, kNumberDuiId, 0.0, 10.0,0.01, 0.0 );
  243. cmDspInst_t* ogain3 = cmDspSysAllocInst(h,"Scalar", "Out Gain-3", 5, kNumberDuiId, 0.0, 10.0,0.01, 0.0 );
  244. //cmDspInst_t* scLoc = cmDspSysAllocInst(h,"Scalar", "Sc Loc", 5, kNumberDuiId, 0.0, 3000.0, 1.0, 0.0 );
  245. // Audio file recording
  246. cmDspInst_t* recdGain= cmDspSysAllocInst(h,"Scalar", "Recd Gain", 5, kNumberDuiId, 0.0, 100.0,0.01, 1.5 );
  247. cmDspInst_t* recdChk = cmDspSysAllocInst(h,"Button", "Record", 2, kCheckDuiId, 0.0 );
  248. cmDspInst_t* recdPtS = cmDspSysAllocInst(h,"GateToSym", NULL, 2, cmSymTblRegisterStaticSymbol(cmDspSysSymbolTable(h),"open"),cmSymTblRegisterStaticSymbol(cmDspSysSymbolTable(h),"close"));
  249. cmDspInst_t* afop = cmDspSysAllocInst(h,"AudioFileOut",NULL, 2, r.recordDir,2);
  250. cmDspInst_t* mi0p = cmDspSysAllocInst(h,"AMeter","In 0", 0);
  251. cmDspInst_t* mi1p = cmDspSysAllocInst(h,"AMeter","In 1", 0);
  252. cmDspInst_t* mi2p = cmDspSysAllocInst(h,"AMeter","In 2", 0);
  253. cmDspInst_t* mi3p = cmDspSysAllocInst(h,"AMeter","In 3", 0);
  254. //--------------- Preset controls
  255. cmDspSysNewColumn(h,0);
  256. cmDspInst_t* preset = cmDspSysAllocInst( h, "Preset", NULL, 1, preGrpSymId );
  257. cmDspInst_t* presetLbl = cmDspSysAllocInst( h, "Text", "Preset", 1, "" );
  258. cmDspInst_t* storeBtn = cmDspSysAllocButton( h, "store", 0);
  259. cmDspInst_t* recallBtn = cmDspSysAllocButton( h, "recall", 0);
  260. cmDspSysInstallCb( h, presetLbl, "val", preset, "label",NULL);
  261. cmDspSysInstallCb( h, storeBtn, "sym", preset, "cmd", NULL );
  262. cmDspSysInstallCb( h, recallBtn, "sym", preset, "cmd", NULL );
  263. //cmDspInst_t* prePath = cmDspSysAllocInst( h, "Fname", "prePath", 3, true,NULL,r.tlPrefixPath);
  264. cmDspSysNewColumn(h,0);
  265. //--------------- Recorded performance evaluation and Active Measurement related controls
  266. cmDspInst_t* clrBtn = cmDspSysAllocButton( h, "clear", 0);
  267. cmDspInst_t* prtBtn = cmDspSysAllocButton( h, "dump", 0);
  268. cmDspInst_t* mlst = cmDspSysAllocInst( h, "MsgList", NULL, 3, "meas", r.measFn, 2);
  269. cmDspInst_t* amCmd = cmDspSysAllocInst( h, "PortToSym", NULL, 2, "add", "rewind" );
  270. if( useInputEqFl ) cmDspSysNewPage(h,"In EQ");
  271. cmDspInst_t* eqLpByp0 = useInputEqFl ? cmDspSysAllocCheck( h,"Eq-LPF-Bypass-0", 0.0 ) : NULL;
  272. cmDspInst_t* eqLpMode0 = useInputEqFl ? cmDspSysAllocInst( h,"MsgList","Eq-LPF-Mode-0", 3, "biQuadEqMode", NULL, 1) : NULL;
  273. cmDspInst_t* eqLpFc0 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-LPF-Hz-0", 5, kNumberDuiId, 0.0, 20000.0, 0.5, eqLpF0hz ) : NULL;
  274. cmDspInst_t* eqLpQ0 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-LPF-Q-0", 5, kNumberDuiId, 0.0, 100.0, 0.01, eqLpQ ) : NULL;
  275. cmDspInst_t* eqLpGain0 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-LPF-Gain-0", 5, kNumberDuiId, -100.0, 100.0, 0.5, eqLpGain ) : NULL;
  276. cmDspInst_t* eqBpByp0 = useInputEqFl ? cmDspSysAllocCheck( h,"Eq-BPF-Bypass-0", 0.0 ) : NULL;
  277. cmDspInst_t* eqBpMode0 = useInputEqFl ? cmDspSysAllocInst( h,"MsgList","Eq-BPF-Mode-0", 3, "biQuadEqMode", NULL, 3) : NULL;
  278. cmDspInst_t* eqBpFc0 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-BPF-Hz-0", 5, kNumberDuiId, 0.0, 20000.0, 0.5, eqBpF0hz ) : NULL;
  279. cmDspInst_t* eqBpQ0 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-BPF-Q-0", 5, kNumberDuiId, 0.0, 100.0, 0.01, eqBpQ ) : NULL;
  280. cmDspInst_t* eqBpGain0 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-BPF-Gain-0", 5, kNumberDuiId, -100.0, 100.0, 0.5, eqBpGain ) : NULL;
  281. cmDspInst_t* eqHpByp0 = useInputEqFl ? cmDspSysAllocCheck( h,"Eq-HPF-Bypass-0", 0.0 ) : NULL;
  282. cmDspInst_t* eqHpMode0 = useInputEqFl ? cmDspSysAllocInst( h,"MsgList","Eq-HPF-Mode-0", 3, "biQuadEqMode", NULL, 2) : NULL;
  283. cmDspInst_t* eqHpFc0 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-HPF-Hz-0", 5, kNumberDuiId, 0.0, 20000.0, 0.5, eqHpF0hz ) : NULL;
  284. cmDspInst_t* eqHpQ0 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-HPF-Q-0", 5, kNumberDuiId, 0.0, 100.0, 0.01, eqHpQ ) : NULL;
  285. cmDspInst_t* eqHpGain0 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-HPF-Gain-0", 5, kNumberDuiId, -100.0, 100.0, 0.5, eqHpGain ) : NULL;
  286. if( useInputEqFl ) cmDspSysNewColumn(h,0);
  287. cmDspInst_t* eqLpByp1 = useInputEqFl ? cmDspSysAllocCheck( h,"Eq-LPF-Bypass-1", 0.0 ) : NULL;
  288. cmDspInst_t* eqLpMode1 = useInputEqFl ? cmDspSysAllocInst( h,"MsgList","Eq-LPF-Mode-1", 3, "biQuadEqMode", NULL, 1) : NULL;
  289. cmDspInst_t* eqLpFc1 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-LPF-Hz-1", 5, kNumberDuiId, 0.0, 20000.0, 0.5, eqLpF0hz ) : NULL;
  290. cmDspInst_t* eqLpQ1 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-LPF-Q-1", 5, kNumberDuiId, 0.0, 100.0, 0.01, eqLpQ ) : NULL;
  291. cmDspInst_t* eqLpGain1 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-LPF-Gain-1", 5, kNumberDuiId, -100.0, 100.0, 0.5, eqLpGain ) : NULL;
  292. cmDspInst_t* eqBpByp1 = useInputEqFl ? cmDspSysAllocCheck( h,"Eq-BPF-Bypass-1", 0.0 ) : NULL;
  293. cmDspInst_t* eqBpMode1 = useInputEqFl ? cmDspSysAllocInst( h,"MsgList","Eq-BPF-Mode-1", 3, "biQuadEqMode", NULL, 3) : NULL;
  294. cmDspInst_t* eqBpFc1 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-BPF-Hz-1", 5, kNumberDuiId, 0.0, 20000.0, 0.5, eqBpF0hz ) : NULL;
  295. cmDspInst_t* eqBpQ1 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-BPF-Q-1", 5, kNumberDuiId, 0.0, 100.0, 0.01, eqBpQ ) : NULL;
  296. cmDspInst_t* eqBpGain1 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-BPF-Gain-1", 5, kNumberDuiId, -100.0, 100.0, 0.5, eqBpGain ) : NULL;
  297. cmDspInst_t* eqHpByp1 = useInputEqFl ? cmDspSysAllocCheck( h,"Eq-HPF-Bypass-1", 0.0 ) : NULL;
  298. cmDspInst_t* eqHpMode1 = useInputEqFl ? cmDspSysAllocInst( h,"MsgList","Eq-HPF-Mode-1", 3, "biQuadEqMode", NULL, 2) : NULL;
  299. cmDspInst_t* eqHpFc1 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-HPF-Hz-1", 5, kNumberDuiId, 0.0, 20000.0, 0.5, eqHpF0hz ) : NULL;
  300. cmDspInst_t* eqHpQ1 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-HPF-Q-1", 5, kNumberDuiId, 0.0, 100.0, 0.01, eqHpQ ) : NULL;
  301. cmDspInst_t* eqHpGain1 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-HPF-Gain-1", 5, kNumberDuiId, -100.0, 100.0, 0.5, eqHpGain ) : NULL;
  302. if( useInputEqFl ) cmDspSysNewColumn(h,0);
  303. cmDspInst_t* eqLpByp2 = useInputEqFl ? cmDspSysAllocCheck( h,"Eq-LPF-Bypass-2", 0.0 ) : NULL;
  304. cmDspInst_t* eqLpMode2 = useInputEqFl ? cmDspSysAllocInst( h,"MsgList","Eq-LPF-Mode-2", 3, "biQuadEqMode", NULL, 1) : NULL;
  305. cmDspInst_t* eqLpFc2 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-LPF-Hz-2", 5, kNumberDuiId, 0.0, 20000.0, 0.5, eqLpF0hz ) : NULL;
  306. cmDspInst_t* eqLpQ2 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-LPF-Q-2", 5, kNumberDuiId, 0.0, 100.0, 0.01, eqLpQ ) : NULL;
  307. cmDspInst_t* eqLpGain2 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-LPF-Gain-2", 5, kNumberDuiId, -100.0, 100.0, 0.5, eqLpGain ) : NULL;
  308. cmDspInst_t* eqBpByp2 = useInputEqFl ? cmDspSysAllocCheck( h,"Eq-BPF-Bypass-2", 0.0 ) : NULL;
  309. cmDspInst_t* eqBpMode2 = useInputEqFl ? cmDspSysAllocInst( h,"MsgList","Eq-BPF-Mode-2", 3, "biQuadEqMode", NULL, 3) : NULL;
  310. cmDspInst_t* eqBpFc2 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-BPF-Hz-2", 5, kNumberDuiId, 0.0, 20000.0, 0.5, eqBpF0hz ) : NULL;
  311. cmDspInst_t* eqBpQ2 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-BPF-Q-2", 5, kNumberDuiId, 0.0, 100.0, 0.01, eqBpQ ) : NULL;
  312. cmDspInst_t* eqBpGain2 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-BPF-Gain-2", 5, kNumberDuiId, -100.0, 100.0, 0.5, eqBpGain ) : NULL;
  313. cmDspInst_t* eqHpByp2 = useInputEqFl ? cmDspSysAllocCheck( h,"Eq-HPF-Bypass-2", 0.0 ) : NULL;
  314. cmDspInst_t* eqHpMode2 = useInputEqFl ? cmDspSysAllocInst( h,"MsgList","Eq-HPF-Mode-2", 3, "biQuadEqMode", NULL, 2) : NULL;
  315. cmDspInst_t* eqHpFc2 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-HPF-Hz-2", 5, kNumberDuiId, 0.0, 20000.0, 0.5, eqHpF0hz ) : NULL;
  316. cmDspInst_t* eqHpQ2 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-HPF-Q-2", 5, kNumberDuiId, 0.0, 100.0, 0.01, eqHpQ ) : NULL;
  317. cmDspInst_t* eqHpGain2 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-HPF-Gain-2", 5, kNumberDuiId, -100.0, 100.0, 0.5, eqHpGain ) : NULL;
  318. if( useInputEqFl ) cmDspSysNewColumn(h,0);
  319. cmDspInst_t* eqLpByp3 = useInputEqFl ? cmDspSysAllocCheck( h,"Eq-LPF-Bypass-3", 0.0 ) : NULL;
  320. cmDspInst_t* eqLpMode3 = useInputEqFl ? cmDspSysAllocInst( h,"MsgList","Eq-LPF-Mode-3", 3, "biQuadEqMode", NULL, 1) : NULL;
  321. cmDspInst_t* eqLpFc3 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-LPF-Hz-3", 5, kNumberDuiId, 0.0, 20000.0, 0.5, eqLpF0hz ) : NULL;
  322. cmDspInst_t* eqLpQ3 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-LPF-Q-3", 5, kNumberDuiId, 0.0, 100.0, 0.01, eqLpQ ) : NULL;
  323. cmDspInst_t* eqLpGain3 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-LPF-Gain-3", 5, kNumberDuiId, -300.0, 100.0, 0.5, eqLpGain ) : NULL;
  324. cmDspInst_t* eqBpByp3 = useInputEqFl ? cmDspSysAllocCheck( h,"Eq-BPF-Bypass-3", 0.0 ) : NULL;
  325. cmDspInst_t* eqBpMode3 = useInputEqFl ? cmDspSysAllocInst( h,"MsgList","Eq-BPF-Mode-3", 3, "biQuadEqMode", NULL, 3) : NULL;
  326. cmDspInst_t* eqBpFc3 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-BPF-Hz-3", 5, kNumberDuiId, 0.0, 20000.0, 0.5, eqBpF0hz ) : NULL;
  327. cmDspInst_t* eqBpQ3 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-BPF-Q-3", 5, kNumberDuiId, 0.0, 100.0, 0.01, eqBpQ ) : NULL;
  328. cmDspInst_t* eqBpGain3 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-BPF-Gain-3", 5, kNumberDuiId, -300.0, 100.0, 0.5, eqBpGain ) : NULL;
  329. cmDspInst_t* eqHpByp3 = useInputEqFl ? cmDspSysAllocCheck( h,"Eq-HPF-Bypass-3", 0.0 ) : NULL;
  330. cmDspInst_t* eqHpMode3 = useInputEqFl ? cmDspSysAllocInst( h,"MsgList","Eq-HPF-Mode-3", 3, "biQuadEqMode", NULL, 2) : NULL;
  331. cmDspInst_t* eqHpFc3 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-HPF-Hz-3", 5, kNumberDuiId, 0.0, 20000.0, 0.5, eqHpF0hz ) : NULL;
  332. cmDspInst_t* eqHpQ3 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-HPF-Q-3", 5, kNumberDuiId, 0.0, 100.0, 0.01, eqHpQ ) : NULL;
  333. cmDspInst_t* eqHpGain3 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-HPF-Gain-3", 5, kNumberDuiId, -100.0, 100.0, 0.5, eqHpGain ) : NULL;
  334. if((rc = cmDspSysLastRC(h)) != kOkDspRC )
  335. return rc;
  336. // Output Audio file recording.
  337. cmDspSysInstallCb(h, recdGain,"val", afop, "gain0", NULL );
  338. cmDspSysInstallCb(h, recdGain,"val", afop, "gain1", NULL );
  339. cmDspSysInstallCb(h, recdChk, "out", recdPtS, "on", NULL );
  340. cmDspSysInstallCb(h, recdChk, "out", recdPtS, "off", NULL );
  341. cmDspSysInstallCb(h, recdPtS, "out", afop, "sel", NULL );
  342. // Audio connections
  343. /// cmDspSysConnectAudio(h, php, "out", wtp, "phs" ); // phs -> wt
  344. cmDspSysConnectAudio( h, ai0p, "out", mi0p, "in");
  345. cmDspSysConnectAudio( h, ai1p, "out", mi1p, "in");
  346. cmDspSysConnectAudio( h, ai2p, "out", mi2p, "in");
  347. cmDspSysConnectAudio( h, ai3p, "out", mi3p, "in");
  348. if( useInputEqFl )
  349. {
  350. cmDspSysConnectAudio(h, ai0p, "out", eqLpf_0, "in" ); // ain->eq
  351. cmDspSysConnectAudio(h, ai0p, "out", eqBpf_0, "in" );
  352. cmDspSysConnectAudio(h, ai0p, "out", eqHpf_0, "in" );
  353. cmDspSysConnectAudio(h, eqLpf_0, "out", eqMx_0, "in-0"); // eq -> eqmix
  354. cmDspSysConnectAudio(h, eqBpf_0, "out", eqMx_0, "in-1");
  355. cmDspSysConnectAudio(h, eqHpf_0, "out", eqMx_0, "in-2");
  356. cmDspSysConnectAudio(h, ai1p, "out", eqLpf_1, "in" ); // ain->eq
  357. cmDspSysConnectAudio(h, ai1p, "out", eqBpf_1, "in" );
  358. cmDspSysConnectAudio(h, ai1p, "out", eqHpf_1, "in" );
  359. cmDspSysConnectAudio(h, eqLpf_1, "out", eqMx_1, "in-0"); // eq -> eqmix
  360. cmDspSysConnectAudio(h, eqBpf_1, "out", eqMx_1, "in-1");
  361. cmDspSysConnectAudio(h, eqHpf_1, "out", eqMx_1, "in-2");
  362. cmDspSysConnectAudio(h, ai2p, "out", eqLpf_2, "in" ); // ain->eq
  363. cmDspSysConnectAudio(h, ai2p, "out", eqBpf_2, "in" );
  364. cmDspSysConnectAudio(h, ai2p, "out", eqHpf_2, "in" );
  365. cmDspSysConnectAudio(h, eqLpf_2, "out", eqMx_2, "in-0"); // eq -> eqmix
  366. cmDspSysConnectAudio(h, eqBpf_2, "out", eqMx_2, "in-1");
  367. cmDspSysConnectAudio(h, eqHpf_2, "out", eqMx_2, "in-2");
  368. cmDspSysConnectAudio(h, ai3p, "out", eqLpf_3, "in" ); // ain->eq
  369. cmDspSysConnectAudio(h, ai3p, "out", eqBpf_3, "in" );
  370. cmDspSysConnectAudio(h, ai3p, "out", eqHpf_3, "in" );
  371. cmDspSysConnectAudio(h, eqLpf_3, "out", eqMx_3, "in-0"); // eq -> eqmix
  372. cmDspSysConnectAudio(h, eqBpf_3, "out", eqMx_3, "in-1");
  373. cmDspSysConnectAudio(h, eqHpf_3, "out", eqMx_3, "in-2");
  374. }
  375. cmDspSysConnectAudio(h, ai0p, "out", ec0, "f_in" );
  376. cmDspSysConnectAudio(h, ai1p, "out", ec1, "f_in" );
  377. cmDspSysConnectAudio(h, useInputEqFl ? eqMx_0 : ec0, "out", mx0p, "in-0" ); // eqmix -> input mix
  378. cmDspSysConnectAudio(h, useInputEqFl ? eqMx_1 : ec1, "out", mx1p, "in-0" );
  379. cmDspSysConnectAudio(h, useInputEqFl ? eqMx_2 : ai2p, "out", mx0p, "in-1" );
  380. cmDspSysConnectAudio(h, useInputEqFl ? eqMx_3 : ai3p, "out", mx1p, "in-1" );
  381. if( useWtFl )
  382. {
  383. /// cmDspSysConnectAudio(h, wtp, "out", au0Sw, "a-in-0" ); // wt -> sw
  384. cmDspSysConnectAudio(h, mx0p, "out", au0Sw, "a-in-1" ); // ain -> sw
  385. //cmDspSysConnectAudio(h, ci0p, "out", au0Sw, "a-in-1" );
  386. cmDspSysConnectAudio(h, au0Sw, "a-out", rpp, "in-0"); // sw -> rcdply
  387. cmDspSysConnectAudio(h, au0Sw, "a-out", c0.kr0,"in" ); // sw -> kr
  388. //cmDspSysConnectAudio(h, au0Sw, "a-out", c0.kr1,"in" ); // sw -> kr
  389. //cmDspSysConnectAudio(h, au0Sw, "a-out", mi0p, "in" ); // sw -> meter
  390. }
  391. else
  392. {
  393. cmDspSysConnectAudio(h, mx0p, "out", rpp, "in-0"); // sw -> rcdply
  394. if( useInCompFl )
  395. {
  396. cmDspSysConnectAudio(h, mx0p, "out", ci0p, "in" ); // ain -> in compress
  397. cmDspSysConnectAudio(h, ci0p, "out", c0.kr0, "in" );
  398. }
  399. else
  400. {
  401. cmDspSysConnectAudio(h, mx0p, "out", c0.kr0, "in" ); // ain -> sw
  402. }
  403. //cmDspSysConnectAudio(h, mx0p, "out", mi0p, "in" );
  404. }
  405. if( fragFl )
  406. {
  407. cmDspSysConnectAudio(h, c0.cmp, "out", mix0, "in-0" ); // cmp -> mix 0
  408. cmDspSysConnectAudio(h, rpp, "out-0", c2.kr0,"in" );
  409. //cmDspSysConnectAudio(h, rpp, "out-0", c2.kr1,"in" );
  410. cmDspSysConnectAudio(h, c2.cmp, "out", mix0, "in-1"); // rpp -> mix 1
  411. cmDspSysConnectAudio(h, mix0, "out", apf0, "in" ); // mix -> aout
  412. cmDspSysConnectAudio(h, apf0, "out", ao0p, "in" );
  413. }
  414. else
  415. {
  416. cmDspSysConnectAudio(h, c0.cmp, "out", apf0, "in" );
  417. cmDspSysConnectAudio(h, c0.cmp, "out", apf2, "in" );
  418. cmDspSysConnectAudio(h, apf0, "out", ao0p, "in" );
  419. cmDspSysConnectAudio(h, apf0, "out", ec0, "uf_in" );
  420. cmDspSysConnectAudio(h, apf2, "out", ao2p, "in" );
  421. //cmDspSysConnectAudio(h, wtp, "out", apf0, "in" );
  422. }
  423. if( useChain1Fl )
  424. {
  425. if( useWtFl )
  426. {
  427. /// cmDspSysConnectAudio(h, wtp, "out", au1Sw, "a-in-0" ); // wt -> sw
  428. cmDspSysConnectAudio(h, mx1p, "out", au1Sw, "a-in-1" ); // ain -> sw
  429. //cmDspSysConnectAudio(h, ci1p, "out", au1Sw, "a-in-1" );
  430. cmDspSysConnectAudio(h, au1Sw, "a-out", rpp, "in-1"); // sw -> rcdply
  431. cmDspSysConnectAudio(h, au1Sw, "a-out", c1.kr0,"in" ); // sw -> kr
  432. //cmDspSysConnectAudio(h, au1Sw, "a-out", c1.kr1,"in" ); // sw -> kr
  433. //cmDspSysConnectAudio(h, au1Sw, "a-out", mi1p, "in" ); // sw -> meter
  434. }
  435. else
  436. {
  437. cmDspSysConnectAudio(h, mx1p, "out", rpp, "in-1"); // sw -> rcdply
  438. if( useInCompFl )
  439. {
  440. cmDspSysConnectAudio(h, mx1p, "out", ci1p, "in" ); // ain -> in compress
  441. cmDspSysConnectAudio(h, ci1p, "out", c1.kr0, "in" );
  442. }
  443. else
  444. {
  445. cmDspSysConnectAudio(h, mx1p, "out", c1.kr0, "in" ); // ain -> sw
  446. }
  447. //cmDspSysConnectAudio(h, mx1p, "out", mi1p, "in" );
  448. }
  449. if( fragFl )
  450. {
  451. cmDspSysConnectAudio(h, c1.cmp, "out", mix1, "in-0" ); // cmp -> mix 0
  452. cmDspSysConnectAudio(h, rpp, "out-1", c3.kr0, "in" );
  453. //cmDspSysConnectAudio(h, rpp, "out-1", c3.kr1, "in" );
  454. cmDspSysConnectAudio(h, c3.cmp, "out", mix1, "in-1"); // rpp -> mix 1
  455. cmDspSysConnectAudio(h, mix1, "out", apf1, "in" ); // mix -> aout
  456. cmDspSysConnectAudio(h, apf1, "out", ao1p, "in" );
  457. }
  458. else
  459. {
  460. cmDspSysConnectAudio(h, c1.cmp, "out", apf1, "in" ); // cmp -> mix 0
  461. cmDspSysConnectAudio(h, c1.cmp, "out", apf3, "in" ); // cmp -> mix 0
  462. cmDspSysConnectAudio(h, apf1, "out", ao1p, "in" );
  463. cmDspSysConnectAudio(h, apf1, "out", ec1, "uf_in" );
  464. cmDspSysConnectAudio(h, apf3, "out", ao3p, "in" );
  465. //cmDspSysConnectAudio(h, wtp, "out", apf1, "in" );
  466. }
  467. }
  468. cmDspSysConnectAudio(h, c0.cmp, "out", afop, "in0" ); // comp -> audio_file_out
  469. cmDspSysConnectAudio(h, c1.cmp, "out", afop, "in1" );
  470. //cmDspSysConnectAudio(h, ai0p, "out", afop, "in0" ); // comp -> audio_file_out
  471. //cmDspSysConnectAudio(h, ai1p, "out", afop, "in1" );
  472. //cmDspSysConnectAudio(h, ai0p, "out", ao2p, "in" ); // direct through from input to
  473. //cmDspSysConnectAudio(h, ai1p, "out", ao3p, "in" ); // output chs 2&3
  474. cmDspSysInstallCb( h, clrBtn, "sym", amp, "cmd", NULL ); // clear active meas.
  475. cmDspSysInstallCb( h, prtBtn, "sym", amp, "cmd", NULL ); // print active meas
  476. ///cmDspSysInstallCb( h, prtBtn, "sym", scp, "cmd", NULL );
  477. cmDspSysInstallCb( h, amCmd, "add", amp, "cmd", NULL ); // add active meas
  478. cmDspSysInstallCb( h, amCmd, "rewind", amp, "cmd", NULL ); // rewind active meas
  479. cmDspSysInstallCb( h, mlst, "loc", amp, "loc", NULL ); // recorded meas's list to active meas unit
  480. cmDspSysInstallCb( h, mlst, "typeId", amp, "type", NULL ); //
  481. cmDspSysInstallCb( h, mlst, "val", amp, "val", NULL ); //
  482. cmDspSysInstallCb( h, mlst, "cost", amp, "cst", NULL ); //
  483. cmDspSysInstallCb( h, mlst, "typeId", amCmd, "add", NULL ); //
  484. cmDspSysInstallCb( h, sfp, "out", amRt, "f-in", NULL ); // sfp-active meas router (rtr is switched by live btn)
  485. cmDspSysInstallCb( h, amRt, "f-out-0",amp, "sfloc", NULL );
  486. cmDspSysInstallCb( h, sfp, "vloc", amp, "loc", NULL ); // live meas's to active meas unit
  487. cmDspSysInstallCb( h, sfp, "vval", amp, "val", NULL ); //
  488. cmDspSysInstallCb( h, sfp, "vcost",amp, "cst", NULL ); //
  489. cmDspSysInstallCb( h, sfp, "vtyp", amp, "type", NULL ); //
  490. cmDspSysInstallCb( h, sfp, "vtyp", amCmd, "add", NULL); //
  491. // ***** delete this to prevent the score follower from driving the active-measure unit in 'live' mode
  492. cmDspSysInstallCb( h, amRt, "f-out-1",amp, "sfloc", NULL );
  493. // *****
  494. // active measure loc to xfad channel trigger
  495. cmDspSysInstallCb( h, amp, "scloc", c0.achan, "trig", NULL ); // See Also: modp.sw ->achan.trig
  496. if( useChain1Fl )
  497. {
  498. cmDspSysInstallCb( h, amp, "scloc", c1.achan, "trig", NULL );
  499. }
  500. if( fragFl )
  501. {
  502. cmDspSysInstallCb( h, amp, "scloc", c2.achan, "trig", NULL );
  503. cmDspSysInstallCb( h, amp, "scloc", c3.achan, "trig", NULL );
  504. }
  505. cmDspSysInstallCb( h, amp, "even", pre, "in", NULL ); // active meas output to printers
  506. cmDspSysInstallCb( h, amp, "dyn", prd, "in", NULL );
  507. cmDspSysInstallCb( h, amp, "tempo", prt, "in", NULL );
  508. cmDspSysInstallCb( h, amp, "cost", prc, "in", NULL );
  509. // wave-table to time-line cursor
  510. ///cmDspSysInstallCb( h, wtp, "fidx",tlp, "curs", NULL);
  511. ///cmDspSysInstallCb(h, prePath, "out", tlp, "path", NULL );
  512. // 'live' button -> live router selector switch
  513. cmDspSysInstallCb(h, liveb, "out", wtRt, "sel", NULL );
  514. cmDspSysInstallCb(h, liveb, "out", tlRt, "sel", NULL );
  515. cmDspSysInstallCb(h, liveb, "out", mfpRt,"sel", NULL );
  516. cmDspSysInstallCb(h, liveb, "out", amRt, "sel", NULL );
  517. cmDspSysInstallCb(h, liveb, "out", au0Sw, "chidx", NULL );
  518. cmDspSysInstallCb(h, liveb, "out", au1Sw, "chidx", NULL );
  519. cmDspSysInstallCb(h, liveb, "out", measb, "in", NULL );
  520. cmDspSysInstallCb(h, measb, "out", sfp, "measfl", NULL );
  521. // 'simulate' button -> simulate router selector switch
  522. cmDspSysInstallCb(h, simb, "out", ainb, "in", NULL );
  523. cmDspSysInstallCb(h, ainb, "out", au0Sw, "chidx", NULL );
  524. cmDspSysInstallCb(h, ainb, "out", au1Sw, "chidx", NULL );
  525. cmDspSysInstallCb(h, simb, "out", siRt, "sel", NULL );
  526. cmDspSysInstallCb(h, simb, "out", muRt, "sel", NULL );
  527. cmDspSysInstallCb(h, simb, "out", d1Rt, "sel", NULL );
  528. cmDspSysInstallCb(h, simb, "out", d0Rt, "sel", NULL );
  529. cmDspSysInstallCb(h, simb, "out", stRt, "sel", NULL );
  530. // bldr -> rndr
  531. cmDspSysInstallCb( h, bldr, "bldr", rndr, "bldr", NULL);
  532. cmDspSysInstallCb( h, bldr, "refresh", rndr, "refresh", NULL );
  533. cmDspSysInstallCb( h, bldr, "sel", rndr, "sel", NULL );
  534. // start connections
  535. cmDspSysInstallCb(h, onb, "sym", tlRt, "s-in", NULL );
  536. /// cmDspSysInstallCb(h, tlRt, "s-out-0",tlp, "reset", NULL );
  537. cmDspSysInstallCb(h, onb, "sym", rndr, "cmd", NULL );
  538. ///cmDspSysInstallCb(h, onb, "sym", scp, "send", NULL );
  539. cmDspSysInstallCb(h, onb, "sym", bldr, "send", NULL );
  540. cmDspSysInstallCb(h, onb, "sym", mfpRt,"s-in", NULL );
  541. /// cmDspSysInstallCb(h, mfpRt,"s-out-0",mfp, "sel", NULL );
  542. cmDspSysInstallCb(h, onb, "sym", pts, "on", NULL );
  543. cmDspSysInstallCb(h, pts, "on", wtRt, "s-in", NULL );
  544. /// cmDspSysInstallCb(h, wtRt,"s-out-0", wtp, "cmd", NULL );
  545. cmDspSysInstallCb(h, pts, "on", modp, "cmd", NULL );
  546. cmDspSysInstallCb(h, pts, "on", modr, "cmd", NULL );
  547. cmDspSysInstallCb(h, pts, "on", rpp, "cmd", NULL );
  548. cmDspSysInstallCb(h, onb, "sym", amCmd, "rewind",NULL );
  549. cmDspSysInstallCb(h, onb, "out", c0.achan,"reset", NULL );
  550. if( useChain1Fl )
  551. {
  552. cmDspSysInstallCb(h, onb, "out", c1.achan,"reset", NULL );
  553. }
  554. // stop connections
  555. /// cmDspSysInstallCb(h, wtp, "done",offb,"in", NULL ); // 'done' from WT simulates pressing Stop btn.
  556. ///cmDspSysInstallCb(h, tlp, "mfn", pts, "off", NULL ); // Prevents WT start on new audio file from TL.
  557. ///cmDspSysInstallCb(h, offb, "sym", mfp, "sel", NULL );
  558. cmDspSysInstallCb(h, offb, "sym", pts, "off", NULL );
  559. ///cmDspSysInstallCb(h, pts, "off", wtp, "cmd", NULL );
  560. cmDspSysInstallCb(h, pts, "off", modp,"cmd", NULL );
  561. cmDspSysInstallCb(h, pts, "off", modr,"cmd", NULL );
  562. cmDspSysInstallCb(h, offb, "sym", mop, "reset", NULL );
  563. cmDspSysInstallCb(h, offb, "sym", mo2p, "reset", NULL );
  564. cmDspSysInstallCb(h, pts, "off", rndr, "cmd", NULL );
  565. /*
  566. // time-line to wave-table selection
  567. cmDspSysInstallCb(h, tlp, "absi", wtp, "beg", NULL );
  568. cmDspSysInstallCb(h, tlp, "aesi", wtp, "end", NULL );
  569. cmDspSysInstallCb(h, tlp, "afn", wtp, "fn", NULL );
  570. // time-line to MIDI file player selection
  571. cmDspSysInstallCb(h, tlp, "mbsi", mfp, "bsi", NULL );
  572. cmDspSysInstallCb(h, tlp, "mesi", mfp, "esi", NULL );
  573. cmDspSysInstallCb(h, tlp, "mfn", mfp, "fn", NULL );
  574. */
  575. // score to score follower - to set initial search location
  576. cmDspSysInstallCb(h, bldr, "sel", sfp, "index", NULL );
  577. cmDspSysInstallCb(h, bldr, "sel", modp,"reset", NULL );
  578. cmDspSysInstallCb(h, bldr, "sel", modr,"reset", NULL );
  579. cmDspSysInstallCb(h, bldr, "sel", rpp, "initIdx", NULL );
  580. cmDspSysInstallCb(h, bldr, "sel", prp, "in", NULL );
  581. // NOTE: THIS IS A DUPLICATE OF THE scp.sel CONNECTIONS
  582. /*
  583. cmDspSysInstallCb(h, scLoc, "val", sfp, "index", NULL );
  584. cmDspSysInstallCb(h, scLoc, "val", modp,"reset", NULL );
  585. cmDspSysInstallCb(h, scLoc, "val", modr,"reset", NULL );
  586. cmDspSysInstallCb(h, scLoc, "val", rpp, "initIdx", NULL );
  587. cmDspSysInstallCb(h, scLoc, "val", prp, "in", NULL );
  588. */
  589. //cmDspSysInstallCb(h, reload,"out", modp, "reload", NULL );
  590. // MIDI file player to score follower
  591. ///cmDspSysInstallCb(h, mfp, "smpidx", siRt, "f-in",NULL );
  592. cmDspSysInstallCb(h, rndr, "smpidx", siRt, "f-in", NULL );
  593. cmDspSysInstallCb(h, siRt, "f-out-1", sfp, "smpidx",NULL );
  594. // leave siRt.f-out-1 unconnected because it should be ignored in 'simulate mode'
  595. ///cmDspSysInstallCb(h, mfp, "mu", muRt, "f-in", NULL );
  596. /// ???? does rndr need to generate muid ??????
  597. cmDspSysInstallCb(h, muRt, "f-out-1", sfp, "muid", NULL );
  598. // leave muRt.f-out-1 unconnected because it should be ignored in 'simulate mode'
  599. cmDspSysInstallCb(h, rndr, "d1", d1Rt, "f-in", NULL );
  600. cmDspSysInstallCb(h, d1Rt, "f-out-1", sfp, "d1", NULL );
  601. cmDspSysInstallCb(h, d1Rt, "f-out-1", nmp, "d1", NULL );
  602. cmDspSysInstallCb(h, nmp, "d1", mop, "d1", NULL );
  603. cmDspSysInstallCb(h, nmp, "d1", mo2p, "d1", NULL );
  604. cmDspSysInstallCb(h, rndr, "d0", d0Rt, "f-in", NULL );
  605. cmDspSysInstallCb(h, d0Rt, "f-out-1", sfp, "d0", NULL );
  606. cmDspSysInstallCb(h, d0Rt, "f-out-1", nmp, "d0", NULL );
  607. cmDspSysInstallCb(h, nmp, "d0", mop, "d0", NULL );
  608. cmDspSysInstallCb(h, nmp, "d0", mo2p, "d0", NULL );
  609. cmDspSysInstallCb(h, rndr, "status", stRt, "f-in", NULL );
  610. cmDspSysInstallCb(h, stRt, "f-out-1", sfp, "status",NULL );
  611. cmDspSysInstallCb(h, stRt, "f-out-1", nmp, "status",NULL );
  612. cmDspSysInstallCb(h, nmp, "status", mop, "status",NULL );
  613. cmDspSysInstallCb(h, nmp, "status", mo2p, "status",NULL );
  614. // MIDI input port
  615. //cmDspSysInstallCb(h, mip, "smpidx", sfp, "smpidx", NULL );
  616. //cmDspSysInstallCb(h, mip, "d1", sfp, "d1", NULL );
  617. //cmDspSysInstallCb(h, mip, "d0", sfp, "d0", NULL );
  618. //cmDspSysInstallCb(h, mip, "status", sfp, "status", NULL );
  619. // score follower to recd_play,modulator and printers
  620. //cmDspSysInstallCb(h, sfp, "out", rpp, "index", NULL );
  621. cmDspSysInstallCb(h, sfp, "out", modp, "index", NULL );
  622. //cmDspSysInstallCb(h, sfp, "out", modr, "index", NULL );
  623. cmDspSysInstallCb(h, sfp, "recent", prp, "in", NULL ); // report 'recent' but only act on 'max' loc index
  624. //cmDspSysInstallCb(h, prtb, "sym", sfp, "cmd", NULL );
  625. //cmDspSysInstallCb(h, qtb, "sym", sfp, "cmd", NULL );
  626. cmDspSysInstallCb( h, lasecs, "val", rpp, "curla", NULL ); // recd/play control
  627. cmDspSysInstallCb( h, dbpsec, "val", rpp, "frate", NULL );
  628. cmDspSysInstallCb(h, igain0, "val", ai0p, "gain", NULL ); // input gain control
  629. cmDspSysInstallCb(h, igain1, "val", ai1p, "gain", NULL );
  630. cmDspSysInstallCb(h, igain2, "val", ai2p, "gain", NULL ); // input gain control
  631. cmDspSysInstallCb(h, igain3, "val", ai3p, "gain", NULL );
  632. if( fragFl )
  633. {
  634. cmDspSysInstallCb(h, mutm, "out", mix0, "gain-0", NULL );
  635. cmDspSysInstallCb(h, mutm, "out", mix1, "gain-0", NULL );
  636. cmDspSysInstallCb(h, mutr, "out", mix0, "gain-1", NULL );
  637. cmDspSysInstallCb(h, mutr, "out", mix1, "gain-1", NULL );
  638. }
  639. cmDspSysInstallCb(h, apfByp, "out", apf0, "bypass", NULL ); // APF bypass
  640. cmDspSysInstallCb(h, apfByp, "out", apf1, "bypass", NULL ); //
  641. cmDspSysInstallCb(h, apfByp, "out", apf2, "bypass", NULL ); //
  642. cmDspSysInstallCb(h, apfByp, "out", apf3, "bypass", NULL ); //
  643. cmDspSysInstallCb(h, ogain0, "val", ao0p, "gain", NULL ); // output gain control
  644. cmDspSysInstallCb(h, ogain1, "val", ao1p, "gain", NULL );
  645. cmDspSysInstallCb(h, ogain2, "val", ao2p, "gain", NULL );
  646. cmDspSysInstallCb(h, ogain3, "val", ao3p, "gain", NULL );
  647. if( useInputEqFl )
  648. {
  649. cmDspSysInstallCb(h, eqLpByp0, "out", eqLpf_0, "bypass", NULL);
  650. cmDspSysInstallCb(h, eqLpMode0, "mode",eqLpf_0, "mode", NULL );
  651. cmDspSysInstallCb(h, eqLpFc0, "val", eqLpf_0, "f0", NULL );
  652. cmDspSysInstallCb(h, eqLpQ0, "val", eqLpf_0, "Q", NULL );
  653. cmDspSysInstallCb(h, eqLpGain0, "val", eqLpf_0, "gain", NULL );
  654. cmDspSysInstallCb(h, eqBpByp0, "out", eqBpf_0, "bypass", NULL);
  655. cmDspSysInstallCb(h, eqBpMode0, "mode",eqBpf_0, "mode", NULL );
  656. cmDspSysInstallCb(h, eqBpFc0, "val", eqBpf_0, "f0", NULL );
  657. cmDspSysInstallCb(h, eqBpQ0, "val", eqBpf_0, "Q", NULL );
  658. cmDspSysInstallCb(h, eqBpGain0, "val", eqBpf_0, "gain", NULL );
  659. cmDspSysInstallCb(h, eqHpByp0, "out", eqHpf_0, "bypass", NULL);
  660. cmDspSysInstallCb(h, eqHpMode0, "mode",eqHpf_0, "mode", NULL );
  661. cmDspSysInstallCb(h, eqHpFc0, "val", eqHpf_0, "f0", NULL );
  662. cmDspSysInstallCb(h, eqHpQ0, "val", eqHpf_0, "Q", NULL );
  663. cmDspSysInstallCb(h, eqHpGain0, "val", eqHpf_0, "gain", NULL );
  664. cmDspSysInstallCb(h, eqLpByp1, "out", eqLpf_1, "bypass", NULL);
  665. cmDspSysInstallCb(h, eqLpMode1, "mode",eqLpf_1, "mode", NULL );
  666. cmDspSysInstallCb(h, eqLpFc1, "val", eqLpf_1, "f0", NULL );
  667. cmDspSysInstallCb(h, eqLpQ1, "val", eqLpf_1, "Q", NULL );
  668. cmDspSysInstallCb(h, eqLpGain1, "val", eqLpf_1, "gain", NULL );
  669. cmDspSysInstallCb(h, eqBpByp1, "out", eqBpf_1, "bypass", NULL);
  670. cmDspSysInstallCb(h, eqBpMode1, "mode",eqBpf_1, "mode", NULL );
  671. cmDspSysInstallCb(h, eqBpFc1, "val", eqBpf_1, "f0", NULL );
  672. cmDspSysInstallCb(h, eqBpQ1, "val", eqBpf_1, "Q", NULL );
  673. cmDspSysInstallCb(h, eqBpGain1, "val", eqBpf_1, "gain", NULL );
  674. cmDspSysInstallCb(h, eqHpByp1, "out", eqHpf_1, "bypass", NULL);
  675. cmDspSysInstallCb(h, eqHpMode1, "mode",eqHpf_1, "mode", NULL );
  676. cmDspSysInstallCb(h, eqHpFc1, "val", eqHpf_1, "f0", NULL );
  677. cmDspSysInstallCb(h, eqHpQ1, "val", eqHpf_1, "Q", NULL );
  678. cmDspSysInstallCb(h, eqHpGain1, "val", eqHpf_1, "gain", NULL );
  679. cmDspSysInstallCb(h, eqLpByp2, "out", eqLpf_2, "bypass", NULL);
  680. cmDspSysInstallCb(h, eqLpMode2, "mode",eqLpf_2, "mode", NULL );
  681. cmDspSysInstallCb(h, eqLpFc2, "val", eqLpf_2, "f0", NULL );
  682. cmDspSysInstallCb(h, eqLpQ2, "val", eqLpf_2, "Q", NULL );
  683. cmDspSysInstallCb(h, eqLpGain2, "val", eqLpf_2, "gain", NULL );
  684. cmDspSysInstallCb(h, eqBpByp2, "out", eqBpf_2, "bypass", NULL);
  685. cmDspSysInstallCb(h, eqBpMode2, "mode",eqBpf_2, "mode", NULL );
  686. cmDspSysInstallCb(h, eqBpFc2, "val", eqBpf_2, "f0", NULL );
  687. cmDspSysInstallCb(h, eqBpQ2, "val", eqBpf_2, "Q", NULL );
  688. cmDspSysInstallCb(h, eqBpGain2, "val", eqBpf_2, "gain", NULL );
  689. cmDspSysInstallCb(h, eqHpByp2, "out", eqHpf_2, "bypass", NULL);
  690. cmDspSysInstallCb(h, eqHpMode2, "mode",eqHpf_2, "mode", NULL );
  691. cmDspSysInstallCb(h, eqHpFc2, "val", eqHpf_2, "f0", NULL );
  692. cmDspSysInstallCb(h, eqHpQ2, "val", eqHpf_2, "Q", NULL );
  693. cmDspSysInstallCb(h, eqHpGain2, "val", eqHpf_2, "gain", NULL );
  694. cmDspSysInstallCb(h, eqLpByp3, "out", eqLpf_3, "bypass", NULL);
  695. cmDspSysInstallCb(h, eqLpMode3, "mode",eqLpf_3, "mode", NULL );
  696. cmDspSysInstallCb(h, eqLpFc3, "val", eqLpf_3, "f0", NULL );
  697. cmDspSysInstallCb(h, eqLpQ3, "val", eqLpf_3, "Q", NULL );
  698. cmDspSysInstallCb(h, eqLpGain3, "val", eqLpf_3, "gain", NULL );
  699. cmDspSysInstallCb(h, eqBpByp3, "out", eqBpf_3, "bypass", NULL);
  700. cmDspSysInstallCb(h, eqBpMode3, "mode",eqBpf_3, "mode", NULL );
  701. cmDspSysInstallCb(h, eqBpFc3, "val", eqBpf_3, "f0", NULL );
  702. cmDspSysInstallCb(h, eqBpQ3, "val", eqBpf_3, "Q", NULL );
  703. cmDspSysInstallCb(h, eqBpGain3, "val", eqBpf_3, "gain", NULL );
  704. cmDspSysInstallCb(h, eqHpByp3, "out", eqHpf_3, "bypass", NULL);
  705. cmDspSysInstallCb(h, eqHpMode3, "mode",eqHpf_3, "mode", NULL );
  706. cmDspSysInstallCb(h, eqHpFc3, "val", eqHpf_3, "f0", NULL );
  707. cmDspSysInstallCb(h, eqHpQ3, "val", eqHpf_3, "Q", NULL );
  708. cmDspSysInstallCb(h, eqHpGain3, "val", eqHpf_3, "gain", NULL );
  709. }
  710. return rc;
  711. }
  712. //------------------------------------------------------------------------------
  713. //)
  714. //( { label:cmDspPgm_TksbLIst file_desc:"A simplified version of cmDspSysPgm_Tksb." kw:[spgm] }
  715. cmDspRC_t _cmDspSysPgm_TksbLite(cmDspSysH_t h, void** userPtrPtr )
  716. {
  717. cmDspRC_t rc = kOkDspRC;
  718. cmCtx_t* cmCtx = cmDspSysPgmCtx(h);
  719. cmErr_t err;
  720. krRsrc_t r;
  721. unsigned sfBufCnt = 7; // length of the MIDI event buffer
  722. unsigned sfMaxWndCnt = 10; // length of the score event buffer
  723. unsigned sfMinVel = 5; // ignore MIDI events below this velocity
  724. bool sfEnaMeasFl = false;
  725. memset(&r,0,sizeof(r));
  726. cmErrSetup(&err,&cmCtx->rpt,"Kr Timeline");
  727. if( krLoadRsrc(h,&err,&r) != kOkDspRC )
  728. return rc;
  729. cmDspInst_t* ai0p = cmDspSysAllocInst(h,"AudioIn", NULL, 1, 0);
  730. cmDspInst_t* ai1p = cmDspSysAllocInst(h,"AudioIn", NULL, 1, 1);
  731. //cmDspInst_t* ec0 = cmDspSysAllocInst(h,"EchoCancel", NULL, 1, 0,1 );
  732. //cmDspInst_t* ec1 = cmDspSysAllocInst(h,"EchoCancel", NULL, 1, 0,1 );
  733. cmDspInst_t* bldr = cmDspSysAllocInst( h,"TakeSeqBldr", NULL, 1, r.tksbFn );
  734. cmDspInst_t* rndr = cmDspSysAllocInst( h,"TakeSeqRend", NULL, 0 );
  735. cmDspInst_t* pts = cmDspSysAllocInst(h,"PortToSym", NULL, 2, "on", "off" );
  736. cmDspInst_t* nmp = cmDspSysAllocInst(h,"NanoMap", NULL, 0 );
  737. cmDspInst_t* mop = cmDspSysAllocInst(h,"MidiOut", NULL, 2, r.midiDevice,r.midiOutPort);
  738. cmDspInst_t* mo2p = cmDspSysAllocInst(h,"MidiOut", NULL, 2, r.midiDevice,r.midiOutPort2);
  739. cmDspInst_t* sfp = cmDspSysAllocInst(h,"ScFol", NULL, 1, r.scFn, sfBufCnt, sfMaxWndCnt, sfMinVel, sfEnaMeasFl );
  740. //cmDspInst_t* amp = cmDspSysAllocInst(h,"ActiveMeas", NULL, 1, 100 );
  741. cmDspInst_t* modp = cmDspSysAllocInst(h,"ScMod", NULL, 2, r.modFn, "m1" );
  742. unsigned preGrpSymId = cmDspSysPresetRegisterGroup(h,"tl");
  743. unsigned cmpPreGrpSymId = cmDspSysPresetRegisterGroup(h,"tl_cmp");
  744. cmDspTlXform_t c0,c1;
  745. cmDspSysNewPage(h,"Controls-0");
  746. _cmDspSys_TlXformChain(h, &c0, preGrpSymId, cmpPreGrpSymId, NULL, modp, 0, 0 );
  747. cmDspSysNewPage(h,"Controls-1");
  748. _cmDspSys_TlXformChain(h, &c1, preGrpSymId, cmpPreGrpSymId, NULL, modp, 1, 1 );
  749. cmDspInst_t* ao0p = cmDspSysAllocInst(h,"AudioOut", NULL, 1, 2 );
  750. cmDspInst_t* ao1p = cmDspSysAllocInst(h,"AudioOut", NULL, 1, 3 );
  751. cmDspSysNewPage(h,"Main");
  752. cmDspInst_t* liveb= cmDspSysAllocInst(h,"Button", "live", 2, kCheckDuiId, 0.0 );
  753. cmDspInst_t* simb = cmDspSysAllocInst(h,"Button", "simulate",2, kCheckDuiId, 0.0 );
  754. cmDspInst_t* ainb = cmDspSysAllocInst(h,"Button", "audio in",2, kCheckDuiId, 0.0 );
  755. cmDspInst_t* measb= cmDspSysAllocInst(h,"Button", "meas", 2, kCheckDuiId, 0.0 );
  756. cmDspInst_t* onb = cmDspSysAllocInst(h,"Button", "start", 2, kButtonDuiId, 1.0 );
  757. cmDspInst_t* offb = cmDspSysAllocInst(h,"Button", "stop", 2, kButtonDuiId, 1.0 );
  758. cmDspInst_t* prp = cmDspSysAllocInst(h,"Printer", NULL, 1, ">" );
  759. //cmDspInst_t* prd = cmDspSysAllocInst(h,"Printer", NULL, 1, "DYN:" );
  760. //cmDspInst_t* pre = cmDspSysAllocInst(h,"Printer", NULL, 1, "EVEN:" );
  761. //cmDspInst_t* prt = cmDspSysAllocInst(h,"Printer", NULL, 1, "TEMPO:");
  762. //cmDspInst_t* prc = cmDspSysAllocInst(h,"Printer", NULL, 1, "COST:");
  763. cmDspInst_t* pra0 = cmDspSysAllocInst(h,"Printer", NULL, 1, "ACh0:");
  764. cmDspInst_t* pra1 = cmDspSysAllocInst(h,"Printer", NULL, 1, "ACh1:");
  765. // Record <-> Live switches
  766. cmDspInst_t* tlRt = cmDspSysAllocInst(h,"Router", "tlRt", 2, 2, 0); // time line swich
  767. cmDspInst_t* wtRt = cmDspSysAllocInst(h,"Router", NULL, 2, 2, 0);
  768. cmDspInst_t* mfpRt = cmDspSysAllocInst(h,"Router", NULL, 2, 2, 0);
  769. cmDspInst_t* amRt = cmDspSysAllocInst(h,"Router", NULL, 2, 2, 0);
  770. cmDspInst_t* au0Sw = cmDspSysAllocInst(h,"1ofN", NULL, 2, 2, 0);
  771. cmDspInst_t* au1Sw = cmDspSysAllocInst(h,"1ofN", NULL, 2, 2, 0);
  772. cmDspInst_t* siRt = cmDspSysAllocInst(h,"Router", "siRT", 2, 2, 0);
  773. cmDspInst_t* muRt = cmDspSysAllocInst(h,"Router", NULL, 2, 2, 0);
  774. cmDspInst_t* d0Rt = cmDspSysAllocInst(h,"Router", NULL, 2, 2, 0);
  775. cmDspInst_t* d1Rt = cmDspSysAllocInst(h,"Router", NULL, 2, 2, 0);
  776. cmDspInst_t* stRt = cmDspSysAllocInst(h,"Router", NULL, 2, 2, 0);
  777. cmDspSysNewColumn(h,0);
  778. cmDspInst_t* igain0 = cmDspSysAllocInst(h,"Scalar", "In Gain-0", 5, kNumberDuiId, 0.0, 100.0,0.01, 2.0 );
  779. cmDspSysNewColumn(h,0);
  780. cmDspInst_t* ogain0 = cmDspSysAllocInst(h,"Scalar", "Out Gain-0", 5, kNumberDuiId, 0.0, 10.0, 0.01, 3.0 );
  781. /*
  782. cmDspInst_t* ec_mu = cmDspSysAllocInst(h,"Scalar", "EC mu", 5, kNumberDuiId, 0.0, 1.0, 0.01, 0.1 );
  783. cmDspInst_t* ec_di = cmDspSysAllocInst(h,"Scalar", "EC Delay", 5, kNumberDuiId, 0.0, cmDspSysSampleRate(h), 1.0, 1765.0 );
  784. cmDspInst_t* ec_hn = cmDspSysAllocInst(h,"Scalar", "EC IR N", 5, kNumberDuiId, 0.0, cmDspSysSampleRate(h), 1.0, 2048.0 );
  785. cmDspInst_t* ec_byp= cmDspSysAllocCheck( h, "EC Bypass", 1.0 );
  786. */
  787. // Audio file recording
  788. cmDspInst_t* recdGain= cmDspSysAllocInst(h,"Scalar", "Recd Gain", 5, kNumberDuiId, 0.0, 100.0,0.01, 1.5 );
  789. cmDspInst_t* recdChk = cmDspSysAllocInst(h,"Button", "Record", 2, kCheckDuiId, 0.0 );
  790. cmDspInst_t* recdPtS = cmDspSysAllocInst(h,"GateToSym", NULL, 2, cmSymTblRegisterStaticSymbol(cmDspSysSymbolTable(h),"open"),cmSymTblRegisterStaticSymbol(cmDspSysSymbolTable(h),"close"));
  791. cmDspInst_t* afop = cmDspSysAllocInst(h,"AudioFileOut",NULL, 2, r.recordDir,2);
  792. cmDspInst_t* mi0p = cmDspSysAllocInst(h,"AMeter","In 0", 0);
  793. cmDspInst_t* mi1p = cmDspSysAllocInst(h,"AMeter","In 1", 0);
  794. cmDspInst_t* mo0p = cmDspSysAllocInst(h,"AMeter","Out 0", 0);
  795. cmDspInst_t* mo1p = cmDspSysAllocInst(h,"AMeter","Out 1", 0);
  796. //--------------- Preset controls
  797. cmDspSysNewColumn(h,0);
  798. cmDspInst_t* preset = cmDspSysAllocInst( h, "Preset", NULL, 1, preGrpSymId );
  799. cmDspInst_t* presetLbl = cmDspSysAllocInst( h, "Text", "Preset", 1, "" );
  800. cmDspInst_t* storeBtn = cmDspSysAllocButton( h, "store", 0);
  801. cmDspInst_t* recallBtn = cmDspSysAllocButton( h, "recall", 0);
  802. cmDspSysInstallCb( h, presetLbl, "val", preset, "label",NULL);
  803. cmDspSysInstallCb( h, storeBtn, "sym", preset, "cmd", NULL );
  804. cmDspSysInstallCb( h, recallBtn, "sym", preset, "cmd", NULL );
  805. //cmDspInst_t* prePath = cmDspSysAllocInst( h, "Fname", "prePath", 3, true,NULL,r.tlPrefixPath);
  806. cmDspSysNewColumn(h,0);
  807. //--------------- Recorded performance evaluation and Active Measurement related controls
  808. //cmDspInst_t* clrBtn = cmDspSysAllocButton( h, "clear", 0);
  809. //cmDspInst_t* prtBtn = cmDspSysAllocButton( h, "dump", 0);
  810. //cmDspInst_t* mlst = cmDspSysAllocInst( h, "MsgList", NULL, 3, "meas", r.measFn, 2);
  811. cmDspInst_t* amCmd = cmDspSysAllocInst( h, "PortToSym", NULL, 2, "add", "rewind" );
  812. if((rc = cmDspSysLastRC(h)) != kOkDspRC )
  813. return rc;
  814. // Output Audio file recording.
  815. cmDspSysInstallCb(h, recdGain,"val", afop, "gain0", NULL );
  816. cmDspSysInstallCb(h, recdGain,"val", afop, "gain1", NULL );
  817. cmDspSysInstallCb(h, recdChk, "out", recdPtS, "on", NULL );
  818. cmDspSysInstallCb(h, recdChk, "out", recdPtS, "off", NULL );
  819. cmDspSysInstallCb(h, recdPtS, "out", afop, "sel", NULL );
  820. // Audio connections
  821. cmDspSysConnectAudio(h, ai0p, "out", mi0p, "in"); // ain -> meter
  822. cmDspSysConnectAudio(h, ai0p, "out", c0.kr0, "in" ); // ain -> kr
  823. cmDspSysConnectAudio(h, ai0p, "out", c0.kr1, "in" );
  824. //cmDspSysConnectAudio(h, ai0p, "out", ec0, "f_in" ); // ain -> echo_cancel
  825. //cmDspSysConnectAudio(h, c0.cmp, "out", ec0, "uf_in" ); // kr -> echo_cancel
  826. //cmDspSysConnectAudio(h, ec0, "out", ao0p, "in" ); // ec -> aout 0
  827. cmDspSysConnectAudio(h, c0.cmp, "out", ao0p, "in" ); // kr -> echo_cancel
  828. cmDspSysConnectAudio(h, c0.cmp, "out", afop, "in0" ); // ec -> audio_file
  829. cmDspSysConnectAudio(h, c0.cmp, "out", mo0p, "in" ); //
  830. cmDspSysConnectAudio(h, ai1p, "out", mi1p, "in"); // ain -> meter
  831. cmDspSysConnectAudio(h, ai1p, "out", c1.kr0, "in" ); // ain -> kr
  832. cmDspSysConnectAudio(h, ai1p, "out", c1.kr1, "in" );
  833. //cmDspSysConnectAudio(h, ai1p, "out", ec1, "f_in" ); // ain -> echo_cancel
  834. //cmDspSysConnectAudio(h, c1.cmp, "out", ec1, "uf_in" ); // kr -> echo_cancel
  835. //cmDspSysConnectAudio(h, ec1, "out", ao1p, "in" ); // ec -> aout 0
  836. cmDspSysConnectAudio(h, c1.cmp, "out", ao1p, "in" ); // kr -> echo_cancel
  837. cmDspSysConnectAudio(h, c1.cmp, "out", afop, "in1");
  838. cmDspSysConnectAudio(h, c1.cmp, "out", mo1p, "in" ); //
  839. /*
  840. cmDspSysInstallCb( h, clrBtn, "sym", amp, "cmd", NULL ); // clear active meas.
  841. cmDspSysInstallCb( h, prtBtn, "sym", amp, "cmd", NULL ); // print active meas
  842. cmDspSysInstallCb( h, prtBtn, "sym", modp,"cmd", NULL ); // print modulator
  843. cmDspSysInstallCb( h, amCmd, "add", amp, "cmd", NULL ); // add active meas
  844. cmDspSysInstallCb( h, amCmd, "rewind", amp, "cmd", NULL ); // rewind active meas
  845. cmDspSysInstallCb( h, mlst, "loc", amp, "loc", NULL ); // recorded meas's list to active meas unit
  846. cmDspSysInstallCb( h, mlst, "typeId", amp, "type", NULL ); //
  847. cmDspSysInstallCb( h, mlst, "val", amp, "val", NULL ); //
  848. cmDspSysInstallCb( h, mlst, "cost", amp, "cst", NULL ); //
  849. cmDspSysInstallCb( h, mlst, "typeId", amCmd, "add", NULL ); //
  850. cmDspSysInstallCb( h, sfp, "out", amRt, "f-in", NULL ); // sfp-active meas router (rtr is switched by live btn)
  851. cmDspSysInstallCb( h, amRt, "f-out-0",amp, "sfloc", NULL );
  852. cmDspSysInstallCb( h, sfp, "vloc", amp, "loc", NULL ); // live meas's to active meas unit
  853. cmDspSysInstallCb( h, sfp, "vval", amp, "val", NULL ); //
  854. cmDspSysInstallCb( h, sfp, "vcost",amp, "cst", NULL ); //
  855. cmDspSysInstallCb( h, sfp, "vtyp", amp, "type", NULL ); //
  856. cmDspSysInstallCb( h, sfp, "vtyp", amCmd, "add", NULL); //
  857. */
  858. /*
  859. // ***** delete this to prevent the score follower from driving the active-measure unit in 'live' mode
  860. cmDspSysInstallCb( h, amRt, "f-out-1",amp, "sfloc", NULL );
  861. // *****
  862. // active measure loc to xfad channel trigger
  863. cmDspSysInstallCb( h, amp, "scloc", c0.achan, "trig", NULL ); // See Also: modp.sw ->achan.trig
  864. cmDspSysInstallCb( h, amp, "scloc", c1.achan, "trig", NULL ); // See Also: modp.sw ->achan.trig
  865. cmDspSysInstallCb( h, amp, "even", pre, "in", NULL ); // active meas output to printers
  866. cmDspSysInstallCb( h, amp, "dyn", prd, "in", NULL );
  867. cmDspSysInstallCb( h, amp, "tempo", prt, "in", NULL );
  868. cmDspSysInstallCb( h, amp, "cost", prc, "in", NULL );
  869. */
  870. // 'live' button -> live router selector switch
  871. cmDspSysInstallCb(h, liveb, "out", wtRt, "sel", NULL );
  872. cmDspSysInstallCb(h, liveb, "out", tlRt, "sel", NULL );
  873. cmDspSysInstallCb(h, liveb, "out", mfpRt,"sel", NULL );
  874. cmDspSysInstallCb(h, liveb, "out", amRt, "sel", NULL );
  875. cmDspSysInstallCb(h, liveb, "out", au0Sw, "chidx", NULL );
  876. cmDspSysInstallCb(h, liveb, "out", au1Sw, "chidx", NULL );
  877. cmDspSysInstallCb(h, liveb, "out", measb, "in", NULL );
  878. cmDspSysInstallCb(h, measb, "out", sfp, "measfl", NULL );
  879. // 'simulate' button -> simulate router selector switch
  880. cmDspSysInstallCb(h, simb, "out", ainb, "in", NULL );
  881. cmDspSysInstallCb(h, ainb, "out", au0Sw, "chidx", NULL );
  882. cmDspSysInstallCb(h, ainb, "out", au1Sw, "chidx", NULL );
  883. cmDspSysInstallCb(h, simb, "out", siRt, "sel", NULL );
  884. cmDspSysInstallCb(h, simb, "out", muRt, "sel", NULL );
  885. cmDspSysInstallCb(h, simb, "out", d1Rt, "sel", NULL );
  886. cmDspSysInstallCb(h, simb, "out", d0Rt, "sel", NULL );
  887. cmDspSysInstallCb(h, simb, "out", stRt, "sel", NULL );
  888. // bldr -> rndr
  889. cmDspSysInstallCb( h, bldr, "bldr", rndr, "bldr", NULL);
  890. cmDspSysInstallCb( h, bldr, "refresh", rndr, "refresh", NULL );
  891. cmDspSysInstallCb( h, bldr, "sel", rndr, "sel", NULL );
  892. // start connections
  893. cmDspSysInstallCb(h, onb, "sym", tlRt, "s-in", NULL );
  894. cmDspSysInstallCb(h, onb, "sym", rndr, "cmd", NULL );
  895. cmDspSysInstallCb(h, onb, "sym", bldr, "send", NULL );
  896. cmDspSysInstallCb(h, onb, "sym", mfpRt, "s-in", NULL );
  897. cmDspSysInstallCb(h, onb, "sym", pts, "on", NULL );
  898. cmDspSysInstallCb(h, pts, "on", wtRt, "s-in", NULL );
  899. cmDspSysInstallCb(h, pts, "on", modp, "cmd", NULL );
  900. cmDspSysInstallCb(h, onb, "sym", amCmd, "rewind",NULL );
  901. cmDspSysInstallCb(h, onb, "out", c0.achan,"reset", NULL );
  902. cmDspSysInstallCb(h, onb, "out", c1.achan,"reset", NULL );
  903. cmDspSysInstallCb(h, c0.achan, "ch", pra0, "in", NULL );
  904. cmDspSysInstallCb(h, c1.achan, "ch", pra1, "in", NULL );
  905. // stop connections
  906. cmDspSysInstallCb(h, offb, "sym", pts, "off", NULL );
  907. cmDspSysInstallCb(h, pts, "off", modp, "cmd", NULL );
  908. cmDspSysInstallCb(h, offb, "sym", mop, "reset", NULL );
  909. cmDspSysInstallCb(h, offb, "sym", mo2p, "reset", NULL );
  910. cmDspSysInstallCb(h, pts, "off", rndr, "cmd", NULL );
  911. // score to score follower - to set initial search location
  912. cmDspSysInstallCb(h, bldr, "sel", sfp, "index", NULL );
  913. cmDspSysInstallCb(h, bldr, "sel", modp,"reset", NULL );
  914. cmDspSysInstallCb(h, bldr, "sel", prp, "in", NULL );
  915. // MIDI file player to score follower
  916. cmDspSysInstallCb(h, rndr, "smpidx", siRt, "f-in", NULL );
  917. cmDspSysInstallCb(h, siRt, "f-out-1", sfp, "smpidx",NULL );
  918. // leave siRt.f-out-1 unconnected because it should be ignored in 'simulate mode'
  919. /// ???? does rndr need to generate muid ??????
  920. cmDspSysInstallCb(h, muRt, "f-out-1", sfp, "muid", NULL );
  921. // leave muRt.f-out-1 unconnected because it should be ignored in 'simulate mode'
  922. cmDspSysInstallCb(h, rndr, "d1", d1Rt, "f-in", NULL );
  923. cmDspSysInstallCb(h, d1Rt, "f-out-1", sfp, "d1", NULL );
  924. cmDspSysInstallCb(h, d1Rt, "f-out-1", nmp, "d1", NULL );
  925. cmDspSysInstallCb(h, nmp, "d1", mop, "d1", NULL );
  926. cmDspSysInstallCb(h, nmp, "d1", mo2p, "d1", NULL );
  927. cmDspSysInstallCb(h, rndr, "d0", d0Rt, "f-in", NULL );
  928. cmDspSysInstallCb(h, d0Rt, "f-out-1", sfp, "d0", NULL );
  929. cmDspSysInstallCb(h, d0Rt, "f-out-1", nmp, "d0", NULL );
  930. cmDspSysInstallCb(h, nmp, "d0", mop, "d0", NULL );
  931. cmDspSysInstallCb(h, nmp, "d0", mo2p, "d0", NULL );
  932. cmDspSysInstallCb(h, rndr, "status", stRt, "f-in", NULL );
  933. cmDspSysInstallCb(h, stRt, "f-out-1", sfp, "status",NULL );
  934. cmDspSysInstallCb(h, stRt, "f-out-1", nmp, "status",NULL );
  935. cmDspSysInstallCb(h, nmp, "status", mop, "status",NULL );
  936. cmDspSysInstallCb(h, nmp, "status", mo2p, "status",NULL );
  937. // score follower to recd_play,modulator and printers
  938. cmDspSysInstallCb(h, sfp, "out", modp, "index", NULL );
  939. cmDspSysInstallCb(h, sfp, "recent", prp, "in", NULL ); // report 'recent' but only act on 'max' loc index
  940. cmDspSysInstallCb(h, igain0, "val", ai0p, "gain", NULL ); // input gain control
  941. cmDspSysInstallCb(h, igain0, "val", ai1p, "gain", NULL ); // input gain control
  942. /*
  943. cmDspSysInstallCb(h, ec_mu, "val", ec0, "mu", NULL );
  944. cmDspSysInstallCb(h, ec_di, "val", ec0, "delayN", NULL );
  945. cmDspSysInstallCb(h, ec_hn, "val", ec0, "irN", NULL );
  946. cmDspSysInstallCb(h, ec_byp,"out", ec0, "bypass", NULL );
  947. cmDspSysInstallCb(h, ec_mu, "val", ec1, "mu", NULL );
  948. cmDspSysInstallCb(h, ec_di, "val", ec1, "delayN", NULL );
  949. cmDspSysInstallCb(h, ec_hn, "val", ec1, "irN", NULL );
  950. cmDspSysInstallCb(h, ec_byp,"out", ec1, "bypass", NULL );
  951. */
  952. cmDspSysInstallCb(h, ogain0, "val", ao0p, "gain", NULL ); // output gain control
  953. cmDspSysInstallCb(h, ogain0, "val", ao1p, "gain", NULL );
  954. return rc;
  955. }
  956. //)