forked from pmaillot/X32-Behringer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
XAirSetSceneParse.c
1467 lines (1452 loc) · 58.5 KB
/
XAirSetSceneParse.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
//
// XAirSetSceneParse.c
//
// Created on: 6 jan. 2015 (SetSceneParse.c)
// Author: Patrick-Gilles Maillot
//
// Modified to Support XAir Series on: Jul 10, 2016
// Author: Ken Mitchell
// Scene and Snippet files parser. Basically a very big switch statement checking the syntax of incoming data and
// based on parameters, sending data to XAir accordingly.
//
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <math.h>
#include "XAirSetScene.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 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 Xlogf(char *header, char *buf, int len);
extern int Xdebug;
extern int Xverbose;
extern int Xdelay;
extern int X32SHOW;
extern struct sockaddr *Xip_pt;
extern int Xip_len; // length of addresses
extern int Xfd; // our socket
extern int fx[4]; // 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 SendDataToXAir do { \
if (X32SHOW) {if (Xverbose) Xlogf("->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, rt, mx, k, bus;
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 ... 15-16
for (ch = 1; ch < 16; ch+=2) {
sprintf(tmp, "/config/chlink/%d-%d", ch, ch+1);
k = Xsprint(buf, 0, 's', tmp);
k = XOff_On(buf, k, "OFF");
SendDataToXAir // send to XAir
}
break;
case config_buslink: // /config/buslink 1-2 ... 15-16
for (ch = 1; ch < 6; ch+=2) {
sprintf(tmp, "/config/buslink/%d-%d", ch, ch+1);
k = Xsprint(buf, 0, 's', tmp);
k = XOff_On(buf, k, "OFF");
SendDataToXAir // send to XAir
}
break;
case config_linkcfg: // /config/linkcfg
k = Xsprint(buf, 0, 's', "/config/linkcfg/preamp");
k = XOff_On(buf, k, "OFF");
SendDataToXAir // send to XAir
k = Xsprint(buf, 0, 's', "/config/linkcfg/eq");
k = XOff_On(buf, k, "OFF");
SendDataToXAir // send to XAir
k = Xsprint(buf, 0, 's', "/config/linkcfg/dyn");
k = XOff_On(buf, k, "OFF");
SendDataToXAir // send to XAir
k = Xsprint(buf, 0, 's', "/config/linkcfg/fdrmute");
k = XOff_On(buf, k, "OFF");
SendDataToXAir // send to XAir
break;
case config_solo: // /config/solo
k = Xsprint(buf, 0, 's', "/config/solo/level");
k = Xp_level(buf, k, 161);
SendDataToXAir // send to XAir
k = Xsprint(buf, 0, 's', "/config/solo/source");
k = Xp_list(buf, k, Xsource, Xsource_max);
SendDataToXAir // send to XAir
k = Xsprint(buf, 0, 's', "/config/solo/sourcetrim");
// rev 1.09 spec says -18..+12db log(73)
// but firmware 1.12 acts like -18..+18db lin(72)
k = Xp_linf(buf, k, -18., 36., 0.5);
SendDataToXAir // send to XAir
k = Xsprint(buf, 0, 's', "/config/solo/chmode");
k = XOff_On(buf, k, "PFL");
SendDataToXAir // send to XAir
k = Xsprint(buf, 0, 's', "/config/solo/busmode");
k = XOff_On(buf, k, "PFL");
SendDataToXAir // send to XAir
k = Xsprint(buf, 0, 's', "/config/solo/dimatt");
k = Xp_linf(buf, k, -40., 40., 1.);
SendDataToXAir // send to XAir
k = Xsprint(buf, 0, 's', "/config/solo/dim");
k = XOff_On(buf, k, "OFF");
SendDataToXAir // send to XAir
k = Xsprint(buf, 0, 's', "/config/solo/mono");
k = XOff_On(buf, k, "OFF");
SendDataToXAir // send to XAir
k = Xsprint(buf, 0, 's', "/config/solo/mute");
k = XOff_On(buf, k, "OFF");
SendDataToXAir // send to XAir
k = Xsprint(buf, 0, 's', "/config/solo/dimplf");
k = XOff_On(buf, k, "OFF");
SendDataToXAir // send to XAir
break;
case config_amixenable: // /config/amixenable
k = Xsprint(buf, 0, 's', "/config/amixenable/X");
k = XOff_On(buf, k, "OFF");
SendDataToXAir // send to XAir
k = Xsprint(buf, 0, 's', "/config/amixenable/Y");
k = XOff_On(buf, k, "OFF");
SendDataToXAir // send to XAir
break;
case config_amixlock: // /config/amixenable
k = Xsprint(buf, 0, 's', "/config/amixlock/X");
k = XOff_On(buf, k, "OFF");
SendDataToXAir // send to XAir
k = Xsprint(buf, 0, 's', "/config/amixlock/Y");
k = XOff_On(buf, k, "OFF");
SendDataToXAir // send to XAir
break;
case config_mute: // /config/mute 1-4
for (ch = 1; ch < 5; ch++) {
sprintf(tmp, "/config/mute/%d", ch);
k = Xsprint(buf, 0, 's', tmp);
k = XOff_On(buf, k, "OFF");
SendDataToXAir // send to XAir
}
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:
sscanf(l_read + 4, "%d", &ch);
sprintf(tmp, "/ch/%02d/config/name", ch);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_str(buf, k);
SendDataToXAir // send to XAir
sprintf(tmp, "/ch/%02d/config/color", ch);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_int(buf, k);
SendDataToXAir // send to XAir
sprintf(tmp, "/ch/%02d/config/insrc", ch);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_list(buf, k, Xinsrc, Xinsrc_max);
SendDataToXAir // send to XAir
sprintf(tmp, "/ch/%02d/config/rtnsrc", ch);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_list(buf, k, Xchrtnsrc, Xchrtnsrc_max);
SendDataToXAir // send to XAir
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:
sscanf(l_read + 4, "%d", &ch);
sprintf(tmp, "/ch/%02d/preamp/rtntrim", ch);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_linf(buf, k, -18., 36., 0.25);
SendDataToXAir // send to XAir
sprintf(tmp, "/ch/%02d/preamp/rtnsw", ch);
k = Xsprint(buf, 0, 's', tmp);
k = XOff_On(buf, k, "OFF");
SendDataToXAir // send to XAir
sprintf(tmp, "/ch/%02d/preamp/invert", ch);
k = Xsprint(buf, 0, 's', tmp);
k = XOff_On(buf, k, "OFF");
SendDataToXAir // send to XAir
sprintf(tmp, "/ch/%02d/preamp/hpon", ch);
k = Xsprint(buf, 0, 's', tmp);
k = XOff_On(buf, k, "OFF");
SendDataToXAir // send to XAir
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
SendDataToXAir // send to XAir
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:
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");
SendDataToXAir // send to XAir
sprintf(tmp, "/ch/%02d/gate/mode", ch);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_list(buf, k, Xgatemode, Xgatemode_max);
SendDataToXAir // send to XAir
sprintf(tmp, "/ch/%02d/gate/thr", ch);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_linf(buf, k, -80., 80., 0.5);
SendDataToXAir // send to XAir
sprintf(tmp, "/ch/%02d/gate/range", ch);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_linf(buf, k, 3., 57., 1.);
SendDataToXAir // send to XAir
sprintf(tmp, "/ch/%02d/gate/attack", ch);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_linf(buf, k, 0., 120., 1.);
SendDataToXAir // send to XAir
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
SendDataToXAir // send to XAir
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
SendDataToXAir // send to XAir
sprintf(tmp, "/ch/%02d/gate/keysrc", ch);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_list(buf, k, Xkeysrc, Xkeysrc_max);
SendDataToXAir // send to XAir
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:
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");
SendDataToXAir // send to XAir
sprintf(tmp, "/ch/%02d/gate/filter/type", ch);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_list(buf, k, Xfiltertype, Xfiltertype_max);
SendDataToXAir // send to XAir
sprintf(tmp, "/ch/%02d/gate/filter/f", ch);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_frequency(buf, k, 200);
SendDataToXAir // send to XAir
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:
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");
SendDataToXAir // send to XAir
sprintf(tmp, "/ch/%02d/dyn/mode", ch);
k = Xsprint(buf, 0, 's', tmp);
k = XOff_On(buf, k, "COMP");
SendDataToXAir // send to XAir
sprintf(tmp, "/ch/%02d/dyn/det", ch);
k = Xsprint(buf, 0, 's', tmp);
k = XOff_On(buf, k, "PEAK");
SendDataToXAir // send to XAir
sprintf(tmp, "/ch/%02d/dyn/env", ch);
k = Xsprint(buf, 0, 's', tmp);
k = XOff_On(buf, k, "LIN");
SendDataToXAir // send to XAir
sprintf(tmp, "/ch/%02d/dyn/thr", ch);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_linf(buf, k, -60., 60., 0.5);
SendDataToXAir // send to XAir
sprintf(tmp, "/ch/%02d/dyn/ratio", ch);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_list(buf, k, Xdynratio, Xdynratio_max);
SendDataToXAir // send to XAir
sprintf(tmp, "/ch/%02d/dyn/knee", ch);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_linf(buf, k, 0., 5., 1.);
SendDataToXAir // send to XAir
sprintf(tmp, "/ch/%02d/dyn/mgain", ch);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_linf(buf, k, 0., 24., 0.5);
SendDataToXAir // send to XAir
sprintf(tmp, "/ch/%02d/dyn/attack", ch);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_linf(buf, k, 0., 120., 1.);
SendDataToXAir // send to XAir
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
SendDataToXAir // send to XAir
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
SendDataToXAir // send to XAir
sprintf(tmp, "/ch/%02d/dyn/mix", ch);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_percent(buf, k);
SendDataToXAir // send to XAir
sprintf(tmp, "/ch/%02d/dyn/keysrc", ch);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_list(buf, k, Xkeysrc, Xkeysrc_max);
SendDataToXAir // send to XAir
sprintf(tmp, "/ch/%02d/dyn/auto", ch);
k = Xsprint(buf, 0, 's', tmp);
k = XOff_On(buf, k, "OFF");
SendDataToXAir // send to XAir
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:
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");
SendDataToXAir // send to XAir
sprintf(tmp, "/ch/%02d/dyn/filter/type", ch);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_list(buf, k, Xfiltertype, Xfiltertype_max);
SendDataToXAir // send to XAir
sprintf(tmp, "/ch/%02d/dyn/filter/f", ch);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_frequency(buf, k, 200);
SendDataToXAir // send to XAir
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:
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");
SendDataToXAir // send to XAir
sprintf(tmp, "/ch/%02d/insert/fxslot", ch);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_list(buf, k, Xchfxslot, Xchfxslot_max);
SendDataToXAir // send to XAir
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:
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");
SendDataToXAir // send to XAir
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_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_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_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:
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);
SendDataToXAir // send to XAir
sprintf(tmp, "/ch/%02d/eq/%c/f", ch, c1);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_frequency(buf, k, 200);
SendDataToXAir // send to XAir
sprintf(tmp, "/ch/%02d/eq/%c/g", ch, c1);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_linf(buf, k, -15., 30., 0.25);
SendDataToXAir // send to XAir
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
SendDataToXAir // send to XAir
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:
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");
SendDataToXAir // send to XAir
sprintf(tmp, "/ch/%02d/mix/fader", ch);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_level(buf, k, 1023);
SendDataToXAir // send to XAir
sprintf(tmp, "/ch/%02d/mix/lr", ch);
k = Xsprint(buf, 0, 's', tmp);
k = XOff_On(buf, k, "OFF");
SendDataToXAir // send to XAir
sprintf(tmp, "/ch/%02d/mix/pan", ch);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_linf(buf, k, -100., 200., 2.);
SendDataToXAir // send to XAir
break;
// "pan" is only available on sends _01, _03, and _05
case ch_01_mix_01:case ch_02_mix_01:case ch_03_mix_01:case ch_04_mix_01: // /ch/01/mix/01
case ch_05_mix_01:case ch_06_mix_01:case ch_07_mix_01:case ch_08_mix_01:
case ch_09_mix_01:case ch_10_mix_01:case ch_11_mix_01:case ch_12_mix_01:
case ch_13_mix_01:case ch_14_mix_01:case ch_15_mix_01:case ch_16_mix_01:
case ch_01_mix_03:case ch_02_mix_03:case ch_03_mix_03:case ch_04_mix_03: // /ch/01/mix/03
case ch_05_mix_03:case ch_06_mix_03:case ch_07_mix_03:case ch_08_mix_03:
case ch_09_mix_03:case ch_10_mix_03:case ch_11_mix_03:case ch_12_mix_03:
case ch_13_mix_03:case ch_14_mix_03:case ch_15_mix_03:case ch_16_mix_03:
case ch_01_mix_05:case ch_02_mix_05:case ch_03_mix_05:case ch_04_mix_05: // /ch/01/mix/05
case ch_05_mix_05:case ch_06_mix_05:case ch_07_mix_05:case ch_08_mix_05:
case ch_09_mix_05:case ch_10_mix_05:case ch_11_mix_05:case ch_12_mix_05:
case ch_13_mix_05:case ch_14_mix_05:case ch_15_mix_05:case ch_16_mix_05:
sscanf(l_read + 4, "%d", &ch);
sscanf(l_read + 11, "%d", &mx);
sprintf(tmp, "/ch/%02d/mix/%02d/level", ch, mx);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_level(buf, k, 160);
SendDataToXAir // send to XAir
sprintf(tmp, "/ch/%02d/mix/%02d/grpon", ch, mx);
k = Xsprint(buf, 0, 's', tmp);
k = XOff_On(buf, k, "OFF");
SendDataToXAir // send to XAir
sprintf(tmp, "/ch/%02d/mix/%02d/tap", ch, mx);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_list(buf, k, Xmxtap, Xmxtap_max);
SendDataToXAir // send to XAir
sprintf(tmp, "/ch/%02d/mix/%02d/pan", ch, mx);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_linf(buf, k, -100., 200., 2.);
SendDataToXAir // send to XAir
break;
// All others don't have "pan"
case ch_01_mix_02:case ch_02_mix_02:case ch_03_mix_02:case ch_04_mix_02: // /ch/01/mix/02
case ch_05_mix_02:case ch_06_mix_02:case ch_07_mix_02:case ch_08_mix_02:
case ch_09_mix_02:case ch_10_mix_02:case ch_11_mix_02:case ch_12_mix_02:
case ch_13_mix_02:case ch_14_mix_02:case ch_15_mix_02:case ch_16_mix_02:
case ch_01_mix_04:case ch_02_mix_04:case ch_03_mix_04:case ch_04_mix_04: // /ch/01/mix/04
case ch_05_mix_04:case ch_06_mix_04:case ch_07_mix_04:case ch_08_mix_04:
case ch_09_mix_04:case ch_10_mix_04:case ch_11_mix_04:case ch_12_mix_04:
case ch_13_mix_04:case ch_14_mix_04:case ch_15_mix_04:case ch_16_mix_04:
case ch_01_mix_06:case ch_02_mix_06:case ch_03_mix_06:case ch_04_mix_06: // /ch/01/mix/06
case ch_05_mix_06:case ch_06_mix_06:case ch_07_mix_06:case ch_08_mix_06:
case ch_09_mix_06:case ch_10_mix_06:case ch_11_mix_06:case ch_12_mix_06:
case ch_13_mix_06:case ch_14_mix_06:case ch_15_mix_06:case ch_16_mix_06:
case ch_01_mix_07:case ch_02_mix_07:case ch_03_mix_07:case ch_04_mix_07: // /ch/01/mix/07
case ch_05_mix_07:case ch_06_mix_07:case ch_07_mix_07:case ch_08_mix_07:
case ch_09_mix_07:case ch_10_mix_07:case ch_11_mix_07:case ch_12_mix_07:
case ch_13_mix_07:case ch_14_mix_07:case ch_15_mix_07:case ch_16_mix_07:
case ch_01_mix_08:case ch_02_mix_08:case ch_03_mix_08:case ch_04_mix_08: // /ch/01/mix/08
case ch_05_mix_08:case ch_06_mix_08:case ch_07_mix_08:case ch_08_mix_08:
case ch_09_mix_08:case ch_10_mix_08:case ch_11_mix_08:case ch_12_mix_08:
case ch_13_mix_08:case ch_14_mix_08:case ch_15_mix_08:case ch_16_mix_08:
case ch_01_mix_09:case ch_02_mix_09:case ch_03_mix_09:case ch_04_mix_09: // /ch/01/mix/09
case ch_05_mix_09:case ch_06_mix_09:case ch_07_mix_09:case ch_08_mix_09:
case ch_09_mix_09:case ch_10_mix_09:case ch_11_mix_09:case ch_12_mix_09:
case ch_13_mix_09:case ch_14_mix_09:case ch_15_mix_09:case ch_16_mix_09:
case ch_01_mix_10:case ch_02_mix_10:case ch_03_mix_10:case ch_04_mix_10: // /ch/01/mix/10
case ch_05_mix_10:case ch_06_mix_10:case ch_07_mix_10:case ch_08_mix_10:
case ch_09_mix_10:case ch_10_mix_10:case ch_11_mix_10:case ch_12_mix_10:
case ch_13_mix_10:case ch_14_mix_10:case ch_15_mix_10:case ch_16_mix_10:
sscanf(l_read + 4, "%d", &ch);
sscanf(l_read + 11, "%d", &mx);
sprintf(tmp, "/ch/%02d/mix/%02d/level", ch, mx);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_level(buf, k, 160);
SendDataToXAir // send to XAir
sprintf(tmp, "/ch/%02d/mix/%02d/grpon", ch, mx);
k = Xsprint(buf, 0, 's', tmp);
k = XOff_On(buf, k, "OFF");
SendDataToXAir // send to XAir
sprintf(tmp, "/ch/%02d/mix/%02d/tap", ch, mx);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_list(buf, k, Xmxtap, Xmxtap_max);
SendDataToXAir // send to XAir
break;
case ch_01_grp:case ch_02_grp:case ch_03_grp:case ch_04_grp: // /ch/01/grp
case ch_05_grp:case ch_06_grp:case ch_07_grp:case ch_08_grp:
case ch_09_grp:case ch_10_grp:case ch_11_grp:case ch_12_grp:
case ch_13_grp:case ch_14_grp:case ch_15_grp:case ch_16_grp:
sscanf(l_read + 4, "%d", &ch);
sprintf(tmp, "/ch/%02d/grp/dca", ch);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_bit(buf, k);
SendDataToXAir // send to XAir
sprintf(tmp, "/ch/%02d/grp/mute", ch);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_bit(buf, k);
SendDataToXAir // send to XAir
break;
case ch_01_automix:case ch_02_automix:case ch_03_automix:case ch_04_automix:
case ch_05_automix:case ch_06_automix:case ch_07_automix:case ch_08_automix:
case ch_09_automix:case ch_10_automix:case ch_11_automix:case ch_12_automix:
case ch_13_automix:case ch_14_automix:case ch_15_automix:case ch_16_automix:
sscanf(l_read + 4, "%d", &ch);
sprintf(tmp, "/ch/%02d/automix/group", ch);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_list(buf, k, Xamgroup, Xamgroup_max);
SendDataToXAir // send to XAir
sprintf(tmp, "/ch/%02d/automix/weight", ch);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_linf(buf, k, -24., 36., 0.5);
SendDataToXAir // send to XAir
break;
case rtn_aux_config:
k = Xsprint(buf, 0, 's', "/rtn/aux/config/name");
k = Xp_str(buf, k);
SendDataToXAir // send to XAir
k = Xsprint(buf, 0, 's', "/rtn/aux/config/color");
k = Xp_int(buf, k);
SendDataToXAir // send to XAir
k = Xsprint(buf, 0, 's', "/rtn/aux/config/rtnsrc");
k = Xp_list(buf, k, Xrtnrtnsrc, Xrtnrtnsrc_max);
SendDataToXAir // send to XAir
break;
case rtn_aux_preamp:
k = Xsprint(buf, 0, 's', "/rtn/aux/preamp/rtntrim");
k = Xp_linf(buf, k, -18., 36., 0.25);
SendDataToXAir // send to XAir
k = Xsprint(buf, 0, 's', "/rtn/aux/preamp/rtnsw");
k = XOff_On(buf, k, "OFF");
SendDataToXAir // send to XAir
break;
case rtn_aux_eq:
k = Xsprint(buf, 0, 's', "/rtn/aux/eq/on");
k = XOff_On(buf, k, "OFF");
SendDataToXAir // send to XAir
break;
case rtn_aux_eq_1: case rtn_aux_eq_2: case rtn_aux_eq_3: case rtn_aux_eq_4:
sscanf(l_read + 12, "%c", &c1);
sprintf(tmp, "/rtn/aux/eq/%c/type", c1);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_list(buf, k, Xeqtyp, Xeqtyp_max);
SendDataToXAir // send to XAir
sprintf(tmp, "/rtn/aux/eq/%c/f", c1);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_frequency(buf, k, 200);
SendDataToXAir // send to XAir
sprintf(tmp, "/rtn/aux/eq/%c/g", c1);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_linf(buf, k, -15., 30., 0.25);
SendDataToXAir // send to XAir
sprintf(tmp, "/rtn/aux/eq/%c/q", c1);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_logf(buf, k, 10., -3.506557897, 71); // log(0.3/10) = -3.506557897
SendDataToXAir // send to XAir
break;
case rtn_aux_mix:
k = Xsprint(buf, 0, 's', "/rtn/aux/mix/on");
k = XOff_On(buf, k, "OFF");
SendDataToXAir // send to XAir
k = Xsprint(buf, 0, 's', "/rtn/aux/mix/fader");
k = Xp_level(buf, k, 1023);
SendDataToXAir // send to XAir
k = Xsprint(buf, 0, 's', "rtn/aux/mix/lr");
k = XOff_On(buf, k, "OFF");
SendDataToXAir // send to XAir
k = Xsprint(buf, 0, 's', "rtn/aux/mix/pan");
k = Xp_linf(buf, k, -100., 200., 2.);
SendDataToXAir // send to XAir
break;
// Only _01, _03, _05 have "pan"
case rtn_aux_mix_01: case rtn_aux_mix_03: case rtn_aux_mix_05:
sscanf(l_read + 14, "%d", &mx);
sprintf(tmp, "/rtn/aux/mix/%02d/level", mx);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_level(buf, k, 160);
SendDataToXAir // send to XAir
sprintf(tmp, "/rtn/aux/mix/%02d/grpon", mx);
k = Xsprint(buf, 0, 's', tmp);
k = XOff_On(buf, k, "OFF");
SendDataToXAir // send to XAir
sprintf(tmp, "/rtn/aux/mix/%02d/tap", mx);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_list(buf, k, Xmxtap, Xmxtap_max);
SendDataToXAir // send to XAir
sprintf(tmp, "/rtn/aux/mix/%02d/pan", mx);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_linf(buf, k, -100., 200., 2.);
SendDataToXAir // send to XAir
break;
// _02, _04, _06 and _07 - _10 don't have "pan"
case rtn_aux_mix_02: case rtn_aux_mix_04: case rtn_aux_mix_06: case rtn_aux_mix_07:
case rtn_aux_mix_08: case rtn_aux_mix_09: case rtn_aux_mix_10:
sscanf(l_read + 14, "%d", &mx);
sprintf(tmp, "/rtn/aux/mix/%02d/level", mx);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_level(buf, k, 160);
SendDataToXAir // send to XAir
sprintf(tmp, "/rtn/aux/mix/%02d/grpon", mx);
k = Xsprint(buf, 0, 's', tmp);
k = XOff_On(buf, k, "OFF");
SendDataToXAir // send to XAir
sprintf(tmp, "/rtn/aux/mix/%02d/tap", mx);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_list(buf, k, Xmxtap, Xmxtap_max);
SendDataToXAir // send to XAir
break;
case rtn_aux_grp:
k = Xsprint(buf, 0, 's', "/rtn/aux/grp/dca");
k = Xp_bit(buf, k);
SendDataToXAir // send to XAir
k = Xsprint(buf, 0, 's', "/rtn/aux/grp/mute");
k = Xp_bit(buf, k);
SendDataToXAir // send to XAir
break;
case rtn_1_config: case rtn_2_config: case rtn_3_config: case rtn_4_config:
sscanf(l_read + 5, "%d", &rt);
sprintf(tmp, "/rtn/%d/config/name", rt);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_str(buf, k);
SendDataToXAir // send to XAir
sprintf(tmp, "/rtn/%d/config/color", rt);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_int(buf, k);
SendDataToXAir // send to XAir
sprintf(tmp, "/rtn/%d/config/rtnsrc", rt);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_list(buf, k, Xrtnrtnsrc, Xrtnrtnsrc_max);
SendDataToXAir // send to XAir
break;
case rtn_1_preamp: case rtn_2_preamp: case rtn_3_preamp: case rtn_4_preamp:
sscanf(l_read + 5, "%d", &rt);
sprintf(tmp, "/rtn/%d/preamp/rtntrim", rt);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_linf(buf, k, -18., 36., 0.25);
SendDataToXAir // send to XAir
sprintf(tmp, "/rtn/%d/preamp/rtnsw", rt);
k = Xsprint(buf, 0, 's', tmp);
k = XOff_On(buf, k, "OFF");
SendDataToXAir // send to XAir
break;
case rtn_1_eq: case rtn_2_eq: case rtn_3_eq: case rtn_4_eq:
sscanf(l_read + 5, "%d", &rt);
sprintf(tmp, "/rtn/%d/eq/on", rt);
k = Xsprint(buf, 0, 's', tmp);
k = XOff_On(buf, k, "OFF");
SendDataToXAir // send to XAir
break;
case rtn_1_eq_1: case rtn_2_eq_1: case rtn_3_eq_1: case rtn_4_eq_1:
case rtn_1_eq_2: case rtn_2_eq_2: case rtn_3_eq_2: case rtn_4_eq_2:
case rtn_1_eq_3: case rtn_2_eq_3: case rtn_3_eq_3: case rtn_4_eq_3:
case rtn_1_eq_4: case rtn_2_eq_4: case rtn_3_eq_4: case rtn_4_eq_4:
sscanf(l_read + 5, "%d", &rt);
sscanf(l_read + 10, "%c", &c1);
sprintf(tmp, "/rtn/%d/eq/%c/type", rt, c1);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_list(buf, k, Xeqtyp, Xeqtyp_max);
SendDataToXAir // send to XAir
sprintf(tmp, "/rtn/%d/eq/%c/f", rt, c1);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_frequency(buf, k, 200);
SendDataToXAir // send to XAir
sprintf(tmp, "/rtn/%d/eq/%c/g", rt, c1);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_linf(buf, k, -15., 30., 0.25);
SendDataToXAir // send to XAir
sprintf(tmp, "/rtn/%d/eq/%c/q", rt, c1);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_logf(buf, k, 10., -3.506557897, 71); // log(0.3/10) = -3.506557897
SendDataToXAir // send to XAir
break;
case rtn_1_mix: case rtn_2_mix: case rtn_3_mix: case rtn_4_mix:
sscanf(l_read + 5, "%d", &rt);
sprintf(tmp, "/rtn/%d/mix/on", rt);
k = Xsprint(buf, 0, 's', tmp);
k = XOff_On(buf, k, "OFF");
SendDataToXAir // send to XAir
sprintf(tmp, "/rtn/%d/mix/fader", rt);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_level(buf, k, 1023);
SendDataToXAir // send to XAir
sprintf(tmp, "/rtn/%d/mix/lr", rt);
k = Xsprint(buf, 0, 's', tmp);
k = XOff_On(buf, k, "OFF");
SendDataToXAir // send to XAir
sprintf(tmp, "/rtn/%d/mix/pan", rt);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_linf(buf, k, -100., 200., 2.);
SendDataToXAir // send to XAir
break;
// "pan" is only available on sends _01, _03, and _05
case rtn_1_mix_01: case rtn_2_mix_01: case rtn_3_mix_01: case rtn_4_mix_01:
case rtn_1_mix_03: case rtn_2_mix_03: case rtn_3_mix_03: case rtn_4_mix_03:
case rtn_1_mix_05: case rtn_2_mix_05: case rtn_3_mix_05: case rtn_4_mix_05:
sscanf(l_read + 5, "%d", &rt);
sscanf(l_read + 11, "%d", &mx);
sprintf(tmp, "/rtn/%d/mix/%02d/level", rt, mx);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_level(buf, k, 160);
SendDataToXAir // send to XAir
sprintf(tmp, "/rtn/%d/mix/%02d/grpon", rt, mx);
k = Xsprint(buf, 0, 's', tmp);
k = XOff_On(buf, k, "OFF");
SendDataToXAir // send to XAir
sprintf(tmp, "/rtn/%d/mix/%02d/tap", rt, mx);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_list(buf, k, Xmxtap, Xmxtap_max);
SendDataToXAir // send to XAir
sprintf(tmp, "/rtn/%d/mix/%02d/pan", rt, mx);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_linf(buf, k, -100., 200., 2.);
SendDataToXAir // send to XAir
break;
// All others don't have "pan"
case rtn_1_mix_02: case rtn_2_mix_02: case rtn_3_mix_02: case rtn_4_mix_02:
case rtn_1_mix_04: case rtn_2_mix_04: case rtn_3_mix_04: case rtn_4_mix_04:
case rtn_1_mix_06: case rtn_2_mix_06: case rtn_3_mix_06: case rtn_4_mix_06:
case rtn_1_mix_07: case rtn_2_mix_07: case rtn_3_mix_07: case rtn_4_mix_07:
case rtn_1_mix_08: case rtn_2_mix_08: case rtn_3_mix_08: case rtn_4_mix_08:
case rtn_1_mix_09: case rtn_2_mix_09: case rtn_3_mix_09: case rtn_4_mix_09:
case rtn_1_mix_10: case rtn_2_mix_10: case rtn_3_mix_10: case rtn_4_mix_10:
sscanf(l_read + 5, "%d", &rt);
sscanf(l_read + 11, "%d", &mx);
sprintf(tmp, "/rtn/%d/mix/%02d/level", rt, mx);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_level(buf, k, 160);
SendDataToXAir // send to XAir
sprintf(tmp, "/rtn/%d/mix/%02d/grpon", rt, mx);
k = Xsprint(buf, 0, 's', tmp);
k = XOff_On(buf, k, "OFF");
SendDataToXAir // send to XAir
sprintf(tmp, "/rtn/%d/mix/%02d/tap", rt, mx);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_list(buf, k, Xmxtap, Xmxtap_max);
SendDataToXAir // send to XAir
break;
case rtn_1_grp: case rtn_2_grp: case rtn_3_grp: case rtn_4_grp:
sscanf(l_read + 5, "%d", &rt);
sprintf(tmp, "/rtn/%d/grp/dca", rt);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_bit(buf, k);
SendDataToXAir // send to XAir
sprintf(tmp, "/rtn/%d/grp/mute", rt);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_bit(buf, k);
SendDataToXAir // send to XAir
break;
case bus_1_config: case bus_2_config: case bus_3_config: case bus_4_config:
case bus_5_config: case bus_6_config:
sscanf(l_read + 5, "%d", &bus);
sprintf(tmp, "/bus/%d/config/name", bus);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_str(buf, k);
SendDataToXAir // send to XAir
sprintf(tmp, "/bus/%d/config/color", bus);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_int(buf, k);
SendDataToXAir // send to XAir
break;
case bus_1_dyn: case bus_2_dyn: case bus_3_dyn: case bus_4_dyn:
case bus_5_dyn: case bus_6_dyn:
sscanf(l_read + 5, "%d", &bus);
sprintf(tmp, "/ch/%d/dyn/on", bus);
k = Xsprint(buf, 0, 's', tmp);
k = XOff_On(buf, k, "OFF");
SendDataToXAir // send to XAir
sprintf(tmp, "/ch/%d/dyn/mode", bus);
k = Xsprint(buf, 0, 's', tmp);
k = XOff_On(buf, k, "COMP");
SendDataToXAir // send to XAir
sprintf(tmp, "/ch/%d/dyn/det", bus);
k = Xsprint(buf, 0, 's', tmp);
k = XOff_On(buf, k, "PEAK");
SendDataToXAir // send to XAir
sprintf(tmp, "/ch/%d/dyn/env", bus);
k = Xsprint(buf, 0, 's', tmp);
k = XOff_On(buf, k, "LIN");
SendDataToXAir // send to XAir
sprintf(tmp, "/ch/%d/dyn/thr", bus);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_linf(buf, k, -60., 60., 0.5);
SendDataToXAir // send to XAir
sprintf(tmp, "/ch/%d/dyn/ratio", bus);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_list(buf, k, Xdynratio, Xdynratio_max);
SendDataToXAir // send to XAir
sprintf(tmp, "/ch/%d/dyn/knee", bus);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_linf(buf, k, 0., 5., 1.);
SendDataToXAir // send to XAir
sprintf(tmp, "/ch/%d/dyn/mgain", bus);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_linf(buf, k, 0., 24., 0.5);
SendDataToXAir // send to XAir
sprintf(tmp, "/ch/%d/dyn/attack", bus);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_linf(buf, k, 0., 120., 1.);
SendDataToXAir // send to XAir
sprintf(tmp, "/ch/%d/dyn/hold", bus);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_logf(buf, k, 0.02, 11.512925465, 100); // log (2000/0.02) = 11.512925465
SendDataToXAir // send to XAir
sprintf(tmp, "/ch/%d/dyn/release", bus);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_logf(buf, k, 5., 6.684611728, 100); // log(4000/5) = 6.684611728
SendDataToXAir // send to XAir
sprintf(tmp, "/ch/%d/dyn/mix", bus);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_percent(buf, k);
SendDataToXAir // send to XAir
sprintf(tmp, "/ch/%d/dyn/keysrc", bus);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_list(buf, k, Xkeysrc, Xkeysrc_max);
SendDataToXAir // send to XAir
sprintf(tmp, "/ch/%d/dyn/auto", bus);
k = Xsprint(buf, 0, 's', tmp);
k = XOff_On(buf, k, "OFF");
SendDataToXAir // send to XAir
break;
case bus_1_dyn_filter: case bus_2_dyn_filter: case bus_3_dyn_filter: case bus_4_dyn_filter:
case bus_5_dyn_filter: case bus_6_dyn_filter:
sscanf(l_read + 5, "%d", &bus);
sprintf(tmp, "/bus/%d/dyn/filter/on", bus);
k = Xsprint(buf, 0, 's', tmp);
k = XOff_On(buf, k, "OFF");
SendDataToXAir // send to XAir
sprintf(tmp, "/bus/%d/dyn/filter/type", bus);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_list(buf, k, Xfiltertype, Xfiltertype_max);
SendDataToXAir // send to XAir
sprintf(tmp, "/bus/%d/dyn/filter/f", bus);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_frequency(buf, k, 200);
SendDataToXAir // send to XAir
break;
case bus_1_insert:case bus_2_insert:case bus_3_insert:case bus_4_insert:
case bus_5_insert:case bus_6_insert:
sscanf(l_read + 5, "%d", &bus);
sprintf(tmp, "/bus/%d/insert/on", bus);
k = Xsprint(buf, 0, 's', tmp);
k = XOff_On(buf, k, "OFF");
SendDataToXAir // send to XAir
sprintf(tmp, "/bus/%d/insert/fxslot", bus);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_list(buf, k, Xchfxslot, Xchfxslot_max);
SendDataToXAir // send to XAir
break;
case bus_1_eq:case bus_2_eq:case bus_3_eq:case bus_4_eq:
case bus_5_eq:case bus_6_eq:
sscanf(l_read + 5, "%d", &bus);
sprintf(tmp, "/bus/%02d/eq/on", bus);
k = Xsprint(buf, 0, 's', tmp);
k = XOff_On(buf, k, "OFF");
SendDataToXAir // send to XAir
sprintf(tmp, "/bus/%d/eq/mode", bus);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_list(buf, k, Xeqmode, Xeqmode_max);
SendDataToXAir // send to XAir
break;
case bus_1_eq_1:case bus_2_eq_1:case bus_3_eq_1:case bus_4_eq_1:
case bus_5_eq_1:case bus_6_eq_1:
case bus_1_eq_2:case bus_2_eq_2:case bus_3_eq_2:case bus_4_eq_2:
case bus_5_eq_2:case bus_6_eq_2:
case bus_1_eq_3:case bus_2_eq_3:case bus_3_eq_3:case bus_4_eq_3:
case bus_5_eq_3:case bus_6_eq_3:
case bus_1_eq_4:case bus_2_eq_4:case bus_3_eq_4:case bus_4_eq_4:
case bus_5_eq_4:case bus_6_eq_4:
case bus_1_eq_5:case bus_2_eq_5:case bus_3_eq_5:case bus_4_eq_5:
case bus_5_eq_5:case bus_6_eq_5:
case bus_1_eq_6:case bus_2_eq_6:case bus_3_eq_6:case bus_4_eq_6:
case bus_5_eq_6:case bus_6_eq_6:
sscanf(l_read + 5, "%d", &bus);
sscanf(l_read + 10, "%c", &c1);
sprintf(tmp, "/bus/%d/eq/%c/type", bus, c1);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_list(buf, k, Xeqtyp, Xeqtyp_max);
SendDataToXAir // send to XAir
sprintf(tmp, "/bus/%d/eq/%c/f", bus, c1);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_frequency(buf, k, 200);
SendDataToXAir // send to XAir
sprintf(tmp, "/bus/%d/eq/%c/g", bus, c1);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_linf(buf, k, -15., 30., 0.25);
SendDataToXAir // send to XAir
sprintf(tmp, "/bus/%d/eq/%c/q", bus, c1);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_logf(buf, k, 10., -3.506557897, 71); // log(0.3/10) = -3.506557897
SendDataToXAir // send to XAir
break;
//
// 20, 25, 31.5, 40, 50, 63, 80, 100, 125, 160, 200, 250, 315, 400, 500, 630, 800, 1k,
// 1k25, 1k6, 2k, 2k5, 3k15, 4k, 5k, 6k3, 8k, 10k, 12k5, 16k, 20k
case bus_1_geq: case bus_2_geq: case bus_3_geq: case bus_4_geq:
case bus_5_geq: case bus_6_geq:
sscanf(l_read + 5, "%d", &bus);
sprintf(tmp, "/bus/%d/geq/20", bus);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_linf(buf, k, -15., 30., 0.5);
SendDataToXAir // send to XAir
sprintf(tmp, "/bus/%d/geq/25", bus);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_linf(buf, k, -15., 30., 0.5);
SendDataToXAir // send to XAir
sprintf(tmp, "/bus/%d/geq/31.5", bus);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_linf(buf, k, -15., 30., 0.5);
SendDataToXAir // send to XAir
sprintf(tmp, "/bus/%d/geq/40", bus);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_linf(buf, k, -15., 30., 0.5);
SendDataToXAir // send to XAir
sprintf(tmp, "/bus/%d/geq/50", bus);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_linf(buf, k, -15., 30., 0.5);
SendDataToXAir // send to XAir
sprintf(tmp, "/bus/%d/geq/63", bus);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_linf(buf, k, -15., 30., 0.5);
SendDataToXAir // send to XAir
sprintf(tmp, "/bus/%d/geq/80", bus);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_linf(buf, k, -15., 30., 0.5);
SendDataToXAir // send to XAir
sprintf(tmp, "/bus/%d/geq/100", bus);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_linf(buf, k, -15., 30., 0.5);
SendDataToXAir // send to XAir
sprintf(tmp, "/bus/%d/geq/125", bus);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_linf(buf, k, -15., 30., 0.5);
SendDataToXAir // send to XAir
sprintf(tmp, "/bus/%d/geq/160", bus);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_linf(buf, k, -15., 30., 0.5);
SendDataToXAir // send to XAir
sprintf(tmp, "/bus/%d/geq/200", bus);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_linf(buf, k, -15., 30., 0.5);
SendDataToXAir // send to XAir
sprintf(tmp, "/bus/%d/geq/250", bus);
k = Xsprint(buf, 0, 's', tmp);
k = Xp_linf(buf, k, -15., 30., 0.5);
SendDataToXAir // send to XAir
sprintf(tmp, "/bus/%d/geq/315", bus);