nodeskini 1.0.5 → 1.0.7

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 (179) hide show
  1. package/blocklySkini/blocklySkini.html +5 -1
  2. package/blocklySkini/scripts/hiphop_blocks.js +5 -6
  3. package/client/clientListe/clientListe.js +11 -0
  4. package/client/clientListe/clientListebundle.js +1755 -1909
  5. package/client/controleurHH/controleurHH.html +4 -0
  6. package/client/queueViewer/queue.html +34 -0
  7. package/client/queueViewer/queue.js +187 -0
  8. package/client/queueViewer/style.css +26 -0
  9. package/client/score/parto1.js +14 -11
  10. package/client/score/parto1bundle.js +55 -33
  11. package/client/score/score.html +8 -7
  12. package/doc/Doc Skini Node english.pdf +0 -0
  13. package/doc/Mode d'emploi Skini Node.pdf +0 -0
  14. package/doc/Tuto Skini.pdf +0 -0
  15. package/doc/quickstart.pdf +0 -0
  16. package/myReact/orchestrationHH.hh.js +147 -1843
  17. package/myReact/orchestrationHH.mjs +50 -231
  18. package/myReact/orchestrationHH.mjs.map +1 -1
  19. package/package.json +11 -8
  20. package/pieces/tutos/demoAbleton.csv +21 -0
  21. package/pieces/tutos/demoAbleton.js +100 -0
  22. package/pieces/tutos/demoAbleton.xml +180 -0
  23. package/pieces/tutos/demoHH.js +99 -0
  24. package/pieces/tutos/demoHH.xml +184 -0
  25. package/pieces/tutos/demoHHwait.js +100 -0
  26. package/pieces/tutos/demoHHwait.xml +175 -0
  27. package/pieces/tutos/tuto.csv +10 -0
  28. package/pieces/tutos/tuto.csv.good +1 -0
  29. package/pieces/tutos/tuto1.js +105 -0
  30. package/pieces/tutos/tuto1.xml +147 -0
  31. package/pieces/tutos/tuto10.back.js +106 -0
  32. package/pieces/tutos/tuto10.js +107 -0
  33. package/pieces/tutos/tuto10.xml +199 -0
  34. package/pieces/tutos/tuto11.js +111 -0
  35. package/pieces/tutos/tuto11.xml +124 -0
  36. package/pieces/tutos/tuto12.js +91 -0
  37. package/pieces/tutos/tuto12.xml +258 -0
  38. package/pieces/tutos/tuto2.back.js +106 -0
  39. package/pieces/tutos/tuto2.js +95 -0
  40. package/pieces/tutos/tuto2.xml +94 -0
  41. package/pieces/tutos/tuto3-2.js +105 -0
  42. package/pieces/tutos/tuto3-2.xml +96 -0
  43. package/pieces/tutos/tuto3.js +97 -0
  44. package/pieces/tutos/tuto3.xml +49 -0
  45. package/pieces/tutos/tuto4.js +107 -0
  46. package/pieces/tutos/tuto4.xml +106 -0
  47. package/pieces/tutos/tuto5.js +109 -0
  48. package/pieces/tutos/tuto5.xml +42 -0
  49. package/pieces/tutos/tuto6.js +105 -0
  50. package/pieces/tutos/tuto6.xml +26 -0
  51. package/pieces/tutos/tuto7.js +107 -0
  52. package/pieces/tutos/tuto7.xml +65 -0
  53. package/pieces/tutos/tuto8.js +105 -0
  54. package/pieces/tutos/tuto8.xml +76 -0
  55. package/pieces/tutos/tuto9.js +107 -0
  56. package/pieces/tutos/tuto9.xml +90 -0
  57. package/pieces/tutos/tutoAwait.js +111 -0
  58. package/pieces/tutos/tutoAwait.xml +171 -0
  59. package/pieces/tutos/tutoDoubleEmission.js +93 -0
  60. package/pieces/tutos/tutoDoubleEmission.xml +65 -0
  61. package/pieces/tutos/tutoESP32.js +104 -0
  62. package/pieces/tutos/tutoESP32.xml +246 -0
  63. package/pieces/tutos/tutoGame.js +126 -0
  64. package/pieces/tutos/tutoGame.xml +109 -0
  65. package/pieces/tutos/tutoGroups1.js +111 -0
  66. package/pieces/tutos/tutoGroups1.xml +137 -0
  67. package/pieces/tutos/tutoGroups2.js +97 -0
  68. package/pieces/tutos/tutoGroups2.xml +103 -0
  69. package/pieces/tutos/tutoGroups3.js +111 -0
  70. package/pieces/tutos/tutoGroups3.xml +128 -0
  71. package/pieces/tutos/tutoGroups4.js +111 -0
  72. package/pieces/tutos/tutoGroups4.xml +84 -0
  73. package/pieces/tutos/tutoIZ.js +95 -0
  74. package/pieces/tutos/tutoIZ.xml +135 -0
  75. package/pieces/tutos/tutoIf.js +111 -0
  76. package/pieces/tutos/tutoIf.xml +126 -0
  77. package/pieces/tutos/tutoMidi.js +126 -0
  78. package/pieces/tutos/tutoMidi.xml +62 -0
  79. package/pieces/tutos/tutoOS.js +121 -0
  80. package/pieces/tutos/tutoOSC.js +109 -0
  81. package/pieces/tutos/tutoOSC.xml +223 -0
  82. package/pieces/tutos/tutoOSCJonathan.js +94 -0
  83. package/pieces/tutos/tutoOSCJonathan.xml +312 -0
  84. package/pieces/tutos/tutoPatternInGroup.js +109 -0
  85. package/pieces/tutos/tutoPatternInGroup.xml +116 -0
  86. package/pieces/tutos/tutoRandomBlock.js +129 -0
  87. package/pieces/tutos/tutoRandomBlock.xml +194 -0
  88. package/pieces/tutos/tutoSuspend.js +107 -0
  89. package/pieces/tutos/tutoSuspend.xml +139 -0
  90. package/pieces/tutos/tutoSustain.js +107 -0
  91. package/pieces/tutos/tutoSustain.xml +109 -0
  92. package/pieces/tutos/tutoTank.csv +9 -0
  93. package/pieces/tutos/tutoTank.js +100 -0
  94. package/pieces/tutos/tutoTank.xml +326 -0
  95. package/pieces/tutos/tutoTestAll.csv +11 -0
  96. package/pieces/tutos/tutoTestAll.hh.js +401 -0
  97. package/pieces/tutos/tutoTestAll.js +101 -0
  98. package/pieces/tutos/tutoTestAll.xml +866 -0
  99. package/serveur/OSCandMidi.mjs +27 -3
  100. package/serveur/controleDAW.mjs +2 -1
  101. package/serveur/groupeClientsSons.mjs +27 -3
  102. package/serveur/ipConfig.json +2 -2
  103. package/serveur/skiniParametres.js +55 -10
  104. package/serveur/utilsSkini.mjs +1 -1
  105. package/serveur/websocketServer.mjs +14 -4
  106. package/skini.mjs +4 -0
  107. package/blocklySkini/archive/blocklyControleur.js +0 -87
  108. package/blocklySkini/archive/blocklySkini.js +0 -84
  109. package/blocklySkini/archive/blocklyhop.js +0 -75
  110. package/blocklySkini/archive/clientControleurBlocly.js +0 -170
  111. package/blocklySkini/archive/index.html +0 -76
  112. package/blocklySkini/archive/testHHsuspend.txt +0 -89
  113. package/blocklySkini/archive/testHHtrap.txt +0 -262
  114. package/blocklySkini/archive/testOrchestration.txt +0 -177
  115. package/blocklySkini/archive/testOrchestration.xml +0 -447
  116. package/blocklySkini/archive/testOrchestration2.xml +0 -456
  117. package/blocklySkini/scripts/hiphop_blocks.old.js +0 -3010
  118. package/blocklySkini/scripts/hiphop_blocks11-2025.js +0 -6104
  119. package/myReact/archive/Nodeemitvaluedlocal1.hh.js +0 -52
  120. package/myReact/archive/abort-parNode.js +0 -79
  121. package/myReact/archive/abroNode.js +0 -169
  122. package/myReact/archive/abroNode2.js +0 -80
  123. package/myReact/archive/atom.compile.hh.js +0 -52
  124. package/myReact/archive/await-countNode.js +0 -67
  125. package/myReact/archive/await-nowvalNode.js +0 -44
  126. package/myReact/archive/callHH.js +0 -96
  127. package/myReact/archive/emit-if2.hh.compiled.js +0 -113
  128. package/myReact/archive/every1Node.js +0 -35
  129. package/myReact/archive/if-runNode.js +0 -74
  130. package/myReact/archive/if1Node.js +0 -43
  131. package/myReact/archive/makeawait.js +0 -0
  132. package/myReact/archive/myReact.old.js +0 -684
  133. package/myReact/archive/orchestration.js +0 -281
  134. package/myReact/archive/orchestration1.js +0 -132
  135. package/myReact/archive/orchestration1.xml +0 -465
  136. package/myReact/archive/orchestration2.js +0 -161
  137. package/myReact/archive/orchestrationHH.mano.js +0 -280
  138. package/myReact/archive/orchestrationHHTest.js +0 -428
  139. package/myReact/archive/orchestrationHHTest.xml +0 -234
  140. package/myReact/archive/orchestrationHHTestRun.js +0 -104
  141. package/myReact/archive/orchestrationHHTestRun.xml +0 -34
  142. package/myReact/archive/orchestrationTest0.js +0 -178
  143. package/myReact/archive/orchestrationTest1.js +0 -181
  144. package/myReact/archive/orchestrationTest2.js +0 -281
  145. package/myReact/archive/run3pointsNode.js +0 -59
  146. package/myReact/archive/runNode.js +0 -123
  147. package/myReact/archive/runNode2.js +0 -91
  148. package/myReact/archive/testAwait1.js +0 -141
  149. package/myReact/archive/testAwait1.xml +0 -86
  150. package/myReact/archive/testEvery1.js +0 -122
  151. package/myReact/archive/testEvery1.xml +0 -79
  152. package/myReact/archive/testHH1.js +0 -135
  153. package/myReact/archive/testHH1.xml +0 -86
  154. package/myReact/archive/testHH1revu.js +0 -104
  155. package/myReact/archive/testHH2.js +0 -122
  156. package/myReact/archive/testHH2.xml +0 -79
  157. package/myReact/archive/testHH3.js +0 -130
  158. package/myReact/archive/testHH3.xml +0 -86
  159. package/myReact/archive/testHHabort.js +0 -121
  160. package/myReact/archive/testHHabort.xml +0 -83
  161. package/myReact/archive/testMakeawait.js +0 -202
  162. package/myReact/archive/testRun1.js +0 -168
  163. package/myReact/archive/testRun1.xml +0 -142
  164. package/myReact/archive/titi.js +0 -28
  165. package/myReact/archive/titi.xml +0 -110
  166. package/myReact/archive/toto.js +0 -73
  167. package/myReact/archive/toto.xml +0 -198
  168. package/myReact/archive/trap-await-parallelNode.js +0 -123
  169. package/myReact/inutiles/hiver2022.xml +0 -804
  170. package/myReact/inutiles/hopeNode.xml +0 -459
  171. package/myReact/inutiles/mars2022.xml +0 -871
  172. package/myReact/inutiles/mystique1.xml +0 -318
  173. package/myReact/inutiles/mystiqueOSC.xml +0 -277
  174. package/myReact/inutiles/opus5Node.xml +0 -1271
  175. package/myReact/inutiles/opus5NodeLinux.xml +0 -1241
  176. package/myReact/inutiles/orchestrationHH.xml +0 -541
  177. package/myReact/inutiles/orchestrationHH2.xml +0 -547
  178. package/myReact/inutiles/testHH.xml +0 -95
  179. package/myReact/inutiles/trouveLaPercuTenor.xml +0 -349
