-
-
Notifications
You must be signed in to change notification settings - Fork 41
/
SetSceneParse.c
2781 lines (2761 loc) · 125 KB
/
SetSceneParse.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
//
// SetSceneParse.c
//
// Created on: 6 janv. 2015
// Author: Patrick-Gilles Maillot
//
// Scene and Snippet files parser. Basically a very big switch statement checking the syntax of incoming data and
// based on parameters, sending data to X32 accordingly.
//
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <math.h>
#include "X32SetScene.h"
#ifdef __WIN32__
#include <windows.h>
#else
#include <sys/socket.h>
#include <arpa/inet.h>
#include <netdb.h>
#endif
extern int fxparse1(char *buf, int k, int ifx);
extern int fxparse5(char *buf, int k, int ifx);
extern void Xfdump(char *header, char *buf, int len, int debug);
extern int Xsprint(char *bd, int index, char format, void *bs);
extern int XOff_On(char *buf, int k, char* Crit_0);
extern int Xp_percent(char *buf, int k);
extern int Xp_linf(char *buf, int k, float xmin, float lmaxmin, float xstep);
extern int Xp_logf(char *buf, int k, float xmin, float lmaxmin, int nsteps);
extern int Xp_int(char *buf, int k);
extern int Xp_str(char *buf, int k);
extern int Xp_bit(char *buf, int k);
extern int Xp_list(char *buf, int k, char **list, int list_max);
extern int Xp_fxlist(char *buf, int k, char **list, int list_max, int *p_ival);
extern int Xp_frequency(char *buf, int k, int nsteps);
extern int Xp_level(char *buf, int k, int nsteps);
extern void X32logf(char *header, char *buf, int len);
extern int Xdebug;
extern int Xverbose;
extern int Xdelay;
extern int X32VER;
extern int X32SHOW;
extern int X32PRESET;
extern struct sockaddr *Xip_pt;
extern int Xip_len; // length of addresses
extern int Xfd; // our socket
extern int fx[8]; // saves the FX current type for each of the fx slots
extern FILE *Xin, *log_file;
#ifdef __WIN32__
#define MILLISLEEP(t) \
do { \
Sleep((t)); \
} while (0);
#else
#define MILLISLEEP(t) \
do { \
usleep((t)*1000); \
} while (0);
#endif
#define SendDataToX32 do { \
if (X32SHOW) {if (Xverbose) X32logf("->X", buf, k);} \
else {if (Xverbose) {Xfdump("->X", buf, k, Xdebug); fflush(stdout);}} \
if (sendto(Xfd, buf, k, 0, Xip_pt, Xip_len) < 0) { \
perror("coundn't send data"); \
return (-1); \
} \
if (Xdelay > 0) MILLISLEEP(Xdelay); \
if (Early_End()) return (0); \
} while (0);
//
// Private functions
int Early_End() {
int i;
//
while ((i = fgetc(Xin)) == (int)' '); // ignore/skip spaces
ungetc(i, Xin); // re-install just read char
if ((i == (int)'/') || (i == (int)10)) return 1; // Early end is either a new line of a command
return 0;
}
//
//
//
int SetSceneParse(char *l_read) {
int Xsc_index;
int ch, mx, k;
char c1;
char buf[512]; //512 is to take care of large number of
char tmp[512]; //parameters i.e. 64 floats in FX (each is max 6 chars)
for (Xsc_index = 0; Xsc_index < Xsc_max; Xsc_index++) {
if (strcmp(l_read, Xsc[Xsc_index]) == 0) {
// found
if (X32SHOW) {
if(Xverbose) fprintf (log_file, "scene data in: %s - found: %d %s\r\n", l_read, Xsc_index, Xsc[Xsc_index]);
} else {
if(Xverbose) printf ("scene data in: %s - found: %d %s\n", l_read, Xsc_index, Xsc[Xsc_index]);
}
switch (Xsc_index) {
case config_chlink: // /config/chlink 1-2 ... 31-32
for (ch = 1; ch < 32; ch+=2) {
sprintf(tmp, "/config/chlink/%d-%d", ch, ch+1);
k = Xsprint(buf, 0, 's', tmp);
k = XOff_On(buf, k, "OFF");
SendDataToX32 // send to X32
}
break;
case config_auxlink: // /config/auxlink 1-2 ... 7-8
for (ch = 1; ch < 8; ch+=2) {
sprintf(tmp, "/config/auxlink/%d-%d", ch, ch+1);
k = Xsprint(buf, 0, 's', tmp);
k = XOff_On(buf, k, "OFF");
SendDataToX32 // send to X32
}
break;
case config_fxlink: // /config/fxlink 1-2 ... 7-8
for (ch = 1; ch < 8; ch+=2) {
sprintf(tmp, "/config/fxlink/%d-%d", ch, ch+1);
k = Xsprint(buf, 0, 's', tmp);
k = XOff_On(buf, k, "OFF");
SendDataToX32 // send to X32
}
break;
case config_buslink: // /config/buslink 1-2 ... 15-16
for (ch = 1; ch < 16; ch+=2) {
sprintf(tmp, "/config/buslink/%d-%d", ch, ch+1);
k = Xsprint(buf, 0, 's', tmp);
k = XOff_On(buf, k, "OFF");
SendDataToX32 // send to X32
}
break;
case config_mtxlink: // /config/mtxlink 1-2 ... 5-6
for (ch = 1; ch < 6; ch+=2) {
sprintf(tmp, "/config/mtxlink/%d-%d", ch, ch+1);
k = Xsprint(buf, 0, 's', tmp);
k = XOff_On(buf, k, "OFF");
SendDataToX32 // send to X32
}
break;
case config_mute: // /config/mute 1-6
for (ch = 1; ch < 7; ch++) {
sprintf(tmp, "/config/mute/%d", ch);
k = Xsprint(buf, 0, 's', tmp);
k = XOff_On(buf, k, "OFF");
SendDataToX32 // send to X32
}
break;
case config_linkcfg: // /config/linkcfg
k = Xsprint(buf, 0, 's', "/config/linkcfg/hadly");
k = XOff_On(buf, k, "OFF");
SendDataToX32 // send to X32
k = Xsprint(buf, 0, 's', "/config/linkcfg/eq");
k = XOff_On(buf, k, "OFF");
SendDataToX32 // send to X32
k = Xsprint(buf, 0, 's', "/config/linkcfg/dyn");
k = XOff_On(buf, k, "OFF");
SendDataToX32 // send to X32
k = Xsprint(buf, 0, 's', "/config/linkcfg/fdrmute");
k = XOff_On(buf, k, "OFF");
SendDataToX32 // send to X32
break;
case config_mono: // /config/mono
k = Xsprint(buf, 0, 's', "/config/mono/mode");
k = XOff_On(buf, k, "LR+M");
SendDataToX32 // send to X32
k = Xsprint(buf, 0, 's', "/config/mono/link");
k = XOff_On(buf, k, "OFF");
SendDataToX32 // send to X32
break;
case config_solo: // /config/solo
k = Xsprint(buf, 0, 's', "/config/solo/level");
k = Xp_level(buf, k, 160);
SendDataToX32 // send to X32
k = Xsprint(buf, 0, 's', "/config/solo/source");
k = Xp_list(buf, k, Xsource, Xsource_max);
SendDataToX32 // send to X32
k = Xsprint(buf, 0, 's', "/config/solo/sourcetrim");
k = Xp_linf(buf, k, -18., 36., 0.5);
SendDataToX32 // send to X32
k = Xsprint(buf, 0, 's', "/config/solo/chmode");
k = XOff_On(buf, k, "PFL");
SendDataToX32 // send to X32
k = Xsprint(buf, 0, 's', "/config/solo/Busmode");
k = XOff_On(buf, k, "PFL");
SendDataToX32 // send to X32
k = Xsprint(buf, 0, 's', "/config/solo/dcamode");
k = XOff_On(buf, k, "PFL");
SendDataToX32 // send to X32
k = Xsprint(buf, 0, 's', "/config/solo/exclusive");
k = XOff_On(buf, k, "OFF");
SendDataToX32 // send to X32
k = Xsprint(buf, 0, 's', "/config/solo/followsel");
k = XOff_On(buf, k, "OFF");
SendDataToX32 // send to X32
k = Xsprint(buf, 0, 's', "/config/solo/followsolo");
k = XOff_On(buf, k, "OFF");
SendDataToX32 // send to X32
k = Xsprint(buf, 0, 's', "/config/solo/dimatt");
k = Xp_linf(buf, k, -40., 40., 1.);
SendDataToX32 // send to X32
k = Xsprint(buf, 0, 's', "/config/solo/dim");
k = XOff_On(buf, k, "OFF");
SendDataToX32 // send to X32
k = Xsprint(buf, 0, 's', "/config/solo/mono");
k = XOff_On(buf, k, "OFF");
SendDataToX32 // send to X32
k = Xsprint(buf, 0, 's', "/config/solo/delay");
k = XOff_On(buf, k, "OFF");
SendDataToX32 // send to X32
k = Xsprint(buf, 0, 's', "/config/solo/delaytime");
k = Xp_linf(buf, k, 0.3, 499.7, 0.1);
SendDataToX32 // send to X32
k = Xsprint(buf, 0, 's', "/config/solo/masterctrl");
k = XOff_On(buf, k, "OFF");
SendDataToX32 // send to X32
k = Xsprint(buf, 0, 's', "/config/solo/mute");
k = XOff_On(buf, k, "OFF");
SendDataToX32 // send to X32
k = Xsprint(buf, 0, 's', "/config/solo/dimplf");
k = XOff_On(buf, k, "OFF");
SendDataToX32 // send to X32
break;
case config_talk: // /config/talk
k = Xsprint(buf, 0, 's', "/config/talk/enable");
k = XOff_On(buf, k, "OFF");
SendDataToX32 // send to X32
k = Xsprint(buf, 0, 's', "/config/talk/source");
k = XOff_On(buf, k, "INT");
SendDataToX32 // send to X32
break;
case config_talk_A: // /config/talk/A
k = Xsprint(buf, 0, 's', "/config/talk/A/level");
k = Xp_level(buf, k, 160);
SendDataToX32 // send to X32
k = Xsprint(buf, 0, 's', "/config/talk/A/dim");
k = XOff_On(buf, k, "OFF");
SendDataToX32 // send to X32
k = Xsprint(buf, 0, 's', "/config/talk/A/latch");
k = XOff_On(buf, k, "OFF");
SendDataToX32 // send to X32
k = Xsprint(buf, 0, 's', "/config/talk/A/destmap");
k = Xp_bit(buf, k);
SendDataToX32 // send to X32
break;
case config_talk_B: // /config/talk/B
k = Xsprint(buf, 0, 's', "/config/talk/B/level");
k = Xp_level(buf, k, 160);
SendDataToX32 // send to X32
k = Xsprint(buf, 0, 's', "/config/talk/B/dim");
k = XOff_On(buf, k, "OFF");
SendDataToX32 // send to X32
k = Xsprint(buf, 0, 's', "/config/talk/B/latch");
k = XOff_On(buf, k, "OFF");
SendDataToX32 // send to X32
k = Xsprint(buf, 0, 's', "/config/talk/B/destmap");
k = Xp_bit(buf, k);
SendDataToX32 // send to X32
break;
case config_osc: // /config/osc
k = Xsprint(buf, 0, 's', "/config/osc/level");
k = Xp_level(buf, k, 160);
SendDataToX32 // send to X32
k = Xsprint(buf, 0, 's', "/config/osc/f1");
k = Xp_frequency(buf, k, 120);
SendDataToX32 // send to X32
k = Xsprint(buf, 0, 's', "/config/osc/f2");
k = Xp_frequency(buf, k, 120);
SendDataToX32 // send to X32
k = Xsprint(buf, 0, 's', "/config/osc/fsel");
k = XOff_On(buf, k, "F1");
SendDataToX32 // send to X32
k = Xsprint(buf, 0, 's', "/config/osc/type");
k = Xp_list(buf, k, Xosctype, Xosctype_max);
SendDataToX32 // send to X32
k = Xsprint(buf, 0, 's', "/config/osc/dest");
k = Xp_int(buf, k);
SendDataToX32 // send to X32
break;
case config_userrout_out:
for (ch = 1; ch < 49; ch += 1) {
sprintf(tmp, "/config/userrout/out/%02d", ch);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_int(buf, k);
SendDataToX32 // send to X32
}
break;
case config_userrout_in:
for (ch = 1; ch < 33; ch += 1) {
sprintf(tmp, "/config/userrout/in/%02d", ch);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_int(buf, k);
SendDataToX32 // send to X32
}
break;
case config_routing: // /config/routing
k = Xsprint(buf, 0, 's', "/config/routing");
k = Xp_list(buf, k, Xroutswitch, Xroutswitch_max);
SendDataToX32 // send to X32
break;
case config_routing_IN: // /config/routing/IN
k = Xsprint(buf, 0, 's', "/config/routing/IN/1-8");
k = Xp_list(buf, k, Xinaertng, Xinaertng_max);
SendDataToX32 // send to X32
k = Xsprint(buf, 0, 's', "/config/routing/IN/9-16");
k = Xp_list(buf, k, Xinaertng, Xinaertng_max);
SendDataToX32 // send to X32
k = Xsprint(buf, 0, 's', "/config/routing/IN/17-24");
k = Xp_list(buf, k, Xinaertng, Xinaertng_max);
SendDataToX32 // send to X32
k = Xsprint(buf, 0, 's', "/config/routing/IN/25-32");
k = Xp_list(buf, k, Xinaertng, Xinaertng_max);
SendDataToX32 // send to X32
k = Xsprint(buf, 0, 's', "/config/routing/IN/AUX");
k = Xp_list(buf, k, Xauxrtng, Xauxrtng_max);
SendDataToX32 // send to X32
break;
case config_routing_IN1: // /config/routing/IN/1-8
k = Xsprint(buf, 0, 's', "/config/routing/IN/1-8");
k = Xp_list(buf, k, Xinaertng, Xinaertng_max);
SendDataToX32 // send to X32
break;
case config_routing_IN9: // /config/routing/IN/9-16
k = Xsprint(buf, 0, 's', "/config/routing/IN/9-16");
k = Xp_list(buf, k, Xinaertng, Xinaertng_max);
SendDataToX32 // send to X32
break;
case config_routing_IN17: // /config/routing/IN/17-24
k = Xsprint(buf, 0, 's', "/config/routing/IN/17-24");
k = Xp_list(buf, k, Xinaertng, Xinaertng_max);
SendDataToX32 // send to X32
break;
case config_routing_IN25: // /config/routing/IN/25-32
k = Xsprint(buf, 0, 's', "/config/routing/IN/25-32");
k = Xp_list(buf, k, Xinaertng, Xinaertng_max);
SendDataToX32 // send to X32
break;
case config_routing_INAUX: // /config/routing/IN/AUX
k = Xsprint(buf, 0, 's', "/config/routing/IN/AUX");
k = Xp_list(buf, k, Xauxrtng, Xauxrtng_max);
SendDataToX32 // send to X32
break;
case config_routing_AES50A:case config_routing_AES50B: // /config/routing/AES50A|B
sscanf(l_read +21, "%c", &c1);
for (ch = 1; ch < 48; ch +=8) {
sprintf(tmp, "/config/routing/AES50%c/%d-%d", c1, ch, ch+7);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_list(buf, k, Xiaesrtng, Xiaesrtng_max);
SendDataToX32 // send to X32
}
break;
case config_routing_AES50A1:case config_routing_AES50B1: // /config/routing/AES50A1|B1
sscanf(l_read +21, "%c", &c1);
ch = 1;
sprintf(tmp, "/config/routing/AES50%c/%d-%d", c1, ch, ch+7);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_list(buf, k, Xiaesrtng, Xiaesrtng_max);
SendDataToX32 // send to X32
break;
case config_routing_AES50A9:case config_routing_AES50B9: // /config/routing/AES50A9|B9
sscanf(l_read +21, "%c", &c1);
ch = 8;
sprintf(tmp, "/config/routing/AES50%c/%d-%d", c1, ch, ch+7);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_list(buf, k, Xiaesrtng, Xiaesrtng_max);
SendDataToX32 // send to X32
break;
case config_routing_AES50A17:case config_routing_AES50B17: // /config/routing/AES50A17|B17
sscanf(l_read +21, "%c", &c1);
ch = 17;
sprintf(tmp, "/config/routing/AES50%c/%d-%d", c1, ch, ch+7);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_list(buf, k, Xiaesrtng, Xiaesrtng_max);
SendDataToX32 // send to X32
break;
case config_routing_AES50A25:case config_routing_AES50B25: // /config/routing/AES50A25|B25
sscanf(l_read +21, "%c", &c1);
ch = 25;
sprintf(tmp, "/config/routing/AES50%c/%d-%d", c1, ch, ch+7);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_list(buf, k, Xiaesrtng, Xiaesrtng_max);
SendDataToX32 // send to X32
break;
case config_routing_AES50A33:case config_routing_AES50B33: // /config/routing/AES50A33|B33
sscanf(l_read +21, "%c", &c1);
ch = 33;
sprintf(tmp, "/config/routing/AES50%c/%d-%d", c1, ch, ch+7);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_list(buf, k, Xiaesrtng, Xiaesrtng_max);
SendDataToX32 // send to X32
break;
case config_routing_AES50A41:case config_routing_AES50B41: // /config/routing/AES50A41|B41
sscanf(l_read +21, "%c", &c1);
ch = 41;
sprintf(tmp, "/config/routing/AES50%c/%d-%d", c1, ch, ch+7);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_list(buf, k, Xiaesrtng, Xiaesrtng_max);
SendDataToX32 // send to X32
break;
case config_routing_CARD: // /config/routing/CARD
for (ch = 1; ch < 32; ch +=8) {
sprintf(tmp, "/config/routing/CARD/%d-%d", ch, ch+7);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_list(buf, k, Xiaesrtng, Xiaesrtng_max);
SendDataToX32 // send to X32
}
break;
case config_routing_CARD1: // /config/routing/CARD/1-8
sprintf(tmp, "/config/routing/CARD/1-8");
k = Xsprint(buf, 0, 's', tmp);
k = Xp_list(buf, k, Xiaesrtng, Xiaesrtng_max);
SendDataToX32 // send to X32
break;
case config_routing_CARD9: // /config/routing/CARD/9-16
sprintf(tmp, "/config/routing/CARD/9-16");
k = Xsprint(buf, 0, 's', tmp);
k = Xp_list(buf, k, Xiaesrtng, Xiaesrtng_max);
SendDataToX32 // send to X32
break;
case config_routing_CARD17: // /config/routing/CARD/17-24
sprintf(tmp, "/config/routing/CARD/17-24");
k = Xsprint(buf, 0, 's', tmp);
k = Xp_list(buf, k, Xiaesrtng, Xiaesrtng_max);
SendDataToX32 // send to X32
break;
case config_routing_CARD25: // /config/routing/CARD/25-32
sprintf(tmp, "/config/routing/CARD/25-32");
k = Xsprint(buf, 0, 's', tmp);
k = Xp_list(buf, k, Xiaesrtng, Xiaesrtng_max);
SendDataToX32 // send to X32
break;
case config_routing_OUT: // /config/routing/OUT
sprintf(tmp, "/config/routing/OUT/1-4");
k = Xsprint(buf, 0, 's', tmp);
k = Xp_list(buf, k, Xo14rtng, Xo14rtng_max);
SendDataToX32 // send to X32
sprintf(tmp, "/config/routing/OUT/5-8");
k = Xsprint(buf, 0, 's', tmp);
k = Xp_list(buf, k, Xo58rtng, Xo58rtng_max);
SendDataToX32 // send to X32
sprintf(tmp, "/config/routing/OUT/9-12");
k = Xsprint(buf, 0, 's', tmp);
k = Xp_list(buf, k, Xo14rtng, Xo14rtng_max);
SendDataToX32 // send to X32
sprintf(tmp, "/config/routing/OUT/13-16");
k = Xsprint(buf, 0, 's', tmp);
k = Xp_list(buf, k, Xo58rtng, Xo58rtng_max);
SendDataToX32 // send to X32
break;
case config_routing_OUT1: // /config/routing/OUT/1-4
sprintf(tmp, "/config/routing/OUT/1-4");
k = Xsprint(buf, 0, 's', tmp);
k = Xp_list(buf, k, Xo14rtng, Xo14rtng_max);
SendDataToX32 // send to X32
break;
case config_routing_OUT5: // /config/routing/OUT/5-8
sprintf(tmp, "/config/routing/OUT/5-8");
k = Xsprint(buf, 0, 's', tmp);
k = Xp_list(buf, k, Xo58rtng, Xo58rtng_max);
SendDataToX32 // send to X32
break;
case config_routing_OUT9: // /config/routing/OUT/9-12
sprintf(tmp, "/config/routing/OUT/9-12");
k = Xsprint(buf, 0, 's', tmp);
k = Xp_list(buf, k, Xo14rtng, Xo14rtng_max);
SendDataToX32 // send to X32
break;
case config_routing_OUT13: // /config/routing/OUT/13-16
sprintf(tmp, "/config/routing/OUT/13-16");
k = Xsprint(buf, 0, 's', tmp);
k = Xp_list(buf, k, Xo58rtng, Xo58rtng_max);
SendDataToX32 // send to X32
break;
case config_routing_PLAY: // /config/routing/PLAY
k = Xsprint(buf, 0, 's', "/config/routing/PLAY/1-8");
k = Xp_list(buf, k, Xinaertng, Xinaertng_max);
SendDataToX32 // send to X32
k = Xsprint(buf, 0, 's', "/config/routing/PLAY/9-16");
k = Xp_list(buf, k, Xinaertng, Xinaertng_max);
SendDataToX32 // send to X32
k = Xsprint(buf, 0, 's', "/config/routing/PLAY/17-24");
k = Xp_list(buf, k, Xinaertng, Xinaertng_max);
SendDataToX32 // send to X32
k = Xsprint(buf, 0, 's', "/config/routing/PLAY/25-32");
k = Xp_list(buf, k, Xinaertng, Xinaertng_max);
SendDataToX32 // send to X32
k = Xsprint(buf, 0, 's', "/config/routing/PLAY/AUX");
k = Xp_list(buf, k, Xauxrtng, Xauxrtng_max);
SendDataToX32 // send to X32
break;
case config_routing_PLAY1: // /config/routing/PLAY/1-8
k = Xsprint(buf, 0, 's', "/config/routing/PLAY/1-8");
k = Xp_list(buf, k, Xinaertng, Xinaertng_max);
SendDataToX32 // send to X32
break;
case config_routing_PLAY9: // /config/routing/PLAY/9-16
k = Xsprint(buf, 0, 's', "/config/routing/PLAY/9-16");
k = Xp_list(buf, k, Xinaertng, Xinaertng_max);
SendDataToX32 // send to X32
break;
case config_routing_PLAY17: // /config/routing/PLAY/17-24
k = Xsprint(buf, 0, 's', "/config/routing/PLAY/17-24");
k = Xp_list(buf, k, Xinaertng, Xinaertng_max);
SendDataToX32 // send to X32
break;
case config_routing_PLAY25: // /config/routing/PLAY/25-32
k = Xsprint(buf, 0, 's', "/config/routing/PLAY/25-32");
k = Xp_list(buf, k, Xinaertng, Xinaertng_max);
SendDataToX32 // send to X32
break;
case config_routing_PLAYAUX: // /config/routing/PLAY/AUX
k = Xsprint(buf, 0, 's', "/config/routing/PLAY/AUX");
k = Xp_list(buf, k, Xauxrtng, Xauxrtng_max);
SendDataToX32 // send to X32
break;
case config_userctrl_A:case config_userctrl_B:case config_userctrl_C: // /config/userctrl
sscanf(l_read +17, "%c", &c1);
sprintf(tmp, "/config/userctrl/%c", c1);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_list(buf, k, Xcolor, Xcolor_max);
SendDataToX32 // send to X32
break;
case config_userctrl_A_enc:case config_userctrl_B_enc:case config_userctrl_C_enc: // /config/userctrl/A|B|C/enc
sscanf(l_read +17, "%c", &c1);
for (ch = 1; ch < 5; ch++) {
sprintf(tmp, "/config/userctrl/%c/enc/%d", c1, ch);
k = Xsprint(buf, 0, 's', tmp);
k = Xsprint(buf, k, 's', ",s");
mx = fscanf(Xin, "%511s", tmp);
mx = 1; // search for end of sting (char '"')
while (tmp[mx] != '"') mx++; // search for end of string (char '"')
if (mx == 1) tmp[mx++] = '-';
tmp[mx] = 0; //mark end of string
k = Xsprint(buf, k, 's', tmp + 1); //skip the first char!
SendDataToX32 // send to X32
}
break;
case config_userctrl_A_btn:case config_userctrl_B_btn:case config_userctrl_C_btn: // /config/userctrl/A|B|C/btn
sscanf(l_read +17, "%c", &c1);
for (ch = 5; ch < 13; ch++) {
sprintf(tmp, "/config/userctrl/%c/btn/%d", c1, ch);
k = Xsprint(buf, 0, 's', tmp);
k = Xsprint(buf, k, 's', ",s");
mx = fscanf(Xin, "%511s", tmp);
mx = 1; // search for end of sting (char '"')
while (tmp[mx] != '"') mx++; // search for end of string (char '"')
if (mx == 1) tmp[mx++] = '-';
tmp[mx] = 0; //mark end of string
k = Xsprint(buf, k, 's', tmp+ 1); //skip the first char!
SendDataToX32 // send to X32
}
break;
case config_tape: // /config/tape
k = Xsprint(buf, 0, 's', "/config/tape/gainL");
k = Xp_linf(buf, k, -6., 30., 0.5);
SendDataToX32 // send to X32
k = Xsprint(buf, 0, 's', "/config/tape/gainR");
k = Xp_linf(buf, k, -6., 30., 0.5);
SendDataToX32 // send to X32
k = Xsprint(buf, 0, 's', "/config/tape/autoplay");
k = XOff_On(buf, k, "OFF");
SendDataToX32 // send to X32
break;
case config_amixenable: // /config/amixenable
k = Xsprint(buf, 0, 's', "/config/amixenable");
k = XOff_On(buf, k, "OFF");
k = XOff_On(buf, k, "OFF");
SendDataToX32 // send to X32
break;
case config_dp48:
k = Xsprint(buf, 0, 's', "/config/scope");
k = Xp_percent(buf, k);
SendDataToX32 // send to X32
k = Xsprint(buf, 0, 's', "/config/broadcast");
k = Xp_int(buf, k);
SendDataToX32 // send to X32
break;
case config_dp48_assign:
for (ch = 1; ch < 49; ch += 1) {
sprintf(tmp, "/config/dp48/assign/%02d", ch);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_int(buf, k);
SendDataToX32 // send to X32
}
break;
case config_dp48_grpname:
for (ch = 1; ch < 13; ch += 1) {
sprintf(tmp, "/config/dp48/grpname/%02d", ch);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_str(buf, k);
SendDataToX32 // send to X32
}
break;
case ch_01_config:case ch_02_config:case ch_03_config:case ch_04_config: // /ch/01/config
case ch_05_config:case ch_06_config:case ch_07_config:case ch_08_config:
case ch_09_config:case ch_10_config:case ch_11_config:case ch_12_config:
case ch_13_config:case ch_14_config:case ch_15_config:case ch_16_config:
case ch_17_config:case ch_18_config:case ch_19_config:case ch_20_config:
case ch_21_config:case ch_22_config:case ch_23_config:case ch_24_config:
case ch_25_config:case ch_26_config:case ch_27_config:case ch_28_config:
case ch_29_config:case ch_30_config:case ch_31_config:case ch_32_config:
sscanf(l_read + 4, "%d", &ch);
sprintf(tmp, "/ch/%02d/config/name", ch);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_str(buf, k);
SendDataToX32 // send to X32
sprintf(tmp, "/ch/%02d/config/icon", ch);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_int(buf, k);
SendDataToX32 // send to X32
sprintf(tmp, "/ch/%02d/config/color", ch);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_list(buf, k, Xcolor, Xcolor_max);
SendDataToX32 // send to X32
if (!X32PRESET) {
sprintf(tmp, "/ch/%02d/config/source", ch);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_int(buf, k);
SendDataToX32 // send to X32
}
break;
case ch_01_delay:case ch_02_delay:case ch_03_delay:case ch_04_delay: // /ch/01/delay
case ch_05_delay:case ch_06_delay:case ch_07_delay:case ch_08_delay:
case ch_09_delay:case ch_10_delay:case ch_11_delay:case ch_12_delay:
case ch_13_delay:case ch_14_delay:case ch_15_delay:case ch_16_delay:
case ch_17_delay:case ch_18_delay:case ch_19_delay:case ch_20_delay:
case ch_21_delay:case ch_22_delay:case ch_23_delay:case ch_24_delay:
case ch_25_delay:case ch_26_delay:case ch_27_delay:case ch_28_delay:
case ch_29_delay:case ch_30_delay:case ch_31_delay:case ch_32_delay:
sscanf(l_read + 4, "%d", &ch);
sprintf(tmp, "/ch/%02d/delay/on", ch);
k = Xsprint(buf, 0, 's', tmp);
k = XOff_On(buf, k, "OFF");
SendDataToX32 // send to X32
sprintf(tmp, "/ch/%02d/delay/time", ch);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_linf(buf, k, 0.3, 499.7, 0.1);
SendDataToX32 // send to X32
break;
case ch_01_preamp:case ch_02_preamp:case ch_03_preamp:case ch_04_preamp: // /ch/01/preamp
case ch_05_preamp:case ch_06_preamp:case ch_07_preamp:case ch_08_preamp:
case ch_09_preamp:case ch_10_preamp:case ch_11_preamp:case ch_12_preamp:
case ch_13_preamp:case ch_14_preamp:case ch_15_preamp:case ch_16_preamp:
case ch_17_preamp:case ch_18_preamp:case ch_19_preamp:case ch_20_preamp:
case ch_21_preamp:case ch_22_preamp:case ch_23_preamp:case ch_24_preamp:
case ch_25_preamp:case ch_26_preamp:case ch_27_preamp:case ch_28_preamp:
case ch_29_preamp:case ch_30_preamp:case ch_31_preamp:case ch_32_preamp:
sscanf(l_read + 4, "%d", &ch);
sprintf(tmp, "/ch/%02d/preamp/trim", ch);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_linf(buf, k, -18., 36., 0.25);
SendDataToX32 // send to X32
sprintf(tmp, "/ch/%02d/preamp/invert", ch);
k = Xsprint(buf, 0, 's', tmp);
k = XOff_On(buf, k, "OFF");
SendDataToX32 // send to X32
sprintf(tmp, "/ch/%02d/preamp/hpon", ch);
k = Xsprint(buf, 0, 's', tmp);
k = XOff_On(buf, k, "OFF");
SendDataToX32 // send to X32
sprintf(tmp, "/ch/%02d/preamp/hpslope", ch);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_int(buf, k);
SendDataToX32 // send to X32
sprintf(tmp, "/ch/%02d/preamp/hpf", ch);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_logf(buf, k, 20., 2.9957322735, 100); // log(400/20) = 2.9957322735
SendDataToX32 // send to X32
break;
case ch_01_gate:case ch_02_gate:case ch_03_gate:case ch_04_gate: // /ch/01/gate
case ch_05_gate:case ch_06_gate:case ch_07_gate:case ch_08_gate:
case ch_09_gate:case ch_10_gate:case ch_11_gate:case ch_12_gate:
case ch_13_gate:case ch_14_gate:case ch_15_gate:case ch_16_gate:
case ch_17_gate:case ch_18_gate:case ch_19_gate:case ch_20_gate:
case ch_21_gate:case ch_22_gate:case ch_23_gate:case ch_24_gate:
case ch_25_gate:case ch_26_gate:case ch_27_gate:case ch_28_gate:
case ch_29_gate:case ch_30_gate:case ch_31_gate:case ch_32_gate:
sscanf(l_read + 4, "%d", &ch);
sprintf(tmp, "/ch/%02d/gate/on", ch);
k = Xsprint(buf, 0, 's', tmp);
k = XOff_On(buf, k, "OFF");
SendDataToX32 // send to X32
sprintf(tmp, "/ch/%02d/gate/mode", ch);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_list(buf, k, Xgatemode, Xgatemode_max);
SendDataToX32 // send to X32
sprintf(tmp, "/ch/%02d/gate/thr", ch);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_linf(buf, k, -80., 80., 0.5);
SendDataToX32 // send to X32
sprintf(tmp, "/ch/%02d/gate/range", ch);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_linf(buf, k, 3., 57., 1.);
SendDataToX32 // send to X32
sprintf(tmp, "/ch/%02d/gate/attack", ch);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_linf(buf, k, 0., 120., 1.);
SendDataToX32 // send to X32
sprintf(tmp, "/ch/%02d/gate/hold", ch);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_logf(buf, k, 0.02, 11.512925465, 100); // log(2000/0.02) = 11.512925465
SendDataToX32 // send to X32
sprintf(tmp, "/ch/%02d/gate/release", ch);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_logf(buf, k, 5., 6.684611728, 100); // log (4000/5) = 6.684611728
SendDataToX32 // send to X32
sprintf(tmp, "/ch/%02d/gate/keysrc", ch);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_int(buf, k);
SendDataToX32 // send to X32
break;
case ch_01_gate_filter:case ch_02_gate_filter:case ch_03_gate_filter:case ch_04_gate_filter: // /ch/01/gate/filter
case ch_05_gate_filter:case ch_06_gate_filter:case ch_07_gate_filter:case ch_08_gate_filter:
case ch_09_gate_filter:case ch_10_gate_filter:case ch_11_gate_filter:case ch_12_gate_filter:
case ch_13_gate_filter:case ch_14_gate_filter:case ch_15_gate_filter:case ch_16_gate_filter:
case ch_17_gate_filter:case ch_18_gate_filter:case ch_19_gate_filter:case ch_20_gate_filter:
case ch_21_gate_filter:case ch_22_gate_filter:case ch_23_gate_filter:case ch_24_gate_filter:
case ch_25_gate_filter:case ch_26_gate_filter:case ch_27_gate_filter:case ch_28_gate_filter:
case ch_29_gate_filter:case ch_30_gate_filter:case ch_31_gate_filter:case ch_32_gate_filter:
sscanf(l_read + 4, "%d", &ch);
sprintf(tmp, "/ch/%02d/gate/filter/on", ch);
k = Xsprint(buf, 0, 's', tmp);
k = XOff_On(buf, k, "OFF");
SendDataToX32 // send to X32
sprintf(tmp, "/ch/%02d/gate/filter/type", ch);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_list(buf, k, Xgateftype, Xgateftype_max);
SendDataToX32 // send to X32
sprintf(tmp, "/ch/%02d/gate/filter/f", ch);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_frequency(buf, k, 200);
SendDataToX32 // send to X32
break;
case ch_01_dyn:case ch_02_dyn:case ch_03_dyn:case ch_04_dyn: // /ch/01/dyn
case ch_05_dyn:case ch_06_dyn:case ch_07_dyn:case ch_08_dyn:
case ch_09_dyn:case ch_10_dyn:case ch_11_dyn:case ch_12_dyn:
case ch_13_dyn:case ch_14_dyn:case ch_15_dyn:case ch_16_dyn:
case ch_17_dyn:case ch_18_dyn:case ch_19_dyn:case ch_20_dyn:
case ch_21_dyn:case ch_22_dyn:case ch_23_dyn:case ch_24_dyn:
case ch_25_dyn:case ch_26_dyn:case ch_27_dyn:case ch_28_dyn:
case ch_29_dyn:case ch_30_dyn:case ch_31_dyn:case ch_32_dyn:
sscanf(l_read + 4, "%d", &ch);
sprintf(tmp, "/ch/%02d/dyn/on", ch);
k = Xsprint(buf, 0, 's', tmp);
k = XOff_On(buf, k, "OFF");
SendDataToX32 // send to X32
sprintf(tmp, "/ch/%02d/dyn/mode", ch);
k = Xsprint(buf, 0, 's', tmp);
k = XOff_On(buf, k, "COMP");
SendDataToX32 // send to X32
sprintf(tmp, "/ch/%02d/dyn/det", ch);
k = Xsprint(buf, 0, 's', tmp);
k = XOff_On(buf, k, "PEAK");
SendDataToX32 // send to X32
sprintf(tmp, "/ch/%02d/dyn/env", ch);
k = Xsprint(buf, 0, 's', tmp);
k = XOff_On(buf, k, "UN");
SendDataToX32 // send to X32
sprintf(tmp, "/ch/%02d/dyn/thr", ch);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_linf(buf, k, -60., 60., 0.5);
SendDataToX32 // send to X32
sprintf(tmp, "/ch/%02d/dyn/ratio", ch);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_list(buf, k, Xdynratio, Xdynratio_max);
SendDataToX32 // send to X32
sprintf(tmp, "/ch/%02d/dyn/knee", ch);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_linf(buf, k, 0., 5., 1.);
SendDataToX32 // send to X32
sprintf(tmp, "/ch/%02d/dyn/mgain", ch);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_linf(buf, k, 0., 24., 0.5);
SendDataToX32 // send to X32
sprintf(tmp, "/ch/%02d/dyn/attack", ch);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_linf(buf, k, 0., 120., 1.);
SendDataToX32 // send to X32
sprintf(tmp, "/ch/%02d/dyn/hold", ch);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_logf(buf, k, 0.02, 11.512925465, 100); // log (2000/0.02) = 11.512925465
SendDataToX32 // send to X32
sprintf(tmp, "/ch/%02d/dyn/release", ch);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_logf(buf, k, 5., 6.684611728, 100); // log(4000/5) = 6.684611728
SendDataToX32 // send to X32
sprintf(tmp, "/ch/%02d/dyn/pos", ch);
k = Xsprint(buf, 0, 's', tmp);
k = XOff_On(buf, k, "PRE");
SendDataToX32 // send to X32
sprintf(tmp, "/ch/%02d/dyn/keysrc", ch);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_int(buf, k);
SendDataToX32 // send to X32
sprintf(tmp, "/ch/%02d/dyn/mix", ch);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_percent(buf, k);
SendDataToX32 // send to X32
if (X32VER > 209) { //starting with FW 2.10...
sprintf(tmp, "/ch/%02d/dyn/auto", ch);
k = Xsprint(buf, 0, 's', tmp);
k = XOff_On(buf, k, "OFF");
SendDataToX32 // send to X32
}
break;
case ch_01_dyn_filter:case ch_02_dyn_filter:case ch_03_dyn_filter:case ch_04_dyn_filter: // /ch/01/dyn/filter
case ch_05_dyn_filter:case ch_06_dyn_filter:case ch_07_dyn_filter:case ch_08_dyn_filter:
case ch_09_dyn_filter:case ch_10_dyn_filter:case ch_11_dyn_filter:case ch_12_dyn_filter:
case ch_13_dyn_filter:case ch_14_dyn_filter:case ch_15_dyn_filter:case ch_16_dyn_filter:
case ch_17_dyn_filter:case ch_18_dyn_filter:case ch_19_dyn_filter:case ch_20_dyn_filter:
case ch_21_dyn_filter:case ch_22_dyn_filter:case ch_23_dyn_filter:case ch_24_dyn_filter:
case ch_25_dyn_filter:case ch_26_dyn_filter:case ch_27_dyn_filter:case ch_28_dyn_filter:
case ch_29_dyn_filter:case ch_30_dyn_filter:case ch_31_dyn_filter:case ch_32_dyn_filter:
sscanf(l_read + 4, "%d", &ch);
sprintf(tmp, "/ch/%02d/dyn/filter/on", ch);
k = Xsprint(buf, 0, 's', tmp);
k = XOff_On(buf, k, "OFF");
SendDataToX32 // send to X32
sprintf(tmp, "/ch/%02d/dyn/filter/type", ch);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_list(buf, k, Xgateftype, Xgateftype_max);
SendDataToX32 // send to X32
sprintf(tmp, "/ch/%02d/dyn/filter/f", ch);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_frequency(buf, k, 200);
SendDataToX32 // send to X32
break;
case ch_01_insert:case ch_02_insert:case ch_03_insert:case ch_04_insert: // /ch/01/insert
case ch_05_insert:case ch_06_insert:case ch_07_insert:case ch_08_insert:
case ch_09_insert:case ch_10_insert:case ch_11_insert:case ch_12_insert:
case ch_13_insert:case ch_14_insert:case ch_15_insert:case ch_16_insert:
case ch_17_insert:case ch_18_insert:case ch_19_insert:case ch_20_insert:
case ch_21_insert:case ch_22_insert:case ch_23_insert:case ch_24_insert:
case ch_25_insert:case ch_26_insert:case ch_27_insert:case ch_28_insert:
case ch_29_insert:case ch_30_insert:case ch_31_insert:case ch_32_insert:
sscanf(l_read + 4, "%d", &ch);
sprintf(tmp, "/ch/%02d/insert/on", ch);
k = Xsprint(buf, 0, 's', tmp);
k = XOff_On(buf, k, "OFF");
SendDataToX32 // send to X32
sprintf(tmp, "/ch/%02d/insert/pos", ch);
k = Xsprint(buf, 0, 's', tmp);
k = XOff_On(buf, k, "PRE");
SendDataToX32 // send to X32
sprintf(tmp, "/ch/%02d/insert/sel", ch);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_list(buf, k, Xinsel, Xinsel_max);
SendDataToX32 // send to X32
break;
case ch_01_eq:case ch_02_eq:case ch_03_eq:case ch_04_eq: // /ch/01/eq
case ch_05_eq:case ch_06_eq:case ch_07_eq:case ch_08_eq:
case ch_09_eq:case ch_10_eq:case ch_11_eq:case ch_12_eq:
case ch_13_eq:case ch_14_eq:case ch_15_eq:case ch_16_eq:
case ch_17_eq:case ch_18_eq:case ch_19_eq:case ch_20_eq:
case ch_21_eq:case ch_22_eq:case ch_23_eq:case ch_24_eq:
case ch_25_eq:case ch_26_eq:case ch_27_eq:case ch_28_eq:
case ch_29_eq:case ch_30_eq:case ch_31_eq:case ch_32_eq:
sscanf(l_read + 4, "%d", &ch);
sprintf(tmp, "/ch/%02d/eq/on", ch);
k = Xsprint(buf, 0, 's', tmp);
k = XOff_On(buf, k, "OFF");
SendDataToX32 // send to X32
break;
case ch_01_eq_1:case ch_02_eq_1:case ch_03_eq_1:case ch_04_eq_1: // /ch/01/eq/1
case ch_05_eq_1:case ch_06_eq_1:case ch_07_eq_1:case ch_08_eq_1:
case ch_09_eq_1:case ch_10_eq_1:case ch_11_eq_1:case ch_12_eq_1:
case ch_13_eq_1:case ch_14_eq_1:case ch_15_eq_1:case ch_16_eq_1:
case ch_17_eq_1:case ch_18_eq_1:case ch_19_eq_1:case ch_20_eq_1:
case ch_21_eq_1:case ch_22_eq_1:case ch_23_eq_1:case ch_24_eq_1:
case ch_25_eq_1:case ch_26_eq_1:case ch_27_eq_1:case ch_28_eq_1:
case ch_29_eq_1:case ch_30_eq_1:case ch_31_eq_1:case ch_32_eq_1:
case ch_01_eq_2:case ch_02_eq_2:case ch_03_eq_2:case ch_04_eq_2: // /ch/01/eq/2
case ch_05_eq_2:case ch_06_eq_2:case ch_07_eq_2:case ch_08_eq_2:
case ch_09_eq_2:case ch_10_eq_2:case ch_11_eq_2:case ch_12_eq_2:
case ch_13_eq_2:case ch_14_eq_2:case ch_15_eq_2:case ch_16_eq_2:
case ch_17_eq_2:case ch_18_eq_2:case ch_19_eq_2:case ch_20_eq_2:
case ch_21_eq_2:case ch_22_eq_2:case ch_23_eq_2:case ch_24_eq_2:
case ch_25_eq_2:case ch_26_eq_2:case ch_27_eq_2:case ch_28_eq_2:
case ch_29_eq_2:case ch_30_eq_2:case ch_31_eq_2:case ch_32_eq_2:
case ch_01_eq_3:case ch_02_eq_3:case ch_03_eq_3:case ch_04_eq_3: // /ch/01/eq/3
case ch_05_eq_3:case ch_06_eq_3:case ch_07_eq_3:case ch_08_eq_3:
case ch_09_eq_3:case ch_10_eq_3:case ch_11_eq_3:case ch_12_eq_3:
case ch_13_eq_3:case ch_14_eq_3:case ch_15_eq_3:case ch_16_eq_3:
case ch_17_eq_3:case ch_18_eq_3:case ch_19_eq_3:case ch_20_eq_3:
case ch_21_eq_3:case ch_22_eq_3:case ch_23_eq_3:case ch_24_eq_3:
case ch_25_eq_3:case ch_26_eq_3:case ch_27_eq_3:case ch_28_eq_3:
case ch_29_eq_3:case ch_30_eq_3:case ch_31_eq_3:case ch_32_eq_3:
case ch_01_eq_4:case ch_02_eq_4:case ch_03_eq_4:case ch_04_eq_4: // /ch/01/eq/4
case ch_05_eq_4:case ch_06_eq_4:case ch_07_eq_4:case ch_08_eq_4:
case ch_09_eq_4:case ch_10_eq_4:case ch_11_eq_4:case ch_12_eq_4:
case ch_13_eq_4:case ch_14_eq_4:case ch_15_eq_4:case ch_16_eq_4:
case ch_17_eq_4:case ch_18_eq_4:case ch_19_eq_4:case ch_20_eq_4:
case ch_21_eq_4:case ch_22_eq_4:case ch_23_eq_4:case ch_24_eq_4:
case ch_25_eq_4:case ch_26_eq_4:case ch_27_eq_4:case ch_28_eq_4:
case ch_29_eq_4:case ch_30_eq_4:case ch_31_eq_4:case ch_32_eq_4:
sscanf(l_read + 4, "%d", &ch);
sscanf(l_read + 10, "%c", &c1);
sprintf(tmp, "/ch/%02d/eq/%c/type", ch, c1);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_list(buf, k, Xeqtyp, Xeqtyp_max);
SendDataToX32 // send to X32
sprintf(tmp, "/ch/%02d/eq/%c/f", ch, c1);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_frequency(buf, k, 200);
SendDataToX32 // send to X32
sprintf(tmp, "/ch/%02d/eq/%c/g", ch, c1);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_linf(buf, k, -15., 30., 0.25);
SendDataToX32 // send to X32
sprintf(tmp, "/ch/%02d/eq/%c/q", ch, c1);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_logf(buf, k, 10., -3.506557897, 71); // log(0.3/10) = -3.506557897
SendDataToX32 // send to X32
break;
case ch_01_mix:case ch_02_mix:case ch_03_mix:case ch_04_mix: // /ch/01/mix
case ch_05_mix:case ch_06_mix:case ch_07_mix:case ch_08_mix:
case ch_09_mix:case ch_10_mix:case ch_11_mix:case ch_12_mix:
case ch_13_mix:case ch_14_mix:case ch_15_mix:case ch_16_mix:
case ch_17_mix:case ch_18_mix:case ch_19_mix:case ch_20_mix:
case ch_21_mix:case ch_22_mix:case ch_23_mix:case ch_24_mix:
case ch_25_mix:case ch_26_mix:case ch_27_mix:case ch_28_mix:
case ch_29_mix:case ch_30_mix:case ch_31_mix:case ch_32_mix:
sscanf(l_read + 4, "%d", &ch);
sprintf(tmp, "/ch/%02d/mix/on", ch);
k = Xsprint(buf, 0, 's', tmp);
k = XOff_On(buf, k, "OFF");
SendDataToX32 // send to X32
sprintf(tmp, "/ch/%02d/mix/fader", ch);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_level(buf, k, 1023);
SendDataToX32 // send to X32
sprintf(tmp, "/ch/%02d/mix/st", ch);
k = Xsprint(buf, 0, 's', tmp);
k = XOff_On(buf, k, "OFF");
SendDataToX32 // send to X32
sprintf(tmp, "/ch/%02d/mix/pan", ch);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_linf(buf, k, -100., 200., 2.);
SendDataToX32 // send to X32
sprintf(tmp, "/ch/%02d/mix/mono", ch);
k = Xsprint(buf, 0, 's', tmp);
k = XOff_On(buf, k, "OFF");
SendDataToX32 // send to X32
sprintf(tmp, "/ch/%02d/mix/mlevel", ch);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_level(buf, k, 160);
SendDataToX32 // send to X32
break;
case ch_01_mix_fader:case ch_02_mix_fader:case ch_03_mix_fader:case ch_04_mix_fader: // /ch/01/mix
case ch_05_mix_fader:case ch_06_mix_fader:case ch_07_mix_fader:case ch_08_mix_fader:
case ch_09_mix_fader:case ch_10_mix_fader:case ch_11_mix_fader:case ch_12_mix_fader:
case ch_13_mix_fader:case ch_14_mix_fader:case ch_15_mix_fader:case ch_16_mix_fader:
case ch_17_mix_fader:case ch_18_mix_fader:case ch_19_mix_fader:case ch_20_mix_fader:
case ch_21_mix_fader:case ch_22_mix_fader:case ch_23_mix_fader:case ch_24_mix_fader:
case ch_25_mix_fader:case ch_26_mix_fader:case ch_27_mix_fader:case ch_28_mix_fader:
case ch_29_mix_fader:case ch_30_mix_fader:case ch_31_mix_fader:case ch_32_mix_fader:
sscanf(l_read + 4, "%d", &ch);
sprintf(tmp, "/ch/%02d/mix/fader", ch);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_level(buf, k, 1023);
SendDataToX32 // send to X32
break;
case ch_01_mix_pan:case ch_02_mix_pan:case ch_03_mix_pan:case ch_04_mix_pan: // /ch/01/mix
case ch_05_mix_pan:case ch_06_mix_pan:case ch_07_mix_pan:case ch_08_mix_pan:
case ch_09_mix_pan:case ch_10_mix_pan:case ch_11_mix_pan:case ch_12_mix_pan:
case ch_13_mix_pan:case ch_14_mix_pan:case ch_15_mix_pan:case ch_16_mix_pan:
case ch_17_mix_pan:case ch_18_mix_pan:case ch_19_mix_pan:case ch_20_mix_pan:
case ch_21_mix_pan:case ch_22_mix_pan:case ch_23_mix_pan:case ch_24_mix_pan:
case ch_25_mix_pan:case ch_26_mix_pan:case ch_27_mix_pan:case ch_28_mix_pan:
case ch_29_mix_pan:case ch_30_mix_pan:case ch_31_mix_pan:case ch_32_mix_pan:
sscanf(l_read + 4, "%d", &ch);
sprintf(tmp, "/ch/%02d/mix/pan", ch);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_linf(buf, k, -100., 200., 2.);
SendDataToX32 // send to X32
break;
case ch_01_mix_on:case ch_02_mix_on:case ch_03_mix_on:case ch_04_mix_on: // /ch/01/mix
case ch_05_mix_on:case ch_06_mix_on:case ch_07_mix_on:case ch_08_mix_on:
case ch_09_mix_on:case ch_10_mix_on:case ch_11_mix_on:case ch_12_mix_on:
case ch_13_mix_on:case ch_14_mix_on:case ch_15_mix_on:case ch_16_mix_on:
case ch_17_mix_on:case ch_18_mix_on:case ch_19_mix_on:case ch_20_mix_on:
case ch_21_mix_on:case ch_22_mix_on:case ch_23_mix_on:case ch_24_mix_on:
case ch_25_mix_on:case ch_26_mix_on:case ch_27_mix_on:case ch_28_mix_on:
case ch_29_mix_on:case ch_30_mix_on:case ch_31_mix_on:case ch_32_mix_on:
sscanf(l_read + 4, "%d", &ch);
sprintf(tmp, "/ch/%02d/mix/on", ch);
k = Xsprint(buf, 0, 's', tmp);
k = XOff_On(buf, k, "OFF");
SendDataToX32 // send to X32
break;
case ch_01_mix_mono:case ch_02_mix_mono:case ch_03_mix_mono:case ch_04_mix_mono: // /ch/01/mix