libcm is a C development framework with an emphasis on audio signal processing applications.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

cmDspPgmKrTksb.c 63KB

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