libcm is a C development framework with an emphasis on audio signal processing applications.
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

cmDspPgmKrTksb.c 63KB

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