Initial commit

This commit is contained in:
pasketti
2026-04-05 16:14:49 -04:00
commit ebee3a5534
14059 changed files with 2588797 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
var Utils = {
isNative: function(fn) {
return (/\{\s*\[native code\]\s*\}/).test('' + fn);
}
};

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,34 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<!-- For Windows 8 and 10 to support Jazz Plugin -->
<meta http-equiv="X-UA-Compatible" content="requiresActiveX=true"/>
<title>Web MIDI API Demo</title>
<script src="libs/WebMIDIAPI.js"></script>
<!--<script src="https://cdn.jsdelivr.net/npm/webmidi"></script>-->
<script src="../../src/webmidi.js"></script>
<script src="script.js"></script>
</head>
<body>
<p>Open the debugging console and look at the <b>app.js</b> file for usage examples.</p>
Jazz Plugin for browsers that do not support Web MIDI
<object id="Jazz1" classid="CLSID:1ACE1618-1C7D-4561-AEE1-34842AA85E90" class="hidden">
<object id="Jazz2" type="audio/x-jazz" class="hidden">
<p><a href=http://jazz-soft.net>Jazz-Plugin</a> required!</p>
</object>
</object>
</body>
</html>

99
node_modules/webmidi/playground/testbrowser/script.js generated vendored Normal file
View File

@@ -0,0 +1,99 @@
document.addEventListener("DOMContentLoaded", function () {
WebMidi.enable(function(err) {
if (err) console.warn("xxxWebMidi couldn't be enabled!", err);
console.log(WebMidi.inputs);
console.log(WebMidi.outputs);
WebMidi.inputs.forEach(function (input) {
input.addListener("noteon", "all", function (e) {
console.log(e);
})
console.log(input.getCcNameByNumber(34));
});
// WebMidi.inputs.forEach(function (input) {
// input.addListener("connected", undefined, function (e) {
// console.log("CONNECTED!!", e);
// })
// input.addListener("disconnected", undefined, function (e) {
// console.log("DISCONNECTED!!", e);
// })
// });
// var test = function (e) {
// console.log(e.test);
// };
// WebMidi.inputs[0].addListener("midimessage", undefined, test);
WebMidi.outputs.forEach(function (output) {
output.playNote("C4", 10, {duration: 1000});
});
// WebMidi.outputs.forEach(function (output) {
// output.stopNote("C4", 10, {velocity: "0.25"});
// });
// var kbd = WebMidi.inputs[0];
// var toSynth = WebMidi.getOutputByName("MIDI Monitor");
//
// kbd.addListener('noteon', "all", function (e) {
// console.log(e);
// toSynth.playNote(e.note.number, 8);
// });
//
// kbd.addListener('noteoff', "all", function (e) {
// console.log(e);
// toSynth.stopNote(e.note.number, 8);
// });
// WebMidi.outputs[0].sendSysex(0x42, [1, 2, 3, 4, 5]);
// }, true)
}, {sysex: true, software: true})
// WebMidi.enable(function(err) {
//
// if(err) {
// console.log("WebMidi cannot be enabled!");
// } else {
// console.log("WebMidi enabled!");
//
// // create dropdown for MIDI output select
// // let controls = document.getElementById("controls");
// // let select = document.createElement("select");
// // select.id = "midiOut";
// // select.setAttribute("onchange", "midiPortSelect(this.value)");
// // controls.appendChild(select);
// for(i = 0; i < WebMidi.outputs.length; i ++) {
// console.log("output: " + WebMidi.outputs[i].name);
// // let option = document.createElement("option");
// // option.appendChild(document.createTextNode(WebMidi.outputs[i].name));
// // select.appendChild(option);
// }
//
// }
//
// }, true);
// WebMidi.enable( function(error) {
//
// if(error) console.log("WebMidi Error:", error);
//
// WebMidi.outputs[0].playNote("Gb2", 10, {duration: 2000, velocity: 0.25});
// // WebMidi.outputs[0].stopNote("Gb2", 10);
//
// });
});

View File

