nodeskini 1.0.0

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 (215) hide show
  1. package/README.md +31 -0
  2. package/client/archive/bundle.js +11528 -0
  3. package/client/archive/golem.html +60 -0
  4. package/client/archive/golemClient.js +595 -0
  5. package/client/archive/golembundle.js +11634 -0
  6. package/client/archive/sequencer.html +43 -0
  7. package/client/archive/sequenceurClient.js +815 -0
  8. package/client/archive/stylegolem.css +158 -0
  9. package/client/archive/stylesequenceur.css +204 -0
  10. package/client/clientListe/Sortable-master/.circleci/config.yml +33 -0
  11. package/client/clientListe/Sortable-master/.editorconfig +15 -0
  12. package/client/clientListe/Sortable-master/.github/ISSUE_TEMPLATE/bug-report.md +73 -0
  13. package/client/clientListe/Sortable-master/.github/ISSUE_TEMPLATE/custom-template.md +48 -0
  14. package/client/clientListe/Sortable-master/.github/ISSUE_TEMPLATE/feature-request.md +41 -0
  15. package/client/clientListe/Sortable-master/.jshintrc +25 -0
  16. package/client/clientListe/Sortable-master/.testcaferc.json +7 -0
  17. package/client/clientListe/Sortable-master/CONTRIBUTING.md +26 -0
  18. package/client/clientListe/Sortable-master/LICENSE +21 -0
  19. package/client/clientListe/Sortable-master/README.md +813 -0
  20. package/client/clientListe/Sortable-master/Sortable.js +3709 -0
  21. package/client/clientListe/Sortable-master/Sortable.min.js +2 -0
  22. package/client/clientListe/Sortable-master/Sortable.min.old.js +2 -0
  23. package/client/clientListe/Sortable-master/Sortable.min.old.old.js +2 -0
  24. package/client/clientListe/Sortable-master/babel.config.js +27 -0
  25. package/client/clientListe/Sortable-master/bower.json +30 -0
  26. package/client/clientListe/Sortable-master/entry/entry-complete.js +8 -0
  27. package/client/clientListe/Sortable-master/entry/entry-core.js +19 -0
  28. package/client/clientListe/Sortable-master/entry/entry-defaults.js +19 -0
  29. package/client/clientListe/Sortable-master/index.html +460 -0
  30. package/client/clientListe/Sortable-master/modular/sortable.complete.esm.js +3701 -0
  31. package/client/clientListe/Sortable-master/modular/sortable.core.esm.js +3698 -0
  32. package/client/clientListe/Sortable-master/modular/sortable.esm.js +3699 -0
  33. package/client/clientListe/Sortable-master/package-lock.json +5704 -0
  34. package/client/clientListe/Sortable-master/package.json +56 -0
  35. package/client/clientListe/Sortable-master/plugins/AutoScroll/AutoScroll.js +270 -0
  36. package/client/clientListe/Sortable-master/plugins/AutoScroll/README.md +80 -0
  37. package/client/clientListe/Sortable-master/plugins/AutoScroll/index.js +1 -0
  38. package/client/clientListe/Sortable-master/plugins/MultiDrag/MultiDrag.js +617 -0
  39. package/client/clientListe/Sortable-master/plugins/MultiDrag/README.md +96 -0
  40. package/client/clientListe/Sortable-master/plugins/MultiDrag/index.js +1 -0
  41. package/client/clientListe/Sortable-master/plugins/OnSpill/OnSpill.js +79 -0
  42. package/client/clientListe/Sortable-master/plugins/OnSpill/README.md +60 -0
  43. package/client/clientListe/Sortable-master/plugins/OnSpill/index.js +1 -0
  44. package/client/clientListe/Sortable-master/plugins/README.md +178 -0
  45. package/client/clientListe/Sortable-master/plugins/Swap/README.md +55 -0
  46. package/client/clientListe/Sortable-master/plugins/Swap/Swap.js +90 -0
  47. package/client/clientListe/Sortable-master/plugins/Swap/index.js +1 -0
  48. package/client/clientListe/Sortable-master/scripts/banner.js +8 -0
  49. package/client/clientListe/Sortable-master/scripts/build.js +17 -0
  50. package/client/clientListe/Sortable-master/scripts/esm-build.js +28 -0
  51. package/client/clientListe/Sortable-master/scripts/minify.js +11 -0
  52. package/client/clientListe/Sortable-master/scripts/test-compat.js +30 -0
  53. package/client/clientListe/Sortable-master/scripts/test.js +21 -0
  54. package/client/clientListe/Sortable-master/scripts/umd-build.js +15 -0
  55. package/client/clientListe/Sortable-master/src/Animation.js +175 -0
  56. package/client/clientListe/Sortable-master/src/BrowserInfo.js +12 -0
  57. package/client/clientListe/Sortable-master/src/EventDispatcher.js +57 -0
  58. package/client/clientListe/Sortable-master/src/PluginManager.js +87 -0
  59. package/client/clientListe/Sortable-master/src/Sortable.js +1971 -0
  60. package/client/clientListe/Sortable-master/src/utils.js +556 -0
  61. package/client/clientListe/Sortable-master/st/app.js +224 -0
  62. package/client/clientListe/Sortable-master/st/iframe/frame.html +32 -0
  63. package/client/clientListe/Sortable-master/st/iframe/index.html +49 -0
  64. package/client/clientListe/Sortable-master/st/logo.png +0 -0
  65. package/client/clientListe/Sortable-master/st/og-image.png +0 -0
  66. package/client/clientListe/Sortable-master/st/prettify/prettify.css +1 -0
  67. package/client/clientListe/Sortable-master/st/prettify/prettify.js +46 -0
  68. package/client/clientListe/Sortable-master/st/prettify/run_prettify.js +64 -0
  69. package/client/clientListe/Sortable-master/st/saucelabs.svg +1 -0
  70. package/client/clientListe/Sortable-master/st/theme.css +254 -0
  71. package/client/clientListe/Sortable-master/tests/Sortable.compat.test.js +39 -0
  72. package/client/clientListe/Sortable-master/tests/Sortable.test.js +386 -0
  73. package/client/clientListe/Sortable-master/tests/dual-list.html +34 -0
  74. package/client/clientListe/Sortable-master/tests/empty-list.html +30 -0
  75. package/client/clientListe/Sortable-master/tests/filter.html +27 -0
  76. package/client/clientListe/Sortable-master/tests/handles.html +27 -0
  77. package/client/clientListe/Sortable-master/tests/nested.html +67 -0
  78. package/client/clientListe/Sortable-master/tests/single-list.html +25 -0
  79. package/client/clientListe/Sortable-master/tests/style.css +18 -0
  80. package/client/clientListe/clientListe.html +148 -0
  81. package/client/clientListe/clientListe.js +1508 -0
  82. package/client/clientListe/clientListebundle.js +13164 -0
  83. package/client/clientListe/images/poubelle.png +0 -0
  84. package/client/clientListe/images/start.png +0 -0
  85. package/client/clientListe/images/stop.png +0 -0
  86. package/client/clientListe/images/submit.png +0 -0
  87. package/client/clientListe/sortable-theme-bootstrap.css +90 -0
  88. package/client/configurateur/configReact.js +273 -0
  89. package/client/configurateur/configReactbundle.js +295 -0
  90. package/client/configurateur/configurateur.css +95 -0
  91. package/client/configurateur/configurateur.html +48 -0
  92. package/client/configurateur/lib/jexcel.css +755 -0
  93. package/client/configurateur/lib/jexcel.js +14970 -0
  94. package/client/configurateur/lib/jsuites.css +2801 -0
  95. package/client/configurateur/lib/jsuites.js +11822 -0
  96. package/client/configurateur/lib/react-dom.production.min.js +239 -0
  97. package/client/configurateur/lib/react.production.min.js +32 -0
  98. package/client/configurateur/src/configReact.js +247 -0
  99. package/client/controleur/clientcontroleur.js +536 -0
  100. package/client/controleur/clientcontroleur.test.js +282 -0
  101. package/client/controleur/controleur.html +51 -0
  102. package/client/controleur/controleurbundle.js +565 -0
  103. package/client/controleur/stylecontroleur.css +236 -0
  104. package/client/controleurHH/controleurHH.html +71 -0
  105. package/client/controleurHH/controleurHH.js +252 -0
  106. package/client/controleurHH/styles/index.css +320 -0
  107. package/client/controleurHH/styles/material.css +11552 -0
  108. package/client/parametrage/paramReact.js +473 -0
  109. package/client/parametrage/paramReactbundle.js +500 -0
  110. package/client/parametrage/parametrage.css +111 -0
  111. package/client/parametrage/parametrage.html +163 -0
  112. package/client/parametrage/src/paramReact.js +459 -0
  113. package/client/score/hash.js +83 -0
  114. package/client/score/p5.min.js +3 -0
  115. package/client/score/parto1.js +1171 -0
  116. package/client/score/parto1bundle.js +1181 -0
  117. package/client/score/processing.min.js +431 -0
  118. package/client/score/score.html +15 -0
  119. package/client/score/score.js +34 -0
  120. package/client/simulateurListe/simulateurFork.js +750 -0
  121. package/client/simulateurListe/simulateurFork.mjs +681 -0
  122. package/client/simulateurListe/simulateurForkSansReorg.js +569 -0
  123. package/client/simulateurListe/simulateurListe.js +628 -0
  124. package/myReact/archive/Nodeemitvaluedlocal1.hh.js +52 -0
  125. package/myReact/archive/abort-parNode.js +79 -0
  126. package/myReact/archive/abroNode.js +169 -0
  127. package/myReact/archive/abroNode2.js +80 -0
  128. package/myReact/archive/atom.compile.hh.js +51 -0
  129. package/myReact/archive/await-countNode.js +67 -0
  130. package/myReact/archive/await-nowvalNode.js +44 -0
  131. package/myReact/archive/callHH.js +96 -0
  132. package/myReact/archive/emit-if2.hh.compiled.js +113 -0
  133. package/myReact/archive/every1Node.js +35 -0
  134. package/myReact/archive/if-runNode.js +74 -0
  135. package/myReact/archive/if1Node.js +43 -0
  136. package/myReact/archive/makeawait.js +0 -0
  137. package/myReact/archive/myReact.old.js +684 -0
  138. package/myReact/archive/orchestration.js +281 -0
  139. package/myReact/archive/orchestration1.js +132 -0
  140. package/myReact/archive/orchestration1.xml +465 -0
  141. package/myReact/archive/orchestration2.js +161 -0
  142. package/myReact/archive/orchestrationHH.mano.js +280 -0
  143. package/myReact/archive/orchestrationHHTest.js +428 -0
  144. package/myReact/archive/orchestrationHHTest.xml +234 -0
  145. package/myReact/archive/orchestrationHHTestRun.js +104 -0
  146. package/myReact/archive/orchestrationHHTestRun.xml +34 -0
  147. package/myReact/archive/orchestrationTest0.js +178 -0
  148. package/myReact/archive/orchestrationTest1.js +181 -0
  149. package/myReact/archive/orchestrationTest2.js +281 -0
  150. package/myReact/archive/run3pointsNode.js +59 -0
  151. package/myReact/archive/runNode.js +123 -0
  152. package/myReact/archive/runNode2.js +91 -0
  153. package/myReact/archive/testAwait1.js +141 -0
  154. package/myReact/archive/testAwait1.xml +86 -0
  155. package/myReact/archive/testEvery1.js +122 -0
  156. package/myReact/archive/testEvery1.xml +79 -0
  157. package/myReact/archive/testHH1.js +135 -0
  158. package/myReact/archive/testHH1.xml +86 -0
  159. package/myReact/archive/testHH1revu.js +104 -0
  160. package/myReact/archive/testHH2.js +122 -0
  161. package/myReact/archive/testHH2.xml +79 -0
  162. package/myReact/archive/testHH3.js +130 -0
  163. package/myReact/archive/testHH3.xml +86 -0
  164. package/myReact/archive/testHHabort.js +121 -0
  165. package/myReact/archive/testHHabort.xml +83 -0
  166. package/myReact/archive/testMakeawait.js +202 -0
  167. package/myReact/archive/testRun1.js +168 -0
  168. package/myReact/archive/testRun1.xml +142 -0
  169. package/myReact/archive/titi.js +28 -0
  170. package/myReact/archive/titi.xml +110 -0
  171. package/myReact/archive/toto.js +73 -0
  172. package/myReact/archive/toto.xml +198 -0
  173. package/myReact/archive/trap-await-parallelNode.js +123 -0
  174. package/myReact/inutiles/hiver2022.xml +804 -0
  175. package/myReact/inutiles/hopeNode.xml +459 -0
  176. package/myReact/inutiles/mars2022.xml +871 -0
  177. package/myReact/inutiles/mystique1.xml +318 -0
  178. package/myReact/inutiles/mystiqueOSC.xml +277 -0
  179. package/myReact/inutiles/opus5Node.xml +1271 -0
  180. package/myReact/inutiles/opus5NodeLinux.xml +1241 -0
  181. package/myReact/inutiles/orchestrationHH.xml +541 -0
  182. package/myReact/inutiles/orchestrationHH2.xml +547 -0
  183. package/myReact/inutiles/testHH.xml +95 -0
  184. package/myReact/inutiles/trouveLaPercuTenor.xml +349 -0
  185. package/myReact/myReact.js +744 -0
  186. package/myReact/myReact.min.js +1 -0
  187. package/myReact/orchestrationHH.js +311 -0
  188. package/myReact/orchestrationHH.mjs +436 -0
  189. package/myReact/orchestrationHH.mjs.map +1 -0
  190. package/package.json +46 -0
  191. package/serveur/OSCandMidi.mjs +361 -0
  192. package/serveur/computeScore.mjs +415 -0
  193. package/serveur/controleDAW.mjs +1149 -0
  194. package/serveur/defaultSession.csv +2 -0
  195. package/serveur/defaultSkiniParametres.js +119 -0
  196. package/serveur/gameOSC.mjs +96 -0
  197. package/serveur/groupeClientsSons.mjs +1014 -0
  198. package/serveur/ipConfig.json +24 -0
  199. package/serveur/ipConfig127.json +19 -0
  200. package/serveur/ipConfig75.json +17 -0
  201. package/serveur/ipConfigBH.json +19 -0
  202. package/serveur/ipConfigLocal.json +19 -0
  203. package/serveur/midiConfig.json +26 -0
  204. package/serveur/midiConfigBH.json +26 -0
  205. package/serveur/midiConfigVoid.json +3 -0
  206. package/serveur/midimix.mjs +570 -0
  207. package/serveur/saveParam.mjs +159 -0
  208. package/serveur/skiniParametres.good.js +132 -0
  209. package/serveur/skiniParametres.js +106 -0
  210. package/serveur/utilsHHSkini.hh.js +64 -0
  211. package/serveur/utilsSkini.mjs +137 -0
  212. package/serveur/websocketServer.mjs +2052 -0
  213. package/serveur/workerInterfaceZ.mjs +327 -0
  214. package/serveur/workerSynchro.mjs +49 -0
  215. package/skini.mjs +141 -0
