libcm is a C development framework with an emphasis on audio signal processing applications.
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

cmDspPgmKr.c 47KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866
  1. //( { file_desc:"'snap' Performance analysis Time Line program." kw:[snap]}
  2. #include "cmPrefix.h"
  3. #include "cmGlobal.h"
  4. #include "cmFloatTypes.h"
  5. #include "cmRpt.h"
  6. #include "cmErr.h"
  7. #include "cmCtx.h"
  8. #include "cmMem.h"
  9. #include "cmMallocDebug.h"
  10. #include "cmLinkedHeap.h"
  11. #include "cmText.h"
  12. #include "cmFileSys.h"
  13. #include "cmSymTbl.h"
  14. #include "cmJson.h"
  15. #include "cmPrefs.h"
  16. #include "cmDspValue.h"
  17. #include "cmMsgProtocol.h"
  18. #include "cmThread.h"
  19. #include "cmUdpPort.h"
  20. #include "cmUdpNet.h"
  21. #include "cmSerialPort.h"
  22. #include "cmTime.h"
  23. #include "cmAudioSys.h"
  24. #include "cmProcObj.h"
  25. #include "cmDspCtx.h"
  26. #include "cmDspClass.h"
  27. #include "cmDspSys.h"
  28. #include "cmDspPgm.h"
  29. #include "cmAudioFile.h"
  30. #include "cmProcObj.h"
  31. #include "cmProc.h"
  32. #include "cmProc3.h"
  33. #include "cmVectOpsTemplateMain.h"
  34. #include "cmVectOps.h"
  35. #include "cmDspPgmKrChain.h"
  36. //)
  37. //( { label:cmDspPgm_TimeLine file_desc:"Audio/MIDI sequencer for analyzing the score vs. the performance and generating related audio transforms." kw:[spgm] }
  38. cmDspRC_t _cmDspSysPgm_TimeLine(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 = false;
  49. unsigned wtLoopCnt = 1; // 1=play once (-1=loop forever)
  50. unsigned wtInitMode = 0; // initial wt mode is 'silence'
  51. unsigned wtSmpCnt = floor(cmDspSysSampleRate(h)); // wt length == srate
  52. unsigned sfBufCnt = 7; // length of the MIDI event buffer
  53. unsigned sfMaxWndCnt = 10; // length of the score event buffer
  54. unsigned sfMinVel = 5; // ignore MIDI events below this velocity
  55. bool sfEnaMeasFl = false;
  56. double recdPlayInitAllocSecs = 10.0;
  57. double recdPlayMaxLaSecs = 2.0;
  58. double recdPlayCurLaSecs = 0.1;
  59. double recdPlayFadeRateDbPerSec = 4.0;
  60. bool eqBypassFl = false;
  61. unsigned eqLpSymId = cmSymTblRegisterStaticSymbol(cmDspSysSymbolTable(h),"LP");
  62. double eqLpF0hz = 200.0;
  63. double eqLpQ = 0.5;
  64. double eqLpGain = 0.9;
  65. unsigned eqBpSymId = cmSymTblRegisterStaticSymbol(cmDspSysSymbolTable(h),"BP");
  66. double eqBpF0hz = 350.0;
  67. double eqBpQ = 0.6;
  68. double eqBpGain = 1.0;
  69. unsigned eqHpSymId = cmSymTblRegisterStaticSymbol(cmDspSysSymbolTable(h),"HP");
  70. double eqHpF0hz = 600.0;
  71. double eqHpQ = 0.5;
  72. double eqHpGain = 0.9;
  73. bool apfBypassFl = false;
  74. unsigned apfModeSymId = cmSymTblRegisterStaticSymbol(cmDspSysSymbolTable(h),"AP");
  75. double apfF0hz = 100.0;
  76. double apfQ = 1.0;
  77. double apfGain = 1.0;
  78. // input compressor default parameters
  79. bool cmpBypassFl = false;
  80. double cmpInGain = 3.0;
  81. double cmpThreshDb = -40.0;
  82. double cmpRatio_num = 5.0;
  83. double cmpAtkMs = 20.0;
  84. double cmpRlsMs = 100.0;
  85. double cmpMakeup = 1.0;
  86. double cmpWndMaxMs = 1000.0;
  87. double cmpWndMs = 200.0;
  88. memset(&r,0,sizeof(r));
  89. cmErrSetup(&err,&cmCtx->rpt,"Kr Timeline");
  90. if( krLoadRsrc(h,&err,&r) != kOkDspRC )
  91. return rc;
  92. cmDspInst_t* ai0p = cmDspSysAllocInst(h,"AudioIn", NULL, 1, 0);
  93. cmDspInst_t* ai1p = cmDspSysAllocInst(h,"AudioIn", NULL, 1, 1);
  94. cmDspInst_t* ai2p = cmDspSysAllocInst(h,"AudioIn", NULL, 1, 2);
  95. cmDspInst_t* ai3p = cmDspSysAllocInst(h,"AudioIn", NULL, 1, 3);
  96. cmDspInst_t* eqLpf_0 = useInputEqFl ? cmDspSysAllocInst(h,"BiQuadEq",NULL, 5, eqBypassFl, eqLpSymId,eqLpF0hz, eqLpQ, eqLpGain ) : NULL;
  97. cmDspInst_t* eqLpf_1 = useInputEqFl ? cmDspSysAllocInst(h,"BiQuadEq",NULL, 5, eqBypassFl, eqLpSymId,eqLpF0hz, eqLpQ, eqLpGain ) : NULL;
  98. cmDspInst_t* eqLpf_2 = useInputEqFl ? cmDspSysAllocInst(h,"BiQuadEq",NULL, 5, eqBypassFl, eqLpSymId,eqLpF0hz, eqLpQ, eqLpGain ) : NULL;
  99. cmDspInst_t* eqLpf_3 = useInputEqFl ? cmDspSysAllocInst(h,"BiQuadEq",NULL, 5, eqBypassFl, eqLpSymId,eqLpF0hz, eqLpQ, eqLpGain ) : NULL;
  100. cmDspInst_t* eqBpf_0 = useInputEqFl ? cmDspSysAllocInst(h,"BiQuadEq",NULL, 5, eqBypassFl, eqBpSymId,eqBpF0hz, eqBpQ, eqBpGain ) : NULL;
  101. cmDspInst_t* eqBpf_1 = useInputEqFl ? cmDspSysAllocInst(h,"BiQuadEq",NULL, 5, eqBypassFl, eqBpSymId,eqBpF0hz, eqBpQ, eqBpGain ) : NULL;
  102. cmDspInst_t* eqBpf_2 = useInputEqFl ? cmDspSysAllocInst(h,"BiQuadEq",NULL, 5, eqBypassFl, eqBpSymId,eqBpF0hz, eqBpQ, eqBpGain ) : NULL;
  103. cmDspInst_t* eqBpf_3 = useInputEqFl ? cmDspSysAllocInst(h,"BiQuadEq",NULL, 5, eqBypassFl, eqBpSymId,eqBpF0hz, eqBpQ, eqBpGain ) : NULL;
  104. cmDspInst_t* eqHpf_0 = useInputEqFl ? cmDspSysAllocInst(h,"BiQuadEq",NULL, 5, eqBypassFl, eqHpSymId,eqHpF0hz, eqHpQ, eqHpGain ) : NULL;
  105. cmDspInst_t* eqHpf_1 = useInputEqFl ? cmDspSysAllocInst(h,"BiQuadEq",NULL, 5, eqBypassFl, eqHpSymId,eqHpF0hz, eqHpQ, eqHpGain ) : NULL;
  106. cmDspInst_t* eqHpf_2 = useInputEqFl ? cmDspSysAllocInst(h,"BiQuadEq",NULL, 5, eqBypassFl, eqHpSymId,eqHpF0hz, eqHpQ, eqHpGain ) : NULL;
  107. cmDspInst_t* eqHpf_3 = useInputEqFl ? cmDspSysAllocInst(h,"BiQuadEq",NULL, 5, eqBypassFl, eqHpSymId,eqHpF0hz, eqHpQ, eqHpGain ) : NULL;
  108. double eqMixGain = 1.0/3.0;
  109. cmDspInst_t* eqMx_0 = useInputEqFl ? cmDspSysAllocInst( h, "AMix", NULL, 4, 3, eqMixGain, eqMixGain, eqMixGain) : NULL;
  110. cmDspInst_t* eqMx_1 = useInputEqFl ? cmDspSysAllocInst( h, "AMix", NULL, 4, 3, eqMixGain, eqMixGain, eqMixGain) : NULL;
  111. cmDspInst_t* eqMx_2 = useInputEqFl ? cmDspSysAllocInst( h, "AMix", NULL, 4, 3, eqMixGain, eqMixGain, eqMixGain) : NULL;
  112. cmDspInst_t* eqMx_3 = useInputEqFl ? cmDspSysAllocInst( h, "AMix", NULL, 4, 3, eqMixGain, eqMixGain, eqMixGain) : NULL;
  113. cmDspInst_t* mx0p = cmDspSysAllocInst( h, "AMix", NULL, 3, 2, 0.5, 0.5);
  114. cmDspInst_t* mx1p = cmDspSysAllocInst( h, "AMix", NULL, 3, 2, 0.5, 0.5);
  115. cmDspInst_t* ci0p = NULL;
  116. cmDspInst_t* ci1p = NULL;
  117. if( useInCompFl )
  118. {
  119. ci0p = cmDspSysAllocInst(h,"Compressor", NULL, 8, cmpBypassFl, cmpThreshDb, cmpRatio_num, cmpAtkMs, cmpRlsMs, cmpMakeup, cmpWndMs, cmpWndMaxMs );
  120. ci1p = cmDspSysAllocInst(h,"Compressor", NULL, 8, cmpBypassFl, cmpThreshDb, cmpRatio_num, cmpAtkMs, cmpRlsMs, cmpMakeup, cmpWndMs, cmpWndMaxMs );
  121. }
  122. cmDspInst_t* tlp = cmDspSysAllocInst(h,"TimeLine", "tl", 2, r.tlFn, r.tlPrefixPath );
  123. cmDspInst_t* scp = cmDspSysAllocInst(h,"Score", "sc", 1, r.scFn );
  124. cmDspInst_t* php = cmDspSysAllocInst(h,"Phasor", NULL, 1, cmDspSysSampleRate(h) );
  125. cmDspInst_t* wtp = cmDspSysAllocInst(h,"WaveTable", NULL, 4, wtSmpCnt, wtInitMode, NULL, wtLoopCnt );
  126. cmDspInst_t* pts = cmDspSysAllocInst(h,"PortToSym", NULL, 2, "on", "off" );
  127. //cmDspInst_t* mip = cmDspSysAllocInst(h,"MidiIn", NULL, 0 );
  128. cmDspInst_t* mfp = cmDspSysAllocInst(h,"MidiFilePlay",NULL, 0 );
  129. cmDspInst_t* nmp = cmDspSysAllocInst(h,"NanoMap", NULL, 0 );
  130. cmDspInst_t* mop = cmDspSysAllocInst(h,"MidiOut", NULL, 2, r.midiDevice,r.midiOutPort);
  131. cmDspInst_t* mo2p = cmDspSysAllocInst(h,"MidiOut", NULL, 2, r.midiDevice,r.midiOutPort2);
  132. cmDspInst_t* sfp = cmDspSysAllocInst(h,"ScFol", NULL, 1, r.scFn, sfBufCnt, sfMaxWndCnt, sfMinVel, sfEnaMeasFl );
  133. cmDspInst_t* amp = cmDspSysAllocInst(h,"ActiveMeas", NULL, 1, 100 );
  134. cmDspInst_t* rpp = cmDspSysAllocInst(h,"RecdPlay", NULL, 6, 2, r.scFn, recdPlayInitAllocSecs, recdPlayMaxLaSecs, recdPlayCurLaSecs, recdPlayFadeRateDbPerSec);
  135. cmDspInst_t* modp = cmDspSysAllocInst(h,"ScMod", NULL, 2, r.modFn, "m1" );
  136. cmDspInst_t* modr = cmDspSysAllocInst(h,"ScMod", NULL, 2, r.modFn, "m1" );
  137. unsigned preGrpSymId = cmDspSysPresetRegisterGroup(h,"tl");
  138. unsigned cmpPreGrpSymId = cmDspSysPresetRegisterGroup(h,"tl_cmp");
  139. cmDspTlXform_t c0,c1,c2,c3;
  140. cmDspSysNewPage(h,"Controls-0");
  141. _cmDspSys_TlXformChain(h, &c0, preGrpSymId, cmpPreGrpSymId, amp, modp, 0, 0 );
  142. if( useChain1Fl )
  143. {
  144. cmDspSysNewPage(h,"Controls-1");
  145. _cmDspSys_TlXformChain(h, &c1, preGrpSymId, cmpPreGrpSymId, amp, modp, 1, 1 );
  146. }
  147. cmDspInst_t* mix0 = NULL;
  148. cmDspInst_t* mix1 = NULL;
  149. if( fragFl )
  150. {
  151. cmDspSysNewPage(h,"Ctl-R/P-0");
  152. _cmDspSys_TlXformChain(h, &c2, preGrpSymId, cmpPreGrpSymId, amp, modr, 2, 0 );
  153. cmDspSysNewPage(h,"Ctl-R/P-1");
  154. _cmDspSys_TlXformChain(h, &c3, preGrpSymId, cmpPreGrpSymId, amp, modr, 3, 1 );
  155. mix0 = cmDspSysAllocInst(h,"AMix", NULL, 3, 2, 1.0, 1.0 );
  156. mix1 = cmDspSysAllocInst(h,"AMix", NULL, 3, 2, 1.0, 1.0 );
  157. }
  158. if( useInCompFl )
  159. {
  160. cmDspSysNewPage(h,"InComp");
  161. cmDspInst_t* cmp0_byp = cmDspSysAllocCheckP( h, cmpPreGrpSymId, NULL, ("0-Bypass"), 0.0 );
  162. cmDspInst_t* cmp0_igain = cmDspSysAllocScalarP( h, cmpPreGrpSymId, NULL, ("0-In Gain"), 0.0, 10.0, 0.1, cmpInGain);
  163. cmDspInst_t* cmp0_thr = cmDspSysAllocScalarP( h, cmpPreGrpSymId, NULL, ("0-ThreshDb"), -100.0, 0.0, 0.1, cmpThreshDb);
  164. cmDspInst_t* cmp0_rat = cmDspSysAllocScalarP( h, cmpPreGrpSymId, NULL, ("0-Ratio"), 0.1, 100, 0.1, cmpRatio_num);
  165. cmDspInst_t* cmp0_atk = cmDspSysAllocScalarP( h, cmpPreGrpSymId, NULL, ("0-Atk Ms"), 0.0, 1000.0, 0.1, cmpAtkMs);
  166. cmDspInst_t* cmp0_rls = cmDspSysAllocScalarP( h, cmpPreGrpSymId, NULL, ("0-Rls Ms"), 0.0, 1000.0, 0.1, cmpRlsMs);
  167. cmDspInst_t* cmp0_mkup = cmDspSysAllocScalarP( h, cmpPreGrpSymId, NULL, ("0-Makeup"), 0.0, 10.0, 0.01, cmpMakeup);
  168. cmDspInst_t* cmp0_wnd = cmDspSysAllocScalarP( h, cmpPreGrpSymId, NULL, ("0-Wnd Ms"), 1.0, cmpWndMaxMs, 1.0, cmpWndMs );
  169. cmDspInst_t* cmp0_mtr = cmDspSysAllocInst(h,"Meter",("0-Env"), 3, 0.0, 0.0, 1.0);
  170. cmDspSysInstallCb(h, cmp0_byp, "out", ci0p, "bypass", NULL );
  171. cmDspSysInstallCb(h, cmp0_igain,"val", ci0p, "igain", NULL );
  172. cmDspSysInstallCb(h, cmp0_thr, "val", ci0p, "thr", NULL );
  173. cmDspSysInstallCb(h, cmp0_rat, "val", ci0p, "ratio", NULL );
  174. cmDspSysInstallCb(h, cmp0_atk, "val", ci0p, "atk", NULL );
  175. cmDspSysInstallCb(h, cmp0_rls, "val", ci0p, "rls", NULL );
  176. cmDspSysInstallCb(h, cmp0_mkup, "val", ci0p, "ogain", NULL );
  177. cmDspSysInstallCb(h, cmp0_wnd, "val", ci0p, "wnd", NULL );
  178. cmDspSysInstallCb(h, ci0p, "env", cmp0_mtr, "in", NULL );
  179. cmDspSysNewColumn(h,0);
  180. cmDspInst_t* cmp1_byp = cmDspSysAllocCheckP( h, cmpPreGrpSymId, NULL, ("1-Bypass"), 0.0 );
  181. cmDspInst_t* cmp1_igain = cmDspSysAllocScalarP( h, cmpPreGrpSymId, NULL, ("1-In Gain"), 0.0, 10.0, 0.1, cmpInGain);
  182. cmDspInst_t* cmp1_thr = cmDspSysAllocScalarP( h, cmpPreGrpSymId, NULL, ("1-ThreshDb"), -100.0, 0.0, 0.1, cmpThreshDb);
  183. cmDspInst_t* cmp1_rat = cmDspSysAllocScalarP( h, cmpPreGrpSymId, NULL, ("1-Ratio"), 0.1, 100, 0.1, cmpRatio_num);
  184. cmDspInst_t* cmp1_atk = cmDspSysAllocScalarP( h, cmpPreGrpSymId, NULL, ("1-Atk Ms"), 0.0, 1000.0, 0.1, cmpAtkMs);
  185. cmDspInst_t* cmp1_rls = cmDspSysAllocScalarP( h, cmpPreGrpSymId, NULL, ("1-Rls Ms"), 0.0, 1000.0, 0.1, cmpRlsMs);
  186. cmDspInst_t* cmp1_mkup = cmDspSysAllocScalarP( h, cmpPreGrpSymId, NULL, ("1-Makeup"), 0.0, 10.0, 0.01, cmpMakeup);
  187. cmDspInst_t* cmp1_wnd = cmDspSysAllocScalarP( h, cmpPreGrpSymId, NULL, ("1-Wnd Ms"), 1.0, cmpWndMaxMs, 1.0, cmpWndMs );
  188. cmDspInst_t* cmp1_mtr = cmDspSysAllocInst(h,"Meter",("1-Env"), 3, 0.0, 0.0, 1.0);
  189. cmDspSysInstallCb(h, cmp1_byp, "out", ci1p, "bypass", NULL );
  190. cmDspSysInstallCb(h, cmp1_igain,"val", ci1p, "igain", NULL );
  191. cmDspSysInstallCb(h, cmp1_thr, "val", ci1p, "thr", NULL );
  192. cmDspSysInstallCb(h, cmp1_rat, "val", ci1p, "ratio", NULL );
  193. cmDspSysInstallCb(h, cmp1_atk, "val", ci1p, "atk", NULL );
  194. cmDspSysInstallCb(h, cmp1_rls, "val", ci1p, "rls", NULL );
  195. cmDspSysInstallCb(h, cmp1_mkup, "val", ci1p, "ogain", NULL );
  196. cmDspSysInstallCb(h, cmp1_wnd, "val", ci1p, "wnd", NULL );
  197. cmDspSysInstallCb(h, ci1p, "env", cmp1_mtr, "in", NULL );
  198. }
  199. cmDspInst_t* apf0 = cmDspSysAllocInst(h,"BiQuadEq",NULL, 5, apfBypassFl, apfModeSymId, apfF0hz+0, apfQ, apfGain );
  200. cmDspInst_t* apf1 = cmDspSysAllocInst(h,"BiQuadEq",NULL, 5, apfBypassFl, apfModeSymId, apfF0hz+100.0, apfQ, apfGain );
  201. cmDspInst_t* apf2 = cmDspSysAllocInst(h,"BiQuadEq",NULL, 5, apfBypassFl, apfModeSymId, apfF0hz+200.0, apfQ, apfGain );
  202. cmDspInst_t* apf3 = cmDspSysAllocInst(h,"BiQuadEq",NULL, 5, apfBypassFl, apfModeSymId, apfF0hz+300.0, apfQ, apfGain );
  203. cmDspInst_t* ao0p = cmDspSysAllocInst(h,"AudioOut", NULL, 1, 2 );
  204. cmDspInst_t* ao1p = cmDspSysAllocInst(h,"AudioOut", NULL, 1, 3 );
  205. cmDspInst_t* ao2p = cmDspSysAllocInst(h,"AudioOut", NULL, 1, 4 );
  206. cmDspInst_t* ao3p = cmDspSysAllocInst(h,"AudioOut", NULL, 1, 5 );
  207. cmDspSysNewPage(h,"Main");
  208. cmDspInst_t* liveb= cmDspSysAllocInst(h,"Button", "live", 2, kCheckDuiId, 0.0 );
  209. cmDspInst_t* simb = cmDspSysAllocInst(h,"Button", "simulate",2, kCheckDuiId, 0.0 );
  210. cmDspInst_t* ainb = cmDspSysAllocInst(h,"Button", "audio in",2, kCheckDuiId, 0.0 );
  211. cmDspInst_t* measb= cmDspSysAllocInst(h,"Button", "meas", 2, kCheckDuiId, 0.0 );
  212. cmDspInst_t* onb = cmDspSysAllocInst(h,"Button", "start", 2, kButtonDuiId, 1.0 );
  213. cmDspInst_t* offb = cmDspSysAllocInst(h,"Button", "stop", 2, kButtonDuiId, 1.0 );
  214. //cmDspInst_t* prtb = cmDspSysAllocInst(h,"Button", "print", 2, kButtonDuiId, 1.0 );
  215. //cmDspInst_t* qtb = cmDspSysAllocInst(h,"Button", "quiet", 2, kButtonDuiId, 1.0 );
  216. cmDspInst_t* mutm = cmDspSysAllocInst(h,"Checkbox","main", 1, "main","on","off",1.0,0.0,1.0 );
  217. cmDspInst_t* mutr = cmDspSysAllocInst(h,"Checkbox","frag", 1, "frag","on","off",1.0,0.0,1.0 );
  218. cmDspInst_t* prp = cmDspSysAllocInst(h,"Printer", NULL, 1, ">" );
  219. cmDspInst_t* prd = cmDspSysAllocInst(h,"Printer", NULL, 1, "DYN:" );
  220. cmDspInst_t* pre = cmDspSysAllocInst(h,"Printer", NULL, 1, "EVEN:" );
  221. cmDspInst_t* prt = cmDspSysAllocInst(h,"Printer", NULL, 1, "TEMPO:");
  222. cmDspInst_t* prc = cmDspSysAllocInst(h,"Printer", NULL, 1, "COST:");
  223. //cmDspInst_t* prv = cmDspSysAllocInst(h,"Printer", NULL, 1, "Value:");
  224. // Record <-> Live switches
  225. cmDspInst_t* tlRt = cmDspSysAllocInst(h,"Router", NULL, 2, 2, 0); // time line swich
  226. cmDspInst_t* wtRt = cmDspSysAllocInst(h,"Router", NULL, 2, 2, 0);
  227. cmDspInst_t* mfpRt = cmDspSysAllocInst(h,"Router", NULL, 2, 2, 0);
  228. cmDspInst_t* amRt = cmDspSysAllocInst(h,"Router", NULL, 2, 2, 0);
  229. cmDspInst_t* au0Sw = cmDspSysAllocInst(h,"1ofN", NULL, 2, 2, 0);
  230. cmDspInst_t* au1Sw = cmDspSysAllocInst(h,"1ofN", NULL, 2, 2, 0);
  231. cmDspInst_t* siRt = cmDspSysAllocInst(h,"Router", NULL, 2, 2, 0);
  232. cmDspInst_t* muRt = cmDspSysAllocInst(h,"Router", NULL, 2, 2, 0);
  233. cmDspInst_t* d0Rt = cmDspSysAllocInst(h,"Router", NULL, 2, 2, 0);
  234. cmDspInst_t* d1Rt = cmDspSysAllocInst(h,"Router", NULL, 2, 2, 0);
  235. cmDspInst_t* stRt = cmDspSysAllocInst(h,"Router", NULL, 2, 2, 0);
  236. cmDspSysNewColumn(h,0);
  237. cmDspInst_t* igain0 = cmDspSysAllocInst(h,"Scalar", "In Gain-0", 5, kNumberDuiId, 0.0, 100.0,0.01, 1.0 );
  238. cmDspInst_t* igain1 = cmDspSysAllocInst(h,"Scalar", "In Gain-1", 5, kNumberDuiId, 0.0, 100.0,0.01, 1.0 );
  239. cmDspInst_t* igain2 = cmDspSysAllocInst(h,"Scalar", "In Gain-2", 5, kNumberDuiId, 0.0, 100.0,0.01, 1.0 );
  240. cmDspInst_t* igain3 = cmDspSysAllocInst(h,"Scalar", "In Gain-3", 5, kNumberDuiId, 0.0, 100.0,0.01, 1.0 );
  241. cmDspInst_t* lasecs = cmDspSysAllocInst(h,"Scalar", "LA Secs", 5, kNumberDuiId, 0.0, recdPlayMaxLaSecs,0.01, recdPlayCurLaSecs );
  242. cmDspInst_t* dbpsec = cmDspSysAllocInst(h,"Scalar", "Fade dBpSec", 5, kNumberDuiId, 0.0, 24.0, 0.01, recdPlayFadeRateDbPerSec);
  243. cmDspInst_t* apfByp = cmDspSysAllocCheck( h, "APF-Bypass", 0.0 );
  244. cmDspSysNewColumn(h,0);
  245. cmDspInst_t* ogain0 = cmDspSysAllocInst(h,"Scalar", "Out Gain-0", 5, kNumberDuiId, 0.0, 10.0,0.01, 1.0 );
  246. cmDspInst_t* ogain1 = cmDspSysAllocInst(h,"Scalar", "Out Gain-1", 5, kNumberDuiId, 0.0, 10.0,0.01, 1.0 );
  247. cmDspInst_t* ogain2 = cmDspSysAllocInst(h,"Scalar", "Out Gain-2", 5, kNumberDuiId, 0.0, 10.0,0.01, 1.0 );
  248. cmDspInst_t* ogain3 = cmDspSysAllocInst(h,"Scalar", "Out Gain-3", 5, kNumberDuiId, 0.0, 10.0,0.01, 1.0 );
  249. //cmDspInst_t* scLoc = cmDspSysAllocInst(h,"Scalar", "Sc Loc", 5, kNumberDuiId, 0.0, 3000.0, 1.0, 0.0 );
  250. // Audio file recording
  251. cmDspInst_t* recdGain= cmDspSysAllocInst(h,"Scalar", "Recd Gain", 5, kNumberDuiId, 0.0, 100.0,0.01, 1.5 );
  252. cmDspInst_t* recdChk = cmDspSysAllocInst(h,"Button", "Record", 2, kCheckDuiId, 0.0 );
  253. cmDspInst_t* recdPtS = cmDspSysAllocInst(h,"GateToSym", NULL, 2, cmSymTblRegisterStaticSymbol(cmDspSysSymbolTable(h),"open"),cmSymTblRegisterStaticSymbol(cmDspSysSymbolTable(h),"close"));
  254. cmDspInst_t* afop = cmDspSysAllocInst(h,"AudioFileOut",NULL, 2, r.recordDir,2);
  255. cmDspInst_t* mi0p = cmDspSysAllocInst(h,"AMeter","In 0", 0);
  256. cmDspInst_t* mi1p = cmDspSysAllocInst(h,"AMeter","In 1", 0);
  257. cmDspInst_t* mi2p = cmDspSysAllocInst(h,"AMeter","In 2", 0);
  258. cmDspInst_t* mi3p = cmDspSysAllocInst(h,"AMeter","In 3", 0);
  259. //--------------- Preset controls
  260. cmDspSysNewColumn(h,0);
  261. cmDspInst_t* preset = cmDspSysAllocInst( h, "Preset", NULL, 1, preGrpSymId );
  262. cmDspInst_t* presetLbl = cmDspSysAllocInst( h, "Text", "Preset", 1, "" );
  263. cmDspInst_t* storeBtn = cmDspSysAllocButton( h, "store", 0);
  264. cmDspInst_t* recallBtn = cmDspSysAllocButton( h, "recall", 0);
  265. cmDspSysInstallCb( h, presetLbl, "val", preset, "label",NULL);
  266. cmDspSysInstallCb( h, storeBtn, "sym", preset, "cmd", NULL );
  267. cmDspSysInstallCb( h, recallBtn, "sym", preset, "cmd", NULL );
  268. cmDspInst_t* prePath = cmDspSysAllocInst( h, "Fname", "prePath", 3, true,NULL,r.tlPrefixPath);
  269. cmDspSysNewColumn(h,0);
  270. //--------------- Recorded performance evaluation and Active Measurement related controls
  271. cmDspInst_t* clrBtn = cmDspSysAllocButton( h, "clear", 0);
  272. cmDspInst_t* prtBtn = cmDspSysAllocButton( h, "dump", 0);
  273. cmDspInst_t* mlst = cmDspSysAllocInst( h, "MsgList", NULL, 3, "meas", r.measFn, 2);
  274. cmDspInst_t* amCmd = cmDspSysAllocInst( h, "PortToSym", NULL, 2, "add", "rewind" );
  275. if( useInputEqFl ) cmDspSysNewPage(h,"In EQ");
  276. cmDspInst_t* eqLpByp0 = useInputEqFl ? cmDspSysAllocCheck( h,"Eq-LPF-Bypass-0", 0.0 ) : NULL;
  277. cmDspInst_t* eqLpMode0 = useInputEqFl ? cmDspSysAllocInst( h,"MsgList","Eq-LPF-Mode-0", 3, "biQuadEqMode", NULL, 1) : NULL;
  278. cmDspInst_t* eqLpFc0 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-LPF-Hz-0", 5, kNumberDuiId, 0.0, 20000.0, 0.5, eqLpF0hz ) : NULL;
  279. cmDspInst_t* eqLpQ0 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-LPF-Q-0", 5, kNumberDuiId, 0.0, 100.0, 0.01, eqLpQ ) : NULL;
  280. cmDspInst_t* eqLpGain0 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-LPF-Gain-0", 5, kNumberDuiId, -100.0, 100.0, 0.5, eqLpGain ) : NULL;
  281. cmDspInst_t* eqBpByp0 = useInputEqFl ? cmDspSysAllocCheck( h,"Eq-BPF-Bypass-0", 0.0 ) : NULL;
  282. cmDspInst_t* eqBpMode0 = useInputEqFl ? cmDspSysAllocInst( h,"MsgList","Eq-BPF-Mode-0", 3, "biQuadEqMode", NULL, 3) : NULL;
  283. cmDspInst_t* eqBpFc0 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-BPF-Hz-0", 5, kNumberDuiId, 0.0, 20000.0, 0.5, eqBpF0hz ) : NULL;
  284. cmDspInst_t* eqBpQ0 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-BPF-Q-0", 5, kNumberDuiId, 0.0, 100.0, 0.01, eqBpQ ) : NULL;
  285. cmDspInst_t* eqBpGain0 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-BPF-Gain-0", 5, kNumberDuiId, -100.0, 100.0, 0.5, eqBpGain ) : NULL;
  286. cmDspInst_t* eqHpByp0 = useInputEqFl ? cmDspSysAllocCheck( h,"Eq-HPF-Bypass-0", 0.0 ) : NULL;
  287. cmDspInst_t* eqHpMode0 = useInputEqFl ? cmDspSysAllocInst( h,"MsgList","Eq-HPF-Mode-0", 3, "biQuadEqMode", NULL, 2) : NULL;
  288. cmDspInst_t* eqHpFc0 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-HPF-Hz-0", 5, kNumberDuiId, 0.0, 20000.0, 0.5, eqHpF0hz ) : NULL;
  289. cmDspInst_t* eqHpQ0 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-HPF-Q-0", 5, kNumberDuiId, 0.0, 100.0, 0.01, eqHpQ ) : NULL;
  290. cmDspInst_t* eqHpGain0 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-HPF-Gain-0", 5, kNumberDuiId, -100.0, 100.0, 0.5, eqHpGain ) : NULL;
  291. if( useInputEqFl ) cmDspSysNewColumn(h,0);
  292. cmDspInst_t* eqLpByp1 = useInputEqFl ? cmDspSysAllocCheck( h,"Eq-LPF-Bypass-1", 0.0 ) : NULL;
  293. cmDspInst_t* eqLpMode1 = useInputEqFl ? cmDspSysAllocInst( h,"MsgList","Eq-LPF-Mode-1", 3, "biQuadEqMode", NULL, 1) : NULL;
  294. cmDspInst_t* eqLpFc1 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-LPF-Hz-1", 5, kNumberDuiId, 0.0, 20000.0, 0.5, eqLpF0hz ) : NULL;
  295. cmDspInst_t* eqLpQ1 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-LPF-Q-1", 5, kNumberDuiId, 0.0, 100.0, 0.01, eqLpQ ) : NULL;
  296. cmDspInst_t* eqLpGain1 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-LPF-Gain-1", 5, kNumberDuiId, -100.0, 100.0, 0.5, eqLpGain ) : NULL;
  297. cmDspInst_t* eqBpByp1 = useInputEqFl ? cmDspSysAllocCheck( h,"Eq-BPF-Bypass-1", 0.0 ) : NULL;
  298. cmDspInst_t* eqBpMode1 = useInputEqFl ? cmDspSysAllocInst( h,"MsgList","Eq-BPF-Mode-1", 3, "biQuadEqMode", NULL, 3) : NULL;
  299. cmDspInst_t* eqBpFc1 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-BPF-Hz-1", 5, kNumberDuiId, 0.0, 20000.0, 0.5, eqBpF0hz ) : NULL;
  300. cmDspInst_t* eqBpQ1 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-BPF-Q-1", 5, kNumberDuiId, 0.0, 100.0, 0.01, eqBpQ ) : NULL;
  301. cmDspInst_t* eqBpGain1 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-BPF-Gain-1", 5, kNumberDuiId, -100.0, 100.0, 0.5, eqBpGain ) : NULL;
  302. cmDspInst_t* eqHpByp1 = useInputEqFl ? cmDspSysAllocCheck( h,"Eq-HPF-Bypass-1", 0.0 ) : NULL;
  303. cmDspInst_t* eqHpMode1 = useInputEqFl ? cmDspSysAllocInst( h,"MsgList","Eq-HPF-Mode-1", 3, "biQuadEqMode", NULL, 2) : NULL;
  304. cmDspInst_t* eqHpFc1 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-HPF-Hz-1", 5, kNumberDuiId, 0.0, 20000.0, 0.5, eqHpF0hz ) : NULL;
  305. cmDspInst_t* eqHpQ1 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-HPF-Q-1", 5, kNumberDuiId, 0.0, 100.0, 0.01, eqHpQ ) : NULL;
  306. cmDspInst_t* eqHpGain1 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-HPF-Gain-1", 5, kNumberDuiId, -100.0, 100.0, 0.5, eqHpGain ) : NULL;
  307. if( useInputEqFl ) cmDspSysNewColumn(h,0);
  308. cmDspInst_t* eqLpByp2 = useInputEqFl ? cmDspSysAllocCheck( h,"Eq-LPF-Bypass-2", 0.0 ) : NULL;
  309. cmDspInst_t* eqLpMode2 = useInputEqFl ? cmDspSysAllocInst( h,"MsgList","Eq-LPF-Mode-2", 3, "biQuadEqMode", NULL, 1) : NULL;
  310. cmDspInst_t* eqLpFc2 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-LPF-Hz-2", 5, kNumberDuiId, 0.0, 20000.0, 0.5, eqLpF0hz ) : NULL;
  311. cmDspInst_t* eqLpQ2 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-LPF-Q-2", 5, kNumberDuiId, 0.0, 100.0, 0.01, eqLpQ ) : NULL;
  312. cmDspInst_t* eqLpGain2 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-LPF-Gain-2", 5, kNumberDuiId, -100.0, 100.0, 0.5, eqLpGain ) : NULL;
  313. cmDspInst_t* eqBpByp2 = useInputEqFl ? cmDspSysAllocCheck( h,"Eq-BPF-Bypass-2", 0.0 ) : NULL;
  314. cmDspInst_t* eqBpMode2 = useInputEqFl ? cmDspSysAllocInst( h,"MsgList","Eq-BPF-Mode-2", 3, "biQuadEqMode", NULL, 3) : NULL;
  315. cmDspInst_t* eqBpFc2 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-BPF-Hz-2", 5, kNumberDuiId, 0.0, 20000.0, 0.5, eqBpF0hz ) : NULL;
  316. cmDspInst_t* eqBpQ2 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-BPF-Q-2", 5, kNumberDuiId, 0.0, 100.0, 0.01, eqBpQ ) : NULL;
  317. cmDspInst_t* eqBpGain2 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-BPF-Gain-2", 5, kNumberDuiId, -100.0, 100.0, 0.5, eqBpGain ) : NULL;
  318. cmDspInst_t* eqHpByp2 = useInputEqFl ? cmDspSysAllocCheck( h,"Eq-HPF-Bypass-2", 0.0 ) : NULL;
  319. cmDspInst_t* eqHpMode2 = useInputEqFl ? cmDspSysAllocInst( h,"MsgList","Eq-HPF-Mode-2", 3, "biQuadEqMode", NULL, 2) : NULL;
  320. cmDspInst_t* eqHpFc2 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-HPF-Hz-2", 5, kNumberDuiId, 0.0, 20000.0, 0.5, eqHpF0hz ) : NULL;
  321. cmDspInst_t* eqHpQ2 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-HPF-Q-2", 5, kNumberDuiId, 0.0, 100.0, 0.01, eqHpQ ) : NULL;
  322. cmDspInst_t* eqHpGain2 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-HPF-Gain-2", 5, kNumberDuiId, -100.0, 100.0, 0.5, eqHpGain ) : NULL;
  323. if( useInputEqFl ) cmDspSysNewColumn(h,0);
  324. cmDspInst_t* eqLpByp3 = useInputEqFl ? cmDspSysAllocCheck( h,"Eq-LPF-Bypass-3", 0.0 ) : NULL;
  325. cmDspInst_t* eqLpMode3 = useInputEqFl ? cmDspSysAllocInst( h,"MsgList","Eq-LPF-Mode-3", 3, "biQuadEqMode", NULL, 1) : NULL;
  326. cmDspInst_t* eqLpFc3 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-LPF-Hz-3", 5, kNumberDuiId, 0.0, 20000.0, 0.5, eqLpF0hz ) : NULL;
  327. cmDspInst_t* eqLpQ3 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-LPF-Q-3", 5, kNumberDuiId, 0.0, 100.0, 0.01, eqLpQ ) : NULL;
  328. cmDspInst_t* eqLpGain3 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-LPF-Gain-3", 5, kNumberDuiId, -300.0, 100.0, 0.5, eqLpGain ) : NULL;
  329. cmDspInst_t* eqBpByp3 = useInputEqFl ? cmDspSysAllocCheck( h,"Eq-BPF-Bypass-3", 0.0 ) : NULL;
  330. cmDspInst_t* eqBpMode3 = useInputEqFl ? cmDspSysAllocInst( h,"MsgList","Eq-BPF-Mode-3", 3, "biQuadEqMode", NULL, 3) : NULL;
  331. cmDspInst_t* eqBpFc3 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-BPF-Hz-3", 5, kNumberDuiId, 0.0, 20000.0, 0.5, eqBpF0hz ) : NULL;
  332. cmDspInst_t* eqBpQ3 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-BPF-Q-3", 5, kNumberDuiId, 0.0, 100.0, 0.01, eqBpQ ) : NULL;
  333. cmDspInst_t* eqBpGain3 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-BPF-Gain-3", 5, kNumberDuiId, -300.0, 100.0, 0.5, eqBpGain ) : NULL;
  334. cmDspInst_t* eqHpByp3 = useInputEqFl ? cmDspSysAllocCheck( h,"Eq-HPF-Bypass-3", 0.0 ) : NULL;
  335. cmDspInst_t* eqHpMode3 = useInputEqFl ? cmDspSysAllocInst( h,"MsgList","Eq-HPF-Mode-3", 3, "biQuadEqMode", NULL, 2) : NULL;
  336. cmDspInst_t* eqHpFc3 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-HPF-Hz-3", 5, kNumberDuiId, 0.0, 20000.0, 0.5, eqHpF0hz ) : NULL;
  337. cmDspInst_t* eqHpQ3 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-HPF-Q-3", 5, kNumberDuiId, 0.0, 100.0, 0.01, eqHpQ ) : NULL;
  338. cmDspInst_t* eqHpGain3 = useInputEqFl ? cmDspSysAllocInst( h,"Scalar", "Eq-HPF-Gain-3", 5, kNumberDuiId, -100.0, 100.0, 0.5, eqHpGain ) : NULL;
  339. if((rc = cmDspSysLastRC(h)) != kOkDspRC )
  340. return rc;
  341. // Output Audio file recording.
  342. cmDspSysInstallCb(h, recdGain,"val", afop, "gain0", NULL );
  343. cmDspSysInstallCb(h, recdGain,"val", afop, "gain1", NULL );
  344. cmDspSysInstallCb(h, recdChk, "out", recdPtS, "on", NULL );
  345. cmDspSysInstallCb(h, recdChk, "out", recdPtS, "off", NULL );
  346. cmDspSysInstallCb(h, recdPtS, "out", afop, "sel", NULL );
  347. // Audio connections
  348. cmDspSysConnectAudio(h, php, "out", wtp, "phs" ); // phs -> wt
  349. cmDspSysConnectAudio( h, ai0p, "out", mi0p, "in");
  350. cmDspSysConnectAudio( h, ai1p, "out", mi1p, "in");
  351. cmDspSysConnectAudio( h, ai2p, "out", mi2p, "in");
  352. cmDspSysConnectAudio( h, ai3p, "out", mi3p, "in");
  353. if( useInputEqFl )
  354. {
  355. cmDspSysConnectAudio(h, ai0p, "out", eqLpf_0, "in" ); // ain->eq
  356. cmDspSysConnectAudio(h, ai0p, "out", eqBpf_0, "in" );
  357. cmDspSysConnectAudio(h, ai0p, "out", eqHpf_0, "in" );
  358. cmDspSysConnectAudio(h, eqLpf_0, "out", eqMx_0, "in-0"); // eq -> eqmix
  359. cmDspSysConnectAudio(h, eqBpf_0, "out", eqMx_0, "in-1");
  360. cmDspSysConnectAudio(h, eqHpf_0, "out", eqMx_0, "in-2");
  361. cmDspSysConnectAudio(h, ai1p, "out", eqLpf_1, "in" ); // ain->eq
  362. cmDspSysConnectAudio(h, ai1p, "out", eqBpf_1, "in" );
  363. cmDspSysConnectAudio(h, ai1p, "out", eqHpf_1, "in" );
  364. cmDspSysConnectAudio(h, eqLpf_1, "out", eqMx_1, "in-0"); // eq -> eqmix
  365. cmDspSysConnectAudio(h, eqBpf_1, "out", eqMx_1, "in-1");
  366. cmDspSysConnectAudio(h, eqHpf_1, "out", eqMx_1, "in-2");
  367. cmDspSysConnectAudio(h, ai2p, "out", eqLpf_2, "in" ); // ain->eq
  368. cmDspSysConnectAudio(h, ai2p, "out", eqBpf_2, "in" );
  369. cmDspSysConnectAudio(h, ai2p, "out", eqHpf_2, "in" );
  370. cmDspSysConnectAudio(h, eqLpf_2, "out", eqMx_2, "in-0"); // eq -> eqmix
  371. cmDspSysConnectAudio(h, eqBpf_2, "out", eqMx_2, "in-1");
  372. cmDspSysConnectAudio(h, eqHpf_2, "out", eqMx_2, "in-2");
  373. cmDspSysConnectAudio(h, ai3p, "out", eqLpf_3, "in" ); // ain->eq
  374. cmDspSysConnectAudio(h, ai3p, "out", eqBpf_3, "in" );
  375. cmDspSysConnectAudio(h, ai3p, "out", eqHpf_3, "in" );
  376. cmDspSysConnectAudio(h, eqLpf_3, "out", eqMx_3, "in-0"); // eq -> eqmix
  377. cmDspSysConnectAudio(h, eqBpf_3, "out", eqMx_3, "in-1");
  378. cmDspSysConnectAudio(h, eqHpf_3, "out", eqMx_3, "in-2");
  379. }
  380. cmDspSysConnectAudio(h, useInputEqFl ? eqMx_0 : ai0p, "out", mx0p, "in-0" ); // eqmix -> input mix
  381. cmDspSysConnectAudio(h, useInputEqFl ? eqMx_1 : ai1p, "out", mx1p, "in-0" );
  382. cmDspSysConnectAudio(h, useInputEqFl ? eqMx_2 : ai2p, "out", mx0p, "in-1" );
  383. cmDspSysConnectAudio(h, useInputEqFl ? eqMx_3 : ai3p, "out", mx1p, "in-1" );
  384. if( useWtFl )
  385. {
  386. cmDspSysConnectAudio(h, wtp, "out", au0Sw, "a-in-0" ); // wt -> sw
  387. cmDspSysConnectAudio(h, mx0p, "out", au0Sw, "a-in-1" ); // ain -> sw
  388. //cmDspSysConnectAudio(h, ci0p, "out", au0Sw, "a-in-1" );
  389. cmDspSysConnectAudio(h, au0Sw, "a-out", rpp, "in-0"); // sw -> rcdply
  390. cmDspSysConnectAudio(h, au0Sw, "a-out", c0.kr0,"in" ); // sw -> kr
  391. cmDspSysConnectAudio(h, au0Sw, "a-out", c0.kr1,"in" ); // sw -> kr
  392. //cmDspSysConnectAudio(h, au0Sw, "a-out", mi0p, "in" ); // sw -> meter
  393. }
  394. else
  395. {
  396. cmDspSysConnectAudio(h, mx0p, "out", rpp, "in-0"); // sw -> rcdply
  397. if( useInCompFl )
  398. {
  399. cmDspSysConnectAudio(h, mx0p, "out", ci0p, "in" ); // ain -> in compress
  400. cmDspSysConnectAudio(h, ci0p, "out", c0.kr0, "in" );
  401. }
  402. else
  403. {
  404. cmDspSysConnectAudio(h, mx0p, "out", c0.kr0, "in" ); // ain -> sw
  405. }
  406. //cmDspSysConnectAudio(h, mx0p, "out", mi0p, "in" );
  407. }
  408. if( fragFl )
  409. {
  410. cmDspSysConnectAudio(h, c0.cmp, "out", mix0, "in-0" ); // cmp -> mix 0
  411. cmDspSysConnectAudio(h, rpp, "out-0", c2.kr0,"in" );
  412. cmDspSysConnectAudio(h, rpp, "out-0", c2.kr1,"in" );
  413. cmDspSysConnectAudio(h, c2.cmp, "out", mix0, "in-1"); // rpp -> mix 1
  414. cmDspSysConnectAudio(h, mix0, "out", apf0, "in" ); // mix -> aout
  415. cmDspSysConnectAudio(h, apf0, "out", ao0p, "in" );
  416. }
  417. else
  418. {
  419. cmDspSysConnectAudio(h, c0.cmp, "out", apf0, "in" );
  420. cmDspSysConnectAudio(h, c0.cmp, "out", apf2, "in" );
  421. cmDspSysConnectAudio(h, apf0, "out", ao0p, "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, apf3, "out", ao3p, "in" );
  466. //cmDspSysConnectAudio(h, wtp, "out", apf1, "in" );
  467. }
  468. }
  469. cmDspSysConnectAudio(h, c0.cmp, "out", afop, "in0" ); // comp -> audio_file_out
  470. cmDspSysConnectAudio(h, c1.cmp, "out", afop, "in1" );
  471. //cmDspSysConnectAudio(h, ai0p, "out", afop, "in0" ); // comp -> audio_file_out
  472. //cmDspSysConnectAudio(h, ai1p, "out", afop, "in1" );
  473. //cmDspSysConnectAudio(h, ai0p, "out", ao2p, "in" ); // direct through from input to
  474. //cmDspSysConnectAudio(h, ai1p, "out", ao3p, "in" ); // output chs 2&3
  475. cmDspSysInstallCb( h, clrBtn, "sym", amp, "cmd", NULL ); // clear active meas.
  476. cmDspSysInstallCb( h, prtBtn, "sym", amp, "cmd", NULL ); // print active meas
  477. cmDspSysInstallCb( h, prtBtn, "sym", scp, "cmd", NULL );
  478. cmDspSysInstallCb( h, amCmd, "add", amp, "cmd", NULL ); // add active meas
  479. cmDspSysInstallCb( h, amCmd, "rewind", amp, "cmd", NULL ); // rewind active meas
  480. cmDspSysInstallCb( h, mlst, "loc", amp, "loc", NULL ); // recorded meas's list to active meas unit
  481. cmDspSysInstallCb( h, mlst, "typeId", amp, "type", NULL ); //
  482. cmDspSysInstallCb( h, mlst, "val", amp, "val", NULL ); //
  483. cmDspSysInstallCb( h, mlst, "cost", amp, "cst", NULL ); //
  484. cmDspSysInstallCb( h, mlst, "typeId", amCmd, "add", NULL ); //
  485. cmDspSysInstallCb( h, sfp, "out", amRt, "f-in", NULL ); // sfp-active meas router (rtr is switched by live btn)
  486. cmDspSysInstallCb( h, amRt, "f-out-0",amp, "sfloc", NULL );
  487. cmDspSysInstallCb( h, sfp, "vloc", amp, "loc", NULL ); // live meas's to active meas unit
  488. cmDspSysInstallCb( h, sfp, "vval", amp, "val", NULL ); //
  489. cmDspSysInstallCb( h, sfp, "vcost",amp, "cst", NULL ); //
  490. cmDspSysInstallCb( h, sfp, "vtyp", amp, "type", NULL ); //
  491. cmDspSysInstallCb( h, sfp, "vtyp", amCmd, "add", NULL); //
  492. // ***** delete this to prevent the score follower from driving the active-measure unit in 'live' mode
  493. cmDspSysInstallCb( h, amRt, "f-out-1",amp, "sfloc", NULL );
  494. // *****
  495. // active measure loc to xfad channel trigger
  496. cmDspSysInstallCb( h, amp, "scloc", c0.achan, "trig", NULL ); // See Also: modp.sw ->achan.trig
  497. if( useChain1Fl )
  498. {
  499. cmDspSysInstallCb( h, amp, "scloc", c1.achan, "trig", NULL );
  500. }
  501. if( fragFl )
  502. {
  503. cmDspSysInstallCb( h, amp, "scloc", c2.achan, "trig", NULL );
  504. cmDspSysInstallCb( h, amp, "scloc", c3.achan, "trig", NULL );
  505. }
  506. cmDspSysInstallCb( h, amp, "even", pre, "in", NULL ); // active meas output to printers
  507. cmDspSysInstallCb( h, amp, "dyn", prd, "in", NULL );
  508. cmDspSysInstallCb( h, amp, "tempo", prt, "in", NULL );
  509. cmDspSysInstallCb( h, amp, "cost", prc, "in", NULL );
  510. // wave-table to time-line cursor
  511. cmDspSysInstallCb( h, wtp, "fidx",tlp, "curs", NULL);
  512. cmDspSysInstallCb(h, prePath, "out", tlp, "path", NULL );
  513. // 'live' button -> live router selector switch
  514. cmDspSysInstallCb(h, liveb, "out", wtRt, "sel", NULL );
  515. cmDspSysInstallCb(h, liveb, "out", tlRt, "sel", NULL );
  516. cmDspSysInstallCb(h, liveb, "out", mfpRt,"sel", NULL );
  517. cmDspSysInstallCb(h, liveb, "out", amRt, "sel", NULL );
  518. cmDspSysInstallCb(h, liveb, "out", au0Sw, "chidx", NULL );
  519. cmDspSysInstallCb(h, liveb, "out", au1Sw, "chidx", NULL );
  520. cmDspSysInstallCb(h, liveb, "out", measb, "in", NULL );
  521. cmDspSysInstallCb(h, measb, "out", sfp, "measfl", NULL );
  522. // 'simulate' button -> simulate router selector switch
  523. cmDspSysInstallCb(h, simb, "out", ainb, "in", NULL );
  524. cmDspSysInstallCb(h, ainb, "out", au0Sw, "chidx", NULL );
  525. cmDspSysInstallCb(h, ainb, "out", au1Sw, "chidx", NULL );
  526. cmDspSysInstallCb(h, simb, "out", siRt, "sel", NULL );
  527. cmDspSysInstallCb(h, simb, "out", muRt, "sel", NULL );
  528. cmDspSysInstallCb(h, simb, "out", d1Rt, "sel", NULL );
  529. cmDspSysInstallCb(h, simb, "out", d0Rt, "sel", NULL );
  530. cmDspSysInstallCb(h, simb, "out", stRt, "sel", NULL );
  531. // start connections
  532. cmDspSysInstallCb(h, onb, "sym", tlRt, "s-in", NULL );
  533. cmDspSysInstallCb(h, tlRt, "s-out-0",tlp, "reset", NULL );
  534. cmDspSysInstallCb(h, onb, "sym", scp, "send", NULL );
  535. cmDspSysInstallCb(h, onb, "sym", mfpRt,"s-in", NULL );
  536. cmDspSysInstallCb(h, mfpRt,"s-out-0",mfp, "sel", NULL );
  537. cmDspSysInstallCb(h, onb, "sym", pts, "on", NULL );
  538. cmDspSysInstallCb(h, pts, "on", wtRt, "s-in", NULL );
  539. cmDspSysInstallCb(h, wtRt,"s-out-0", wtp, "cmd", NULL );
  540. cmDspSysInstallCb(h, pts, "on", modp, "cmd", NULL );
  541. cmDspSysInstallCb(h, pts, "on", modr, "cmd", NULL );
  542. cmDspSysInstallCb(h, pts, "on", rpp, "cmd", NULL );
  543. cmDspSysInstallCb(h, onb, "sym", amCmd, "rewind",NULL );
  544. cmDspSysInstallCb(h, onb, "out", c0.achan,"reset", NULL );
  545. if( useChain1Fl )
  546. {
  547. cmDspSysInstallCb(h, onb, "out", c1.achan,"reset", NULL );
  548. }
  549. // stop connections
  550. cmDspSysInstallCb(h, wtp, "done",offb,"in", NULL ); // 'done' from WT simulates pressing Stop btn.
  551. cmDspSysInstallCb(h, tlp, "mfn", pts, "off", NULL ); // Prevents WT start on new audio file from TL.
  552. cmDspSysInstallCb(h, offb, "sym", mfp, "sel", NULL );
  553. cmDspSysInstallCb(h, offb, "sym", pts, "off", NULL );
  554. cmDspSysInstallCb(h, pts, "off", wtp, "cmd", NULL );
  555. cmDspSysInstallCb(h, pts, "off", modp,"cmd", NULL );
  556. cmDspSysInstallCb(h, pts, "off", modr,"cmd", NULL );
  557. cmDspSysInstallCb(h, offb, "sym", mop, "reset", NULL );
  558. cmDspSysInstallCb(h, offb, "sym", mo2p, "reset", NULL );
  559. // time-line to wave-table selection
  560. cmDspSysInstallCb(h, tlp, "absi", wtp, "beg", NULL );
  561. cmDspSysInstallCb(h, tlp, "aesi", wtp, "end", NULL );
  562. cmDspSysInstallCb(h, tlp, "afn", wtp, "fn", NULL );
  563. // time-line to MIDI file player selection
  564. cmDspSysInstallCb(h, tlp, "mbsi", mfp, "bsi", NULL );
  565. cmDspSysInstallCb(h, tlp, "mesi", mfp, "esi", NULL );
  566. cmDspSysInstallCb(h, tlp, "mfn", mfp, "fn", NULL );
  567. // score to score follower - to set initial search location
  568. cmDspSysInstallCb(h, scp, "sel", sfp, "index", NULL );
  569. cmDspSysInstallCb(h, scp, "sel", modp,"reset", NULL );
  570. cmDspSysInstallCb(h, scp, "sel", modr,"reset", NULL );
  571. cmDspSysInstallCb(h, scp, "sel", rpp, "initIdx", NULL );
  572. cmDspSysInstallCb(h, scp, "sel", prp, "in", NULL );
  573. // NOTE: THIS IS A DUPLICATE OF THE scp.sel CONNECTIONS
  574. /*
  575. cmDspSysInstallCb(h, scLoc, "val", sfp, "index", NULL );
  576. cmDspSysInstallCb(h, scLoc, "val", modp,"reset", NULL );
  577. cmDspSysInstallCb(h, scLoc, "val", modr,"reset", NULL );
  578. cmDspSysInstallCb(h, scLoc, "val", rpp, "initIdx", NULL );
  579. cmDspSysInstallCb(h, scLoc, "val", prp, "in", NULL );
  580. */
  581. //cmDspSysInstallCb(h, reload,"out", modp, "reload", NULL );
  582. // MIDI file player to score follower
  583. cmDspSysInstallCb(h, mfp, "smpidx", siRt, "f-in",NULL );
  584. cmDspSysInstallCb(h, siRt, "f-out-1", sfp, "smpidx",NULL );
  585. // leave siRt.f-out-1 unconnected because it should be ignored in 'simulate mode'
  586. cmDspSysInstallCb(h, mfp, "id", muRt, "f-in", NULL );
  587. cmDspSysInstallCb(h, muRt, "f-out-1", sfp, "muid", NULL );
  588. // leave muRt.f-out-1 unconnected because it should be ignored in 'simulate mode'
  589. cmDspSysInstallCb(h, mfp, "d1", d1Rt, "f-in", NULL );
  590. cmDspSysInstallCb(h, d1Rt, "f-out-1", sfp, "d1", NULL );
  591. cmDspSysInstallCb(h, d1Rt, "f-out-1", nmp, "d1", NULL );
  592. cmDspSysInstallCb(h, nmp, "d1", mop, "d1", NULL );
  593. cmDspSysInstallCb(h, nmp, "d1", mo2p, "d1", NULL );
  594. cmDspSysInstallCb(h, mfp, "d0", d0Rt, "f-in", NULL );
  595. cmDspSysInstallCb(h, d0Rt, "f-out-1", sfp, "d0", NULL );
  596. cmDspSysInstallCb(h, d0Rt, "f-out-1", nmp, "d0", NULL );
  597. cmDspSysInstallCb(h, nmp, "d0", mop, "d0", NULL );
  598. cmDspSysInstallCb(h, nmp, "d0", mo2p, "d0", NULL );
  599. cmDspSysInstallCb(h, mfp, "status", stRt, "f-in", NULL );
  600. cmDspSysInstallCb(h, stRt, "f-out-1", sfp, "status",NULL );
  601. cmDspSysInstallCb(h, stRt, "f-out-1", nmp, "status",NULL );
  602. cmDspSysInstallCb(h, nmp, "status", mop, "status",NULL );
  603. cmDspSysInstallCb(h, nmp, "status", mo2p, "status",NULL );
  604. // MIDI input port
  605. //cmDspSysInstallCb(h, mip, "smpidx", sfp, "smpidx", NULL );
  606. //cmDspSysInstallCb(h, mip, "d1", sfp, "d1", NULL );
  607. //cmDspSysInstallCb(h, mip, "d0", sfp, "d0", NULL );
  608. //cmDspSysInstallCb(h, mip, "status", sfp, "status", NULL );
  609. // score follower to recd_play,modulator and printers
  610. //cmDspSysInstallCb(h, sfp, "out", rpp, "index", NULL );
  611. cmDspSysInstallCb(h, sfp, "out", modp, "index", NULL );
  612. //cmDspSysInstallCb(h, sfp, "out", modr, "index", NULL );
  613. cmDspSysInstallCb(h, sfp, "recent", prp, "in", NULL ); // report 'recent' but only act on 'max' loc index
  614. //cmDspSysInstallCb(h, prtb, "sym", sfp, "cmd", NULL );
  615. //cmDspSysInstallCb(h, qtb, "sym", sfp, "cmd", NULL );
  616. cmDspSysInstallCb( h, lasecs, "val", rpp, "curla", NULL ); // recd/play control
  617. cmDspSysInstallCb( h, dbpsec, "val", rpp, "frate", NULL );
  618. cmDspSysInstallCb(h, igain0, "val", ai0p, "gain", NULL ); // input gain control
  619. cmDspSysInstallCb(h, igain1, "val", ai1p, "gain", NULL );
  620. cmDspSysInstallCb(h, igain2, "val", ai2p, "gain", NULL ); // input gain control
  621. cmDspSysInstallCb(h, igain3, "val", ai3p, "gain", NULL );
  622. if( fragFl )
  623. {
  624. cmDspSysInstallCb(h, mutm, "out", mix0, "gain-0", NULL );
  625. cmDspSysInstallCb(h, mutm, "out", mix1, "gain-0", NULL );
  626. cmDspSysInstallCb(h, mutr, "out", mix0, "gain-1", NULL );
  627. cmDspSysInstallCb(h, mutr, "out", mix1, "gain-1", NULL );
  628. }
  629. cmDspSysInstallCb(h, apfByp, "out", apf0, "bypass", NULL ); // APF bypass
  630. cmDspSysInstallCb(h, apfByp, "out", apf1, "bypass", NULL ); //
  631. cmDspSysInstallCb(h, apfByp, "out", apf2, "bypass", NULL ); //
  632. cmDspSysInstallCb(h, apfByp, "out", apf3, "bypass", NULL ); //
  633. cmDspSysInstallCb(h, ogain0, "val", ao0p, "gain", NULL ); // output gain control
  634. cmDspSysInstallCb(h, ogain1, "val", ao1p, "gain", NULL );
  635. cmDspSysInstallCb(h, ogain2, "val", ao2p, "gain", NULL );
  636. cmDspSysInstallCb(h, ogain3, "val", ao3p, "gain", NULL );
  637. if( useInputEqFl )
  638. {
  639. cmDspSysInstallCb(h, eqLpByp0, "out", eqLpf_0, "bypass", NULL);
  640. cmDspSysInstallCb(h, eqLpMode0, "mode",eqLpf_0, "mode", NULL );
  641. cmDspSysInstallCb(h, eqLpFc0, "val", eqLpf_0, "f0", NULL );
  642. cmDspSysInstallCb(h, eqLpQ0, "val", eqLpf_0, "Q", NULL );
  643. cmDspSysInstallCb(h, eqLpGain0, "val", eqLpf_0, "gain", NULL );
  644. cmDspSysInstallCb(h, eqBpByp0, "out", eqBpf_0, "bypass", NULL);
  645. cmDspSysInstallCb(h, eqBpMode0, "mode",eqBpf_0, "mode", NULL );
  646. cmDspSysInstallCb(h, eqBpFc0, "val", eqBpf_0, "f0", NULL );
  647. cmDspSysInstallCb(h, eqBpQ0, "val", eqBpf_0, "Q", NULL );
  648. cmDspSysInstallCb(h, eqBpGain0, "val", eqBpf_0, "gain", NULL );
  649. cmDspSysInstallCb(h, eqHpByp0, "out", eqHpf_0, "bypass", NULL);
  650. cmDspSysInstallCb(h, eqHpMode0, "mode",eqHpf_0, "mode", NULL );
  651. cmDspSysInstallCb(h, eqHpFc0, "val", eqHpf_0, "f0", NULL );
  652. cmDspSysInstallCb(h, eqHpQ0, "val", eqHpf_0, "Q", NULL );
  653. cmDspSysInstallCb(h, eqHpGain0, "val", eqHpf_0, "gain", NULL );
  654. cmDspSysInstallCb(h, eqLpByp1, "out", eqLpf_1, "bypass", NULL);
  655. cmDspSysInstallCb(h, eqLpMode1, "mode",eqLpf_1, "mode", NULL );
  656. cmDspSysInstallCb(h, eqLpFc1, "val", eqLpf_1, "f0", NULL );
  657. cmDspSysInstallCb(h, eqLpQ1, "val", eqLpf_1, "Q", NULL );
  658. cmDspSysInstallCb(h, eqLpGain1, "val", eqLpf_1, "gain", NULL );
  659. cmDspSysInstallCb(h, eqBpByp1, "out", eqBpf_1, "bypass", NULL);
  660. cmDspSysInstallCb(h, eqBpMode1, "mode",eqBpf_1, "mode", NULL );
  661. cmDspSysInstallCb(h, eqBpFc1, "val", eqBpf_1, "f0", NULL );
  662. cmDspSysInstallCb(h, eqBpQ1, "val", eqBpf_1, "Q", NULL );
  663. cmDspSysInstallCb(h, eqBpGain1, "val", eqBpf_1, "gain", NULL );
  664. cmDspSysInstallCb(h, eqHpByp1, "out", eqHpf_1, "bypass", NULL);
  665. cmDspSysInstallCb(h, eqHpMode1, "mode",eqHpf_1, "mode", NULL );
  666. cmDspSysInstallCb(h, eqHpFc1, "val", eqHpf_1, "f0", NULL );
  667. cmDspSysInstallCb(h, eqHpQ1, "val", eqHpf_1, "Q", NULL );
  668. cmDspSysInstallCb(h, eqHpGain1, "val", eqHpf_1, "gain", NULL );
  669. cmDspSysInstallCb(h, eqLpByp2, "out", eqLpf_2, "bypass", NULL);
  670. cmDspSysInstallCb(h, eqLpMode2, "mode",eqLpf_2, "mode", NULL );
  671. cmDspSysInstallCb(h, eqLpFc2, "val", eqLpf_2, "f0", NULL );
  672. cmDspSysInstallCb(h, eqLpQ2, "val", eqLpf_2, "Q", NULL );
  673. cmDspSysInstallCb(h, eqLpGain2, "val", eqLpf_2, "gain", NULL );
  674. cmDspSysInstallCb(h, eqBpByp2, "out", eqBpf_2, "bypass", NULL);
  675. cmDspSysInstallCb(h, eqBpMode2, "mode",eqBpf_2, "mode", NULL );
  676. cmDspSysInstallCb(h, eqBpFc2, "val", eqBpf_2, "f0", NULL );
  677. cmDspSysInstallCb(h, eqBpQ2, "val", eqBpf_2, "Q", NULL );
  678. cmDspSysInstallCb(h, eqBpGain2, "val", eqBpf_2, "gain", NULL );
  679. cmDspSysInstallCb(h, eqHpByp2, "out", eqHpf_2, "bypass", NULL);
  680. cmDspSysInstallCb(h, eqHpMode2, "mode",eqHpf_2, "mode", NULL );
  681. cmDspSysInstallCb(h, eqHpFc2, "val", eqHpf_2, "f0", NULL );
  682. cmDspSysInstallCb(h, eqHpQ2, "val", eqHpf_2, "Q", NULL );
  683. cmDspSysInstallCb(h, eqHpGain2, "val", eqHpf_2, "gain", NULL );
  684. cmDspSysInstallCb(h, eqLpByp3, "out", eqLpf_3, "bypass", NULL);
  685. cmDspSysInstallCb(h, eqLpMode3, "mode",eqLpf_3, "mode", NULL );
  686. cmDspSysInstallCb(h, eqLpFc3, "val", eqLpf_3, "f0", NULL );
  687. cmDspSysInstallCb(h, eqLpQ3, "val", eqLpf_3, "Q", NULL );
  688. cmDspSysInstallCb(h, eqLpGain3, "val", eqLpf_3, "gain", NULL );
  689. cmDspSysInstallCb(h, eqBpByp3, "out", eqBpf_3, "bypass", NULL);
  690. cmDspSysInstallCb(h, eqBpMode3, "mode",eqBpf_3, "mode", NULL );
  691. cmDspSysInstallCb(h, eqBpFc3, "val", eqBpf_3, "f0", NULL );
  692. cmDspSysInstallCb(h, eqBpQ3, "val", eqBpf_3, "Q", NULL );
  693. cmDspSysInstallCb(h, eqBpGain3, "val", eqBpf_3, "gain", NULL );
  694. cmDspSysInstallCb(h, eqHpByp3, "out", eqHpf_3, "bypass", NULL);
  695. cmDspSysInstallCb(h, eqHpMode3, "mode",eqHpf_3, "mode", NULL );
  696. cmDspSysInstallCb(h, eqHpFc3, "val", eqHpf_3, "f0", NULL );
  697. cmDspSysInstallCb(h, eqHpQ3, "val", eqHpf_3, "Q", NULL );
  698. cmDspSysInstallCb(h, eqHpGain3, "val", eqHpf_3, "gain", NULL );
  699. }
  700. return rc;
  701. }
  702. //------------------------------------------------------------------------------
  703. //)