@@ -0,0 +1,50 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<!-- For Windows 8 and 10 to support Jazz Plugin -->
<meta http-equiv="X-UA-Compatible" content="requiresActiveX=true"/>
<title>Web MIDI API Demo</title>
<script type="module">
import WebMidi from './libs/webmidi.js';
document.addEventListener("DOMContentLoaded", function () {
console.log("DOMContentLoaded");
WebMidi.enable(function(err) {
if (err) { console.log(err); }
console.log(this.outputs);
console.log(this.inputs);
}, true);
});
</script>
</head>
<body>
<p>Open the debugging console and look at the <b>app.js</b> file for usage examples.</p>
<!-- Jazz Plugin for browsers that do not support Web MIDI-->
<object id="Jazz1" classid="CLSID:1ACE1618-1C7D-4561-AEE1-34842AA85E90" class="hidden">
<object id="Jazz2" type="audio/x-jazz" class="hidden">
<p><a href=http://jazz-soft.net>Jazz-Plugin</a> required!</p>
</object>
</object>
</body>
</html>

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

79877
node_modules/webmidi/playground/testnode/coucou.txt generated vendored Normal file

File diff suppressed because it is too large Load Diff

13
node_modules/webmidi/playground/testnode/package.json generated vendored Normal file
View File

@@ -0,0 +1,13 @@
{
"name": "testnode",
"version": "1.0.0",
"description": "",
"main": "test.js",
"author": "Jean-Philippe Côté <jp@cote.cc> (http://cote.cc/)",
"license": "ISC",
"dependencies": {
"jazz-midi": "^1.5.4",
"web-midi-api": "^1.4.4",
"webmidi": "^2.0.0-rc.7"
}
}

36
node_modules/webmidi/playground/testnode/test.js generated vendored Normal file
View File

@@ -0,0 +1,36 @@
// The `web-midi-api` module takes care of importing the `jazz-midi` module (which needs to be
// installed) and the WebMIDIAPI shim (which is already part of `web-midi-api`).
global.navigator = require('web-midi-api');
// WebMidi.js depends on the browser's performance.now() so we fake it with the `performance-now`
// Node module (which is installed as a dependency of `web-midi-api`).
global.performance = { now: require('performance-now') };
// To use WebMidi.js, you then simply need to require it.
var WebMidi = new require('webmidi');
// Usual stuff
WebMidi.enable(function (err) {
if (err) return console.log("WebMidi could not be enabled.", err);
console.log("WebMidi enabled!");
console.log("*** Inputs:");
WebMidi.inputs.forEach((o) => {
console.log(o.name)
o.addListener('noteon', "all", (event) => {
console.log(event.note)
});
});
console.log("*** Outputs:");
WebMidi.outputs.forEach( (o) => {
console.log(o.name);
o.playNote("G3")
});
});

File diff suppressed because it is too large Load Diff

31
node_modules/webmidi/playground/testwebpack/index.html generated vendored Normal file
View File

@@ -0,0 +1,31 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<!-- For Windows 8 and 10 to support Jazz Plugin -->
<meta http-equiv="X-UA-Compatible" content="requiresActiveX=true"/>
<title>Web MIDI API Demo</title>
<script src="dist/app.bundle.js"></script>
</head>
<body>
<p>Open the debugging console and look at the <b>app.js</b> file for usage examples.</p>
<!-- Jazz Plugin for browsers that do not support Web MIDI-->
<object id="Jazz1" classid="CLSID:1ACE1618-1C7D-4561-AEE1-34842AA85E90" class="hidden">
<object id="Jazz2" type="audio/x-jazz" class="hidden">
<p><a href=http://jazz-soft.net>Jazz-Plugin</a> required!</p>
</object>
</object>
</body>
</html>

View File

@@ -0,0 +1,7 @@
var Utils = {
isNative: function(fn) {
return (/\{\s*\[native code\]\s*\}/).test('' + fn);
}
};

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,13 @@
const path = require('path');
// const webpack = require('webpack');
module.exports = {
context: path.resolve(__dirname, './src'),
entry: {
app: './app.js',
},
output: {
path: path.resolve(__dirname, './dist'),
filename: '[name].bundle.js',
},
};