nodeskini 1.0.3 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2009 @@
1
+ var Piano, StartTransSaxo, Saxo, Piano1Intro1, Piano1Intro2, Piano1Intro3, Piano1Intro4, Piano1Intro5, Piano1Intro6, Piano1Intro7, Piano1Milieu1, Piano1Milieu2, Piano1Milieu3, Piano1Milieu4, Piano1Milieu5, Piano1Milieu6, Piano1Milieu7, Piano1Fin1, Piano1Fin2, Piano1Fin3, Piano1Fin4, Piano1Fin5, Piano1Fin6, Piano1Fin7, Brass, SaxIntro1, SaxIntro2, SaxIntro3, SaxIntro4, SaxIntro5, SaxIntro6, SaxIntro7, SaxMilieu1, SaxMilieu2, SaxMilieu3, SaxMilieu4, SaxMilieu5, SaxMilieu6, SaxMilieu7, SaxFin1, SaxFin2, SaxFin3, SaxFin4, SaxFin5, SaxFin6, SaxFin7, Flute, Percu, BrassIntro1, BrassIntro2, BrassIntro3, BrassIntro4, BrassIntro5, BrassIntro6, BrassIntro7, BrassMilieu1, BrassMilieu2, BrassMilieu3, BrassMilieu4, BrassMilieu5, BrassMilieu6, BrassMilieu7, BrassFin1, BrassFin2, BrassFin3, BrassFin4, BrassFin5, BrassFin6, BrassFin7, tick, FluteIntro1, FluteIntro2, FluteIntro3, FluteIntro4, FluteIntro5, FluteIntro6, FluteIntro7, FluteMilieu1, FluteMilieu2, FluteMilieu3, FluteMilieu4, FluteMilieu5, FluteMilieu6, FluteMilieu7, FluteFin1, FluteFin2, FluteFin3, FluteFin4, FluteFin5, FluteFin6, FluteFin7, TransPianoEtNappe, Percu1, Percu2, Percu3, Percu4, Percu5, Percu6, Percu7, TransPianoEtNappe2, TransPianoEtNappe3, TransSaxo, nappeViolons, Flesh, Massive;
2
+
3
+
4
+ // Les patterns de cette pièce sont organisés par types et sont dans des réservoirs.
5
+ // On a donc un contrôle sur la construction des phrases musicales.
6
+ // Le simulateur a des contraintes sur les timers : 3000 min et
7
+ // 3010 max avec 20 pulse max d'attente. Ceci permet de faire appel
8
+ // aux tanks en contrôlant/limitant les répétitions de patterns.
9
+ // Si le simulateur va trop vite, il peut rappeler un
10
+ // pattern avant qu'il ait été dévalidé sur le serveur,
11
+ // surtout quand le paramètre reactOnPlay est actif.
12
+ // Il y a deux groupes 1 et 0. Il faut utiliser simulateurListe.
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
+ // Pour cette pièce, il y a un groupe 0. Attention au simulateur.
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
+ // Avec opus4V3 dans Ableton Live et lancer deux simulateurs en groupe 0 et 1.
197
+ //
198
+ //
199
+ //
200
+ //
201
+ //
202
+ //
203
+ //
204
+ //
205
+ //
206
+
207
+ "use strict";
208
+ import { createRequire } from 'module';
209
+ const require = createRequire(import.meta.url);
210
+ const ipConfig = require('../serveur/ipConfig.json');
211
+
212
+ import * as hh from "@hop/hiphop";
213
+ import * as utilsSkini from "../serveur/utilsSkini.mjs";
214
+ import * as tank from "../pieces/util/makeReservoir.mjs";
215
+
216
+ var par;
217
+ var debug = false;
218
+ var debug1 = true;
219
+ var midimix;
220
+ var oscMidiLocal;
221
+ var gcs;
222
+ var DAW;
223
+ var serveur;
224
+
225
+ // Avec des valeurs initiales
226
+ let CCChannel = 1;
227
+ let CCTempo = 100;
228
+ let tempoMax = 160;
229
+ let tempoMin = 40;
230
+ let tempoGlobal = 60;
231
+
232
+ export function setServ(ser, daw, groupeCS, oscMidi, mix){
233
+ if(debug) console.log("hh_ORCHESTRATION: setServ");
234
+ DAW = daw;
235
+ serveur = ser;
236
+ gcs = groupeCS;
237
+ oscMidiLocal = oscMidi;
238
+ midimix = mix;
239
+ tank.initMakeReservoir(gcs, serveur);
240
+ }
241
+
242
+ function setTempo(value, param){
243
+ tempoGlobal = value;
244
+
245
+ // if(midimix.getAbletonLinkStatus()) {
246
+ // if(debug) console.log("ORCHESTRATION: set tempo Link:", value);
247
+ // midimix.setTempoLink(value);
248
+ // return;
249
+ // }
250
+
251
+ if ( value > tempoMax || value < tempoMin) {
252
+ console.log("ERR: Tempo set out of range:", value, "Should be between:", tempoMin, "and", tempoMax);
253
+ return;
254
+ }
255
+ var tempo = Math.round(127/(tempoMax - tempoMin) * (value - tempoMin));
256
+ if (debug) {
257
+ console.log("Set tempo blockly:", value, param.busMidiDAW, CCChannel, CCTempo, tempo, oscMidiLocal.getMidiPortClipToDAW() );
258
+ }
259
+ oscMidiLocal.sendControlChange(param.busMidiDAW, CCChannel, CCTempo, tempo);
260
+ }
261
+
262
+ let tempoValue = 0;
263
+ let tempoRythme = 0;
264
+ let tempoLimit = 0;
265
+ let tempoIncrease = true;
266
+ let transposeValue = 0;
267
+ let ratioTranspose = 1.763;
268
+ let offsetTranspose = 63.5;
269
+
270
+ // Création des signaux OUT de contrôle de la matrice des possibles
271
+ // Ici et immédiatement.
272
+ let signals = [];
273
+ let halt, start, emptyQueueSignal, patternSignal, stopReservoir, stopMoveTempo;
274
+ let tickCounter = 0;
275
+
276
+ export function setSignals(param) {
277
+ par = param;
278
+ let interTextOUT = utilsSkini.creationInterfacesOUT(param.groupesDesSons);
279
+ let interTextIN = utilsSkini.creationInterfacesIN(param.groupesDesSons);
280
+
281
+ const IZsignals = ["INTERFACEZ_RC", "INTERFACEZ_RC0", "INTERFACEZ_RC1", "INTERFACEZ_RC2",
282
+ "INTERFACEZ_RC3", "INTERFACEZ_RC4", "INTERFACEZ_RC5", "INTERFACEZ_RC6",
283
+ "INTERFACEZ_RC7", "INTERFACEZ_RC8", "INTERFACEZ_RC9", "INTERFACEZ_RC10", "INTERFACEZ_RC11"];
284
+
285
+
286
+ const Piano = hiphop module () {
287
+ in stopReservoir;
288
+ in Piano1Intro1IN;
289
+ in Piano1Intro2IN;
290
+ in Piano1Intro3IN;
291
+ in Piano1Intro4IN;
292
+ in Piano1Intro5IN;
293
+ in Piano1Intro6IN;
294
+ in Piano1Intro7IN;
295
+ in Piano1Milieu1IN;
296
+ in Piano1Milieu2IN;
297
+ in Piano1Milieu3IN;
298
+ in Piano1Milieu4IN;
299
+ in Piano1Milieu5IN;
300
+ in Piano1Milieu6IN;
301
+ in Piano1Milieu7IN;
302
+ in Piano1Fin1IN;
303
+ in Piano1Fin2IN;
304
+ in Piano1Fin3IN;
305
+ in Piano1Fin4IN;
306
+ in Piano1Fin5IN;
307
+ in Piano1Fin6IN;
308
+ in Piano1Fin7IN;
309
+ out Piano1Intro1OUT;
310
+ out Piano1Intro2OUT;
311
+ out Piano1Intro3OUT;
312
+ out Piano1Intro4OUT;
313
+ out Piano1Intro5OUT;
314
+ out Piano1Intro6OUT;
315
+ out Piano1Intro7OUT;
316
+ out Piano1Milieu1OUT;
317
+ out Piano1Milieu2OUT;
318
+ out Piano1Milieu3OUT;
319
+ out Piano1Milieu4OUT;
320
+ out Piano1Milieu5OUT;
321
+ out Piano1Milieu6OUT;
322
+ out Piano1Milieu7OUT;
323
+ out Piano1Fin1OUT;
324
+ out Piano1Fin2OUT;
325
+ out Piano1Fin3OUT;
326
+ out Piano1Fin4OUT;
327
+ out Piano1Fin5OUT;
328
+ out Piano1Fin6OUT;
329
+ out Piano1Fin7OUT;
330
+
331
+ ${ tank.makeReservoir(0, ["Piano1Intro1","Piano1Intro2","Piano1Intro3","Piano1Intro4","Piano1Intro5","Piano1Intro6","Piano1Intro7","Piano1Milieu1","Piano1Milieu2","Piano1Milieu3","Piano1Milieu4","Piano1Milieu5","Piano1Milieu6","Piano1Milieu7","Piano1Fin1","Piano1Fin2","Piano1Fin3","Piano1Fin4","Piano1Fin5","Piano1Fin6","Piano1Fin7"]) };
332
+ }
333
+
334
+ const Saxo = hiphop module () {
335
+ in stopReservoir;
336
+ in SaxIntro1IN;
337
+ in SaxIntro2IN;
338
+ in SaxIntro3IN;
339
+ in SaxIntro4IN;
340
+ in SaxIntro5IN;
341
+ in SaxIntro6IN;
342
+ in SaxIntro7IN;
343
+ in SaxMilieu1IN;
344
+ in SaxMilieu2IN;
345
+ in SaxMilieu3IN;
346
+ in SaxMilieu4IN;
347
+ in SaxMilieu5IN;
348
+ in SaxMilieu6IN;
349
+ in SaxMilieu7IN;
350
+ in SaxFin1IN;
351
+ in SaxFin2IN;
352
+ in SaxFin3IN;
353
+ in SaxFin4IN;
354
+ in SaxFin5IN;
355
+ in SaxFin6IN;
356
+ in SaxFin7IN;
357
+ out SaxIntro1OUT;
358
+ out SaxIntro2OUT;
359
+ out SaxIntro3OUT;
360
+ out SaxIntro4OUT;
361
+ out SaxIntro5OUT;
362
+ out SaxIntro6OUT;
363
+ out SaxIntro7OUT;
364
+ out SaxMilieu1OUT;
365
+ out SaxMilieu2OUT;
366
+ out SaxMilieu3OUT;
367
+ out SaxMilieu4OUT;
368
+ out SaxMilieu5OUT;
369
+ out SaxMilieu6OUT;
370
+ out SaxMilieu7OUT;
371
+ out SaxFin1OUT;
372
+ out SaxFin2OUT;
373
+ out SaxFin3OUT;
374
+ out SaxFin4OUT;
375
+ out SaxFin5OUT;
376
+ out SaxFin6OUT;
377
+ out SaxFin7OUT;
378
+
379
+ ${ tank.makeReservoir(0, ["SaxIntro1","SaxIntro2","SaxIntro3","SaxIntro4","SaxIntro5","SaxIntro6","SaxIntro7","SaxMilieu1","SaxMilieu2","SaxMilieu3","SaxMilieu4","SaxMilieu5","SaxMilieu6","SaxMilieu7","SaxFin1","SaxFin2","SaxFin3","SaxFin4","SaxFin5","SaxFin6","SaxFin7"]) };
380
+ }
381
+
382
+ const Brass = hiphop module () {
383
+ in stopReservoir;
384
+ in BrassIntro1IN;
385
+ in BrassIntro2IN;
386
+ in BrassIntro3IN;
387
+ in BrassIntro4IN;
388
+ in BrassIntro5IN;
389
+ in BrassIntro6IN;
390
+ in BrassIntro7IN;
391
+ in BrassMilieu1IN;
392
+ in BrassMilieu2IN;
393
+ in BrassMilieu3IN;
394
+ in BrassMilieu4IN;
395
+ in BrassMilieu5IN;
396
+ in BrassMilieu6IN;
397
+ in BrassMilieu7IN;
398
+ in BrassFin1IN;
399
+ in BrassFin2IN;
400
+ in BrassFin3IN;
401
+ in BrassFin4IN;
402
+ in BrassFin5IN;
403
+ in BrassFin6IN;
404
+ in BrassFin7IN;
405
+ out BrassIntro1OUT;
406
+ out BrassIntro2OUT;
407
+ out BrassIntro3OUT;
408
+ out BrassIntro4OUT;
409
+ out BrassIntro5OUT;
410
+ out BrassIntro6OUT;
411
+ out BrassIntro7OUT;
412
+ out BrassMilieu1OUT;
413
+ out BrassMilieu2OUT;
414
+ out BrassMilieu3OUT;
415
+ out BrassMilieu4OUT;
416
+ out BrassMilieu5OUT;
417
+ out BrassMilieu6OUT;
418
+ out BrassMilieu7OUT;
419
+ out BrassFin1OUT;
420
+ out BrassFin2OUT;
421
+ out BrassFin3OUT;
422
+ out BrassFin4OUT;
423
+ out BrassFin5OUT;
424
+ out BrassFin6OUT;
425
+ out BrassFin7OUT;
426
+
427
+ ${ tank.makeReservoir(0, ["BrassIntro1","BrassIntro2","BrassIntro3","BrassIntro4","BrassIntro5","BrassIntro6","BrassIntro7","BrassMilieu1","BrassMilieu2","BrassMilieu3","BrassMilieu4","BrassMilieu5","BrassMilieu6","BrassMilieu7","BrassFin1","BrassFin2","BrassFin3","BrassFin4","BrassFin5","BrassFin6","BrassFin7"]) };
428
+ }
429
+
430
+ const Flute = hiphop module () {
431
+ in stopReservoir;
432
+ in FluteIntro1IN;
433
+ in FluteIntro2IN;
434
+ in FluteIntro3IN;
435
+ in FluteIntro4IN;
436
+ in FluteIntro5IN;
437
+ in FluteIntro6IN;
438
+ in FluteIntro7IN;
439
+ in FluteMilieu1IN;
440
+ in FluteMilieu2IN;
441
+ in FluteMilieu3IN;
442
+ in FluteMilieu4IN;
443
+ in FluteMilieu5IN;
444
+ in FluteMilieu6IN;
445
+ in FluteMilieu7IN;
446
+ in FluteFin1IN;
447
+ in FluteFin2IN;
448
+ in FluteFin3IN;
449
+ in FluteFin4IN;
450
+ in FluteFin5IN;
451
+ in FluteFin6IN;
452
+ in FluteFin7IN;
453
+ out FluteIntro1OUT;
454
+ out FluteIntro2OUT;
455
+ out FluteIntro3OUT;
456
+ out FluteIntro4OUT;
457
+ out FluteIntro5OUT;
458
+ out FluteIntro6OUT;
459
+ out FluteIntro7OUT;
460
+ out FluteMilieu1OUT;
461
+ out FluteMilieu2OUT;
462
+ out FluteMilieu3OUT;
463
+ out FluteMilieu4OUT;
464
+ out FluteMilieu5OUT;
465
+ out FluteMilieu6OUT;
466
+ out FluteMilieu7OUT;
467
+ out FluteFin1OUT;
468
+ out FluteFin2OUT;
469
+ out FluteFin3OUT;
470
+ out FluteFin4OUT;
471
+ out FluteFin5OUT;
472
+ out FluteFin6OUT;
473
+ out FluteFin7OUT;
474
+
475
+ ${ tank.makeReservoir(0, ["FluteIntro1","FluteIntro2","FluteIntro3","FluteIntro4","FluteIntro5","FluteIntro6","FluteIntro7","FluteMilieu1","FluteMilieu2","FluteMilieu3","FluteMilieu4","FluteMilieu5","FluteMilieu6","FluteMilieu7","FluteFin1","FluteFin2","FluteFin3","FluteFin4","FluteFin5","FluteFin6","FluteFin7"]) };
476
+ }
477
+
478
+ const Percu = hiphop module () {
479
+ in stopReservoir;
480
+ in Percu1IN;
481
+ in Percu2IN;
482
+ in Percu3IN;
483
+ in Percu4IN;
484
+ in Percu5IN;
485
+ in Percu6IN;
486
+ in Percu7IN;
487
+ out Percu1OUT;
488
+ out Percu2OUT;
489
+ out Percu3OUT;
490
+ out Percu4OUT;
491
+ out Percu5OUT;
492
+ out Percu6OUT;
493
+ out Percu7OUT;
494
+
495
+ ${ tank.makeReservoir(0, ["Percu1","Percu2","Percu3","Percu4","Percu5","Percu6","Percu7"]) };
496
+ }
497
+ // La transposition si fait dans Ableton Live. D'où les
498
+ // ratios dans l'initialisation de la pièce pour cadrer
499
+ // avec le paramètre MIDI des CC. (min -36, max +36).
500
+ // 64 -> 0
501
+ // 67 -> +2 ...
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
+ const TransPianoEtNappe = hiphop module() {
696
+
697
+ inout tick;
698
+
699
+
700
+ loop{
701
+
702
+ host{
703
+ transposeValue = 0; // !! Ne devrait pas être une variable commune si on veut incrémenter.
704
+ //console.log("hiphop block transpose: transposeValue:", transposeValue ,1,74);
705
+ oscMidiLocal.sendControlChange(param.busMidiDAW,1,74, Math.round(ratioTranspose * transposeValue + offsetTranspose ));
706
+ }
707
+
708
+ await count(1,tick.now);
709
+
710
+ host{
711
+ transposeValue = -2; // !! Ne devrait pas être une variable commune si on veut incrémenter.
712
+ //console.log("hiphop block transpose: transposeValue:", transposeValue ,1,74);
713
+ oscMidiLocal.sendControlChange(param.busMidiDAW,1,74, Math.round(ratioTranspose * transposeValue + offsetTranspose ));
714
+ }
715
+
716
+ await count(1,tick.now);
717
+
718
+ host{
719
+ transposeValue = 2; // !! Ne devrait pas être une variable commune si on veut incrémenter.
720
+ //console.log("hiphop block transpose: transposeValue:", transposeValue ,1,74);
721
+ oscMidiLocal.sendControlChange(param.busMidiDAW,1,74, Math.round(ratioTranspose * transposeValue + offsetTranspose ));
722
+ }
723
+
724
+ await count(1,tick.now);
725
+
726
+ }
727
+
728
+ }
729
+ // La transposition si fait dans Ableton Live. D'où les
730
+ // ratios dans l'initialisation de la pièce pour cadrer
731
+ // avec le paramètre MIDI des CC. (min -36, max +36).
732
+ // 64 -> 0
733
+ // 67 -> +2 ...
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
+ const TransPianoEtNappe2 = hiphop module() {
928
+
929
+ inout tick;
930
+
931
+
932
+ loop{
933
+
934
+ host{
935
+ transposeValue = 0; // !! Ne devrait pas être une variable commune si on veut incrémenter.
936
+ //console.log("hiphop block transpose: transposeValue:", transposeValue ,1,74);
937
+ oscMidiLocal.sendControlChange(param.busMidiDAW,1,74, Math.round(ratioTranspose * transposeValue + offsetTranspose ));
938
+ }
939
+
940
+ await count(2,tick.now);
941
+
942
+ host{
943
+ transposeValue = -2; // !! Ne devrait pas être une variable commune si on veut incrémenter.
944
+ //console.log("hiphop block transpose: transposeValue:", transposeValue ,1,74);
945
+ oscMidiLocal.sendControlChange(param.busMidiDAW,1,74, Math.round(ratioTranspose * transposeValue + offsetTranspose ));
946
+ }
947
+
948
+ await count(2,tick.now);
949
+
950
+ host{
951
+ transposeValue = 2; // !! Ne devrait pas être une variable commune si on veut incrémenter.
952
+ //console.log("hiphop block transpose: transposeValue:", transposeValue ,1,74);
953
+ oscMidiLocal.sendControlChange(param.busMidiDAW,1,74, Math.round(ratioTranspose * transposeValue + offsetTranspose ));
954
+ }
955
+
956
+ await count(2,tick.now);
957
+
958
+ }
959
+
960
+ }
961
+ // La transposition si fait dans Ableton Live. D'où les
962
+ // ratios dans l'initialisation de la pièce pour cadrer
963
+ // avec le paramètre MIDI des CC. (min -36, max +36).
964
+ // 64 -> 0
965
+ // 67 -> +2 ...
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
+ //
1001
+ //
1002
+ //
1003
+ //
1004
+ //
1005
+ //
1006
+ //
1007
+ //
1008
+ //
1009
+ //
1010
+ //
1011
+ //
1012
+ //
1013
+ //
1014
+ //
1015
+ //
1016
+ //
1017
+ //
1018
+ //
1019
+ //
1020
+ //
1021
+ //
1022
+ //
1023
+ //
1024
+ //
1025
+ //
1026
+ //
1027
+ //
1028
+ //
1029
+ //
1030
+ //
1031
+ //
1032
+ //
1033
+ //
1034
+ //
1035
+ //
1036
+ //
1037
+ //
1038
+ //
1039
+ //
1040
+ //
1041
+ //
1042
+ //
1043
+ //
1044
+ //
1045
+ //
1046
+ //
1047
+ //
1048
+ //
1049
+ //
1050
+ //
1051
+ //
1052
+ //
1053
+ //
1054
+ //
1055
+ //
1056
+ //
1057
+ //
1058
+ //
1059
+ //
1060
+ //
1061
+ //
1062
+ //
1063
+ //
1064
+ //
1065
+ //
1066
+ //
1067
+ //
1068
+ //
1069
+ //
1070
+ //
1071
+ //
1072
+ //
1073
+ //
1074
+ //
1075
+ //
1076
+ //
1077
+ //
1078
+ //
1079
+ //
1080
+ //
1081
+ //
1082
+ //
1083
+ //
1084
+ //
1085
+ //
1086
+ //
1087
+ //
1088
+ //
1089
+ //
1090
+ //
1091
+ //
1092
+ //
1093
+ //
1094
+ //
1095
+ //
1096
+ //
1097
+ //
1098
+ //
1099
+ //
1100
+ //
1101
+ //
1102
+ //
1103
+ //
1104
+ //
1105
+ //
1106
+ //
1107
+ //
1108
+ //
1109
+ //
1110
+ //
1111
+ //
1112
+ //
1113
+ //
1114
+ //
1115
+ //
1116
+ //
1117
+ //
1118
+ //
1119
+ //
1120
+ //
1121
+ //
1122
+ //
1123
+ //
1124
+ //
1125
+ //
1126
+ //
1127
+ //
1128
+ //
1129
+ //
1130
+ //
1131
+ //
1132
+ //
1133
+ //
1134
+ //
1135
+ //
1136
+ //
1137
+ //
1138
+ //
1139
+ //
1140
+ //
1141
+ //
1142
+ //
1143
+ //
1144
+ //
1145
+ //
1146
+ //
1147
+ //
1148
+ //
1149
+ //
1150
+ //
1151
+ //
1152
+ //
1153
+ //
1154
+ //
1155
+ //
1156
+ //
1157
+ //
1158
+
1159
+ const TransPianoEtNappe3 = hiphop module() {
1160
+
1161
+ inout tick;
1162
+
1163
+
1164
+ loop{
1165
+
1166
+ host{
1167
+ transposeValue = 0; // !! Ne devrait pas être une variable commune si on veut incrémenter.
1168
+ //console.log("hiphop block transpose: transposeValue:", transposeValue ,1,74);
1169
+ oscMidiLocal.sendControlChange(param.busMidiDAW,1,74, Math.round(ratioTranspose * transposeValue + offsetTranspose ));
1170
+ }
1171
+
1172
+ await count(1,tick.now);
1173
+
1174
+ host{
1175
+ transposeValue = -2; // !! Ne devrait pas être une variable commune si on veut incrémenter.
1176
+ //console.log("hiphop block transpose: transposeValue:", transposeValue ,1,74);
1177
+ oscMidiLocal.sendControlChange(param.busMidiDAW,1,74, Math.round(ratioTranspose * transposeValue + offsetTranspose ));
1178
+ }
1179
+
1180
+ await count(1,tick.now);
1181
+
1182
+ host{
1183
+ transposeValue = 2; // !! Ne devrait pas être une variable commune si on veut incrémenter.
1184
+ //console.log("hiphop block transpose: transposeValue:", transposeValue ,1,74);
1185
+ oscMidiLocal.sendControlChange(param.busMidiDAW,1,74, Math.round(ratioTranspose * transposeValue + offsetTranspose ));
1186
+ }
1187
+
1188
+ await count(1,tick.now);
1189
+
1190
+ host{
1191
+ transposeValue = -1; // !! Ne devrait pas être une variable commune si on veut incrémenter.
1192
+ //console.log("hiphop block transpose: transposeValue:", transposeValue ,1,74);
1193
+ oscMidiLocal.sendControlChange(param.busMidiDAW,1,74, Math.round(ratioTranspose * transposeValue + offsetTranspose ));
1194
+ }
1195
+
1196
+ await count(1,tick.now);
1197
+
1198
+ host{
1199
+ transposeValue = 1; // !! Ne devrait pas être une variable commune si on veut incrémenter.
1200
+ //console.log("hiphop block transpose: transposeValue:", transposeValue ,1,74);
1201
+ oscMidiLocal.sendControlChange(param.busMidiDAW,1,74, Math.round(ratioTranspose * transposeValue + offsetTranspose ));
1202
+ }
1203
+
1204
+ await count(1,tick.now);
1205
+
1206
+ }
1207
+
1208
+ }
1209
+ // La transposition si fait dans Ableton Live. D'où les
1210
+ // ratios dans l'initialisation de la pièce pour cadrer
1211
+ // avec le paramètre MIDI des CC. (min -36, max +36).
1212
+ // 64 -> 0
1213
+ // 67 -> +2 ...
1214
+ //
1215
+ //
1216
+ //
1217
+ //
1218
+ //
1219
+ //
1220
+ //
1221
+ //
1222
+ //
1223
+ //
1224
+ //
1225
+ //
1226
+ //
1227
+ //
1228
+ //
1229
+ //
1230
+ //
1231
+ //
1232
+ //
1233
+ //
1234
+ //
1235
+ //
1236
+ //
1237
+ //
1238
+ //
1239
+ //
1240
+ //
1241
+ //
1242
+ //
1243
+ //
1244
+ //
1245
+ //
1246
+ //
1247
+ //
1248
+ //
1249
+ //
1250
+ //
1251
+ //
1252
+ //
1253
+ //
1254
+ //
1255
+ //
1256
+ //
1257
+ //
1258
+ //
1259
+ //
1260
+ //
1261
+ //
1262
+ //
1263
+ //
1264
+ //
1265
+ //
1266
+ //
1267
+ //
1268
+ //
1269
+ //
1270
+ //
1271
+ //
1272
+ //
1273
+ //
1274
+ //
1275
+ //
1276
+ //
1277
+ //
1278
+ //
1279
+ //
1280
+ //
1281
+ //
1282
+ //
1283
+ //
1284
+ //
1285
+ //
1286
+ //
1287
+ //
1288
+ //
1289
+ //
1290
+ //
1291
+ //
1292
+ //
1293
+ //
1294
+ //
1295
+ //
1296
+ //
1297
+ //
1298
+ //
1299
+ //
1300
+ //
1301
+ //
1302
+ //
1303
+ //
1304
+ //
1305
+ //
1306
+ //
1307
+ //
1308
+ //
1309
+ //
1310
+ //
1311
+ //
1312
+ //
1313
+ //
1314
+ //
1315
+ //
1316
+ //
1317
+ //
1318
+ //
1319
+ //
1320
+ //
1321
+ //
1322
+ //
1323
+ //
1324
+ //
1325
+ //
1326
+ //
1327
+ //
1328
+ //
1329
+ //
1330
+ //
1331
+ //
1332
+ //
1333
+ //
1334
+ //
1335
+ //
1336
+ //
1337
+ //
1338
+ //
1339
+ //
1340
+ //
1341
+ //
1342
+ //
1343
+ //
1344
+ //
1345
+ //
1346
+ //
1347
+ //
1348
+ //
1349
+ //
1350
+ //
1351
+ //
1352
+ //
1353
+ //
1354
+ //
1355
+ //
1356
+ //
1357
+ //
1358
+ //
1359
+ //
1360
+ //
1361
+ //
1362
+ //
1363
+ //
1364
+ //
1365
+ //
1366
+ //
1367
+ //
1368
+ //
1369
+ //
1370
+ //
1371
+ //
1372
+ //
1373
+ //
1374
+ //
1375
+ //
1376
+ //
1377
+ //
1378
+ //
1379
+ //
1380
+ //
1381
+ //
1382
+ //
1383
+ //
1384
+ //
1385
+ //
1386
+ //
1387
+ //
1388
+ //
1389
+ //
1390
+ //
1391
+ //
1392
+ //
1393
+ //
1394
+ //
1395
+ //
1396
+ //
1397
+ //
1398
+ //
1399
+ //
1400
+ //
1401
+ //
1402
+ //
1403
+ //
1404
+ //
1405
+ //
1406
+
1407
+ const TransSaxo = hiphop module() {
1408
+
1409
+ inout tick;
1410
+
1411
+ inout StartTransSaxo;
1412
+
1413
+
1414
+ await immediate (StartTransSaxo.now);
1415
+
1416
+ await count(2,tick.now);
1417
+
1418
+ loop{
1419
+
1420
+ host{
1421
+ transposeValue = 0; // !! Ne devrait pas être une variable commune si on veut incrémenter.
1422
+ //console.log("hiphop block transpose: transposeValue:", transposeValue ,1,72);
1423
+ oscMidiLocal.sendControlChange(param.busMidiDAW,1,72, Math.round(ratioTranspose * transposeValue + offsetTranspose ));
1424
+ }
1425
+
1426
+ await count(4,tick.now);
1427
+
1428
+ host{
1429
+ transposeValue = -5; // !! Ne devrait pas être une variable commune si on veut incrémenter.
1430
+ //console.log("hiphop block transpose: transposeValue:", transposeValue ,1,72);
1431
+ oscMidiLocal.sendControlChange(param.busMidiDAW,1,72, Math.round(ratioTranspose * transposeValue + offsetTranspose ));
1432
+ }
1433
+
1434
+ await count(4,tick.now);
1435
+
1436
+ host{
1437
+ transposeValue = -7; // !! Ne devrait pas être une variable commune si on veut incrémenter.
1438
+ //console.log("hiphop block transpose: transposeValue:", transposeValue ,1,72);
1439
+ oscMidiLocal.sendControlChange(param.busMidiDAW,1,72, Math.round(ratioTranspose * transposeValue + offsetTranspose ));
1440
+ }
1441
+
1442
+ await count(4,tick.now);
1443
+
1444
+ await count(1,tick.now);
1445
+
1446
+ host{
1447
+ transposeValue = 0; // !! Ne devrait pas être une variable commune si on veut incrémenter.
1448
+ //console.log("hiphop block transpose: transposeValue:", transposeValue ,1,72);
1449
+ oscMidiLocal.sendControlChange(param.busMidiDAW,1,72, Math.round(ratioTranspose * transposeValue + offsetTranspose ));
1450
+ }
1451
+
1452
+ await count(4,tick.now);
1453
+
1454
+ host{
1455
+ transposeValue = -1; // !! Ne devrait pas être une variable commune si on veut incrémenter.
1456
+ //console.log("hiphop block transpose: transposeValue:", transposeValue ,1,72);
1457
+ oscMidiLocal.sendControlChange(param.busMidiDAW,1,72, Math.round(ratioTranspose * transposeValue + offsetTranspose ));
1458
+ }
1459
+
1460
+ }
1461
+
1462
+ }
1463
+
1464
+
1465
+ const Program = hiphop module() {
1466
+ in start, halt, tick, DAWON, patternSignal, pulsation, midiSignal, emptyQueueSignal;
1467
+ inout stopReservoir, stopMoveTempo, stopSolo, stopTransposition;
1468
+ in ... ${ IZsignals };
1469
+ out ... ${ interTextOUT };
1470
+ in ... ${ interTextIN };
1471
+
1472
+
1473
+ inout StartTransSaxo;
1474
+
1475
+
1476
+ loop{
1477
+ await(start.now);
1478
+ abort{
1479
+ fork {
1480
+ every(tick.now){
1481
+ host{
1482
+ //console.log("tick from HH", tickCounter++);
1483
+ gcs.setTickOnControler(tickCounter++);
1484
+ }
1485
+ }
1486
+ }par{
1487
+
1488
+ host {console.log('-- Opus4 Blockly');}
1489
+
1490
+ {
1491
+
1492
+ host{
1493
+ serveur.broadcast(JSON.stringify({
1494
+ type: 'setListeDesTypes',
1495
+ }));
1496
+ }
1497
+
1498
+ host{
1499
+ serveur.broadcast(JSON.stringify({
1500
+ type: 'listeDesTypes',
1501
+ text:'1, 2, 3, 4, 5, 5, 6, 7, 8, 9, 10, 11'
1502
+ }));
1503
+ }
1504
+
1505
+ host{
1506
+ gcs.setpatternListLength([12,255]);
1507
+ }
1508
+
1509
+ }
1510
+
1511
+ {
1512
+
1513
+ host{
1514
+ CCChannel= 1;
1515
+ CCTempo = 100;
1516
+ tempoMax = 160;
1517
+ tempoMin = 40;
1518
+ }
1519
+
1520
+ host{setTempo(62, param);}
1521
+ host{gcs.setTimerDivision(1);}
1522
+ host{
1523
+ serveur.broadcast(JSON.stringify({
1524
+ type: 'addSceneScore',
1525
+ value:1
1526
+ }));
1527
+ }
1528
+ yield;
1529
+
1530
+ host{
1531
+ ratioTranspose = 1.763;
1532
+ offsetTranspose = 63.5;
1533
+ if(debug) console.log("hiphop block transpose Parameters:", ratioTranspose, offsetTranspose);
1534
+ }
1535
+
1536
+ host{
1537
+ transposeValue = 0; // !! Ne devrait pas être une variable commune si on veut incrémenter.
1538
+ //console.log("hiphop block transpose: transposeValue:", transposeValue ,1,74);
1539
+ oscMidiLocal.sendControlChange(param.busMidiDAW,1,74, Math.round(ratioTranspose * transposeValue + offsetTranspose ));
1540
+ }
1541
+
1542
+ }
1543
+
1544
+ M533953 : {
1545
+ fork{
1546
+ run ${ Percu} () {*};
1547
+
1548
+ }par{
1549
+ await count(5, tick.now);
1550
+ emit stopReservoir();
1551
+ break M533953;
1552
+ }
1553
+ }
1554
+
1555
+ host{
1556
+ DAW.cleanQueues();
1557
+ gcs.cleanChoiceList(255);
1558
+ }
1559
+
1560
+ host{
1561
+ DAW.cleanQueue(5);
1562
+ }
1563
+
1564
+ {
1565
+
1566
+ host{
1567
+ serveur.broadcast(JSON.stringify({
1568
+ type: 'alertInfoScoreON',
1569
+ value:'Transposition-1 tick'
1570
+ }));
1571
+ }
1572
+
1573
+ fork {
1574
+
1575
+ M642770 : {
1576
+ fork{
1577
+ run ${ Piano} () {*};
1578
+
1579
+ }par{
1580
+ await count(5, tick.now);
1581
+ emit stopReservoir();
1582
+ break M642770;
1583
+ }
1584
+ }
1585
+
1586
+ }
1587
+
1588
+ par {
1589
+
1590
+ abort{
1591
+
1592
+ fork {
1593
+
1594
+ run ${ TransPianoEtNappe} () {*};
1595
+
1596
+ }
1597
+
1598
+ par {
1599
+
1600
+ signal inverseTempo;
1601
+ host {console.log("-- Start move tempo")}
1602
+ abort {
1603
+ loop{
1604
+ fork {
1605
+ every count( 8, tick.now) {
1606
+ emit inverseTempo();
1607
+ }
1608
+ }par{
1609
+ loop{
1610
+ abort{
1611
+ every count(1, tick.now) {
1612
+ host{
1613
+ tempoGlobal += 5;
1614
+ setTempo(tempoGlobal, param);
1615
+ }
1616
+ }
1617
+ } when (inverseTempo.now);
1618
+ abort {
1619
+ every count(1, tick.now) {
1620
+ host{
1621
+ tempoGlobal -= 5;
1622
+ setTempo(tempoGlobal, param);
1623
+ }
1624
+ }
1625
+ } when (inverseTempo.now);
1626
+ }
1627
+ }
1628
+ }
1629
+ } when immediate(stopMoveTempo.now);
1630
+ host {console.log("-- Stop move tempo")}
1631
+
1632
+ }
1633
+
1634
+ } when count(30, tick.now);
1635
+
1636
+ }
1637
+
1638
+ par {
1639
+
1640
+ emit nappeViolonsOUT([true,255]);
1641
+ host{gcs.informSelecteurOnMenuChange(255," nappeViolons", true) }
1642
+ await count(30, tick.now);
1643
+
1644
+ emit nappeViolonsOUT([false,255]);
1645
+ host{gcs.informSelecteurOnMenuChange(255," nappeViolons", false) }
1646
+ yield;
1647
+
1648
+ }
1649
+
1650
+ host{
1651
+ DAW.cleanQueues();
1652
+ gcs.cleanChoiceList(255);
1653
+ }
1654
+
1655
+ host{
1656
+ serveur.broadcast(JSON.stringify({
1657
+ type: 'alertInfoScoreON',
1658
+ value:'Transposition3-1 tick'
1659
+ }));
1660
+ }
1661
+
1662
+ fork {
1663
+
1664
+ M346707 : {
1665
+ fork{
1666
+ run ${ Piano} () {*};
1667
+
1668
+ }par{
1669
+ await count(30, tick.now);
1670
+ emit stopReservoir();
1671
+ break M346707;
1672
+ }
1673
+ }
1674
+
1675
+ }
1676
+
1677
+ par {
1678
+
1679
+ emit nappeViolonsOUT([true,1]);
1680
+ host{gcs.informSelecteurOnMenuChange(1," nappeViolons", true) }
1681
+ await count(30, tick.now);
1682
+
1683
+ emit nappeViolonsOUT([false,1]);
1684
+ host{gcs.informSelecteurOnMenuChange(1," nappeViolons", false) }
1685
+ yield;
1686
+
1687
+ }
1688
+
1689
+ par {
1690
+
1691
+ abort{
1692
+
1693
+ fork {
1694
+
1695
+ run ${ TransPianoEtNappe3} () {*};
1696
+
1697
+ }
1698
+
1699
+ par {
1700
+
1701
+ signal inverseTempo;
1702
+ host {console.log("-- Start move tempo")}
1703
+ abort {
1704
+ loop{
1705
+ fork {
1706
+ every count( 8, tick.now) {
1707
+ emit inverseTempo();
1708
+ }
1709
+ }par{
1710
+ loop{
1711
+ abort{
1712
+ every count(1, tick.now) {
1713
+ host{
1714
+ tempoGlobal += 5;
1715
+ setTempo(tempoGlobal, param);
1716
+ }
1717
+ }
1718
+ } when (inverseTempo.now);
1719
+ abort {
1720
+ every count(1, tick.now) {
1721
+ host{
1722
+ tempoGlobal -= 5;
1723
+ setTempo(tempoGlobal, param);
1724
+ }
1725
+ }
1726
+ } when (inverseTempo.now);
1727
+ }
1728
+ }
1729
+ }
1730
+ } when immediate(stopMoveTempo.now);
1731
+ host {console.log("-- Stop move tempo")}
1732
+
1733
+ }
1734
+
1735
+ } when count(30, tick.now);
1736
+
1737
+ }
1738
+
1739
+ host{
1740
+ DAW.cleanQueues();
1741
+ gcs.cleanChoiceList(255);
1742
+ }
1743
+
1744
+ host{
1745
+ serveur.broadcast(JSON.stringify({
1746
+ type: 'alertInfoScoreON',
1747
+ value:'Transposition2-2 ticks'
1748
+ }));
1749
+ }
1750
+
1751
+ fork {
1752
+
1753
+ M607778 : {
1754
+ fork{
1755
+ run ${ Piano} () {*};
1756
+
1757
+ }par{
1758
+ await count(30, tick.now);
1759
+ emit stopReservoir();
1760
+ break M607778;
1761
+ }
1762
+ }
1763
+
1764
+ }
1765
+
1766
+ par {
1767
+
1768
+ emit nappeViolonsOUT([true,1]);
1769
+ host{gcs.informSelecteurOnMenuChange(1," nappeViolons", true) }
1770
+ await count(30, tick.now);
1771
+
1772
+ emit nappeViolonsOUT([false,1]);
1773
+ host{gcs.informSelecteurOnMenuChange(1," nappeViolons", false) }
1774
+ yield;
1775
+
1776
+ }
1777
+
1778
+ par {
1779
+
1780
+ abort{
1781
+
1782
+ fork {
1783
+
1784
+ run ${ TransPianoEtNappe2} () {*};
1785
+
1786
+ }
1787
+
1788
+ par {
1789
+
1790
+ signal inverseTempo;
1791
+ host {console.log("-- Start move tempo")}
1792
+ abort {
1793
+ loop{
1794
+ fork {
1795
+ every count( 8, tick.now) {
1796
+ emit inverseTempo();
1797
+ }
1798
+ }par{
1799
+ loop{
1800
+ abort{
1801
+ every count(1, tick.now) {
1802
+ host{
1803
+ tempoGlobal += 5;
1804
+ setTempo(tempoGlobal, param);
1805
+ }
1806
+ }
1807
+ } when (inverseTempo.now);
1808
+ abort {
1809
+ every count(1, tick.now) {
1810
+ host{
1811
+ tempoGlobal -= 5;
1812
+ setTempo(tempoGlobal, param);
1813
+ }
1814
+ }
1815
+ } when (inverseTempo.now);
1816
+ }
1817
+ }
1818
+ }
1819
+ } when immediate(stopMoveTempo.now);
1820
+ host {console.log("-- Stop move tempo")}
1821
+
1822
+ }
1823
+
1824
+ } when count(30, tick.now);
1825
+
1826
+ }
1827
+
1828
+ emit nappeViolonsOUT([false,1]);
1829
+ host{gcs.informSelecteurOnMenuChange(1," nappeViolons", false) }
1830
+
1831
+ host{
1832
+ DAW.cleanQueue(1);
1833
+ }
1834
+
1835
+ host{
1836
+ DAW.cleanQueue(2);
1837
+ }
1838
+
1839
+ host{
1840
+ DAW.cleanQueue(3);
1841
+ }
1842
+
1843
+ }
1844
+
1845
+ host{setTempo(70, param);}
1846
+
1847
+ host{
1848
+ serveur.broadcast(JSON.stringify({
1849
+ type: 'alertInfoScoreOFF'
1850
+ }));
1851
+ }
1852
+
1853
+ host{
1854
+ DAW.cleanQueue(5);
1855
+ }
1856
+
1857
+ host{
1858
+ serveur.broadcast(JSON.stringify({
1859
+ type: 'alertInfoScoreON',
1860
+ value:'Clarinette (Saxo)'
1861
+ }));
1862
+ }
1863
+
1864
+ emit StartTransSaxo(0);
1865
+
1866
+ fork {
1867
+
1868
+ M138663 : {
1869
+ fork{
1870
+ run ${ Saxo} () {*};
1871
+
1872
+ }par{
1873
+ await count(50, tick.now);
1874
+ emit stopReservoir();
1875
+ break M138663;
1876
+ }
1877
+ }
1878
+
1879
+ }
1880
+
1881
+ par {
1882
+
1883
+ abort{
1884
+
1885
+ run ${ TransSaxo} () {*};
1886
+
1887
+ } when count(50, tick.now);
1888
+
1889
+ }
1890
+
1891
+ host{
1892
+ DAW.cleanQueue(2);
1893
+ }
1894
+
1895
+ host{
1896
+ serveur.broadcast(JSON.stringify({
1897
+ type: 'alertInfoScoreON',
1898
+ value:'Brass Percu'
1899
+ }));
1900
+ }
1901
+
1902
+ fork {
1903
+ run ${ Brass} () {*};
1904
+ }
1905
+ par{
1906
+ run ${ Percu} () {*};
1907
+ }
1908
+
1909
+ host{
1910
+ DAW.cleanQueue(5);
1911
+ }
1912
+
1913
+ host{
1914
+ serveur.broadcast(JSON.stringify({
1915
+ type: 'alertInfoScoreON',
1916
+ value:'Flute'
1917
+ }));
1918
+ }
1919
+
1920
+ fork {
1921
+
1922
+ M475594 : {
1923
+ fork{
1924
+ run ${ Flute} () {*};
1925
+
1926
+ }par{
1927
+ await count(40, tick.now);
1928
+ emit stopReservoir();
1929
+ break M475594;
1930
+ }
1931
+ }
1932
+
1933
+ }
1934
+
1935
+ par {
1936
+
1937
+ abort{
1938
+
1939
+ signal inverseTempo;
1940
+ host {console.log("-- Start move tempo")}
1941
+ abort {
1942
+ loop{
1943
+ fork {
1944
+ every count( 5, tick.now) {
1945
+ emit inverseTempo();
1946
+ }
1947
+ }par{
1948
+ loop{
1949
+ abort{
1950
+ every count(1, tick.now) {
1951
+ host{
1952
+ tempoGlobal += 2;
1953
+ setTempo(tempoGlobal, param);
1954
+ }
1955
+ }
1956
+ } when (inverseTempo.now);
1957
+ abort {
1958
+ every count(1, tick.now) {
1959
+ host{
1960
+ tempoGlobal -= 2;
1961
+ setTempo(tempoGlobal, param);
1962
+ }
1963
+ }
1964
+ } when (inverseTempo.now);
1965
+ }
1966
+ }
1967
+ }
1968
+ } when immediate(stopMoveTempo.now);
1969
+ host {console.log("-- Stop move tempo")}
1970
+
1971
+ } when count(40, tick.now);
1972
+
1973
+ }
1974
+
1975
+ par {
1976
+
1977
+ emit MassiveOUT([true,255]);
1978
+ host{gcs.informSelecteurOnMenuChange(255," Massive", true) }
1979
+ await count(10, tick.now);
1980
+
1981
+ emit MassiveOUT([false,255]);
1982
+ host{gcs.informSelecteurOnMenuChange(255," Massive", false) }
1983
+ yield;
1984
+
1985
+ }
1986
+
1987
+ host { DAW.putPatternInQueue('Percu4');}
1988
+
1989
+ host{
1990
+ serveur.broadcast(JSON.stringify({
1991
+ type: 'alertInfoScoreON',
1992
+ value:'FIN'
1993
+ }));
1994
+ }
1995
+
1996
+ host{
1997
+ DAW.cleanQueues();
1998
+ gcs.cleanChoiceList(255);
1999
+ }
2000
+
2001
+ }
2002
+ } when (halt.now);
2003
+ }
2004
+ }
2005
+ if(debug) console.log("orchestrationHH.mjs: setSignals", param.groupesDesSons);
2006
+ var machine = new hh.ReactiveMachine( Program, {sweep:true, tracePropagation: false, traceReactDuration: false});
2007
+ console.log("INFO: setSignals: Number of nets in Orchestration:",machine.nets.length);
2008
+ return machine;
2009
+ }