@@ -53,6 +53,10 @@
53
53
  'height=400, width=600, top=200, left=300, toolbar=no, menubar=no, directories=no, location=no, resizable=yes, scrollbars=yes, status=no');
54
54
  return false;">Parameters</button>
55
55
 
56
+ <button type="button" class="button" onclick="window.open('http://' + window.location.hostname + ':' + window.location.port + '/queueViewer','Queue Viewer',
57
+ 'height=400, width=1200, top=200, left=300, toolbar=no, menubar=no, directories=no, location=no, resizable=yes, scrollbars=yes, status=no');
58
+ return false;">Queue Viewer</button>
59
+
56
60
  <button class="button" id="launchSimulator" onclick="launchSimulator()">Start Simulator</button>
57
61
  <button id="stopSimulator" class="small button red" style="display:none" onclick="stopSimulator();">Stop
58
62
  Simulator</button>
@@ -0,0 +1,34 @@
1
+ <!doctype html>
2
+ <html lang="fr">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta name="viewport" content="width=device-width,initial-scale=1" />
6
+ <title>Files d'attente - Queue Viewer</title>
7
+ <link rel="stylesheet" href="/client/queueViewer/style.css" />
8
+ <meta name="robots" content="noindex" />
9
+ </head>
10
+ <body>
11
+ <header>
12
+ <h1>Files d'attente (dynamique)</h1>
13
+ <p id="status">Connexion : en attente...</p>
14
+ <div class="controls">
15
+ <button id="pauseButton" type="button">Arrêt sur image</button>
16
+ <span id="pauseState">En direct</span>
17
+ </div>
18
+ <p id="tickInfo">Tick : 0</p>
19
+ </header>
20
+
21
+ <main>
22
+ <div id="queuesContainer">
23
+ <table id="queuesTable">
24
+ <thead>
25
+ <tr><th>File</th><th>Longueur</th><th>Contenu</th></tr>
26
+ </thead>
27
+ <tbody></tbody>
28
+ </table>
29
+ </div>
30
+ </main>
31
+
32
+ <script src="/client/queueViewer/queue.js"></script>
33
+ </body>
34
+ </html>
@@ -0,0 +1,187 @@
1
+ // Client minimal pour afficher dynamiquement les files d'attente
2
+ (async function(){
3
+ const statusEl = () => document.getElementById('status');
4
+ const tickInfoEl = () => document.getElementById('tickInfo');
5
+ const pauseStateEl = () => document.getElementById('pauseState');
6
+ const pauseButtonEl = () => document.getElementById('pauseButton');
7
+ let paused = false;
8
+ let queuedQueues = null;
9
+
10
+ // Récupère la config du serveur pour le port websocket
11
+ let ipConfig = { websocketServeurPort: 8383 };
12
+ try {
13
+ const r = await fetch('/serveur/ipConfig.json');
14
+ if (r.ok) ipConfig = await r.json();
15
+ } catch(e) {
16
+ console.warn('Impossible de charger /serveur/ipConfig.json, port par défaut utilisé');
17
+ }
18
+
19
+ const host = window.location.hostname || 'localhost';
20
+ const port = ipConfig.websocketServeurPort || 8383;
21
+ let ws;
22
+
23
+ // Ce visionneur est proche du controleur fonctionnellement
24
+ function connect(){
25
+ statusEl().textContent = `Connexion : ws://${host}:${port}`;
26
+ ws = new WebSocket(`ws://${host}:${port}`);
27
+
28
+ ws.onopen = function(){
29
+ statusEl().textContent = `Connecté à ${host}:${port}`;
30
+ const msg = { type: 'startSpectateur', text: 'queueViewer', id: Date.now() };
31
+ ws.send(JSON.stringify(msg));
32
+ };
33
+
34
+ ws.onclose = function(){
35
+ statusEl().textContent = 'Déconnecté, reconnexion dans 2s...';
36
+ setTimeout(connect, 2000);
37
+ };
38
+
39
+ ws.onerror = function(e){
40
+ console.error('WebSocket error', e);
41
+ };
42
+
43
+ ws.onmessage = function(event){
44
+ try {
45
+ const msg = JSON.parse(event.data);
46
+ if (msg.type === 'etatDeLaFileAttente') {
47
+ if (paused) {
48
+ queuedQueues = msg.value || [];
49
+ statusEl().textContent = `Pause activée - frame figée`;
50
+ } else {
51
+ renderQueues(msg.value || []);
52
+ }
53
+ }
54
+ else if (msg.type === 'setTickAutomate') {
55
+ tickInfoEl().textContent = `Tick : ${msg.tick}`;
56
+ }
57
+ } catch(e){
58
+ console.warn('Erreur parsing message', e);
59
+ }
60
+ };
61
+ }
62
+
63
+ function renderQueues(queues){
64
+ const tbody = document.querySelector('#queuesTable tbody');
65
+ tbody.innerHTML = '';
66
+
67
+ // First pass: compute durations for all clips and per-queue totals
68
+ const queuesInfo = [];
69
+ for (let i = 0; i < queues.length; i++){
70
+ const q = queues[i];
71
+ const index = q && q[0] !== undefined ? q[0] : i;
72
+ const content = (q && q[2]) ? q[2] : [];
73
+ const clips = content.map(it => {
74
+ if (it && typeof it === 'object') return it;
75
+ return { name: String(it) };
76
+ });
77
+ const durations = clips.map(c => {
78
+ if (Array.isArray(c) && c[2] && typeof c[2] === 'number') return c[2];
79
+ if (c.duration && typeof c.duration === 'number') return c.duration;
80
+ return 1;
81
+ });
82
+ const total = durations.reduce((s, v) => s + v, 0) || clips.length;
83
+ queuesInfo.push({ index, clips, durations, total });
84
+ }
85
+
86
+ // Global timeline length = max of queue totals (so longest queue spans full timeline)
87
+ const globalMaxTotal = queuesInfo.reduce((m, q) => Math.max(m, q.total || 0), 0);
88
+ const displayTicks = globalMaxTotal || 0;
89
+ const effectiveMaxTotal = globalMaxTotal || 1;
90
+ //tickInfoEl().textContent = `Tick : ${displayTicks}`;
91
+
92
+ // Fixed width for all timelines (same scale across all files)
93
+ const FIXED_TIMELINE_WIDTH = 920;
94
+
95
+ // Build map of queues by index so missing indices can be rendered empty
96
+ const queueMap = new Map();
97
+ let maxIndex = -1;
98
+ queuesInfo.forEach(info => {
99
+ queueMap.set(info.index, info);
100
+ if (info.index > maxIndex) maxIndex = info.index;
101
+ });
102
+
103
+ // Second pass: render rows using a fixed timeline width so proportions match across rows
104
+ for (let idx = 0; idx <= maxIndex; idx++){
105
+ const info = queueMap.get(idx) || { index: idx, clips: [], durations: [], total: 0 };
106
+ const tr = document.createElement('tr');
107
+ const tdIndex = document.createElement('td'); tdIndex.textContent = info.index;
108
+ const tdLength = document.createElement('td'); tdLength.textContent = info.clips.length;
109
+ const tdContent = document.createElement('td');
110
+
111
+ const timeline = document.createElement('div');
112
+ timeline.className = 'timeline';
113
+ timeline.style.width = FIXED_TIMELINE_WIDTH + 'px';
114
+
115
+ if (info.clips.length === 0) {
116
+ timeline.classList.add('timelineEmpty');
117
+ const emptyEl = document.createElement('div');
118
+ emptyEl.className = 'emptySlot';
119
+ emptyEl.textContent = 'vide';
120
+ timeline.appendChild(emptyEl);
121
+ } else {
122
+ for (let j = 0; j < info.clips.length; j++){
123
+ const c = info.clips[j];
124
+ const dur = info.durations[j] || 1;
125
+ const widthPx = Math.max(24, Math.round((dur / effectiveMaxTotal) * FIXED_TIMELINE_WIDTH));
126
+ const label = (Array.isArray(c) && c[1]) ? c[1] : (c.name || c.label || 'clip');
127
+ const clipEl = document.createElement('div');
128
+ clipEl.className = label === 'clip' ? 'clip clipPlaceholder' : 'clip';
129
+ clipEl.style.flex = 'none';
130
+ clipEl.style.width = widthPx + 'px';
131
+ clipEl.title = label;
132
+ if (label !== 'clip') {
133
+ // Use queue index (vertical type) for color instead of clip name
134
+ clipEl.style.backgroundColor = colorFromQueueIndex(info.index);
135
+ }
136
+ const span = document.createElement('span'); span.textContent = label;
137
+ clipEl.appendChild(span);
138
+ timeline.appendChild(clipEl);
139
+ }
140
+ }
141
+
142
+ tdContent.appendChild(timeline);
143
+ tr.appendChild(tdIndex);
144
+ tr.appendChild(tdLength);
145
+ tr.appendChild(tdContent);
146
+ tbody.appendChild(tr);
147
+ }
148
+ }
149
+
150
+ // Simple color hash from string
151
+ function colorFromString(s){
152
+ let h = 0;
153
+ for (let i = 0; i < s.length; i++) h = (h<<5) - h + s.charCodeAt(i);
154
+ h = Math.abs(h) % 360;
155
+ return `hsl(${h}, 65%, 45%)`;
156
+ }
157
+
158
+ // Color from queue index (vertical type)
159
+ function colorFromQueueIndex(idx){
160
+ const hue = (idx * 45) % 360;
161
+ return `hsl(${hue}, 70%, 50%)`;
162
+ }
163
+
164
+ function initControls(){
165
+ const button = pauseButtonEl();
166
+ button.addEventListener('click', () => {
167
+ paused = !paused;
168
+ if (paused) {
169
+ pauseStateEl().textContent = 'Figé';
170
+ button.textContent = 'Reprendre';
171
+ statusEl().textContent = 'Arrêt sur image activé';
172
+ } else {
173
+ pauseStateEl().textContent = 'En direct';
174
+ button.textContent = 'Arrêt sur image';
175
+ statusEl().textContent = `Connecté à ${host}:${port}`;
176
+ if (queuedQueues !== null) {
177
+ renderQueues(queuedQueues);
178
+ queuedQueues = null;
179
+ }
180
+ }
181
+ });
182
+ }
183
+
184
+ connect();
185
+ initControls();
186
+
187
+ })();
@@ -0,0 +1,26 @@
1
+ body{font-family: Arial, Helvetica, sans-serif; margin:16px; color:#222}
2
+ header h1{margin:0 0 6px 0}
3
+ #status{font-size:0.9rem; color:#666}
4
+ .controls{margin:8px 0; display:flex; gap:10px; align-items:center;}
5
+ #pauseButton{padding:6px 12px; border:1px solid #888; border-radius:4px; background:#f8f8f8; cursor:pointer;}
6
+ #pauseButton:hover{background:#eee}
7
+ #pauseState{font-size:0.9rem; color:#444}
8
+ #tickInfo{font-size:0.9rem; color:#444; margin:4px 0 0 0}
9
+ #queuesContainer{margin-top:12px; overflow-x:auto}
10
+ table{border-collapse:collapse; width:100%; max-width:100%}
11
+ th,td{border:1px solid #ddd; padding:8px; text-align:left}
12
+ th{background:#f3f3f3}
13
+ th:nth-child(2), td:nth-child(2){width:90px; white-space:nowrap}
14
+ body{background:#fff}
15
+ tbody tr:nth-child(odd){background:#fafafa}
16
+ tbody tr:nth-child(odd) td:last-child,
17
+ tbody tr:nth-child(even) td:last-child{background:#fff}
18
+
19
+ .timeline{display:flex; gap:6px; align-items:center; height:28px; background:transparent; border-radius:4px;}
20
+ .timeline.timelineEmpty{background:rgba(0,0,0,0.06); border:1px dashed rgba(0,0,0,0.15);}
21
+ .emptySlot{flex:1; min-height:24px; display:flex; align-items:center; justify-content:center; color:#666; font-size:12px; font-style:italic;}
22
+ .clip{height:24px; border-radius:3px; box-shadow:0 1px 0 rgba(0,0,0,0.15) inset; overflow:hidden; display:inline-flex; align-items:center; justify-content:center; color:rgba(255,255,255,0.95); font-size:12px; padding:0 8px; white-space:nowrap; text-overflow:ellipsis}
23
+ .clipPlaceholder{background:rgba(255,255,255,0.15); color:rgba(0,0,0,0.6); border:1px dashed rgba(0,0,0,0.12);}
24
+ .clip span{display:inline-block; overflow:hidden; text-overflow:ellipsis}
25
+ .clip:hover{transform:translateY(-2px); box-shadow:0 4px 8px rgba(0,0,0,0.15)}
26
+
@@ -77,7 +77,10 @@ var textSize = 20 * screenY / Ybase;
77
77
 
78
78
  // La version processing.min.js ne sais pas gérer les couleur en hexa.
79
79
  function hex_to_RGB(hex) {
80
- var m = hex.match(/^#?([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i);
80
+ if (debug) console.log("hex_to_RGB:", typeof hex, hex);
81
+ if(hex == '') return [0,0,0];
82
+
83
+ let m = hex.match(/^#?([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i);
81
84
  return [ parseInt(m[1], 16), parseInt(m[2], 16), parseInt(m[3], 16)];
82
85
  }
83
86
 
@@ -605,6 +608,8 @@ function isInOngoingGraphicScene(scene){
605
608
  }
606
609
 
607
610
  function addSceneScore(scene){
611
+ if(debug1) console.log("addSceneScore:", scene, ongoingGraphicScene);
612
+
608
613
  // Déjà là
609
614
  for (var i=0; i < ongoingGraphicScene.length; i++){
610
615
  if ( ongoingGraphicScene[i] === scene){
@@ -623,17 +628,15 @@ function addSceneScore(scene){
623
628
  }
624
629
 
625
630
  function removeSceneScore(scene){
626
- if( ongoingGraphicScene[ongoingGraphicScene.length - 1] === scene){
627
- ongoingGraphicScene.pop();
628
- return true;
629
- }else{
630
- for (var i=0; i < ongoingGraphicScene.length; i++){
631
- if ( ongoingGraphicScene[i] === scene){
632
- ongoingGraphicScene[i] = -1;
633
- return true;
634
- }
631
+ if(debug1) console.log("removeSceneScore:", scene, ongoingGraphicScene);
632
+
633
+ for (var i = ongoingGraphicScene.length - 1; i >= 0; i--){
634
+ if ( ongoingGraphicScene[i] === scene){
635
+ ongoingGraphicScene.splice(i, 1);
636
+ return true;
635
637
  }
636
638
  }
639
+ return false;
637
640
  }
638
641
 
639
642
  /**************************
@@ -713,7 +716,7 @@ function sketchProc(processing) {
713
716
  groupsCounter++;
714
717
  }else if(patternGroups[i][2] == "tank"){
715
718
  if (debug) console.log("This one is the tank:", patternGroups[i][0]);
716
- if ( i > 0){
719
+ if (groupsCounter > 0){
717
720
  // C'est ici que l'on gére les tanks de façon séquentielle
718
721
  // On regarde si le prédécesseur est dans le même tank.
719
722
  // Cela pose une contrainte sur le fichier de configuration graphique.
@@ -1,12 +1,26 @@
1
- (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
2
- /**************************************
3
- SKINI
4
-
5
- © Copyright 2019, B. Petit-Heidelein
6
-
7
- browserify parto1.js -o parto1bundle.js
8
-
9
- ***************************************/
1
+ (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
2
+ /**
3
+ * @fileOverview Display the score of the Skini piece
4
+ *
5
+ * browserify parto1.js -o parto1bundle.js
6
+ *
7
+ * @author Bertrand Petit-Hédelin <bertrand@hedelin.fr>
8
+ * @version 1.0
9
+ * @copyright (C) 2022 Bertrand Petit-Hédelin
10
+ *
11
+ * This program is free software: you can redistribute it and/or modify
12
+ * it under the terms of the GNU General Public License as published by
13
+ * the Free Software Foundation, either version 3 of the License, or
14
+ * any later version.
15
+ *
16
+ * This program is distributed in the hope that it will be useful,
17
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
18
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
+ * GNU General Public License for more details.
20
+ *
21
+ * You should have received a copy of the GNU General Public License
22
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
23
+ */
10
24
  "use strict"
11
25
 
12
26
  var ipConfig = require('../../serveur/ipConfig');
@@ -64,7 +78,10 @@ var textSize = 20 * screenY / Ybase;
64
78
 
65
79
  // La version processing.min.js ne sais pas gérer les couleur en hexa.
66
80
  function hex_to_RGB(hex) {
67
- var m = hex.match(/^#?([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i);
81
+ if (debug) console.log("hex_to_RGB:", typeof hex, hex);
82
+ if(hex == '') return [0,0,0];
83
+
84
+ let m = hex.match(/^#?([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i);
68
85
  return [ parseInt(m[1], 16), parseInt(m[2], 16), parseInt(m[3], 16)];
69
86
  }
70
87
 
@@ -592,6 +609,8 @@ function isInOngoingGraphicScene(scene){
592
609
  }
593
610
 
594
611
  function addSceneScore(scene){
612
+ if(debug1) console.log("addSceneScore:", scene, ongoingGraphicScene);
613
+
595
614
  // Déjà là
596
615
  for (var i=0; i < ongoingGraphicScene.length; i++){
597
616
  if ( ongoingGraphicScene[i] === scene){
@@ -610,17 +629,15 @@ function addSceneScore(scene){
610
629
  }
611
630
 
612
631
  function removeSceneScore(scene){
613
- if( ongoingGraphicScene[ongoingGraphicScene.length - 1] === scene){
614
- ongoingGraphicScene.pop();
615
- return true;
616
- }else{
617
- for (var i=0; i < ongoingGraphicScene.length; i++){
618
- if ( ongoingGraphicScene[i] === scene){
619
- ongoingGraphicScene[i] = -1;
620
- return true;
621
- }
632
+ if(debug1) console.log("removeSceneScore:", scene, ongoingGraphicScene);
633
+
634
+ for (var i = ongoingGraphicScene.length - 1; i >= 0; i--){
635
+ if ( ongoingGraphicScene[i] === scene){
636
+ ongoingGraphicScene.splice(i, 1);
637
+ return true;
622
638
  }
623
639
  }
640
+ return false;
624
641
  }
625
642
 
626
643
  /**************************
@@ -700,7 +717,7 @@ function sketchProc(processing) {
700
717
  groupsCounter++;
701
718
  }else if(patternGroups[i][2] == "tank"){
702
719
  if (debug) console.log("This one is the tank:", patternGroups[i][0]);
703
- if ( i > 0){
720
+ if (groupsCounter > 0){
704
721
  // C'est ici que l'on gére les tanks de façon séquentielle
705
722
  // On regarde si le prédécesseur est dans le même tank.
706
723
  // Cela pose une contrainte sur le fichier de configuration graphique.
@@ -1156,26 +1173,31 @@ function initWSSocket(host) {
1156
1173
  }
1157
1174
  }
1158
1175
  window.initWSSocket = initWSSocket;
1159
-
1160
- },{"../../serveur/ipConfig":2}],2:[function(require,module,exports){
1176
+
1177
+ },{"../../serveur/ipConfig":2}],2:[function(require,module,exports){
1161
1178
  module.exports={
1162
- "remoteIPAddressImage": "localhost",
1163
- "remoteIPAddressSound": "localhost",
1179
+ "remoteIPAddressImage": "192.168.1.251",
1180
+ "remoteIPAddressSound": "192.168.1.251",
1164
1181
  "remoteIPAddressLumiere": "localhost",
1165
- "remoteIPAddressGame": "localhost",
1166
- "serverIPAddress": "localhost",
1182
+ "remoteIPAddressGame": "192.168.1.223",
1183
+ "interfaceZIPaddress": "192.168.1.250",
1184
+ "serverIPAddress": "192.168.1.251",
1167
1185
  "webserveurPort": 8080,
1168
1186
  "websocketServeurPort": 8383,
1169
1187
  "InPortOSCMIDIfromDAW": 13000,
1170
1188
  "OutPortOSCMIDItoDAW": 12000,
1171
- "portOSCToGame": 1000,
1172
- "portOSCFromGame": 3005,
1173
- "distribSequencerPort": 8888,
1189
+ "portOSCToGame": 1010,
1190
+ "portOSCFromGame": 3010,
1191
+ "portOSCFromInterfaceZData": 3005,
1192
+ "portOSCFromInterfaceZMidi": 3006,
1193
+ "portOSCFromInterfaceZMiniWi": 8888,
1194
+ "portOSCToInterfaceZ": 1000,
1195
+ "distribSequencerPort": 8899,
1174
1196
  "outportProcessing": 10000,
1175
1197
  "outportLumiere": 7700,
1176
1198
  "inportLumiere": 9000,
1177
- "sessionPath": "./pieces/",
1178
- "piecePath" : "./pieces/"
1199
+ "sessionPath": "./pieces/opus/",
1200
+ "piecePath" : "./pieces/opus/"
1179
1201
  }
1180
-
1181
- },{}]},{},[1]);
1202
+
1203
+ },{}]},{},[1]);
@@ -1,15 +1,16 @@
1
+ <!doctype html>
1
2
  <html>
2
3
  <head>
3
- <script src="./client/score/processing.min.js"></script>
4
- <script src="./client/score/parto1bundle.js"></script>
5
- <meta charset="UTF-8">
6
- </head>
7
- <body onload="initWSSocket(window.location.hostname);">
4
+ <meta charset="UTF-8">
5
+ <title>Score</title>
6
+ <script src="/client/score/processing.min.js"></script>
7
+ <script src="/client/score/parto1bundle.js"></script>
8
+ </head>
9
+ <body onload="initWSSocket(window.location.hostname);">
8
10
  <h1>Score</h1>
9
11
  <input id="buttonUpdate" class="button" type="button" value="Update" onclick="getPatternGroups();">
10
-
11
12
  <p><canvas id="canvas1" width="200" height="200"></canvas></p>
12
- </body>
13
+ </body>
13
14
  </html>
14
15
 
15
16
 
Binary file
Binary file
Binary file
Binary file