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.
- package/README.md +31 -0
- package/client/archive/bundle.js +11528 -0
- package/client/archive/golem.html +60 -0
- package/client/archive/golemClient.js +595 -0
- package/client/archive/golembundle.js +11634 -0
- package/client/archive/sequencer.html +43 -0
- package/client/archive/sequenceurClient.js +815 -0
- package/client/archive/stylegolem.css +158 -0
- package/client/archive/stylesequenceur.css +204 -0
- package/client/clientListe/Sortable-master/.circleci/config.yml +33 -0
- package/client/clientListe/Sortable-master/.editorconfig +15 -0
- package/client/clientListe/Sortable-master/.github/ISSUE_TEMPLATE/bug-report.md +73 -0
- package/client/clientListe/Sortable-master/.github/ISSUE_TEMPLATE/custom-template.md +48 -0
- package/client/clientListe/Sortable-master/.github/ISSUE_TEMPLATE/feature-request.md +41 -0
- package/client/clientListe/Sortable-master/.jshintrc +25 -0
- package/client/clientListe/Sortable-master/.testcaferc.json +7 -0
- package/client/clientListe/Sortable-master/CONTRIBUTING.md +26 -0
- package/client/clientListe/Sortable-master/LICENSE +21 -0
- package/client/clientListe/Sortable-master/README.md +813 -0
- package/client/clientListe/Sortable-master/Sortable.js +3709 -0
- package/client/clientListe/Sortable-master/Sortable.min.js +2 -0
- package/client/clientListe/Sortable-master/Sortable.min.old.js +2 -0
- package/client/clientListe/Sortable-master/Sortable.min.old.old.js +2 -0
- package/client/clientListe/Sortable-master/babel.config.js +27 -0
- package/client/clientListe/Sortable-master/bower.json +30 -0
- package/client/clientListe/Sortable-master/entry/entry-complete.js +8 -0
- package/client/clientListe/Sortable-master/entry/entry-core.js +19 -0
- package/client/clientListe/Sortable-master/entry/entry-defaults.js +19 -0
- package/client/clientListe/Sortable-master/index.html +460 -0
- package/client/clientListe/Sortable-master/modular/sortable.complete.esm.js +3701 -0
- package/client/clientListe/Sortable-master/modular/sortable.core.esm.js +3698 -0
- package/client/clientListe/Sortable-master/modular/sortable.esm.js +3699 -0
- package/client/clientListe/Sortable-master/package-lock.json +5704 -0
- package/client/clientListe/Sortable-master/package.json +56 -0
- package/client/clientListe/Sortable-master/plugins/AutoScroll/AutoScroll.js +270 -0
- package/client/clientListe/Sortable-master/plugins/AutoScroll/README.md +80 -0
- package/client/clientListe/Sortable-master/plugins/AutoScroll/index.js +1 -0
- package/client/clientListe/Sortable-master/plugins/MultiDrag/MultiDrag.js +617 -0
- package/client/clientListe/Sortable-master/plugins/MultiDrag/README.md +96 -0
- package/client/clientListe/Sortable-master/plugins/MultiDrag/index.js +1 -0
- package/client/clientListe/Sortable-master/plugins/OnSpill/OnSpill.js +79 -0
- package/client/clientListe/Sortable-master/plugins/OnSpill/README.md +60 -0
- package/client/clientListe/Sortable-master/plugins/OnSpill/index.js +1 -0
- package/client/clientListe/Sortable-master/plugins/README.md +178 -0
- package/client/clientListe/Sortable-master/plugins/Swap/README.md +55 -0
- package/client/clientListe/Sortable-master/plugins/Swap/Swap.js +90 -0
- package/client/clientListe/Sortable-master/plugins/Swap/index.js +1 -0
- package/client/clientListe/Sortable-master/scripts/banner.js +8 -0
- package/client/clientListe/Sortable-master/scripts/build.js +17 -0
- package/client/clientListe/Sortable-master/scripts/esm-build.js +28 -0
- package/client/clientListe/Sortable-master/scripts/minify.js +11 -0
- package/client/clientListe/Sortable-master/scripts/test-compat.js +30 -0
- package/client/clientListe/Sortable-master/scripts/test.js +21 -0
- package/client/clientListe/Sortable-master/scripts/umd-build.js +15 -0
- package/client/clientListe/Sortable-master/src/Animation.js +175 -0
- package/client/clientListe/Sortable-master/src/BrowserInfo.js +12 -0
- package/client/clientListe/Sortable-master/src/EventDispatcher.js +57 -0
- package/client/clientListe/Sortable-master/src/PluginManager.js +87 -0
- package/client/clientListe/Sortable-master/src/Sortable.js +1971 -0
- package/client/clientListe/Sortable-master/src/utils.js +556 -0
- package/client/clientListe/Sortable-master/st/app.js +224 -0
- package/client/clientListe/Sortable-master/st/iframe/frame.html +32 -0
- package/client/clientListe/Sortable-master/st/iframe/index.html +49 -0
- package/client/clientListe/Sortable-master/st/logo.png +0 -0
- package/client/clientListe/Sortable-master/st/og-image.png +0 -0
- package/client/clientListe/Sortable-master/st/prettify/prettify.css +1 -0
- package/client/clientListe/Sortable-master/st/prettify/prettify.js +46 -0
- package/client/clientListe/Sortable-master/st/prettify/run_prettify.js +64 -0
- package/client/clientListe/Sortable-master/st/saucelabs.svg +1 -0
- package/client/clientListe/Sortable-master/st/theme.css +254 -0
- package/client/clientListe/Sortable-master/tests/Sortable.compat.test.js +39 -0
- package/client/clientListe/Sortable-master/tests/Sortable.test.js +386 -0
- package/client/clientListe/Sortable-master/tests/dual-list.html +34 -0
- package/client/clientListe/Sortable-master/tests/empty-list.html +30 -0
- package/client/clientListe/Sortable-master/tests/filter.html +27 -0
- package/client/clientListe/Sortable-master/tests/handles.html +27 -0
- package/client/clientListe/Sortable-master/tests/nested.html +67 -0
- package/client/clientListe/Sortable-master/tests/single-list.html +25 -0
- package/client/clientListe/Sortable-master/tests/style.css +18 -0
- package/client/clientListe/clientListe.html +148 -0
- package/client/clientListe/clientListe.js +1508 -0
- package/client/clientListe/clientListebundle.js +13164 -0
- package/client/clientListe/images/poubelle.png +0 -0
- package/client/clientListe/images/start.png +0 -0
- package/client/clientListe/images/stop.png +0 -0
- package/client/clientListe/images/submit.png +0 -0
- package/client/clientListe/sortable-theme-bootstrap.css +90 -0
- package/client/configurateur/configReact.js +273 -0
- package/client/configurateur/configReactbundle.js +295 -0
- package/client/configurateur/configurateur.css +95 -0
- package/client/configurateur/configurateur.html +48 -0
- package/client/configurateur/lib/jexcel.css +755 -0
- package/client/configurateur/lib/jexcel.js +14970 -0
- package/client/configurateur/lib/jsuites.css +2801 -0
- package/client/configurateur/lib/jsuites.js +11822 -0
- package/client/configurateur/lib/react-dom.production.min.js +239 -0
- package/client/configurateur/lib/react.production.min.js +32 -0
- package/client/configurateur/src/configReact.js +247 -0
- package/client/controleur/clientcontroleur.js +536 -0
- package/client/controleur/clientcontroleur.test.js +282 -0
- package/client/controleur/controleur.html +51 -0
- package/client/controleur/controleurbundle.js +565 -0
- package/client/controleur/stylecontroleur.css +236 -0
- package/client/controleurHH/controleurHH.html +71 -0
- package/client/controleurHH/controleurHH.js +252 -0
- package/client/controleurHH/styles/index.css +320 -0
- package/client/controleurHH/styles/material.css +11552 -0
- package/client/parametrage/paramReact.js +473 -0
- package/client/parametrage/paramReactbundle.js +500 -0
- package/client/parametrage/parametrage.css +111 -0
- package/client/parametrage/parametrage.html +163 -0
- package/client/parametrage/src/paramReact.js +459 -0
- package/client/score/hash.js +83 -0
- package/client/score/p5.min.js +3 -0
- package/client/score/parto1.js +1171 -0
- package/client/score/parto1bundle.js +1181 -0
- package/client/score/processing.min.js +431 -0
- package/client/score/score.html +15 -0
- package/client/score/score.js +34 -0
- package/client/simulateurListe/simulateurFork.js +750 -0
- package/client/simulateurListe/simulateurFork.mjs +681 -0
- package/client/simulateurListe/simulateurForkSansReorg.js +569 -0
- package/client/simulateurListe/simulateurListe.js +628 -0
- package/myReact/archive/Nodeemitvaluedlocal1.hh.js +52 -0
- package/myReact/archive/abort-parNode.js +79 -0
- package/myReact/archive/abroNode.js +169 -0
- package/myReact/archive/abroNode2.js +80 -0
- package/myReact/archive/atom.compile.hh.js +51 -0
- package/myReact/archive/await-countNode.js +67 -0
- package/myReact/archive/await-nowvalNode.js +44 -0
- package/myReact/archive/callHH.js +96 -0
- package/myReact/archive/emit-if2.hh.compiled.js +113 -0
- package/myReact/archive/every1Node.js +35 -0
- package/myReact/archive/if-runNode.js +74 -0
- package/myReact/archive/if1Node.js +43 -0
- package/myReact/archive/makeawait.js +0 -0
- package/myReact/archive/myReact.old.js +684 -0
- package/myReact/archive/orchestration.js +281 -0
- package/myReact/archive/orchestration1.js +132 -0
- package/myReact/archive/orchestration1.xml +465 -0
- package/myReact/archive/orchestration2.js +161 -0
- package/myReact/archive/orchestrationHH.mano.js +280 -0
- package/myReact/archive/orchestrationHHTest.js +428 -0
- package/myReact/archive/orchestrationHHTest.xml +234 -0
- package/myReact/archive/orchestrationHHTestRun.js +104 -0
- package/myReact/archive/orchestrationHHTestRun.xml +34 -0
- package/myReact/archive/orchestrationTest0.js +178 -0
- package/myReact/archive/orchestrationTest1.js +181 -0
- package/myReact/archive/orchestrationTest2.js +281 -0
- package/myReact/archive/run3pointsNode.js +59 -0
- package/myReact/archive/runNode.js +123 -0
- package/myReact/archive/runNode2.js +91 -0
- package/myReact/archive/testAwait1.js +141 -0
- package/myReact/archive/testAwait1.xml +86 -0
- package/myReact/archive/testEvery1.js +122 -0
- package/myReact/archive/testEvery1.xml +79 -0
- package/myReact/archive/testHH1.js +135 -0
- package/myReact/archive/testHH1.xml +86 -0
- package/myReact/archive/testHH1revu.js +104 -0
- package/myReact/archive/testHH2.js +122 -0
- package/myReact/archive/testHH2.xml +79 -0
- package/myReact/archive/testHH3.js +130 -0
- package/myReact/archive/testHH3.xml +86 -0
- package/myReact/archive/testHHabort.js +121 -0
- package/myReact/archive/testHHabort.xml +83 -0
- package/myReact/archive/testMakeawait.js +202 -0
- package/myReact/archive/testRun1.js +168 -0
- package/myReact/archive/testRun1.xml +142 -0
- package/myReact/archive/titi.js +28 -0
- package/myReact/archive/titi.xml +110 -0
- package/myReact/archive/toto.js +73 -0
- package/myReact/archive/toto.xml +198 -0
- package/myReact/archive/trap-await-parallelNode.js +123 -0
- package/myReact/inutiles/hiver2022.xml +804 -0
- package/myReact/inutiles/hopeNode.xml +459 -0
- package/myReact/inutiles/mars2022.xml +871 -0
- package/myReact/inutiles/mystique1.xml +318 -0
- package/myReact/inutiles/mystiqueOSC.xml +277 -0
- package/myReact/inutiles/opus5Node.xml +1271 -0
- package/myReact/inutiles/opus5NodeLinux.xml +1241 -0
- package/myReact/inutiles/orchestrationHH.xml +541 -0
- package/myReact/inutiles/orchestrationHH2.xml +547 -0
- package/myReact/inutiles/testHH.xml +95 -0
- package/myReact/inutiles/trouveLaPercuTenor.xml +349 -0
- package/myReact/myReact.js +744 -0
- package/myReact/myReact.min.js +1 -0
- package/myReact/orchestrationHH.js +311 -0
- package/myReact/orchestrationHH.mjs +436 -0
- package/myReact/orchestrationHH.mjs.map +1 -0
- package/package.json +46 -0
- package/serveur/OSCandMidi.mjs +361 -0
- package/serveur/computeScore.mjs +415 -0
- package/serveur/controleDAW.mjs +1149 -0
- package/serveur/defaultSession.csv +2 -0
- package/serveur/defaultSkiniParametres.js +119 -0
- package/serveur/gameOSC.mjs +96 -0
- package/serveur/groupeClientsSons.mjs +1014 -0
- package/serveur/ipConfig.json +24 -0
- package/serveur/ipConfig127.json +19 -0
- package/serveur/ipConfig75.json +17 -0
- package/serveur/ipConfigBH.json +19 -0
- package/serveur/ipConfigLocal.json +19 -0
- package/serveur/midiConfig.json +26 -0
- package/serveur/midiConfigBH.json +26 -0
- package/serveur/midiConfigVoid.json +3 -0
- package/serveur/midimix.mjs +570 -0
- package/serveur/saveParam.mjs +159 -0
- package/serveur/skiniParametres.good.js +132 -0
- package/serveur/skiniParametres.js +106 -0
- package/serveur/utilsHHSkini.hh.js +64 -0
- package/serveur/utilsSkini.mjs +137 -0
- package/serveur/websocketServer.mjs +2052 -0
- package/serveur/workerInterfaceZ.mjs +327 -0
- package/serveur/workerSynchro.mjs +49 -0
- package/skini.mjs +141 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var signals=[];var debug=false;var debug1=true;var program;function createSignal(sig,val){var oneSignal={name:sig,value:val,action:undefined};signals.push(oneSignal)}exports.createSignal=createSignal;function addEventListener(sig,action){for(var i=0;i<signals.length;i++){if(signals[i].name===sig){signals[i].action=action;return true}}console.log("ERR: addEventListener: signal inconnu:",sig);return-1}exports.addEventListener=addEventListener;function playEventListener(sig,val){for(var i=0;i<signals.length;i++){if(signals[i].name===sig){if(signals[i].action!==undefined){signals[i].action(val);return true}else{return true}}}console.log("ERR: playEventListener: signal inconnu:",sig,val);return-1}exports.playEventListener=playEventListener;function setSignalValue(val){for(var i=0;i<signals.length;i++){if(signals[i].name===sig){signals[i].value=val;return true}}console.log("ERR: setSignalValue: signal inconnu:",sig);return-1}exports.setSignalValue=setSignalValue;function isSignalActivatedInInstruction(instr,signal){if(instr.signal===signal){if(instr.signalActivated)return true}return false}function activateSignal(sig,val){if(debug)console.log("activateSignal",sig,val);setSignalAll(program,sig,val,true);return true}exports.activateSignal=activateSignal;function setSignal(instr,sig,value,activated){if(instr===undefined)return;for(var i=0;i<instr.length;i++){if(instr[i].signal===sig){instr[i].signalActivated=activated;instr[i].nowval=value}if(debug)console.log("-- setSignal",instr[i].name,instr[i].signal,instr[i].signalActivated);setSignal(instr[i].nextInstr,sig,value,activated)}}function setSignalAll(prog,sig,value,activated){if(debug)console.log("- setSignalAll");setSignal(prog.instructions,sig,value,activated)}exports.printProgram=printProgram;var instrIndex=0;function createInstruction(name,signal,nowval,count,action,nextInstr){var instruction={name:name,signal:signal,signalActivated:false,nowval:nowval,count:0,countMax:count,action:action,burnt:false,broadcast:false,nextInstr:nextInstr,index:instrIndex};instrIndex++;return instruction}exports.createInstruction=createInstruction;function execInstruction(command,branch){if(debug)console.log("execInstruction: Instruction :",command.name,command.signal);if(!command.burnt){switch(command.name){case"abort":if(debug)console.log("abort: signal",command.signal,", abort burnt:",command.burnt,", abort index:",command.index);if(isSignalActivatedInInstruction(command,command.signal)){command.count++;if(command.count>=command.countMax){command.count=0;command.burnt=true;if(debug)console.log("abort brulé car signal actif:",command);return true}else{for(var i=0;i<command.nextInstr.length;i++){if(!runBranch(command.nextInstr[i],command.nextInstr)){command.burnt=false;return false}if(i===command.nextInstr.length-1){command.count=0;command.burnt=true;return true}}}}else{for(var i=0;i<command.nextInstr.length;i++){if(!runBranch(command.nextInstr[i],branch)){command.burnt=false;return false}if(i===command.nextInstr.length-1){command.count=0;command.burnt=true;return true}}}break;case"atom":if(debug)console.log("atom");command.action();command.burnt=true;return true;case"await":if(isSignalActivatedInInstruction(command,command.signal)){command.count++;if(command.count>=command.countMax){command.count=0;command.signalActivated=false;if(debug)console.log("await dans la branche:",branch);setSignal(branch,command.signal,command.nowval,false);command.burnt=true;return true}}else{command.burnt=false;return false}break;case"await_do":if(debug)console.log("await_do: ",command.signal,signals);if(isSignalActivatedInInstruction(command,command.signal)){command.count++;if(command.count>=command.countMax){command.action();command.count=0;command.signalActivated=false;setSignal(branch,command.signal,command.nowval,false);command.burnt=true;return true}}else{command.burnt=false;return false}case"emit":if(debug)console.log("-- emit --");activateSignal(command.signal,command.nowval);playEventListener(command.signal,command.nowval);if(debug)console.log("-- emit activé : ",command.signal,command.burnt);command.burnt=true;return true;case"every":if(isSignalActivatedInInstruction(command,command.signal)){command.count++;if(command.count>=command.countMax){command.count=0;if(debug)console.log("every: command.branch",i,command.nextInstr[0]);setSignal(branch,command.signal,command.nowval,false);unburnBranch(command.nextInstr);for(var i=0;i<command.nextInstr.length;i++){if(debug)console.log("every: seq command.branch",i,command.nextInstr[i].name);if(!runBranch(command.nextInstr[i],command.nextInstr)){return false}if(i===command.nextInstr.length-1){command.burnt=false;return false}}}else{command.burnt=false;return false}}else{command.burnt=false;return false}case"loop":if(debug)console.log("loop command.branch",command.nextInstr);for(var i=0;i<command.nextInstr.length;i++){if(debug)console.log("seq command.branch",i,command.nextInstr[i]);if(!runBranch(command.nextInstr[i],command.nextInstr)){return false}if(i===command.nextInstr.length-1){unburnBranch(command.nextInstr);command.burnt=false;return false}}break;case"par":var countBranch=0;for(var i=0;i<command.nextInstr.length;i++){if(runBranch(command.nextInstr[i],command.nextInstr)){if(debug)console.log("Par:",i);countBranch++}}if(countBranch===command.nextInstr.length){command.burnt=true;return true}else{return false}break;case"restart":if(debug1)console.log("restart:");command.burnt=true;reRunProg();return true;case"run":case"seq":if(debug)console.log("seq command.branch",command.nextInstr);for(var i=0;i<command.nextInstr.length;i++){if(debug)console.log("seq command.branch",i,command.nextInstr[i]);if(!runBranch(command.nextInstr[i],command.nextInstr)){return false}if(i===command.nextInstr.length-1){command.burnt=true;return true}}break;case"printSignals":if(debug)console.log("printSignals");command.action();command.burnt=true;return true;default:console.log("Instruction inconnue")}}else{if(debug)console.log("execInstruction: Instruction :",command.name,"déjà jouée");return true}}function runProg(){if(debug)console.log("\nrunProg",prog.length);runBranch(program.instructions,undefined)}exports.runProg=runProg;function reRunProg(){if(debug)console.log("\nreRunProg",program);if(program!==undefined){runBranch(program.instructions,undefined)}}function createModule(instr){var module={name:"Program",signal:undefined,signalActivated:undefined,burnt:false,instructions:instr};program=module;return module}exports.createModule=createModule;function runBranch(instructions,branch){if(debug)console.log("\nrunBranch: length: ",instructions.length);if(instructions.length===undefined){if(debug)console.log("runBranch: instruction seule:",instructions.name);if(!execInstruction(instructions,branch)){return false}return true}for(var i=0;i<instructions.length;i++){if(debug)console.log("-- runBranch: tableau d'instructions:",i,instructions[i].name,instructions[i].index);if(!execInstruction(instructions[i],instructions)){return false}}return true}function unburnBranch(instructions){if(instructions===undefined){return true}if(instructions.length===undefined){if(debug)console.log("unburnBranch 1:",instructions);instructions.burnt=false;return true}for(var i=0;i<instructions.length;i++){if(debug)console.log("\n--- unburnBranch",i,instructions[i].name);if(instructions[i].burnt!==undefined){if(debug)console.log("unburnBranch 2:",instructions[i].name);instructions[i].burnt=false;unburnBranch(instructions[i].nextInstr)}else{unburnBranch(instructions[i].nextInstr)}}return true}function printInstructions(instr,option){if(instr===undefined)return;for(var i=0;i<instr.length;i++){if(option===true){console.log(instr[i]);console.log("------------------------------")}else{console.log("-> ",instr[i].name,": index:",instr[i].index)}printInstructions(instr[i].nextInstr,option)}}function printProgram(prog,option){console.log("------ PROGRAM ---------------");printInstructions(prog.instructions,option);console.log("------------------------------")}exports.printProgram=printProgram;function _emit(signal,value){return createInstruction("emit",signal,value,undefined,undefined,undefined)}exports._emit=_emit;function _await(signal,count){return createInstruction("await",signal,undefined,count,undefined,undefined)}exports._await=_await;function _await_do(signal,count,action){return createInstruction("await_do",signal,undefined,count,action,undefined)}exports._await_do=_await_do;function _abort(signal,count,instructions){return createInstruction("abort",signal,undefined,count,undefined,instructions)}exports._abort=_abort;function _every(signal,count,instructions){return createInstruction("every",signal,undefined,count,undefined,instructions)}exports._every=_every;function _seq(instructions){return createInstruction("seq",undefined,undefined,undefined,undefined,instructions)}exports._seq=_seq;function _par(instructions){return createInstruction("par",undefined,undefined,undefined,undefined,instructions)}exports._par=_par;function _loop(instructions){return createInstruction("loop",undefined,undefined,undefined,undefined,instructions)}exports._loop=_loop;function _run(module){return createInstruction("run",undefined,undefined,undefined,undefined,module)}exports._run=_run;function _atom(action){return createInstruction("atom",undefined,undefined,undefined,action,undefined)}exports._atom=_atom;function _printSignals(){return createInstruction("printSignals",undefined,undefined,undefined,()=>{console.log(signals)},undefined)}exports._printSignals=_printSignals;function _restart(){return createInstruction("restart",undefined,undefined,undefined,undefined,undefined)}exports._restart=_restart;
|
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
var tick;
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
"use strict";
|
|
6
|
+
|
|
7
|
+
var hh = require("../hiphop/hiphop.js");
|
|
8
|
+
|
|
9
|
+
// C'est la seule façon d'échanger les paramètres nécessaires à la compilation
|
|
10
|
+
// lors de la création des signaux.
|
|
11
|
+
var par = require('../serveur/skiniParametres');
|
|
12
|
+
|
|
13
|
+
var midimix;
|
|
14
|
+
var oscMidiLocal;
|
|
15
|
+
|
|
16
|
+
var gcs;
|
|
17
|
+
var DAW;
|
|
18
|
+
var serveur;
|
|
19
|
+
|
|
20
|
+
var debug = false;
|
|
21
|
+
var debug1 = true;
|
|
22
|
+
|
|
23
|
+
// Avec des valeurs initiales
|
|
24
|
+
var CCChannel = 1;
|
|
25
|
+
var CCTempo = 100;
|
|
26
|
+
var tempoMax = 160;
|
|
27
|
+
var tempoMin = 40;
|
|
28
|
+
var tempoGlobal = 60;
|
|
29
|
+
|
|
30
|
+
function setServ(ser, daw, groupeCS, oscMidi, mix){
|
|
31
|
+
if(debug1) console.log("hh_ORCHESTRATION: setServ");
|
|
32
|
+
DAW = daw;
|
|
33
|
+
serveur = ser;
|
|
34
|
+
gcs = groupeCS;
|
|
35
|
+
oscMidiLocal = oscMidi;
|
|
36
|
+
midimix = mix;
|
|
37
|
+
}
|
|
38
|
+
exports.setServ = setServ;
|
|
39
|
+
|
|
40
|
+
function setTempo(value){
|
|
41
|
+
tempoGlobal = value;
|
|
42
|
+
|
|
43
|
+
if(midimix.getAbletonLinkStatus()) {
|
|
44
|
+
if(debug) console.log("ORCHESTRATION: set tempo Link:", value);
|
|
45
|
+
midimix.setTempoLink(value);
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
if ( value > tempoMax || value < tempoMin) {
|
|
49
|
+
console.log("ERR: Tempo set out of range:", value, "Should be between:", tempoMin, "and", tempoMax);
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
var tempo = Math.round(127/(tempoMax - tempoMin) * (value - tempoMin));
|
|
53
|
+
if (debug) {
|
|
54
|
+
console.log("Set tempo blockly:", value, par.busMidiDAW, CCChannel, CCTempo, tempo, oscMidiLocal.getMidiPortClipToDAW() );
|
|
55
|
+
}
|
|
56
|
+
oscMidiLocal.sendControlChange(par.busMidiDAW, CCChannel, CCTempo, tempo);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
var tempoValue = 0;
|
|
60
|
+
var tempoRythme = 0;
|
|
61
|
+
var tempoLimit = 0;
|
|
62
|
+
var tempoIncrease = true;
|
|
63
|
+
var transposeValue = 0;
|
|
64
|
+
var ratioTranspose = 1.763;
|
|
65
|
+
var offsetTranspose = 63.5;
|
|
66
|
+
|
|
67
|
+
function moveTempo(value, limit){
|
|
68
|
+
|
|
69
|
+
if(tempoLimit >= limit){
|
|
70
|
+
tempoLimit = 0;
|
|
71
|
+
tempoIncrease = !tempoIncrease;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
if(tempoIncrease){
|
|
75
|
+
tempoGlobal += value;
|
|
76
|
+
}else{
|
|
77
|
+
tempoGlobal -= value;
|
|
78
|
+
}
|
|
79
|
+
if(debug) console.log("moveTempo:", tempoGlobal);
|
|
80
|
+
setTempo(tempoGlobal);
|
|
81
|
+
tempoLimit++;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// Création des signaux OUT de contrôle de la matrice des possibles
|
|
85
|
+
// Ici et immédiatement.
|
|
86
|
+
var signals = [];
|
|
87
|
+
var halt, start, emptyQueueSignal, patternSignal, stopReservoir, stopMoveTempo;
|
|
88
|
+
var tickCounter = 0;
|
|
89
|
+
|
|
90
|
+
for (var i=0; i < par.groupesDesSons.length; i++) {
|
|
91
|
+
if(par.groupesDesSons[i][0] !== "") {
|
|
92
|
+
var signame = par.groupesDesSons[i][0] + "OUT";
|
|
93
|
+
|
|
94
|
+
if(debug1) console.log("Signal Orchestration:", signame);
|
|
95
|
+
|
|
96
|
+
var signal = hh.SIGNAL({
|
|
97
|
+
"%location":{},
|
|
98
|
+
"direction":"OUT",
|
|
99
|
+
"name":signame,
|
|
100
|
+
"init_func":function (){return [false, -1];}
|
|
101
|
+
});
|
|
102
|
+
signals.push(signal);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// Création des signaux IN de sélection de patterns
|
|
107
|
+
for (var i=0; i < par.groupesDesSons.length; i++) {
|
|
108
|
+
if(par.groupesDesSons[i][0] !== "") {
|
|
109
|
+
var signame = par.groupesDesSons[i][0] + "IN";
|
|
110
|
+
|
|
111
|
+
if(debug1) console.log("Signal Orchestration:", signame);
|
|
112
|
+
|
|
113
|
+
var signal = hh.SIGNAL({
|
|
114
|
+
"%location":{},
|
|
115
|
+
"direction":"IN",
|
|
116
|
+
"name":signame
|
|
117
|
+
});
|
|
118
|
+
signals.push(signal);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
var orchestration = hh.MODULE(
|
|
127
|
+
{"id":"Orchestration","%location":{},"%tag":"module"},
|
|
128
|
+
signals,
|
|
129
|
+
|
|
130
|
+
hh.SIGNAL({"%location":{},"direction":"IN","name":"start"}),
|
|
131
|
+
hh.SIGNAL({"%location":{},"direction":"IN","name":"halt"}),
|
|
132
|
+
hh.SIGNAL({"%location":{},"direction":"IN","name":"tick"}),
|
|
133
|
+
hh.SIGNAL({"%location":{},"direction":"IN","name":"DAWON"}),
|
|
134
|
+
hh.SIGNAL({"%location":{},"direction":"IN","name":"patternSignal"}),
|
|
135
|
+
hh.SIGNAL({"%location":{},"direction":"IN","name":"controlFromVideo"}),
|
|
136
|
+
hh.SIGNAL({"%location":{},"direction":"IN","name":"pulsation"}),
|
|
137
|
+
hh.SIGNAL({"%location":{},"direction":"IN","name":"midiSignal"}),
|
|
138
|
+
hh.SIGNAL({"%location":{},"direction":"IN","name":"emptyQueueSignal"}),
|
|
139
|
+
hh.SIGNAL({"%location":{},"direction":"IN","name":"INTERFACEZ_RC"}),
|
|
140
|
+
hh.SIGNAL({"%location":{},"direction":"IN","name":"INTERFACEZ_RC0"}),
|
|
141
|
+
hh.SIGNAL({"%location":{},"direction":"IN","name":"INTERFACEZ_RC1"}),
|
|
142
|
+
hh.SIGNAL({"%location":{},"direction":"IN","name":"INTERFACEZ_RC2"}),
|
|
143
|
+
hh.SIGNAL({"%location":{},"direction":"IN","name":"INTERFACEZ_RC3"}),
|
|
144
|
+
hh.SIGNAL({"%location":{},"direction":"IN","name":"INTERFACEZ_RC4"}),
|
|
145
|
+
hh.SIGNAL({"%location":{},"direction":"IN","name":"INTERFACEZ_RC5"}),
|
|
146
|
+
hh.SIGNAL({"%location":{},"direction":"IN","name":"INTERFACEZ_RC6"}),
|
|
147
|
+
hh.SIGNAL({"%location":{},"direction":"IN","name":"INTERFACEZ_RC7"}),
|
|
148
|
+
hh.SIGNAL({"%location":{},"direction":"IN","name":"INTERFACEZ_RC8"}),
|
|
149
|
+
hh.SIGNAL({"%location":{},"direction":"IN","name":"INTERFACEZ_RC9"}),
|
|
150
|
+
hh.SIGNAL({"%location":{},"direction":"IN","name":"INTERFACEZ_RC10"}),
|
|
151
|
+
hh.SIGNAL({"%location":{},"direction":"IN","name":"INTERFACEZ_RC11"}),
|
|
152
|
+
hh.SIGNAL({"%location":{},"direction":"INOUT","name":"stopReservoir"}),
|
|
153
|
+
hh.SIGNAL({"%location":{},"direction":"INOUT","name":"stopMoveTempo"}),
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
hh.LOOP(
|
|
157
|
+
{
|
|
158
|
+
"%location":{loop: 1},
|
|
159
|
+
"%tag":"loop"
|
|
160
|
+
},
|
|
161
|
+
hh.ABORT(
|
|
162
|
+
{
|
|
163
|
+
"%location":{abort: halt},
|
|
164
|
+
"%tag":"abort",
|
|
165
|
+
"immediate":false,
|
|
166
|
+
"apply": function (){return ((() => {
|
|
167
|
+
const halt=this["halt"];
|
|
168
|
+
return halt.now;
|
|
169
|
+
})());},
|
|
170
|
+
"countapply":function (){ return 1;}
|
|
171
|
+
},
|
|
172
|
+
hh.SIGACCESS({
|
|
173
|
+
"signame":"halt",
|
|
174
|
+
"pre":false,
|
|
175
|
+
"val":false,
|
|
176
|
+
"cnt":false
|
|
177
|
+
}),
|
|
178
|
+
|
|
179
|
+
hh.AWAIT(
|
|
180
|
+
{
|
|
181
|
+
"%location":{},
|
|
182
|
+
"%tag":"await",
|
|
183
|
+
"immediate":true,
|
|
184
|
+
"apply":function () {
|
|
185
|
+
return ((() => {
|
|
186
|
+
const start=this["start"];
|
|
187
|
+
return start.now;
|
|
188
|
+
})());
|
|
189
|
+
},
|
|
190
|
+
},
|
|
191
|
+
hh.SIGACCESS({
|
|
192
|
+
"signame":"start",
|
|
193
|
+
"pre":false,
|
|
194
|
+
"val":false,
|
|
195
|
+
"cnt":false
|
|
196
|
+
})
|
|
197
|
+
),
|
|
198
|
+
|
|
199
|
+
hh.FORK(
|
|
200
|
+
{"%location":{},"%tag":"fork"},
|
|
201
|
+
hh.SEQUENCE(
|
|
202
|
+
{"%location":{},"%tag":"fork"},
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
hh.ABORT(
|
|
206
|
+
{
|
|
207
|
+
"%location":{abort: tick},
|
|
208
|
+
"%tag":"abort",
|
|
209
|
+
"immediate":false,
|
|
210
|
+
"apply": function (){return ((() => {
|
|
211
|
+
const tick=this["tick"];
|
|
212
|
+
return tick.now;
|
|
213
|
+
})());},
|
|
214
|
+
"countapply":function (){ return 4;}
|
|
215
|
+
},
|
|
216
|
+
hh.SIGACCESS({
|
|
217
|
+
"signame":"tick",
|
|
218
|
+
"pre":false,
|
|
219
|
+
"val":false,
|
|
220
|
+
"cnt":false
|
|
221
|
+
}),
|
|
222
|
+
|
|
223
|
+
hh.LOOP(
|
|
224
|
+
{
|
|
225
|
+
"%location":{loop: 1},
|
|
226
|
+
"%tag":"loop"
|
|
227
|
+
},
|
|
228
|
+
|
|
229
|
+
hh.AWAIT(
|
|
230
|
+
{
|
|
231
|
+
"%location":{},
|
|
232
|
+
"%tag":"await",
|
|
233
|
+
"immediate":true,
|
|
234
|
+
"apply":function () {
|
|
235
|
+
return ((() => {
|
|
236
|
+
const tick=this["tick"];
|
|
237
|
+
return tick.now;
|
|
238
|
+
})());
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
hh.SIGACCESS({
|
|
242
|
+
"signame":"tick",
|
|
243
|
+
"pre":false,
|
|
244
|
+
"val":false,
|
|
245
|
+
"cnt":false
|
|
246
|
+
})
|
|
247
|
+
),
|
|
248
|
+
|
|
249
|
+
hh.ATOM(
|
|
250
|
+
{
|
|
251
|
+
"%location":{},
|
|
252
|
+
"%tag":"node",
|
|
253
|
+
"apply":function () {console.log('foo tuto5 3eme');}
|
|
254
|
+
}
|
|
255
|
+
),
|
|
256
|
+
|
|
257
|
+
hh.PAUSE(
|
|
258
|
+
{
|
|
259
|
+
"%location":{},
|
|
260
|
+
"%tag":"yield"
|
|
261
|
+
}
|
|
262
|
+
),
|
|
263
|
+
|
|
264
|
+
),
|
|
265
|
+
|
|
266
|
+
),
|
|
267
|
+
|
|
268
|
+
),
|
|
269
|
+
hh.SEQUENCE(
|
|
270
|
+
{"%location":{},"%tag":"fork"},
|
|
271
|
+
hh.EVERY(
|
|
272
|
+
{
|
|
273
|
+
"%location":{},
|
|
274
|
+
"%tag":"every",
|
|
275
|
+
"immediate":false,
|
|
276
|
+
"apply": function (){return ((() => {
|
|
277
|
+
const tick = this["tick"];
|
|
278
|
+
return tick.now;
|
|
279
|
+
})());},
|
|
280
|
+
},
|
|
281
|
+
hh.SIGACCESS({
|
|
282
|
+
"signame":"tick",
|
|
283
|
+
"pre":false,
|
|
284
|
+
"val":false,
|
|
285
|
+
"cnt":false
|
|
286
|
+
}),
|
|
287
|
+
hh.ATOM(
|
|
288
|
+
{
|
|
289
|
+
"%location":{},
|
|
290
|
+
"%tag":"node",
|
|
291
|
+
"apply":function () {
|
|
292
|
+
gcs.setTickOnControler(tickCounter);
|
|
293
|
+
tickCounter++;
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
)
|
|
297
|
+
)
|
|
298
|
+
)
|
|
299
|
+
)
|
|
300
|
+
)
|
|
301
|
+
)
|
|
302
|
+
);
|
|
303
|
+
exports.orchestration = orchestration;
|
|
304
|
+
|
|
305
|
+
function setSignals(){
|
|
306
|
+
//console.log("INFO: setSignals: Orchestration:", );
|
|
307
|
+
var machine = new hh.ReactiveMachine( orchestration, {sweep:true, tracePropagation: false, traceReactDuration: false});
|
|
308
|
+
console.log("INFO: setSignals: Number of nets in Orchestration:",machine.nets.length);
|
|
309
|
+
return machine;
|
|
310
|
+
}
|
|
311
|
+
exports.setSignals = setSignals;
|