nodeskini 1.0.3 → 1.0.6

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.
Files changed (182) hide show
  1. package/blocklySkini/scripts/hiphop_blocks.js +3991 -6104
  2. package/blocklySkini/scripts/main2.js +4 -4
  3. package/client/clientListe/clientListe.js +11 -0
  4. package/client/clientListe/clientListebundle.js +1755 -1909
  5. package/client/configurateur/configReact.js +1 -1
  6. package/client/configurateur/configReactbundle.js +16 -10
  7. package/client/configurateur/src/configReact.js +1 -1
  8. package/client/parametrage/paramReact.js +1 -1
  9. package/client/parametrage/paramReactbundle.js +6 -5
  10. package/client/parametrage/src/paramReact.js +2 -2
  11. package/client/score/parto1.js +4 -1
  12. package/client/score/parto1bundle.js +45 -23
  13. package/client/simulateurListe/simulateurFork.mjs +1 -1
  14. package/client/simulateurListe/simulateurListe.js +3 -3
  15. package/doc/Doc Skini Node english.pdf +0 -0
  16. package/doc/Mode d'emploi Skini Node.pdf +0 -0
  17. package/doc/Tuto Skini.pdf +0 -0
  18. package/doc/quickstart.pdf +0 -0
  19. package/myReact/orchestrationHH.hh.js +2024 -0
  20. package/myReact/orchestrationHH.mjs +262 -420
  21. package/myReact/orchestrationHH.mjs.map +1 -1
  22. package/package.json +19 -11
  23. package/pieces/tutos/demoAbleton.csv +21 -0
  24. package/pieces/tutos/demoAbleton.js +100 -0
  25. package/pieces/tutos/demoAbleton.xml +180 -0
  26. package/pieces/tutos/demoHH.js +99 -0
  27. package/pieces/tutos/demoHH.xml +184 -0
  28. package/pieces/tutos/demoHHwait.js +100 -0
  29. package/pieces/tutos/demoHHwait.xml +175 -0
  30. package/pieces/tutos/tuto.csv +10 -0
  31. package/pieces/tutos/tuto.csv.good +1 -0
  32. package/pieces/tutos/tuto1.js +105 -0
  33. package/pieces/tutos/tuto1.xml +147 -0
  34. package/pieces/tutos/tuto10.back.js +106 -0
  35. package/pieces/tutos/tuto10.js +107 -0
  36. package/pieces/tutos/tuto10.xml +199 -0
  37. package/pieces/tutos/tuto11.js +111 -0
  38. package/pieces/tutos/tuto11.xml +124 -0
  39. package/pieces/tutos/tuto12.js +91 -0
  40. package/pieces/tutos/tuto12.xml +258 -0
  41. package/pieces/tutos/tuto2.back.js +106 -0
  42. package/pieces/tutos/tuto2.js +95 -0
  43. package/pieces/tutos/tuto2.xml +94 -0
  44. package/pieces/tutos/tuto3-2.js +105 -0
  45. package/pieces/tutos/tuto3-2.xml +96 -0
  46. package/pieces/tutos/tuto3.js +97 -0
  47. package/pieces/tutos/tuto3.xml +49 -0
  48. package/pieces/tutos/tuto4.js +107 -0
  49. package/pieces/tutos/tuto4.xml +106 -0
  50. package/pieces/tutos/tuto5.js +109 -0
  51. package/pieces/tutos/tuto5.xml +42 -0
  52. package/pieces/tutos/tuto6.js +105 -0
  53. package/pieces/tutos/tuto6.xml +26 -0
  54. package/pieces/tutos/tuto7.js +107 -0
  55. package/pieces/tutos/tuto7.xml +65 -0
  56. package/pieces/tutos/tuto8.js +105 -0
  57. package/pieces/tutos/tuto8.xml +76 -0
  58. package/pieces/tutos/tuto9.js +107 -0
  59. package/pieces/tutos/tuto9.xml +90 -0
  60. package/pieces/tutos/tutoAwait.js +111 -0
  61. package/pieces/tutos/tutoAwait.xml +171 -0
  62. package/pieces/tutos/tutoDoubleEmission.js +93 -0
  63. package/pieces/tutos/tutoDoubleEmission.xml +65 -0
  64. package/pieces/tutos/tutoESP32.js +104 -0
  65. package/pieces/tutos/tutoESP32.xml +246 -0
  66. package/pieces/tutos/tutoGame.js +126 -0
  67. package/pieces/tutos/tutoGame.xml +109 -0
  68. package/pieces/tutos/tutoGroups1.js +111 -0
  69. package/pieces/tutos/tutoGroups1.xml +137 -0
  70. package/pieces/tutos/tutoGroups2.js +97 -0
  71. package/pieces/tutos/tutoGroups2.xml +103 -0
  72. package/pieces/tutos/tutoGroups3.js +111 -0
  73. package/pieces/tutos/tutoGroups3.xml +128 -0
  74. package/pieces/tutos/tutoGroups4.js +111 -0
  75. package/pieces/tutos/tutoGroups4.xml +84 -0
  76. package/pieces/tutos/tutoIZ.js +95 -0
  77. package/pieces/tutos/tutoIZ.xml +135 -0
  78. package/pieces/tutos/tutoIf.js +111 -0
  79. package/pieces/tutos/tutoIf.xml +126 -0
  80. package/pieces/tutos/tutoMidi.js +126 -0
  81. package/pieces/tutos/tutoMidi.xml +62 -0
  82. package/pieces/tutos/tutoOS.js +121 -0
  83. package/pieces/tutos/tutoOSC.js +109 -0
  84. package/pieces/tutos/tutoOSC.xml +223 -0
  85. package/pieces/tutos/tutoOSCJonathan.js +94 -0
  86. package/pieces/tutos/tutoOSCJonathan.xml +312 -0
  87. package/pieces/tutos/tutoPatternInGroup.js +109 -0
  88. package/pieces/tutos/tutoPatternInGroup.xml +116 -0
  89. package/pieces/tutos/tutoRandomBlock.js +129 -0
  90. package/pieces/tutos/tutoRandomBlock.xml +194 -0
  91. package/pieces/tutos/tutoSuspend.js +107 -0
  92. package/pieces/tutos/tutoSuspend.xml +139 -0
  93. package/pieces/tutos/tutoSustain.js +107 -0
  94. package/pieces/tutos/tutoSustain.xml +109 -0
  95. package/pieces/tutos/tutoTank.csv +9 -0
  96. package/pieces/tutos/tutoTank.js +100 -0
  97. package/pieces/tutos/tutoTank.xml +326 -0
  98. package/pieces/tutos/tutoTestAll.csv +11 -0
  99. package/pieces/tutos/tutoTestAll.js +101 -0
  100. package/pieces/tutos/tutoTestAll.xml +859 -0
  101. package/serveur/OSCandMidi.mjs +7 -5
  102. package/serveur/controleDAW.mjs +3 -2
  103. package/serveur/defaultSkiniParametres.js +20 -13
  104. package/serveur/groupeClientsSons.mjs +10 -5
  105. package/serveur/ipConfig.json +2 -2
  106. package/serveur/midimix.mjs +13 -13
  107. package/serveur/saveParam.mjs +4 -15
  108. package/serveur/skiniParametres.js +108 -26
  109. package/serveur/utilsHHSkini.hh.js +64 -64
  110. package/serveur/websocketServer.mjs +2090 -2052
  111. package/serveur/workerInterfaceZ.mjs +4 -7
  112. package/blocklySkini/archive/blocklyControleur.js +0 -87
  113. package/blocklySkini/archive/blocklySkini.js +0 -84
  114. package/blocklySkini/archive/blocklyhop.js +0 -75
  115. package/blocklySkini/archive/clientControleurBlocly.js +0 -170
  116. package/blocklySkini/archive/index.html +0 -76
  117. package/blocklySkini/archive/testHHsuspend.txt +0 -89
  118. package/blocklySkini/archive/testHHtrap.txt +0 -262
  119. package/blocklySkini/archive/testOrchestration.txt +0 -177
  120. package/blocklySkini/archive/testOrchestration.xml +0 -447
  121. package/blocklySkini/archive/testOrchestration2.xml +0 -456
  122. package/myReact/archive/Nodeemitvaluedlocal1.hh.js +0 -52
  123. package/myReact/archive/abort-parNode.js +0 -79
  124. package/myReact/archive/abroNode.js +0 -169
  125. package/myReact/archive/abroNode2.js +0 -80
  126. package/myReact/archive/atom.compile.hh.js +0 -51
  127. package/myReact/archive/await-countNode.js +0 -67
  128. package/myReact/archive/await-nowvalNode.js +0 -44
  129. package/myReact/archive/callHH.js +0 -96
  130. package/myReact/archive/emit-if2.hh.compiled.js +0 -113
  131. package/myReact/archive/every1Node.js +0 -35
  132. package/myReact/archive/if-runNode.js +0 -74
  133. package/myReact/archive/if1Node.js +0 -43
  134. package/myReact/archive/makeawait.js +0 -0
  135. package/myReact/archive/myReact.old.js +0 -684
  136. package/myReact/archive/orchestration.js +0 -281
  137. package/myReact/archive/orchestration1.js +0 -132
  138. package/myReact/archive/orchestration1.xml +0 -465
  139. package/myReact/archive/orchestration2.js +0 -161
  140. package/myReact/archive/orchestrationHH.mano.js +0 -280
  141. package/myReact/archive/orchestrationHHTest.js +0 -428
  142. package/myReact/archive/orchestrationHHTest.xml +0 -234
  143. package/myReact/archive/orchestrationHHTestRun.js +0 -104
  144. package/myReact/archive/orchestrationHHTestRun.xml +0 -34
  145. package/myReact/archive/orchestrationTest0.js +0 -178
  146. package/myReact/archive/orchestrationTest1.js +0 -181
  147. package/myReact/archive/orchestrationTest2.js +0 -281
  148. package/myReact/archive/run3pointsNode.js +0 -59
  149. package/myReact/archive/runNode.js +0 -123
  150. package/myReact/archive/runNode2.js +0 -91
  151. package/myReact/archive/testAwait1.js +0 -141
  152. package/myReact/archive/testAwait1.xml +0 -86
  153. package/myReact/archive/testEvery1.js +0 -122
  154. package/myReact/archive/testEvery1.xml +0 -79
  155. package/myReact/archive/testHH1.js +0 -135
  156. package/myReact/archive/testHH1.xml +0 -86
  157. package/myReact/archive/testHH1revu.js +0 -104
  158. package/myReact/archive/testHH2.js +0 -122
  159. package/myReact/archive/testHH2.xml +0 -79
  160. package/myReact/archive/testHH3.js +0 -130
  161. package/myReact/archive/testHH3.xml +0 -86
  162. package/myReact/archive/testHHabort.js +0 -121
  163. package/myReact/archive/testHHabort.xml +0 -83
  164. package/myReact/archive/testMakeawait.js +0 -202
  165. package/myReact/archive/testRun1.js +0 -168
  166. package/myReact/archive/testRun1.xml +0 -142
  167. package/myReact/archive/titi.js +0 -28
  168. package/myReact/archive/titi.xml +0 -110
  169. package/myReact/archive/toto.js +0 -73
  170. package/myReact/archive/toto.xml +0 -198
  171. package/myReact/archive/trap-await-parallelNode.js +0 -123
  172. package/myReact/inutiles/hiver2022.xml +0 -804
  173. package/myReact/inutiles/hopeNode.xml +0 -459
  174. package/myReact/inutiles/mars2022.xml +0 -871
  175. package/myReact/inutiles/mystique1.xml +0 -318
  176. package/myReact/inutiles/mystiqueOSC.xml +0 -277
  177. package/myReact/inutiles/opus5Node.xml +0 -1271
  178. package/myReact/inutiles/opus5NodeLinux.xml +0 -1241
  179. package/myReact/inutiles/orchestrationHH.xml +0 -541
  180. package/myReact/inutiles/orchestrationHH2.xml +0 -547
  181. package/myReact/inutiles/testHH.xml +0 -95
  182. package/myReact/inutiles/trouveLaPercuTenor.xml +0 -349