@@ -0,0 +1,159 @@
1
+ /**
2
+ * @fileOverview For the creation of the parameters of the Skini piece
3
+ * @author Bertrand Petit-Hédelin <bertrand@hedelin.fr>
4
+ * @copyright (C) 2022-2024 Bertrand Petit-Hédelin
5
+ *
6
+ * This program is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU General Public License as published by
8
+ * the Free Software Foundation, either version 3 of the License, or
9
+ * any later version.
10
+ *
11
+ * This program is distributed in the hope that it will be useful,
12
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ * GNU General Public License for more details.
15
+ *
16
+ * You should have received a copy of the GNU General Public License
17
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
18
+ * @version 1.4
19
+ */
20
+ 'use strict'
21
+ import * as fs from "fs";
22
+
23
+ var today = new Date();
24
+ var debug1= true;
25
+ var debug = false;
26
+
27
+ export function saveParameters(paramFile, params) {
28
+
29
+ var paramText = `
30
+ // Generated by Skini: `+ today.toString() + `
31
+ "use strict"
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
+ }
44
+
45
+ // Piece en OSC si la paramètre est false
46
+ // Sinon Skini parle MIDI
47
+ exports.directMidiON = `+ params.directMidiON + `;
48
+
49
+ // Pour charger les fonctions et modules de scenes de type GOLEM
50
+ exports.scenesON = `+ params.scenesON + `;
51
+
52
+ exports.english = `+ params.english + `;
53
+
54
+ /***********************************
55
+ Paramètres du simulateur
56
+ Si ces valeurs ne sont pas données c'est celle qui
57
+ sont dans le simulateur qui sont utilisées
58
+ ************************************/
59
+ exports.tempoMax = `+ params.tempoMax + `; // En ms
60
+ exports.tempoMin = `+ params.tempoMin + `; // En ms
61
+ exports.limiteDureeAttente = `+ params.limiteDureeAttente + `; // En pulsations
62
+
63
+ /********************************************************
64
+ AUTOMATE
65
+ *********************************************************/
66
+ // Pour un automate conforme à un rechargement selon les déclarations de module HipHop
67
+ exports.reactOnPlay = `+ params.reactOnPlay + `;
68
+
69
+ // Pour une réaction à chaque pulsation
70
+ exports.pulsationON = `+ params.pulsationON + `;
71
+
72
+ /*************************************
73
+ CHEMIN DES FICHIERS SONS MP3 pour les clients
74
+ Nom du sous répartoire ./sounds/xxxx
75
+ *************************************/
76
+ exports.soundFilesPath1 = "`+ params.soundFilesPath1 + `";
77
+
78
+ /***************************************
79
+ CHEMIN DES PARTITIONS DES PATTERNS ET CONFIG AVEC MUSICIENS
80
+ ****************************************/
81
+ exports.avecMusicien = `+ params.avecMusicien + `; // Pour mettre en place les spécificités au jeu avec des musiciens.
82
+ exports.decalageFIFOavecMusicien = `+ params.decalageFIFOavecMusicien + `; // Décalage de la FIFO vide avant le premier pattern dans une FIFO.
83
+ exports.patternScorePath1 ="`+ params.patternScorePath1 + `";
84
+
85
+ /****************************************
86
+ ACTIVATION D'ALGORITHME D'ORGANISATION DES FIFOs
87
+ Si 0 ou undefined pas d'algorithme.
88
+ Si 1 algorithme de réorganisation Début, Milieu, Fin, Neutre (DFMN)
89
+ Dans le csv, D -> 1, M -> 2, F->3, N->4 (c'est fixé dans controleAbleton.js)
90
+ Si autre ... à créer...
91
+ ATTENTION: NE JAMAIS UTILISER EN SITUATION D'INTERACTION SI L'ALGORITHME
92
+ PEUT SUPPRIMER DES PATTERNS DES FIFOs
93
+ *****************************************/
94
+ exports.algoGestionFifo = `+ params.algoGestionFifo + `;
95
+ exports.shufflePatterns = `+ params.shufflePatterns + `;
96
+ /*****************************************************************************
97
+
98
+ Gestion de la Matrice des possibles
99
+ Automate de gestion de la matrice des possibles
100
+
101
+ ******************************************************************************/
102
+ exports.nbeDeGroupesClients = `+ params.nbeDeGroupesClients + `;
103
+
104
+ function setnbeDeGroupesClients(num) {
105
+ this.nbeDeGroupesClients = num;
106
+ }
107
+ exports.setnbeDeGroupesClients = setnbeDeGroupesClients;
108
+
109
+ exports.simulatorInAseperateGroup = `+ params.simulatorInAseperateGroup + `; // Si true, le dernier groupe client est réservé au simulateur.
110
+
111
+ // Pour un contrôle des Raspberries
112
+ exports.useRaspberries = `+ params.useRaspberries + `;
113
+ exports.playBufferMessage = "`+ params.playBufferMessage + `";
114
+ exports.raspOSCPort = `+ params.raspOSCPort + `;
115
+
116
+ // La synchro Midi, Link. Synchro Bitwig OSC par défaut si Midi et Link false.
117
+ exports.synchoOnMidiClock = `+ params.synchoOnMidiClock + `;
118
+ exports.synchroLink = `+ params.synchroLink + `;
119
+ exports.synchroSkini = `+ params.synchroSkini + `;
120
+ exports.timer = `+ params.timer + `;
121
+ exports.gameOSCSignals = `+ params.gameOSCSignals + `;
122
+
123
+ exports.sensorOSC = `+ params.sensorOSC + `;
124
+ exports.tempoSensorsInit = [`+ params.tempoSensorsInit + `];
125
+ exports.sensorsSensibilities = [`+ params.sensorsSensibilities + `];
126
+
127
+ const groupesDesSons = [
128
+ `;
129
+
130
+ for (var i = 0; i < params.groupesDesSons.length; i++) {
131
+ paramText += `[`;
132
+ paramText += ` "` + params.groupesDesSons[i][0].toString() + `",`;
133
+ paramText += params.groupesDesSons[i][1].toString() + `,`;
134
+ paramText += ` "` + params.groupesDesSons[i][2].toString() + `",`;
135
+ for (var j = 3; j < 6; j++) {
136
+ paramText += params.groupesDesSons[i][j].toString() + `,`;
137
+ }
138
+ paramText += `"` + params.groupesDesSons[i][6].toString() + `",`;
139
+ paramText += `[` + params.groupesDesSons[i][7].toString() + `],`;
140
+ paramText += params.groupesDesSons[i][8].toString();
141
+ paramText += ` ],
142
+ `;
143
+ }
144
+
145
+ paramText += `];
146
+ exports.groupesDesSons = groupesDesSons;
147
+ `
148
+ // On écrit en synchrone pour ne pas avoir de pb avec la compilation qui suit
149
+ // dans websocketServer. On n'aurait pu mettre la compilation dans un callback
150
+ // sans synchro. Ce serait plus joli, mais pas utile dans ce cas.
151
+
152
+ // Donne un message d'erreur alors que ça fonctionne !!!
153
+ try {
154
+ fs.writeFileSync(paramFile, paramText);
155
+ if(debug1) console.log("INFO: saveParam.js: saveParameters: file wrtitten :", paramFile);
156
+ } catch (err) {
157
+ //console.log("ERR: saveParam.js: saveParameters: Pb ecriture", paramFile, err);
158
+ }
159
+ }
@@ -0,0 +1,132 @@
1
+ "use hopscript"
2
+
3
+ /* Configuration de l'architecture IP, OSC, Websocket ====================
4
+ 24/1/2017 BH
5
+
6
+ © Copyright 2019-2021, B. Petit-Heidelein
7
+
8
+ websocket en 8080
9
+ SERVEUR <----------------------> CLIENT OSC OUT: 10000 (vers Processing Visu)
10
+ ^ OSC IN:13000 ^ ^ OSC OUT: 12000 (vers Processing Midi)
11
+ | | |
12
+ | |---------------------| |
13
+ | | OSC | OSC
14
+ v V |
15
+ Processing MIDI v
16
+ OSC IN: 12000 Processing Visu (Uniquement en réception)
17
+ OSC OUT: 13000 OSC IN: 10000
18
+
19
+ ===========================================================================*/
20
+
21
+ exports.canWidth = 10; // Pas utile si pas de tablette, 500
22
+ exports.canHeight = 10; // Pas utile si pas de tablette, 250
23
+ exports.tempo_ABL = 20; // CC udefined dans la norme MIDI
24
+
25
+ // Pour le client Golem
26
+ exports.nombreDeNiveaux = 2;
27
+
28
+ // Indexation des bus Midi dans OSCmidiHop de processing
29
+ exports.busMidiDAW = 6;
30
+
31
+ // Pour charger les fonctions et modules de scenes de type GOLEM
32
+ exports.scenesON = false;
33
+
34
+ exports.english = true;
35
+
36
+ /***********************************
37
+ Paramètres du simulateur
38
+ Si ces valeurs ne sont pas données c'est celle qui
39
+ sont dans le simulateur qui sont utilisées
40
+ ************************************/
41
+ exports.tempoMax = 3000; // En ms
42
+ exports.tempoMin = 1000; // En ms
43
+ exports.limiteDureeAttente = 33; // En pulsations
44
+
45
+ /********************************************************
46
+
47
+ AUTOMATE
48
+
49
+ *********************************************************/
50
+ // Les fichiers Hiphop que décrivent les trajets
51
+ // Les signaux à utiliser dans ces programmes sont décrirs dans groupeDesSons
52
+
53
+ //exports.automate1 = './autoTrouveLaPercu-1';
54
+
55
+ // Pour un automate conforme à un rechargement selon les déclarations de module HipHop
56
+ exports.canBeReloaded = true;
57
+ exports.reactOnPlay = false;
58
+
59
+ /************************************
60
+ FICHIERS DES CLIPS CSV
61
+ ************************************/
62
+ // Fichiers CSV à mettre dans l'ordre selon les choix dans le controleur
63
+ // mise à jour dans websocketServer, sur demande client "loadAbletonTable"
64
+
65
+ exports.configClips = "pieces/trouveLaPercu.csv";
66
+
67
+ /*************************************
68
+ CHEMIN DES FICHIERS SONS MP3 pour les clients
69
+ Le choix se fait sur le client en fonction d'abletonON donc
70
+ de la pièce choisie dans la contrôleur.
71
+ Nom du sous répartoire ./sounds/xxxx
72
+ *************************************/
73
+ exports.soundFilesPath1 = "trouveLaPercu";
74
+
75
+ /***************************************
76
+ CHEMIN DES PARTITIONS DES PATTERNS ET CONFIG AVEC MUSICIENS
77
+ ****************************************/
78
+ exports.avecMusicien = false; // Pour mettre en place les spécificités au jeu avec des musiciens.
79
+ exports.decalageFIFOavecMusicien = 4; // Décalage de la FIFO vide avant le premier pattern dans une FIFO.
80
+ exports.patternScorePath1 = "trouveLaPercu";
81
+
82
+ /*****************************************************************************
83
+
84
+ Gestion de la Matrice des possibles
85
+ Automate de gestion de la matrice des possibles
86
+
87
+ ******************************************************************************/
88
+ exports.nbeDeGroupesClients = 3;
89
+ exports.simulatorInAseperateGroup = true; // Si true, le dernier groupe client est réservé au simulateur.
90
+
91
+ // Ces données sont trés sensibles sur le bon déroulement de l'interaction
92
+ // si pas de synchro MIDI
93
+ exports.timer1 = 0;
94
+ exports.timer2 = 450 * 4; // Techno Pour un tempo de 120 sur une mesure 4/4
95
+ exports.timer3 = 450 * 4;
96
+
97
+ exports.timerDivision1 = 0;
98
+ exports.timerDivision2 = 4;
99
+ exports.timerDivision3 = 4;
100
+
101
+ // La synchro midi est émise par processing qui la reçoit d'Ableton ou autre source
102
+ exports.synchoOnMidiClock = true;
103
+
104
+ const bleu = "#008CBA";
105
+ const rouge = '#CF1919';
106
+ const vert = "#4CAF50";
107
+ const marron = '#666633';
108
+ const violet = '#797bbf';
109
+ const orange = '#b3712d';
110
+ const rose = '#E0095F';
111
+ const gris = '#5F6262';
112
+ const ocre = '#BCA104';
113
+ const terre = '#A76611';
114
+ const grisvert = '#039879';
115
+ const grisbleu = '#315A93';
116
+
117
+ const groupesDesSons = [
118
+ // 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
119
+ ["groupe1", 0, "group", 170, 100, 20, rouge, [], 1 ], //0 index d'objet graphique
120
+ ["groupe2", 1, "group", 20, 240, 20, bleu, [], 1 ], //1
121
+ ["groupe3", 2, "group", 170, 580, 20, vert, [], 1 ], //2
122
+ ["groupe4", 3, "group", 350, 100, 20, gris, [], 1 ], //3
123
+ ["groupe5", 4, "group", 20, 380, 20, violet, [], 1 ], //4
124
+ ["groupe6", 5, "group", 350,580, 20, terre, [], 1 ], //5
125
+ ["groupe7", 6, "group", 540,100, 20, rose, [], 1 ], //6
126
+ ["derwish", 7, "group", 740,480, 20, rose, [], 1 ],
127
+ ["gaszi", 8, "group", 540,580, 20, rose, [], 1 ],
128
+ ["djembe", 9, "group", 740,200, 20, rose, [], 1 ],
129
+ ["piano", 10,"group", 740,340, 20, rose, [], 1 ]
130
+ ];
131
+ exports.groupesDesSons = groupesDesSons;
132
+
@@ -0,0 +1,106 @@
1
+
2
+ // Generated by Skini: Mon Nov 24 2025 09:37:46 GMT+0100 (heure normale d’Europe centrale)
3
+ "use strict"
4
+
5
+ var midiConfig = require("../serveur/midiConfig.json");
6
+
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
18
+ // Sinon Skini parle MIDI
19
+ exports.directMidiON = true;
20
+
21
+ // Pour charger les fonctions et modules de scenes de type GOLEM
22
+ exports.scenesON = false;
23
+
24
+ exports.english = true;
25
+
26
+ /***********************************
27
+ Paramètres du simulateur
28
+ Si ces valeurs ne sont pas données c'est celle qui
29
+ sont dans le simulateur qui sont utilisées
30
+ ************************************/
31
+ exports.tempoMax = 500; // En ms
32
+ exports.tempoMin = 500; // En ms
33
+ exports.limiteDureeAttente = 33; // En pulsations
34
+
35
+ /********************************************************
36
+ AUTOMATE
37
+ *********************************************************/
38
+ // Pour un automate conforme à un rechargement selon les déclarations de module HipHop
39
+ exports.reactOnPlay = false;
40
+
41
+ // Pour une réaction à chaque pulsation
42
+ exports.pulsationON = false;
43
+
44
+ /*************************************
45
+ CHEMIN DES FICHIERS SONS MP3 pour les clients
46
+ Nom du sous répartoire ./sounds/xxxx
47
+ *************************************/
48
+ exports.soundFilesPath1 = "";
49
+
50
+ /***************************************
51
+ CHEMIN DES PARTITIONS DES PATTERNS ET CONFIG AVEC MUSICIENS
52
+ ****************************************/
53
+ exports.avecMusicien = false; // Pour mettre en place les spécificités au jeu avec des musiciens.
54
+ exports.decalageFIFOavecMusicien = 4; // Décalage de la FIFO vide avant le premier pattern dans une FIFO.
55
+ exports.patternScorePath1 ="";
56
+
57
+ /****************************************
58
+ ACTIVATION D'ALGORITHME D'ORGANISATION DES FIFOs
59
+ Si 0 ou undefined pas d'algorithme.
60
+ Si 1 algorithme de réorganisation Début, Milieu, Fin, Neutre (DFMN)
61
+ Dans le csv, D -> 1, M -> 2, F->3, N->4 (c'est fixé dans controleAbleton.js)
62
+ Si autre ... à créer...
63
+ ATTENTION: NE JAMAIS UTILISER EN SITUATION D'INTERACTION SI L'ALGORITHME
64
+ PEUT SUPPRIMER DES PATTERNS DES FIFOs
65
+ *****************************************/
66
+ exports.algoGestionFifo = 0;
67
+ exports.shufflePatterns = false;
68
+ /*****************************************************************************
69
+
70
+ Gestion de la Matrice des possibles
71
+ Automate de gestion de la matrice des possibles
72
+
73
+ ******************************************************************************/
74
+ exports.nbeDeGroupesClients = 3;
75
+
76
+ function setnbeDeGroupesClients(num) {
77
+ this.nbeDeGroupesClients = num;
78
+ }
79
+ exports.setnbeDeGroupesClients = setnbeDeGroupesClients;
80
+
81
+ exports.simulatorInAseperateGroup = false; // Si true, le dernier groupe client est réservé au simulateur.
82
+
83
+ // Pour un contrôle des Raspberries
84
+ exports.useRaspberries = false;
85
+ exports.playBufferMessage = "test";
86
+ exports.raspOSCPort = 4000;
87
+
88
+ // La synchro Midi, Link. Synchro Bitwig OSC par défaut si Midi et Link false.
89
+ exports.synchoOnMidiClock = false;
90
+ exports.synchroLink = true;
91
+ exports.synchroSkini = false;
92
+ exports.timer = 500;
93
+ exports.gameOSCSignals = false;
94
+
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,,,,];
98
+
99
+ 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
+ [ "",, "",,,,"",[], ],
105
+ ];
106
+ exports.groupesDesSons = groupesDesSons;
@@ -0,0 +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
+
@@ -0,0 +1,137 @@
1
+ /**
2
+ * @fileOverview Utility functions for the scenarii written in hiphop.js
3
+ * @copyright (C) 2022-2024 Bertrand Petit-Hédelin
4
+ *
5
+ * This program is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU General Public License as published by
7
+ * the Free Software Foundation, either version 3 of the License, or
8
+ * any later version.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU General Public License
16
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
17
+ *
18
+ * @author Bertrand Petit-Hédelin <bertrand@hedelin.fr>
19
+ * @version 1.4
20
+ */
21
+
22
+ "use strict"
23
+ "use hopscript"
24
+
25
+ import { ReactiveMachine } from "@hop/hiphop";
26
+ import { format } from "util";
27
+
28
+ let debug = true;
29
+ let debug1 = true;
30
+
31
+ export function creationInterfacesOUT(groupes) {
32
+ if (groupes !== undefined) {
33
+ return groupes.map(function (k) {
34
+ return k[0] + "OUT";
35
+ })
36
+ };
37
+ }
38
+
39
+ export function creationInterfacesIN(groupes) {
40
+ if (groupes !== undefined) {
41
+ return groupes.map(function (k) {
42
+ return k[0] + "IN";
43
+ })
44
+ };
45
+ }
46
+
47
+ export function setTempo(value, par, oscMidiLocal, midimix,
48
+ tempoMax, tempoMin, CCChannel, CCTempo) {
49
+
50
+ if (midimix.getAbletonLinkStatus()) {
51
+ if (debug) console.log("ORCHESTRATION: set tempo Link:", value);
52
+ midimix.setTempoLink(value);
53
+ return;
54
+ }
55
+ if (value > tempoMax || value < tempoMin) {
56
+ console.log("ERR: Tempo set out of range:", value, "Should be between:", tempoMin, "and", tempoMax);
57
+ return;
58
+ }
59
+ let tempo = Math.round(127 / (tempoMax - tempoMin) * (value - tempoMin));
60
+ if (debug) {
61
+ console.log("Set tempo:", value, par.busMidiDAW, CCChannel, CCTempo, tempo, oscMidiLocal.getMidiPortClipToDAW());
62
+ }
63
+ oscMidiLocal.sendControlChange(par.busMidiDAW, CCChannel, CCTempo, tempo);
64
+ }
65
+
66
+ export function moveTempo(value, limit) {
67
+ if (tempoLimit >= limit) {
68
+ tempoLimit = 0;
69
+ tempoIncrease = !tempoIncrease;
70
+ }
71
+
72
+ if (tempoIncrease) {
73
+ tempoGlobal += value;
74
+ } else {
75
+ tempoGlobal -= value;
76
+ }
77
+ if (debug) console.log("moveTempo:", tempoGlobal);
78
+ setTempo(tempoGlobal);
79
+ tempoLimit++;
80
+ }
81
+
82
+ export function addSceneScore(message, serveur) {
83
+ var msg = {
84
+ type: 'addSceneScore',
85
+ value: message
86
+ }
87
+ serveur.broadcast(JSON.stringify(msg));
88
+ }
89
+
90
+ export function alertInfoScoreON(message, serveur) {
91
+ var msg = {
92
+ type: 'alertInfoScoreON',
93
+ value: message
94
+ }
95
+ serveur.broadcast(JSON.stringify(msg));
96
+ }
97
+
98
+ export function alertInfoScoreOFF(serveur) {
99
+ var msg = {
100
+ type: 'alertInfoScoreOFF',
101
+ }
102
+ serveur.broadcast(JSON.stringify(msg));
103
+ }
104
+
105
+ export function removeSceneScore(message, serveur) {
106
+ var msg = {
107
+ type: 'removeSceneScore',
108
+ value: message
109
+ }
110
+ serveur.broadcast(JSON.stringify(msg));
111
+ }
112
+
113
+ export function refreshSceneScore(serveur) {
114
+ var msg = {
115
+ type: 'refreshSceneScore',
116
+ }
117
+ serveur.broadcast(JSON.stringify(msg));
118
+ }
119
+
120
+ export function setListeDesTypes(serveur) {
121
+ var msg = {
122
+ type: 'setListeDesTypes',
123
+ }
124
+ serveur.broadcast(JSON.stringify(msg));
125
+ }
126
+
127
+ export function setTypeList(liste, serveur) {
128
+ var msg = {
129
+ type: 'listeDesTypes',
130
+ text: liste
131
+ }
132
+ serveur.broadcast(JSON.stringify(msg));
133
+ }
134
+
135
+ export function setpatternListLength(long, groupe, gcs){
136
+ gcs.setpatternListLength([long,groupe]);
137
+ }