|
@@ -0,0 +1,455 @@
|
|
1
|
+//( { file_desc:"'snap' Performance analysis Simplified Time Line program." kw:[snap]}
|
|
2
|
+
|
|
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 "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
|
+
|
|
30
|
+#include "cmAudioFile.h"
|
|
31
|
+#include "cmProcObj.h"
|
|
32
|
+#include "cmProc.h"
|
|
33
|
+#include "cmProc3.h"
|
|
34
|
+
|
|
35
|
+#include "cmVectOpsTemplateMain.h"
|
|
36
|
+#include "cmVectOps.h"
|
|
37
|
+#include "cmDspPgmKrChain.h"
|
|
38
|
+//)
|
|
39
|
+
|
|
40
|
+//( { label:cmDspPgm_TimeLineLite file_desc:"Simplified score vs. the performance and generating related audio transforms." kw:[spgm] }
|
|
41
|
+
|
|
42
|
+cmDspRC_t _cmDspSysPgm_TimeLineLite(cmDspSysH_t h, void** userPtrPtr )
|
|
43
|
+{
|
|
44
|
+ cmDspRC_t rc = kOkDspRC;
|
|
45
|
+ cmCtx_t* cmCtx = cmDspSysPgmCtx(h);
|
|
46
|
+ cmErr_t err;
|
|
47
|
+ krRsrc_t r;
|
|
48
|
+
|
|
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
|
+
|
|
53
|
+ unsigned sfBufCnt = 7; // length of the MIDI event buffer
|
|
54
|
+ unsigned sfMaxWndCnt = 10; // length of the score event buffer
|
|
55
|
+ unsigned sfMinVel = 5; // ignore MIDI events below this velocity
|
|
56
|
+ bool sfEnaMeasFl = false;
|
|
57
|
+
|
|
58
|
+ double recdPlayInitAllocSecs = 10.0;
|
|
59
|
+ double recdPlayMaxLaSecs = 2.0;
|
|
60
|
+ double recdPlayCurLaSecs = 0.1;
|
|
61
|
+ double recdPlayFadeRateDbPerSec = 4.0;
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+ bool apfBypassFl = false;
|
|
65
|
+ unsigned apfModeSymId = cmSymTblRegisterStaticSymbol(cmDspSysSymbolTable(h),"AP");
|
|
66
|
+ double apfF0hz = 100.0;
|
|
67
|
+ double apfQ = 1.0;
|
|
68
|
+ double apfGain = 1.0;
|
|
69
|
+
|
|
70
|
+ memset(&r,0,sizeof(r));
|
|
71
|
+ cmErrSetup(&err,&cmCtx->rpt,"Kr TimelineLite");
|
|
72
|
+
|
|
73
|
+ if( krLoadRsrc(h,&err,&r) != kOkDspRC )
|
|
74
|
+ return rc;
|
|
75
|
+
|
|
76
|
+ cmDspInst_t* ai0p = cmDspSysAllocInst(h,"AudioIn", NULL, 1, 0);
|
|
77
|
+ cmDspInst_t* ai1p = cmDspSysAllocInst(h,"AudioIn", NULL, 1, 1);
|
|
78
|
+ cmDspInst_t* ai2p = cmDspSysAllocInst(h,"AudioIn", NULL, 1, 2);
|
|
79
|
+ cmDspInst_t* ai3p = cmDspSysAllocInst(h,"AudioIn", NULL, 1, 3);
|
|
80
|
+
|
|
81
|
+ cmDspInst_t* mx0p = cmDspSysAllocInst( h, "AMix", NULL, 3, 2, 0.5, 0.5);
|
|
82
|
+ cmDspInst_t* mx1p = cmDspSysAllocInst( h, "AMix", NULL, 3, 2, 0.5, 0.5);
|
|
83
|
+
|
|
84
|
+ cmDspInst_t* tlp = cmDspSysAllocInst(h,"TimeLine", "tl", 2, r.tlFn, r.tlPrefixPath );
|
|
85
|
+ cmDspInst_t* scp = cmDspSysAllocInst(h,"Score", "sc", 1, r.scFn );
|
|
86
|
+ //cmDspInst_t* php = cmDspSysAllocInst(h,"Phasor", NULL, 1, cmDspSysSampleRate(h) );
|
|
87
|
+ //cmDspInst_t* wtp = cmDspSysAllocInst(h,"WaveTable", NULL, 4, wtSmpCnt, wtInitMode, NULL, wtLoopCnt );
|
|
88
|
+ cmDspInst_t* pts = cmDspSysAllocInst(h,"PortToSym", NULL, 2, "on", "off" );
|
|
89
|
+ //cmDspInst_t* mip = cmDspSysAllocInst(h,"MidiIn", NULL, 0 );
|
|
90
|
+
|
|
91
|
+ cmDspInst_t* mfp = cmDspSysAllocInst(h,"MidiFilePlay",NULL, 0 );
|
|
92
|
+ cmDspInst_t* nmp = cmDspSysAllocInst(h,"NanoMap", NULL, 0 );
|
|
93
|
+ cmDspInst_t* mop = cmDspSysAllocInst(h,"MidiOut", NULL, 2, r.midiDevice,r.midiOutPort);
|
|
94
|
+ cmDspInst_t* mo2p = cmDspSysAllocInst(h,"MidiOut", NULL, 2, r.midiDevice,r.midiOutPort2);
|
|
95
|
+ cmDspInst_t* sfp = cmDspSysAllocInst(h,"ScFol", NULL, 1, r.scFn, sfBufCnt, sfMaxWndCnt, sfMinVel, sfEnaMeasFl );
|
|
96
|
+ cmDspInst_t* amp = cmDspSysAllocInst(h,"ActiveMeas", NULL, 1, 100 );
|
|
97
|
+ cmDspInst_t* rpp = cmDspSysAllocInst(h,"RecdPlay", NULL, 6, 2, r.scFn, recdPlayInitAllocSecs, recdPlayMaxLaSecs, recdPlayCurLaSecs, recdPlayFadeRateDbPerSec);
|
|
98
|
+ cmDspInst_t* modp = cmDspSysAllocInst(h,"ScMod", NULL, 2, r.modFn, "m1" );
|
|
99
|
+ cmDspInst_t* modr = cmDspSysAllocInst(h,"ScMod", NULL, 2, r.modFn, "m1" );
|
|
100
|
+
|
|
101
|
+ unsigned preGrpSymId = cmDspSysPresetRegisterGroup(h,"tl");
|
|
102
|
+ unsigned cmpPreGrpSymId = cmDspSysPresetRegisterGroup(h,"tl_cmp");
|
|
103
|
+
|
|
104
|
+ cmDspTlXform_t c0,c1;
|
|
105
|
+
|
|
106
|
+ cmDspSysNewPage(h,"Controls-0");
|
|
107
|
+ _cmDspSys_TlXformChain(h, &c0, preGrpSymId, cmpPreGrpSymId, modp, 0, 0 );
|
|
108
|
+
|
|
109
|
+ cmDspSysNewPage(h,"Controls-1");
|
|
110
|
+ _cmDspSys_TlXformChain(h, &c1, preGrpSymId, cmpPreGrpSymId, modp, 1, 1 );
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+ cmDspInst_t* apf0 = cmDspSysAllocInst(h,"BiQuadEq",NULL, 5, apfBypassFl, apfModeSymId, apfF0hz+0, apfQ, apfGain );
|
|
114
|
+ cmDspInst_t* apf1 = cmDspSysAllocInst(h,"BiQuadEq",NULL, 5, apfBypassFl, apfModeSymId, apfF0hz+100.0, apfQ, apfGain );
|
|
115
|
+ cmDspInst_t* apf2 = cmDspSysAllocInst(h,"BiQuadEq",NULL, 5, apfBypassFl, apfModeSymId, apfF0hz+200.0, apfQ, apfGain );
|
|
116
|
+ cmDspInst_t* apf3 = cmDspSysAllocInst(h,"BiQuadEq",NULL, 5, apfBypassFl, apfModeSymId, apfF0hz+300.0, apfQ, apfGain );
|
|
117
|
+
|
|
118
|
+ cmDspInst_t* ao0p = cmDspSysAllocInst(h,"AudioOut", NULL, 1, 2 );
|
|
119
|
+ cmDspInst_t* ao1p = cmDspSysAllocInst(h,"AudioOut", NULL, 1, 3 );
|
|
120
|
+ cmDspInst_t* ao2p = cmDspSysAllocInst(h,"AudioOut", NULL, 1, 4 );
|
|
121
|
+ cmDspInst_t* ao3p = cmDspSysAllocInst(h,"AudioOut", NULL, 1, 5 );
|
|
122
|
+
|
|
123
|
+ cmDspSysNewPage(h,"Main");
|
|
124
|
+ cmDspInst_t* liveb= cmDspSysAllocInst(h,"Button", "live", 2, kCheckDuiId, 0.0 );
|
|
125
|
+ cmDspInst_t* simb = cmDspSysAllocInst(h,"Button", "simulate",2, kCheckDuiId, 0.0 );
|
|
126
|
+ cmDspInst_t* ainb = cmDspSysAllocInst(h,"Button", "audio in",2, kCheckDuiId, 0.0 );
|
|
127
|
+ cmDspInst_t* measb= cmDspSysAllocInst(h,"Button", "meas", 2, kCheckDuiId, 0.0 );
|
|
128
|
+ cmDspInst_t* onb = cmDspSysAllocInst(h,"Button", "start", 2, kButtonDuiId, 1.0 );
|
|
129
|
+ cmDspInst_t* offb = cmDspSysAllocInst(h,"Button", "stop", 2, kButtonDuiId, 1.0 );
|
|
130
|
+ //cmDspInst_t* prtb = cmDspSysAllocInst(h,"Button", "print", 2, kButtonDuiId, 1.0 );
|
|
131
|
+ //cmDspInst_t* qtb = cmDspSysAllocInst(h,"Button", "quiet", 2, kButtonDuiId, 1.0 );
|
|
132
|
+ cmDspInst_t* prp = cmDspSysAllocInst(h,"Printer", NULL, 1, ">" );
|
|
133
|
+ cmDspInst_t* prd = cmDspSysAllocInst(h,"Printer", NULL, 1, "DYN:" );
|
|
134
|
+ cmDspInst_t* pre = cmDspSysAllocInst(h,"Printer", NULL, 1, "EVEN:" );
|
|
135
|
+ cmDspInst_t* prt = cmDspSysAllocInst(h,"Printer", NULL, 1, "TEMPO:");
|
|
136
|
+ cmDspInst_t* prc = cmDspSysAllocInst(h,"Printer", NULL, 1, "COST:");
|
|
137
|
+ //cmDspInst_t* prv = cmDspSysAllocInst(h,"Printer", NULL, 1, "Value:");
|
|
138
|
+
|
|
139
|
+ // Record <-> Live switches
|
|
140
|
+ cmDspInst_t* tlRt = cmDspSysAllocInst(h,"Router", NULL, 2, 2, 0); // time line swich
|
|
141
|
+ //cmDspInst_t* wtRt = cmDspSysAllocInst(h,"Router", NULL, 2, 2, 0);
|
|
142
|
+ cmDspInst_t* mfpRt = cmDspSysAllocInst(h,"Router", NULL, 2, 2, 0);
|
|
143
|
+ cmDspInst_t* amRt = cmDspSysAllocInst(h,"Router", NULL, 2, 2, 0);
|
|
144
|
+ cmDspInst_t* au0Sw = cmDspSysAllocInst(h,"1ofN", NULL, 2, 2, 0);
|
|
145
|
+ cmDspInst_t* au1Sw = cmDspSysAllocInst(h,"1ofN", NULL, 2, 2, 0);
|
|
146
|
+
|
|
147
|
+ cmDspInst_t* siRt = cmDspSysAllocInst(h,"Router", NULL, 2, 2, 0);
|
|
148
|
+ cmDspInst_t* muRt = cmDspSysAllocInst(h,"Router", NULL, 2, 2, 0);
|
|
149
|
+ cmDspInst_t* d0Rt = cmDspSysAllocInst(h,"Router", NULL, 2, 2, 0);
|
|
150
|
+ cmDspInst_t* d1Rt = cmDspSysAllocInst(h,"Router", NULL, 2, 2, 0);
|
|
151
|
+ cmDspInst_t* stRt = cmDspSysAllocInst(h,"Router", NULL, 2, 2, 0);
|
|
152
|
+
|
|
153
|
+ cmDspSysNewColumn(h,0);
|
|
154
|
+ cmDspInst_t* igain0 = cmDspSysAllocInst(h,"Scalar", "In Gain-0", 5, kNumberDuiId, 0.0, 100.0,0.01, 1.0 );
|
|
155
|
+ cmDspInst_t* igain1 = cmDspSysAllocInst(h,"Scalar", "In Gain-1", 5, kNumberDuiId, 0.0, 100.0,0.01, 1.0 );
|
|
156
|
+ cmDspInst_t* igain2 = cmDspSysAllocInst(h,"Scalar", "In Gain-2", 5, kNumberDuiId, 0.0, 100.0,0.01, 1.0 );
|
|
157
|
+ cmDspInst_t* igain3 = cmDspSysAllocInst(h,"Scalar", "In Gain-3", 5, kNumberDuiId, 0.0, 100.0,0.01, 1.0 );
|
|
158
|
+
|
|
159
|
+ cmDspInst_t* lasecs = cmDspSysAllocInst(h,"Scalar", "LA Secs", 5, kNumberDuiId, 0.0, recdPlayMaxLaSecs,0.01, recdPlayCurLaSecs );
|
|
160
|
+ cmDspInst_t* dbpsec = cmDspSysAllocInst(h,"Scalar", "Fade dBpSec", 5, kNumberDuiId, 0.0, 24.0, 0.01, recdPlayFadeRateDbPerSec);
|
|
161
|
+ cmDspInst_t* apfByp = cmDspSysAllocCheck( h, "APF-Bypass", 0.0 );
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+ cmDspSysNewColumn(h,0);
|
|
166
|
+ cmDspInst_t* ogain0 = cmDspSysAllocInst(h,"Scalar", "Out Gain-0", 5, kNumberDuiId, 0.0, 10.0,0.01, 1.0 );
|
|
167
|
+ cmDspInst_t* ogain1 = cmDspSysAllocInst(h,"Scalar", "Out Gain-1", 5, kNumberDuiId, 0.0, 10.0,0.01, 1.0 );
|
|
168
|
+ cmDspInst_t* ogain2 = cmDspSysAllocInst(h,"Scalar", "Out Gain-2", 5, kNumberDuiId, 0.0, 10.0,0.01, 1.0 );
|
|
169
|
+ cmDspInst_t* ogain3 = cmDspSysAllocInst(h,"Scalar", "Out Gain-3", 5, kNumberDuiId, 0.0, 10.0,0.01, 1.0 );
|
|
170
|
+
|
|
171
|
+ //cmDspInst_t* scLoc = cmDspSysAllocInst(h,"Scalar", "Sc Loc", 5, kNumberDuiId, 0.0, 3000.0, 1.0, 0.0 );
|
|
172
|
+
|
|
173
|
+ // Audio file recording
|
|
174
|
+ cmDspInst_t* recdGain= cmDspSysAllocInst(h,"Scalar", "Recd Gain", 5, kNumberDuiId, 0.0, 100.0,0.01, 1.5 );
|
|
175
|
+ cmDspInst_t* recdChk = cmDspSysAllocInst(h,"Button", "Record", 2, kCheckDuiId, 0.0 );
|
|
176
|
+ cmDspInst_t* recdPtS = cmDspSysAllocInst(h,"GateToSym", NULL, 2, cmSymTblRegisterStaticSymbol(cmDspSysSymbolTable(h),"open"),cmSymTblRegisterStaticSymbol(cmDspSysSymbolTable(h),"close"));
|
|
177
|
+ cmDspInst_t* afop = cmDspSysAllocInst(h,"AudioFileOut",NULL, 2, r.recordDir,2);
|
|
178
|
+ cmDspInst_t* mi0p = cmDspSysAllocInst(h,"AMeter","In 0", 0);
|
|
179
|
+ cmDspInst_t* mi1p = cmDspSysAllocInst(h,"AMeter","In 1", 0);
|
|
180
|
+ cmDspInst_t* mi2p = cmDspSysAllocInst(h,"AMeter","In 2", 0);
|
|
181
|
+ cmDspInst_t* mi3p = cmDspSysAllocInst(h,"AMeter","In 3", 0);
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+ //--------------- Preset controls
|
|
185
|
+ cmDspSysNewColumn(h,0);
|
|
186
|
+ cmDspInst_t* preset = cmDspSysAllocInst( h, "Preset", NULL, 1, preGrpSymId );
|
|
187
|
+ cmDspInst_t* presetLbl = cmDspSysAllocInst( h, "Text", "Preset", 1, "" );
|
|
188
|
+ cmDspInst_t* storeBtn = cmDspSysAllocButton( h, "store", 0);
|
|
189
|
+ cmDspInst_t* recallBtn = cmDspSysAllocButton( h, "recall", 0);
|
|
190
|
+ cmDspSysInstallCb( h, presetLbl, "val", preset, "label",NULL);
|
|
191
|
+ cmDspSysInstallCb( h, storeBtn, "sym", preset, "cmd", NULL );
|
|
192
|
+ cmDspSysInstallCb( h, recallBtn, "sym", preset, "cmd", NULL );
|
|
193
|
+
|
|
194
|
+ cmDspInst_t* prePath = cmDspSysAllocInst( h, "Fname", "prePath", 3, true,NULL,r.tlPrefixPath);
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+ cmDspSysNewColumn(h,0);
|
|
198
|
+
|
|
199
|
+ //--------------- Recorded performance evaluation and Active Measurement related controls
|
|
200
|
+ cmDspInst_t* clrBtn = cmDspSysAllocButton( h, "clear", 0);
|
|
201
|
+ cmDspInst_t* prtBtn = cmDspSysAllocButton( h, "dump", 0);
|
|
202
|
+ cmDspInst_t* mlst = cmDspSysAllocInst( h, "MsgList", NULL, 3, "meas", r.measFn, 2);
|
|
203
|
+ cmDspInst_t* amCmd = cmDspSysAllocInst( h, "PortToSym", NULL, 2, "add", "rewind" );
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+ if((rc = cmDspSysLastRC(h)) != kOkDspRC )
|
|
209
|
+ return rc;
|
|
210
|
+
|
|
211
|
+ // Output Audio file recording.
|
|
212
|
+ cmDspSysInstallCb(h, recdGain,"val", afop, "gain0", NULL );
|
|
213
|
+ cmDspSysInstallCb(h, recdGain,"val", afop, "gain1", NULL );
|
|
214
|
+ cmDspSysInstallCb(h, recdChk, "out", recdPtS, "on", NULL );
|
|
215
|
+ cmDspSysInstallCb(h, recdChk, "out", recdPtS, "off", NULL );
|
|
216
|
+ cmDspSysInstallCb(h, recdPtS, "out", afop, "sel", NULL );
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+ // Audio connections
|
|
220
|
+ //cmDspSysConnectAudio(h, php, "out", wtp, "phs" ); // phs -> wt
|
|
221
|
+
|
|
222
|
+ cmDspSysConnectAudio( h, ai0p, "out", mi0p, "in");
|
|
223
|
+ cmDspSysConnectAudio( h, ai1p, "out", mi1p, "in");
|
|
224
|
+ cmDspSysConnectAudio( h, ai2p, "out", mi2p, "in");
|
|
225
|
+ cmDspSysConnectAudio( h, ai3p, "out", mi3p, "in");
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+ cmDspSysConnectAudio(h, ai0p, "out", mx0p, "in-0" ); // eqmix -> input mix
|
|
229
|
+ cmDspSysConnectAudio(h, ai1p, "out", mx1p, "in-0" );
|
|
230
|
+ cmDspSysConnectAudio(h, ai2p, "out", mx0p, "in-1" );
|
|
231
|
+ cmDspSysConnectAudio(h, ai3p, "out", mx1p, "in-1" );
|
|
232
|
+
|
|
233
|
+ cmDspSysConnectAudio(h, mx0p, "out", rpp, "in-0"); // sw -> rcdply
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+ cmDspSysConnectAudio(h, mx0p, "out", c0.kr0, "in" ); // ain -> sw
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+ cmDspSysConnectAudio(h, c0.cmp, "out", apf0, "in" );
|
|
240
|
+ cmDspSysConnectAudio(h, c0.cmp, "out", apf2, "in" );
|
|
241
|
+ cmDspSysConnectAudio(h, apf0, "out", ao0p, "in" );
|
|
242
|
+ cmDspSysConnectAudio(h, apf2, "out", ao2p, "in" );
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+ cmDspSysConnectAudio(h, mx1p, "out", rpp, "in-1"); // sw -> rcdply
|
|
246
|
+
|
|
247
|
+ cmDspSysConnectAudio(h, mx1p, "out", c1.kr0, "in" ); // ain -> sw
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+ cmDspSysConnectAudio(h, c1.cmp, "out", apf1, "in" ); // cmp -> mix 0
|
|
251
|
+ cmDspSysConnectAudio(h, c1.cmp, "out", apf3, "in" ); // cmp -> mix 0
|
|
252
|
+ cmDspSysConnectAudio(h, apf1, "out", ao1p, "in" );
|
|
253
|
+ cmDspSysConnectAudio(h, apf3, "out", ao3p, "in" );
|
|
254
|
+
|
|
255
|
+ cmDspSysConnectAudio(h, c0.cmp, "out", afop, "in0" ); // comp -> audio_file_out
|
|
256
|
+ cmDspSysConnectAudio(h, c1.cmp, "out", afop, "in1" );
|
|
257
|
+
|
|
258
|
+ //cmDspSysConnectAudio(h, ai0p, "out", afop, "in0" ); // comp -> audio_file_out
|
|
259
|
+ //cmDspSysConnectAudio(h, ai1p, "out", afop, "in1" );
|
|
260
|
+
|
|
261
|
+ //cmDspSysConnectAudio(h, ai0p, "out", ao2p, "in" ); // direct through from input to
|
|
262
|
+ //cmDspSysConnectAudio(h, ai1p, "out", ao3p, "in" ); // output chs 2&3
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+ cmDspSysInstallCb( h, clrBtn, "sym", amp, "cmd", NULL ); // clear active meas.
|
|
268
|
+ cmDspSysInstallCb( h, prtBtn, "sym", amp, "cmd", NULL ); // print active meas
|
|
269
|
+ cmDspSysInstallCb( h, prtBtn, "sym", scp, "cmd", NULL );
|
|
270
|
+ cmDspSysInstallCb( h, amCmd, "add", amp, "cmd", NULL ); // add active meas
|
|
271
|
+ cmDspSysInstallCb( h, amCmd, "rewind", amp, "cmd", NULL ); // rewind active meas
|
|
272
|
+ cmDspSysInstallCb( h, mlst, "loc", amp, "loc", NULL ); // recorded meas's list to active meas unit
|
|
273
|
+ cmDspSysInstallCb( h, mlst, "typeId", amp, "type", NULL ); //
|
|
274
|
+ cmDspSysInstallCb( h, mlst, "val", amp, "val", NULL ); //
|
|
275
|
+ cmDspSysInstallCb( h, mlst, "cost", amp, "cst", NULL ); //
|
|
276
|
+ cmDspSysInstallCb( h, mlst, "typeId", amCmd, "add", NULL ); //
|
|
277
|
+ cmDspSysInstallCb( h, sfp, "out", amRt, "f-in", NULL ); // sfp-active meas router (rtr is switched by live btn)
|
|
278
|
+ cmDspSysInstallCb( h, amRt, "f-out-0",amp, "sfloc", NULL );
|
|
279
|
+
|
|
280
|
+ cmDspSysInstallCb( h, sfp, "vloc", amp, "loc", NULL ); // live meas's to active meas unit
|
|
281
|
+ cmDspSysInstallCb( h, sfp, "vval", amp, "val", NULL ); //
|
|
282
|
+ cmDspSysInstallCb( h, sfp, "vcost",amp, "cst", NULL ); //
|
|
283
|
+ cmDspSysInstallCb( h, sfp, "vtyp", amp, "type", NULL ); //
|
|
284
|
+ cmDspSysInstallCb( h, sfp, "vtyp", amCmd, "add", NULL); //
|
|
285
|
+
|
|
286
|
+ // ***** delete this to prevent the score follower from driving the active-measure unit in 'live' mode
|
|
287
|
+ cmDspSysInstallCb( h, amRt, "f-out-1",amp, "sfloc", NULL );
|
|
288
|
+ // *****
|
|
289
|
+
|
|
290
|
+ // active measure loc to xfad channel trigger
|
|
291
|
+ cmDspSysInstallCb( h, amp, "scloc", c0.achan, "trig", NULL ); // See Also: modp.sw ->achan.trig
|
|
292
|
+
|
|
293
|
+ cmDspSysInstallCb( h, amp, "scloc", c1.achan, "trig", NULL );
|
|
294
|
+
|
|
295
|
+ cmDspSysInstallCb( h, amp, "even", pre, "in", NULL ); // active meas output to printers
|
|
296
|
+ cmDspSysInstallCb( h, amp, "dyn", prd, "in", NULL );
|
|
297
|
+ cmDspSysInstallCb( h, amp, "tempo", prt, "in", NULL );
|
|
298
|
+ cmDspSysInstallCb( h, amp, "cost", prc, "in", NULL );
|
|
299
|
+
|
|
300
|
+ // wave-table to time-line cursor
|
|
301
|
+ //cmDspSysInstallCb( h, wtp, "fidx",tlp, "curs", NULL);
|
|
302
|
+
|
|
303
|
+ cmDspSysInstallCb(h, prePath, "out", tlp, "path", NULL );
|
|
304
|
+
|
|
305
|
+ // 'live' button -> live router selector switch
|
|
306
|
+ //cmDspSysInstallCb(h, liveb, "out", wtRt, "sel", NULL );
|
|
307
|
+ cmDspSysInstallCb(h, liveb, "out", tlRt, "sel", NULL );
|
|
308
|
+ cmDspSysInstallCb(h, liveb, "out", mfpRt,"sel", NULL );
|
|
309
|
+ cmDspSysInstallCb(h, liveb, "out", amRt, "sel", NULL );
|
|
310
|
+ cmDspSysInstallCb(h, liveb, "out", au0Sw, "chidx", NULL );
|
|
311
|
+ cmDspSysInstallCb(h, liveb, "out", au1Sw, "chidx", NULL );
|
|
312
|
+ cmDspSysInstallCb(h, liveb, "out", measb, "in", NULL );
|
|
313
|
+ cmDspSysInstallCb(h, measb, "out", sfp, "measfl", NULL );
|
|
314
|
+
|
|
315
|
+ // 'simulate' button -> simulate router selector switch
|
|
316
|
+ cmDspSysInstallCb(h, simb, "out", ainb, "in", NULL );
|
|
317
|
+ cmDspSysInstallCb(h, ainb, "out", au0Sw, "chidx", NULL );
|
|
318
|
+ cmDspSysInstallCb(h, ainb, "out", au1Sw, "chidx", NULL );
|
|
319
|
+ cmDspSysInstallCb(h, simb, "out", siRt, "sel", NULL );
|
|
320
|
+ cmDspSysInstallCb(h, simb, "out", muRt, "sel", NULL );
|
|
321
|
+ cmDspSysInstallCb(h, simb, "out", d1Rt, "sel", NULL );
|
|
322
|
+ cmDspSysInstallCb(h, simb, "out", d0Rt, "sel", NULL );
|
|
323
|
+ cmDspSysInstallCb(h, simb, "out", stRt, "sel", NULL );
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+ // start connections
|
|
327
|
+ cmDspSysInstallCb(h, onb, "sym", tlRt, "s-in", NULL );
|
|
328
|
+ cmDspSysInstallCb(h, tlRt, "s-out-0",tlp, "reset", NULL );
|
|
329
|
+ cmDspSysInstallCb(h, onb, "sym", scp, "send", NULL );
|
|
330
|
+ cmDspSysInstallCb(h, onb, "sym", mfpRt,"s-in", NULL );
|
|
331
|
+ cmDspSysInstallCb(h, mfpRt,"s-out-0",mfp, "sel", NULL );
|
|
332
|
+
|
|
333
|
+ cmDspSysInstallCb(h, onb, "sym", pts, "on", NULL );
|
|
334
|
+ //cmDspSysInstallCb(h, pts, "on", wtRt, "s-in", NULL );
|
|
335
|
+ //cmDspSysInstallCb(h, wtRt,"s-out-0", wtp, "cmd", NULL );
|
|
336
|
+ cmDspSysInstallCb(h, pts, "on", modp, "cmd", NULL );
|
|
337
|
+ cmDspSysInstallCb(h, pts, "on", modr, "cmd", NULL );
|
|
338
|
+ cmDspSysInstallCb(h, pts, "on", rpp, "cmd", NULL );
|
|
339
|
+ cmDspSysInstallCb(h, onb, "sym", amCmd, "rewind",NULL );
|
|
340
|
+ cmDspSysInstallCb(h, onb, "out", c0.achan,"reset", NULL );
|
|
341
|
+ cmDspSysInstallCb(h, onb, "out", c1.achan,"reset", NULL );
|
|
342
|
+
|
|
343
|
+ // stop connections
|
|
344
|
+ //cmDspSysInstallCb(h, wtp, "done",offb,"in", NULL ); // 'done' from WT simulates pressing Stop btn.
|
|
345
|
+ cmDspSysInstallCb(h, tlp, "mfn", pts, "off", NULL ); // Prevents WT start on new audio file from TL.
|
|
346
|
+ cmDspSysInstallCb(h, offb, "sym", mfp, "sel", NULL );
|
|
347
|
+ cmDspSysInstallCb(h, offb, "sym", pts, "off", NULL );
|
|
348
|
+ //cmDspSysInstallCb(h, pts, "off", wtp, "cmd", NULL );
|
|
349
|
+ cmDspSysInstallCb(h, pts, "off", modp,"cmd", NULL );
|
|
350
|
+ cmDspSysInstallCb(h, pts, "off", modr,"cmd", NULL );
|
|
351
|
+ cmDspSysInstallCb(h, offb, "sym", mop, "reset", NULL );
|
|
352
|
+ cmDspSysInstallCb(h, offb, "sym", mo2p, "reset", NULL );
|
|
353
|
+
|
|
354
|
+
|
|
355
|
+ // time-line to wave-table selection
|
|
356
|
+ //cmDspSysInstallCb(h, tlp, "absi", wtp, "beg", NULL );
|
|
357
|
+ //cmDspSysInstallCb(h, tlp, "aesi", wtp, "end", NULL );
|
|
358
|
+ //cmDspSysInstallCb(h, tlp, "afn", wtp, "fn", NULL );
|
|
359
|
+
|
|
360
|
+ // time-line to MIDI file player selection
|
|
361
|
+ cmDspSysInstallCb(h, tlp, "mbsi", mfp, "bsi", NULL );
|
|
362
|
+ cmDspSysInstallCb(h, tlp, "mesi", mfp, "esi", NULL );
|
|
363
|
+ cmDspSysInstallCb(h, tlp, "mfn", mfp, "fn", NULL );
|
|
364
|
+
|
|
365
|
+ // score to score follower - to set initial search location
|
|
366
|
+ cmDspSysInstallCb(h, scp, "sel", sfp, "index", NULL );
|
|
367
|
+ cmDspSysInstallCb(h, scp, "sel", modp,"reset", NULL );
|
|
368
|
+ cmDspSysInstallCb(h, scp, "sel", modr,"reset", NULL );
|
|
369
|
+ cmDspSysInstallCb(h, scp, "sel", rpp, "initIdx", NULL );
|
|
370
|
+ cmDspSysInstallCb(h, scp, "sel", prp, "in", NULL );
|
|
371
|
+
|
|
372
|
+ // NOTE: THIS IS A DUPLICATE OF THE scp.sel CONNECTIONS
|
|
373
|
+ /*
|
|
374
|
+ cmDspSysInstallCb(h, scLoc, "val", sfp, "index", NULL );
|
|
375
|
+ cmDspSysInstallCb(h, scLoc, "val", modp,"reset", NULL );
|
|
376
|
+ cmDspSysInstallCb(h, scLoc, "val", modr,"reset", NULL );
|
|
377
|
+ cmDspSysInstallCb(h, scLoc, "val", rpp, "initIdx", NULL );
|
|
378
|
+ cmDspSysInstallCb(h, scLoc, "val", prp, "in", NULL );
|
|
379
|
+ */
|
|
380
|
+
|
|
381
|
+ //cmDspSysInstallCb(h, reload,"out", modp, "reload", NULL );
|
|
382
|
+
|
|
383
|
+
|
|
384
|
+ // MIDI file player to score follower
|
|
385
|
+ cmDspSysInstallCb(h, mfp, "smpidx", siRt, "f-in",NULL );
|
|
386
|
+ cmDspSysInstallCb(h, siRt, "f-out-1", sfp, "smpidx",NULL );
|
|
387
|
+ // leave siRt.f-out-1 unconnected because it should be ignored in 'simulate mode'
|
|
388
|
+
|
|
389
|
+ cmDspSysInstallCb(h, mfp, "id", muRt, "f-in", NULL );
|
|
390
|
+ cmDspSysInstallCb(h, muRt, "f-out-1", sfp, "muid", NULL );
|
|
391
|
+ // leave muRt.f-out-1 unconnected because it should be ignored in 'simulate mode'
|
|
392
|
+
|
|
393
|
+ cmDspSysInstallCb(h, mfp, "d1", d1Rt, "f-in", NULL );
|
|
394
|
+ cmDspSysInstallCb(h, d1Rt, "f-out-1", sfp, "d1", NULL );
|
|
395
|
+ cmDspSysInstallCb(h, d1Rt, "f-out-1", nmp, "d1", NULL );
|
|
396
|
+ cmDspSysInstallCb(h, nmp, "d1", mop, "d1", NULL );
|
|
397
|
+ cmDspSysInstallCb(h, nmp, "d1", mo2p, "d1", NULL );
|
|
398
|
+
|
|
399
|
+ cmDspSysInstallCb(h, mfp, "d0", d0Rt, "f-in", NULL );
|
|
400
|
+ cmDspSysInstallCb(h, d0Rt, "f-out-1", sfp, "d0", NULL );
|
|
401
|
+ cmDspSysInstallCb(h, d0Rt, "f-out-1", nmp, "d0", NULL );
|
|
402
|
+ cmDspSysInstallCb(h, nmp, "d0", mop, "d0", NULL );
|
|
403
|
+ cmDspSysInstallCb(h, nmp, "d0", mo2p, "d0", NULL );
|
|
404
|
+
|
|
405
|
+ cmDspSysInstallCb(h, mfp, "status", stRt, "f-in", NULL );
|
|
406
|
+ cmDspSysInstallCb(h, stRt, "f-out-1", sfp, "status",NULL );
|
|
407
|
+ cmDspSysInstallCb(h, stRt, "f-out-1", nmp, "status",NULL );
|
|
408
|
+ cmDspSysInstallCb(h, nmp, "status", mop, "status",NULL );
|
|
409
|
+ cmDspSysInstallCb(h, nmp, "status", mo2p, "status",NULL );
|
|
410
|
+
|
|
411
|
+
|
|
412
|
+ // MIDI input port
|
|
413
|
+ //cmDspSysInstallCb(h, mip, "smpidx", sfp, "smpidx", NULL );
|
|
414
|
+ //cmDspSysInstallCb(h, mip, "d1", sfp, "d1", NULL );
|
|
415
|
+ //cmDspSysInstallCb(h, mip, "d0", sfp, "d0", NULL );
|
|
416
|
+ //cmDspSysInstallCb(h, mip, "status", sfp, "status", NULL );
|
|
417
|
+
|
|
418
|
+ // score follower to recd_play,modulator and printers
|
|
419
|
+ //cmDspSysInstallCb(h, sfp, "out", rpp, "index", NULL );
|
|
420
|
+ cmDspSysInstallCb(h, sfp, "out", modp, "index", NULL );
|
|
421
|
+ //cmDspSysInstallCb(h, sfp, "out", modr, "index", NULL );
|
|
422
|
+ cmDspSysInstallCb(h, sfp, "recent", prp, "in", NULL ); // report 'recent' but only act on 'max' loc index
|
|
423
|
+
|
|
424
|
+ //cmDspSysInstallCb(h, prtb, "sym", sfp, "cmd", NULL );
|
|
425
|
+ //cmDspSysInstallCb(h, qtb, "sym", sfp, "cmd", NULL );
|
|
426
|
+
|
|
427
|
+
|
|
428
|
+ cmDspSysInstallCb( h, lasecs, "val", rpp, "curla", NULL ); // recd/play control
|
|
429
|
+ cmDspSysInstallCb( h, dbpsec, "val", rpp, "frate", NULL );
|
|
430
|
+
|
|
431
|
+ cmDspSysInstallCb(h, igain0, "val", ai0p, "gain", NULL ); // input gain control
|
|
432
|
+ cmDspSysInstallCb(h, igain1, "val", ai1p, "gain", NULL );
|
|
433
|
+ cmDspSysInstallCb(h, igain2, "val", ai2p, "gain", NULL ); // input gain control
|
|
434
|
+ cmDspSysInstallCb(h, igain3, "val", ai3p, "gain", NULL );
|
|
435
|
+
|
|
436
|
+ cmDspSysInstallCb(h, apfByp, "out", apf0, "bypass", NULL ); // APF bypass
|
|
437
|
+ cmDspSysInstallCb(h, apfByp, "out", apf1, "bypass", NULL ); //
|
|
438
|
+ cmDspSysInstallCb(h, apfByp, "out", apf2, "bypass", NULL ); //
|
|
439
|
+ cmDspSysInstallCb(h, apfByp, "out", apf3, "bypass", NULL ); //
|
|
440
|
+
|
|
441
|
+
|
|
442
|
+ cmDspSysInstallCb(h, ogain0, "val", ao0p, "gain", NULL ); // output gain control
|
|
443
|
+ cmDspSysInstallCb(h, ogain1, "val", ao1p, "gain", NULL );
|
|
444
|
+ cmDspSysInstallCb(h, ogain2, "val", ao2p, "gain", NULL );
|
|
445
|
+ cmDspSysInstallCb(h, ogain3, "val", ao3p, "gain", NULL );
|
|
446
|
+
|
|
447
|
+
|
|
448
|
+
|
|
449
|
+
|
|
450
|
+ return rc;
|
|
451
|
+}
|
|
452
|
+
|
|
453
|
+
|
|
454
|
+//------------------------------------------------------------------------------
|
|
455
|
+//)
|