@@ -88,9 +88,10 @@ function startOSCandMIDI() {
88
88
  if (midiConfig[i].spec === "clipToDAW") {
89
89
  for (var j = 0; j < midiOutput.getPortCount(); ++j) {
90
90
  if (midiOutput.getPortName(j) === midiConfig[i].name) {
91
- if (debug1) console.log("INFO: OSCandMIDI: getMidiPortForClipToDAW: Midi" +
92
- midiConfig[i].type + ", usage:" + midiConfig[i].spec +
93
- ", bus: " + midiOutput.getPortName(j) + ", " + midiConfig[i].comment);
91
+ if (debug1) console.log("INFO: OSCandMIDI: getMidiPortForClipToDAW:"
92
+ + " port number: " + j
93
+ + ", Midi" + midiConfig[i].type + ", usage:" + midiConfig[i].spec
94
+ + ", Bus: " + midiOutput.getPortName(j) + ", " + midiConfig[i].comment);
94
95
  return j;
95
96
  }
96
97
  }
@@ -118,7 +119,8 @@ function startOSCandMIDI() {
118
119
  }
119
120
 
120
121
  midiOutput.openPort(midiPortClipToDAW);
121
- if (debug1) console.log("INFO: OSCandMidi.js: initMidiOUT: midiPortClipToDAW ", midiPortClipToDAW, midiOutput.getPortName(midiPortClipToDAW));
122
+ if (debug) console.log("INFO: OSCandMidi.js: initMidiOUT: port:", midiPortClipToDAW,
123
+ ", midiPortClipToDAW :", midiOutput.getPortName(midiPortClipToDAW));
122
124
  }
123
125
  _initMidiOUT = initMidiOUT;
124
126
 
@@ -137,7 +139,7 @@ function startOSCandMIDI() {
137
139
  export function sendProcessing(message, value) {
138
140
  var buf;
139
141
 
140
- if (debug) console.log("OSCandMidi: sends osc to processing :" + message + " " + value + " to " + outportProcessing);
142
+ if (debug1) console.log("OSCandMidi: sends osc to processing :" + message + " " + value + " to " + outportProcessing);
141
143
  buf = osc.toBuffer({ address: message, args: [value] });
142
144
  return udp.send(buf, 0, buf.length, outportProcessing, remoteIPAddressImage);
143
145
  };
@@ -246,6 +246,7 @@ export function initBroadCastServer(serveur) {
246
246
  * @returns {number} - number of groups
247
247
  */
248
248
  export function getNbeDeGroupesSons() {
249
+ if(nbeDeGroupesSons < 0) return 0; // Protection
249
250
  return nbeDeGroupesSons;
250
251
  }
251
252
 
@@ -559,10 +560,10 @@ export function playAndShiftEventDAW(timerDivision) {
559
560
  if (debug) console.log("---2 controleDAW.mjs:sendNoteOn:", commandeDAW[CD_NOM_ID], " de durée: ", commandeDAW[CD_DUREE_ID], "avec timerDivisionLocal:", timerDivisionLocal);
560
561
 
561
562
  // Via OSC on perd les accents, donc on passe pas une WebSocket
562
- if (debug) console.log("playAndShiftEventDAW: ", compteurTest, ": ", commandeDAW[CD_NOM_ID], ":", commandeDAW[CD_PSEUDO_ID]);
563
+ if (debug) console.log("controlDAW: playAndShiftEventDAW: ", compteurTest, ": ", commandeDAW[CD_NOM_ID], ":", commandeDAW[CD_PSEUDO_ID]);
563
564
 
564
565
  // Pour affichage avec un programme Processing
565
- // oscMidi.sendProcessingDisplayNames( "demandeDeSonParPseudo", commandeDAW[7] );
566
+ //oscMidi.sendOSCProcessing( "demandeDeSonParPseudo", commandeDAW[TEXT_ID], commandeDAW[7] );
566
567
 
567
568
  // La ligne automatePossibleMachine.react(commandeDAW[8]) est activé selon reactOnPlay
568
569
  // Si reactOnPlay existe à true on envoie le signal, qui correspond au lancement d'un pattern, au moment de le jouer
@@ -2,19 +2,22 @@
2
2
 
3
3
  // Default parameter file
4
4
 
5
- // Indexation des bus Midi dans OSCmidi de processing, pas utile avec Bitwig
5
+ // Indexation des bus Midi pour OSCmidi
6
6
  // Il s'agit de l'index correspondant à l'élément du tableau midiConfig.json
7
7
  // qui crée le bus midi pour ces commandes.
8
- var midiConfig = require("../serveur/midiConfig.json");
9
- var countBusOUT = 0;
10
- for (var i = 0; i < midiConfig.length; i++) {
11
- if (midiConfig[i].type === "OUT") {
12
- if (midiConfig[i].spec === "clipToDAW") {
13
- exports.busMidiDAW = countBusOUT;
14
- }
15
- countBusOUT++;
16
- }
17
- }
8
+ // var midiConfig = require("../serveur/midiConfig.json");
9
+ // var countBusOUT = 0;
10
+ // for (var i = 0; i < midiConfig.length; i++) {
11
+ // if (midiConfig[i].type === "OUT") {
12
+ // if (midiConfig[i].spec === "clipToDAW") {
13
+ // exports.busMidiDAW = countBusOUT;
14
+ // }
15
+ // countBusOUT++;
16
+ // }
17
+ // }
18
+
19
+ // A utiliser si Processing en passerelle
20
+ exports.busMidiDAW = 1;
18
21
 
19
22
  // Piece Bitwig en OSC si la paramètre est false
20
23
  // Sinon Skini parle MIDI
@@ -31,7 +34,7 @@ exports.english = true;
31
34
  sont dans le simulateur qui sont utilisées
32
35
  ************************************/
33
36
  exports.tempoMax = 500; // En ms
34
- exports.tempoMin = 500; // En ms
37
+ exports.tempoMin = 400; // En ms
35
38
  exports.limiteDureeAttente = 33; // En pulsations
36
39
 
37
40
  /********************************************************
@@ -112,8 +115,12 @@ const terre = '#A76611';
112
115
  const grisvert = '#039879';
113
116
  const grisbleu = '#315A93';
114
117
 
118
+ // Pour group: nom du groupe (0), index du groupe (1), type (2), x(3), y(4),
119
+ // nbe d'éléments(5), color(6), prédécesseurs(7), n° de scène graphique
115
120
  var groupesDesSons = [
116
- // Pour group: nom du groupe (0), index du groupe (1), type (2), x(3), y(4), nbe d'éléments(5), color(6), prédécesseurs(7), n° de scène graphique
121
+ [ "toto",1, "group",100,100,3,"",[],1 ],
122
+ [ "titi",2, "group",200,200,3,"",[],1 ],
123
+ [ "tutu",2, "group",300,300,3,"",[],1 ],
117
124
  ];
118
125
  exports.groupesDesSons = groupesDesSons;
119
126
 
@@ -91,7 +91,7 @@ function initGroupeClientsSons() {
91
91
  // Tableau des clients actifs par groupe,
92
92
  // Devient un tableau de tableau. Le premier tableau a des index correspondant au groupe.
93
93
  // Les tableaux en deuxième position contiennent les id des clients générés à la connexion.
94
- if (debug1) console.log("groupeClientsSins.js: initGroupeClientsSons: par.nbeDeGroupesClients", par.nbeDeGroupesClients);
94
+ if (debug1) console.log("INFO: groupeClientsSons.mjs: initGroupeClientsSons: par.nbeDeGroupesClients", par.nbeDeGroupesClients);
95
95
  groupesClient = new Array(par.nbeDeGroupesClients);
96
96
  for (var i = 0; i < groupesClient.length; i++) {
97
97
  groupesClient[i] = new Array();
@@ -830,6 +830,13 @@ export function setMatriceDesPossibles() {
830
830
  * Clean the matrix.
831
831
  */
832
832
  export function resetMatriceDesPossibles() {
833
+ if(debug) console.log("WARN: groupeClientSons: resetMatriceDesPossibles:", matriceDesPossibles);
834
+
835
+ if(matriceDesPossibles[0] === undefined ) {
836
+ console.log("WARN: groupeClientSons: resetMatriceDesPossibles: matriceDesPossibles vide");
837
+ return;
838
+ }
839
+
833
840
  for (var i = 0; i < matriceDesPossibles.length; i++) {
834
841
  for (var j = 0; j < matriceDesPossibles[i].length; j++) {
835
842
  matriceDesPossibles[i][j] = false;
@@ -879,16 +886,14 @@ export async function makeOneAutomatePossibleMachine() {
879
886
  try {
880
887
  const orchestration = await import(myReactOrchestration + '?foo=bar' + tempIndex);
881
888
  tempIndex++;
882
-
883
- orchestration.setServ(serv, DAW, this, oscMidiLocal, midimix);
884
-
889
+ orchestration.setServ(serv, DAW, this, oscMidiLocal, midimix);
885
890
  machine = orchestration.setSignals(par);
891
+
886
892
  makeSignalsListeners(machine);
887
893
 
888
894
  if (debug) console.log("------------- groupecliensSons: makeOneAutomatePossibleMachine:machine: ", machine);
889
895
 
890
896
  return machine;
891
-
892
897
  } catch (err) {
893
898
  console.log("ERR: groupeClientsSons: makeOneAutomatePossibleMachine:", err.toString());
894
899
  throw err; // Propage l'erreur pour que compileHH() la capture
@@ -19,6 +19,6 @@
19
19
  "outportProcessing": 10000,
20
20
  "outportLumiere": 7700,
21
21
  "inportLumiere": 9000,
22
- "sessionPath": "./pieces/",
23
- "piecePath" : "./pieces/"
22
+ "sessionPath": "./pieces/opus/",
23
+ "piecePath" : "./pieces/opus/"
24
24
  }
@@ -102,7 +102,7 @@ export function midimix(machineServeur) {
102
102
  }
103
103
 
104
104
  if (synchroLink && !socketOpen) {
105
- console.log("INFO: Synchro Ableton Link");
105
+ console.log("INFO: midimix.mjs :Synchro Ableton Link");
106
106
  const abletonlink = require('abletonlink');
107
107
  link = new abletonlink();
108
108
  let localBeat = 0;
@@ -116,7 +116,7 @@ export function midimix(machineServeur) {
116
116
  // On envoie un tick à chaque changement de beat.
117
117
  // Ce serait peut-être mieux d'utiliser la phase ?
118
118
  if (localBeat !== instantBeat) {
119
- if (debug) console.log("midimix.js: Synchro Link ", Math.round(beat), Math.round(phase), Math.round(bpm));
119
+ if (debug) console.log("midimix.mjs: Synchro Link ", Math.round(beat), Math.round(phase), Math.round(bpm));
120
120
 
121
121
  // On a besoin de la phase pour synchroniser les départs.
122
122
  // On commence à envoyer des Tick après avoir reçu la phase 1.
@@ -124,7 +124,7 @@ export function midimix(machineServeur) {
124
124
  if(!linkReadyTostart){
125
125
  if(instantPhase === 100){
126
126
  linkReadyTostart = true;
127
- if(debug1) console.log("INFO: midimix: link ready");
127
+ if(debug1) console.log("INFO: midimix.mjs: link ready");
128
128
  }
129
129
  return;
130
130
  }
@@ -144,7 +144,7 @@ export function midimix(machineServeur) {
144
144
  function setTempoLink(tempo) {
145
145
  if (link !== undefined) {
146
146
  link.bpm = tempo;
147
- if(debug) console.log("INFO: midimix.js: setTempolink:", tempo);
147
+ if(debug) console.log("INFO: midimix.mjs: setTempolink:", tempo);
148
148
  }
149
149
  }
150
150
  _setTempoLink = setTempoLink;
@@ -233,7 +233,7 @@ export function midimix(machineServeur) {
233
233
  for (var i = 0; i < controlers.length; i++) {
234
234
  controlerIndex = getControlerIndex(controlers[i].name);
235
235
  if (controlerIndex === -1) {
236
- console.log("WARN: controler :", controlers[i].name, " does not exist");
236
+ console.log("WARN: midimix.mjs : controler :", controlers[i].name, " does not exist");
237
237
  continue;
238
238
  }
239
239
  controlers[i].input.openPort(controlerIndex);
@@ -242,7 +242,7 @@ export function midimix(machineServeur) {
242
242
  controlers[i].input.getPortName(controlerIndex));
243
243
 
244
244
  controlers[i].input.on('message', function (deltaTime, message) {
245
- if (debug1) console.log('midimix.js: Input received : ' + message + ' d:' + deltaTime);
245
+ if (debug1) console.log('midimix.mjs: Input received : ' + message + ' d:' + deltaTime);
246
246
 
247
247
  // Ici les actions sur commande MIDI
248
248
  // On ne distingue pas les controleurs.
@@ -329,7 +329,7 @@ export function midimix(machineServeur) {
329
329
  midiInput.on('message', function (deltaTime, message) {
330
330
  // On ne traite que les noteON, de 1001 0000 (144) à 1001 1111 (159)
331
331
  if (message[0] >= 144 && message[0] <= 159) {
332
- if (debug) console.log('midimix.js: initMidiIN: Input recieved :' + message + ' d:' + deltaTime);
332
+ if (debug) console.log('midimix.mjs: initMidiIN: Input recieved :' + message + ' d:' + deltaTime);
333
333
  note = message[1];
334
334
  canal = message[0] - 144;
335
335
  //timeStamp = deltaTime;
@@ -343,18 +343,18 @@ export function midimix(machineServeur) {
343
343
  // Le timestamp est proche de la micro-seconde.
344
344
  if (isInPreviousNotes(noteSkini) && Math.round(deltaTime) === 0) {
345
345
  //if (isInPreviousNotes(noteSkini) && previousTimeStamp === Math.round(timeStamp)){ // à peu près une seconde
346
- if (debug) console.log("midimix.js: REPETITION : ", noteSkini, timeStamp, previousTimeStamp);
346
+ if (debug) console.log("midimix.mjs: REPETITION : ", noteSkini, timeStamp, previousTimeStamp);
347
347
  } else {
348
348
  //previousTimeStamp = Math.round(timeStamp);
349
349
 
350
- if (debug) console.log("midimix.js: noteSkini: ", noteSkini, note, canal);
351
- if (debug) console.log("midimix.js: isInPreviousNotes:", isInPreviousNotes(noteSkini));
350
+ if (debug) console.log("midimix.mjs: noteSkini: ", noteSkini, note, canal);
351
+ if (debug) console.log("midimix.mjs: isInPreviousNotes:", isInPreviousNotes(noteSkini));
352
352
 
353
353
  // Avec PUSH branché, Ableton Live envoie des notes négatives...
354
354
  // dont je ne connais pas la signification
355
355
  if (noteSkini > 0) {
356
356
  insertInPreviousNotes(noteSkini);
357
- if (debug) console.log("midimix.js: Note de pattern reçue d'Ableton:", noteSkini);
357
+ if (debug) console.log("midimix.mjs: Note de pattern reçue d'Ableton:", noteSkini);
358
358
  websocketServer.sendSignalFromDAW(noteSkini);
359
359
  }
360
360
  }
@@ -367,7 +367,7 @@ export function midimix(machineServeur) {
367
367
  tempoTickDuration++;
368
368
  if (message[0] === 248) {
369
369
  if (tempoTickDuration > 23) {
370
- if (debug) console.log("midimix.js: midiSync.on:", Date.now() - v0, "ms");
370
+ if (debug) console.log("midimix.mjs: midiSync.on:", Date.now() - v0, "ms");
371
371
  //console.log('Sync recieved :' + message + ' d:' + deltaTime);
372
372
  if (debug) console.log("midimix 1 : Tick", message[0]);
373
373
  // Test pour éviter une "double synchro en OSC est en MIDI"
@@ -436,7 +436,7 @@ export function midimix(machineServeur) {
436
436
  //msgloc.value1 = message.args[0].value; // C'est compliqué le parsing OSC
437
437
  //ws.send(JSON.stringify(msgloc)); // Pas utile pour le moment
438
438
  if (debug) {
439
- console.log("midimix.js: socket reçoit OSC: [", message.address + " : " + message.args[0].value, "]");
439
+ console.log("midimix.mjs: socket reçoit OSC: [", message.address + " : " + message.args[0].value, "]");
440
440
  }
441
441
  switch (message.address) {
442
442
 
@@ -30,17 +30,8 @@ export function saveParameters(paramFile, params) {
30
30
  // Generated by Skini: `+ today.toString() + `
31
31
  "use strict"
32
32
 
33
- var midiConfig = require("../serveur/midiConfig.json");
34
-
35
- var countBusOUT = 0;
36
- for (var i = 0; i < midiConfig.length; i++) {
37
- if (midiConfig[i].type === "OUT") {
38
- if (midiConfig[i].spec === "clipToDAW") {
39
- exports.busMidiDAW = countBusOUT;
40
- }
41
- countBusOUT++;
42
- }
43
- }
33
+ // A utiliser si Processing en passerelle
34
+ exports.busMidiDAW = 1;
44
35
 
45
36
  // Piece en OSC si la paramètre est false
46
37
  // Sinon Skini parle MIDI
@@ -148,12 +139,10 @@ exports.groupesDesSons = groupesDesSons;
148
139
  // On écrit en synchrone pour ne pas avoir de pb avec la compilation qui suit
149
140
  // dans websocketServer. On n'aurait pu mettre la compilation dans un callback
150
141
  // sans synchro. Ce serait plus joli, mais pas utile dans ce cas.
151
-
152
- // Donne un message d'erreur alors que ça fonctionne !!!
153
142
  try {
154
143
  fs.writeFileSync(paramFile, paramText);
155
- if(debug1) console.log("INFO: saveParam.js: saveParameters: file wrtitten :", paramFile);
144
+ if(debug) console.log("INFO: saveParam.js: saveParameters: file wrtitten :", paramFile, paramText);
156
145
  } catch (err) {
157
- //console.log("ERR: saveParam.js: saveParameters: Pb ecriture", paramFile, err);
146
+ console.log("ERR: saveParam.js: saveParameters: Pb ecriture", paramFile, err);
158
147
  }
159
148
  }
@@ -1,20 +1,11 @@
1
1
 
2
- // Generated by Skini: Mon Nov 24 2025 09:37:46 GMT+0100 (heure normale d’Europe centrale)
2
+ // Generated by Skini: Wed Jan 07 2026 10:47:37 GMT+0100 (heure normale d’Europe centrale)
3
3
  "use strict"
4
4
 
5
- var midiConfig = require("../serveur/midiConfig.json");
5
+ // A utiliser si Processing en passerelle
6
+ exports.busMidiDAW = 1;
6
7
 
7
- var countBusOUT = 0;
8
- for (var i = 0; i < midiConfig.length; i++) {
9
- if (midiConfig[i].type === "OUT") {
10
- if (midiConfig[i].spec === "clipToDAW") {
11
- exports.busMidiDAW = countBusOUT;
12
- }
13
- countBusOUT++;
14
- }
15
- }
16
-
17
- // Piece Bitwig en OSC si la paramètre est false
8
+ // Piece en OSC si la paramètre est false
18
9
  // Sinon Skini parle MIDI
19
10
  exports.directMidiON = true;
20
11
 
@@ -28,9 +19,9 @@ exports.english = true;
28
19
  Si ces valeurs ne sont pas données c'est celle qui
29
20
  sont dans le simulateur qui sont utilisées
30
21
  ************************************/
31
- exports.tempoMax = 500; // En ms
32
- exports.tempoMin = 500; // En ms
33
- exports.limiteDureeAttente = 33; // En pulsations
22
+ exports.tempoMax = 2000; // En ms
23
+ exports.tempoMin = 2200; // En ms
24
+ exports.limiteDureeAttente = 2000; // En pulsations
34
25
 
35
26
  /********************************************************
36
27
  AUTOMATE
@@ -45,7 +36,7 @@ exports.pulsationON = false;
45
36
  CHEMIN DES FICHIERS SONS MP3 pour les clients
46
37
  Nom du sous répartoire ./sounds/xxxx
47
38
  *************************************/
48
- exports.soundFilesPath1 = "";
39
+ exports.soundFilesPath1 = "opus4";
49
40
 
50
41
  /***************************************
51
42
  CHEMIN DES PARTITIONS DES PATTERNS ET CONFIG AVEC MUSICIENS
@@ -63,7 +54,7 @@ Si autre ... à créer...
63
54
  ATTENTION: NE JAMAIS UTILISER EN SITUATION D'INTERACTION SI L'ALGORITHME
64
55
  PEUT SUPPRIMER DES PATTERNS DES FIFOs
65
56
  *****************************************/
66
- exports.algoGestionFifo = 0;
57
+ exports.algoGestionFifo = 2;
67
58
  exports.shufflePatterns = false;
68
59
  /*****************************************************************************
69
60
 
@@ -92,15 +83,106 @@ exports.synchroSkini = false;
92
83
  exports.timer = 500;
93
84
  exports.gameOSCSignals = false;
94
85
 
95
- exports.sensorOSC = false;
96
- exports.tempoSensorsInit = [0,0,0,0,0,0,0,0,,,,];
97
- exports.sensorsSensibilities = [0,0,0,0,0,0,0,0,,,,];
86
+ exports.sensorOSC = true;
87
+ exports.tempoSensorsInit = [100,100,100,100,100,100,20,20,20,20,20,20];
88
+ exports.sensorsSensibilities = [200,200,200,200,200,200,200,200,200,200,200,199];
98
89
 
99
90
  const groupesDesSons = [
100
- [ "toto",1, "group",100,100,3,"",[],1 ],
101
- [ "titi",2, "group",200,200,3,"",[],1 ],
102
- [ "tutu",2, "group",300,300,3,"",[],1 ],
103
- [ "",, "",,,,"",[], ],
104
- [ "",, "",,,,"",[], ],
91
+ [ "saxo",1, "group",401,200,21,"#4CAF50",[],10 ],
92
+ [ "nappeViolons",2, "group",100,500,20,"#4CAF50",[],1 ],
93
+ [ "nappe2Violons",3, "group",100,600,20,"#797bbf",[],1 ],
94
+ [ "Piano1Intro1",10, "tank",100,51,1,"#5F6262",[],1 ],
95
+ [ "Piano1Intro2",11, "tank",,,1,"#5F6262",[], ],
96
+ [ "Piano1Intro3",12, "tank",,,1,"#5F6262",[], ],
97
+ [ "Piano1Intro4",13, "tank",,,1,"#5F6262",[], ],
98
+ [ "Piano1Intro5",14, "tank",,,1,"#5F6262",[], ],
99
+ [ "Piano1Intro6",15, "tank",,,1,"#5F6262",[], ],
100
+ [ "Piano1Intro7",16, "tank",,,1,"#5F6262",[], ],
101
+ [ "Piano1Milieu1",17, "tank",,,1,"#5F6262",[], ],
102
+ [ "Piano1Milieu2",18, "tank",,,1,"#5F6262",[], ],
103
+ [ "Piano1Milieu3",19, "tank",,,1,"#5F6262",[], ],
104
+ [ "Piano1Milieu4",20, "tank",,,1,"#5F6262",[], ],
105
+ [ "Piano1Milieu5",21, "tank",,,1,"#5F6262",[], ],
106
+ [ "Piano1Milieu6",22, "tank",,,1,"#5F6262",[], ],
107
+ [ "Piano1Milieu7",23, "tank",,,1,"#5F6262",[], ],
108
+ [ "Piano1Fin1",24, "tank",,,1,"#5F6262",[], ],
109
+ [ "Piano1Fin2",25, "tank",,,1,"#5F6262",[], ],
110
+ [ "Piano1Fin3",26, "tank",,,1,"#5F6262",[], ],
111
+ [ "Piano1Fin4",27, "tank",,,1,"#5F6262",[], ],
112
+ [ "Piano1Fin5",28, "tank",,,1,"#5F6262",[], ],
113
+ [ "Piano1Fin6",29, "tank",,,1,"#5F6262",[], ],
114
+ [ "Piano1Fin7",30, "tank",,,1,"#5F6262",[], ],
115
+ [ "SaxIntro1",31, "tank",400,51,2,"#5F6262",[],1 ],
116
+ [ "SaxIntro2",32, "tank",,,2,"#5F6262",[], ],
117
+ [ "SaxIntro3",33, "tank",,,2,"#5F6262",[], ],
118
+ [ "SaxIntro4",34, "tank",,,2,"#5F6262",[], ],
119
+ [ "SaxIntro5",35, "tank",,,2,"#5F6262",[], ],
120
+ [ "SaxIntro6",36, "tank",,,2,"#5F6262",[], ],
121
+ [ "SaxIntro7",37, "tank",,,2,"#5F6262",[], ],
122
+ [ "SaxMilieu1",38, "tank",,,2,"#5F6262",[], ],
123
+ [ "SaxMilieu2",39, "tank",,,2,"#5F6262",[], ],
124
+ [ "SaxMilieu3",40, "tank",,,2,"#5F6262",[], ],
125
+ [ "SaxMilieu4",41, "tank",,,2,"#5F6262",[], ],
126
+ [ "SaxMilieu5",42, "tank",,,2,"#5F6262",[], ],
127
+ [ "SaxMilieu6",43, "tank",,,2,"#5F6262",[], ],
128
+ [ "SaxMilieu7",44, "tank",,,2,"#5F6262",[], ],
129
+ [ "SaxFin1",45, "tank",,,2,"#5F6262",[], ],
130
+ [ "SaxFin2",46, "tank",,,2,"#5F6262",[], ],
131
+ [ "SaxFin3",47, "tank",,,2,"#5F6262",[], ],
132
+ [ "SaxFin4",48, "tank",,,2,"#5F6262",[], ],
133
+ [ "SaxFin5",49, "tank",,,2,"#5F6262",[], ],
134
+ [ "SaxFin6",50, "tank",,,2,"#5F6262",[], ],
135
+ [ "SaxFin7",51, "tank",,,2,"#5F6262",[], ],
136
+ [ "BrassIntro1",52, "tank",700,51,3,"#039879",[],1 ],
137
+ [ "BrassIntro2",53, "tank",,,3,"#039879",[], ],
138
+ [ "BrassIntro3",54, "tank",,,3,"#039879",[], ],
139
+ [ "BrassIntro4",55, "tank",,,3,"#039879",[], ],
140
+ [ "BrassIntro5",56, "tank",,,3,"#039879",[], ],
141
+ [ "BrassIntro6",57, "tank",,,3,"#039879",[], ],
142
+ [ "BrassIntro7",58, "tank",,,3,"#039879",[], ],
143
+ [ "BrassMilieu1",59, "tank",,,3,"#039879",[], ],
144
+ [ "BrassMilieu2",60, "tank",,,3,"#039879",[], ],
145
+ [ "BrassMilieu3",61, "tank",,,3,"#039879",[], ],
146
+ [ "BrassMilieu4",62, "tank",,,3,"#039879",[], ],
147
+ [ "BrassMilieu5",63, "tank",,,3,"#039879",[], ],
148
+ [ "BrassMilieu6",64, "tank",,,3,"#039879",[], ],
149
+ [ "BrassMilieu7",65, "tank",,,3,"#039879",[], ],
150
+ [ "BrassFin1",66, "tank",,,3,"#039879",[], ],
151
+ [ "BrassFin2",67, "tank",,,3,"#039879",[], ],
152
+ [ "BrassFin3",68, "tank",,,3,"#039879",[], ],
153
+ [ "BrassFin4",69, "tank",,,3,"#039879",[], ],
154
+ [ "BrassFin5",70, "tank",,,3,"#039879",[], ],
155
+ [ "BrassFin6",71, "tank",,,3,"#039879",[], ],
156
+ [ "BrassFin7",72, "tank",,,3,"#039879",[], ],
157
+ [ "Percu1",73, "tank",800,600,4,"#039879",[],1 ],
158
+ [ "Percu2",74, "tank",,,4,"#039879",[], ],
159
+ [ "Percu3",75, "tank",,,4,"#039879",[], ],
160
+ [ "Percu4",76, "tank",,,4,"#039879",[], ],
161
+ [ "Percu5",77, "tank",,,4,"#039879",[], ],
162
+ [ "Percu6",78, "tank",,,4,"#039879",[], ],
163
+ [ "Percu7",79, "tank",,,4,"#039879",[], ],
164
+ [ "FluteIntro1",80, "tank",400,400,5,"#039879",[],1 ],
165
+ [ "FluteIntro2",81, "tank",,,5,"#039879",[], ],
166
+ [ "FluteIntro3",82, "tank",,,5,"#039879",[], ],
167
+ [ "FluteIntro4",83, "tank",,,5,"#039879",[], ],
168
+ [ "FluteIntro5",84, "tank",,,5,"#039879",[], ],
169
+ [ "FluteIntro6",85, "tank",,,5,"#039879",[], ],
170
+ [ "FluteIntro7",86, "tank",,,5,"#039879",[], ],
171
+ [ "FluteMilieu1",87, "tank",,,5,"#039879",[], ],
172
+ [ "FluteMilieu2",88, "tank",,,5,"#039879",[], ],
173
+ [ "FluteMilieu3",89, "tank",,,5,"#039879",[], ],
174
+ [ "FluteMilieu4",90, "tank",,,5,"#039879",[], ],
175
+ [ "FluteMilieu5",91, "tank",,,5,"#039879",[], ],
176
+ [ "FluteMilieu6",92, "tank",,,5,"#039879",[], ],
177
+ [ "FluteMilieu7",93, "tank",,,5,"#039879",[], ],
178
+ [ "FluteFin1",94, "tank",,,5,"#039879",[], ],
179
+ [ "FluteFin2",95, "tank",,,5,"#039879",[], ],
180
+ [ "FluteFin3",96, "tank",,,5,"#039879",[], ],
181
+ [ "FluteFin4",97, "tank",,,5,"#039879",[], ],
182
+ [ "FluteFin5",98, "tank",,,5,"#039879",[], ],
183
+ [ "FluteFin6",99, "tank",,,5,"#039879",[], ],
184
+ [ "FluteFin7",100, "tank",,,5,"#039879",[], ],
185
+ [ "Flesh",110, "group",100,350,7,"#008CBA",[],1 ],
186
+ [ "Massive",111, "group",100,400,7,"#008CBA",[],1 ],
105
187
  ];
106
188
  exports.groupesDesSons = groupesDesSons;
@@ -1,64 +1,64 @@
1
- /**
2
- * @fileOverview Utilitaires en hiphop.js pour Skini
3
- *
4
- * node ../node_modules/@hop/hiphop/bin/hhc.mjs utilsHHSkini.hh.js -o utilsHHSkini.mjs
5
- *
6
- * @copyright (C) 2019-2025 Bertrand Petit-Hédelin
7
- * @author Bertrand Petit-Hédelin <bertrand@hedelin.fr>
8
- * @version 1.0
9
- */
10
- import { ReactiveMachine } from "@hop/hiphop";
11
-
12
- // Création réservoir ***********************************************************
13
- function makeAwait(instruments, groupeClient) {
14
- return hiphop fork ${
15
- instruments.map(val => hiphop {
16
- await(this[`${val}IN`].now);
17
- emit ${`${val}OUT`}([false, groupeClient]);
18
- //host{ console.log("---------------------------- makeAwait", instruments, groupeClient)}
19
- })}
20
- }
21
-
22
- function makeReservoir(groupeClient, instrument) {
23
- return hiphop ${hiphop {
24
- laTrappe: {
25
- abort immediate(stopReservoir.now) { // To kill the tank
26
- host {
27
- console.log("--- MAKE RESERVOIR:", instrument[0], ", groupeClient: ", groupeClient);
28
- var msg = {
29
- type: 'startTank',
30
- value: instrument[0]
31
- }
32
- serveur.broadcast(JSON.stringify(msg)); // Pour les gestions des tanks dans l'affichage de la partition "score"
33
- }
34
- ${
35
- instrument.map(val => hiphop {
36
- emit ${`${val}OUT`} ([true, groupeClient])
37
- })
38
- }
39
- host { gcs.informSelecteurOnMenuChange(groupeClient, instrument[0], true); }
40
- ${ makeAwait(instrument, groupeClient) }
41
- host { console.log("--- FIN NATURELLE RESERVOIR:", instrument[0]); }
42
- break laTrappe;
43
- }
44
-
45
- host { console.log("--- FIN FORCEE DU RESERVOIR:", instrument[0]); }
46
- ${
47
- instrument.map(val => hiphop {
48
- emit ${`${val}OUT`} ([false, groupeClient])})
49
- }
50
-
51
- host { gcs.informSelecteurOnMenuChange(groupeClient, instrument[0], false); }
52
- host {
53
- console.log("--- ABORT RESERVOIR:", instrument[0]);
54
- var msg = {
55
- type: 'killTank',
56
- value: instrument[0]
57
- }
58
- serveur.broadcast(JSON.stringify(msg)); // Pour les gestions des tanks dans l'affichage de la partition "score"
59
- }
60
- }
61
- }
62
- }
63
- }
64
-
1
+ /**
2
+ * @fileOverview Utilitaires en hiphop.js pour Skini
3
+ *
4
+ * node ../node_modules/@hop/hiphop/bin/hhc.mjs utilsHHSkini.hh.js -o utilsHHSkini.mjs
5
+ *
6
+ * @copyright (C) 2019-2025 Bertrand Petit-Hédelin
7
+ * @author Bertrand Petit-Hédelin <bertrand@hedelin.fr>
8
+ * @version 1.0
9
+ */
10
+ import { ReactiveMachine } from "@hop/hiphop";
11
+
12
+ // Création réservoir ***********************************************************
13
+ function makeAwait(instruments, groupeClient) {
14
+ return hiphop fork ${
15
+ instruments.map(val => hiphop {
16
+ await(this[`${val}IN`].now);
17
+ emit ${`${val}OUT`}([false, groupeClient]);
18
+ //host{ console.log("---------------------------- makeAwait", instruments, groupeClient)}
19
+ })}
20
+ }
21
+
22
+ function makeReservoir(groupeClient, instrument) {
23
+ return hiphop ${hiphop {
24
+ laTrappe: {
25
+ abort immediate(stopReservoir.now) { // To kill the tank
26
+ host {
27
+ console.log("--- MAKE RESERVOIR:", instrument[0], ", groupeClient: ", groupeClient);
28
+ var msg = {
29
+ type: 'startTank',
30
+ value: instrument[0]
31
+ }
32
+ serveur.broadcast(JSON.stringify(msg)); // Pour les gestions des tanks dans l'affichage de la partition "score"
33
+ }
34
+ ${
35
+ instrument.map(val => hiphop {
36
+ emit ${`${val}OUT`} ([true, groupeClient])
37
+ })
38
+ }
39
+ host { gcs.informSelecteurOnMenuChange(groupeClient, instrument[0], true); }
40
+ ${ makeAwait(instrument, groupeClient) }
41
+ host { console.log("--- FIN NATURELLE RESERVOIR:", instrument[0]); }
42
+ break laTrappe;
43
+ }
44
+
45
+ host { console.log("--- FIN FORCEE DU RESERVOIR:", instrument[0]); }
46
+ ${
47
+ instrument.map(val => hiphop {
48
+ emit ${`${val}OUT`} ([false, groupeClient])})
49
+ }
50
+
51
+ host { gcs.informSelecteurOnMenuChange(groupeClient, instrument[0], false); }
52
+ host {
53
+ console.log("--- ABORT RESERVOIR:", instrument[0]);
54
+ var msg = {
55
+ type: 'killTank',
56
+ value: instrument[0]
57
+ }
58
+ serveur.broadcast(JSON.stringify(msg)); // Pour les gestions des tanks dans l'affichage de la partition "score"
59
+ }
60
+ }
61
+ }
62
+ }
63
+ }
64
+