-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from midival/feat/virtual-ports
release 0.0.6: Virtual ports. Tests. Examples.
- Loading branch information
Showing
20 changed files
with
2,788 additions
and
165 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
dist/ | ||
node_modules/ | ||
docs/ | ||
coverage/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { MIDIVal } from "@midival/core"; | ||
import {NodeMIDIAccess} from "../src/index"; | ||
import * as midi from "midi"; | ||
import { version as versionMidivalCore } from "@midival/core/package.json"; | ||
import { version as versionMidivalNode } from "../package.json"; | ||
|
||
|
||
const nodeAccess = new NodeMIDIAccess(midi); | ||
MIDIVal.configureAccessObject(nodeAccess); | ||
console.log("------------------------"); | ||
console.log("MIDIVal - Listing inputs") | ||
console.log("@midival/core", versionMidivalCore); | ||
console.log("@midival/node", versionMidivalNode); | ||
console.log("------------------------"); | ||
console.log(); | ||
MIDIVal.connect() | ||
.then(access => { | ||
access.inputs.forEach(device => { | ||
console.log("[ input ]", `${device.name} (${device.id})`); | ||
}); | ||
|
||
setTimeout(() => { | ||
nodeAccess.createVirtualInputPort("HELLO WORLD"); | ||
}, 1200); | ||
}); | ||
|
||
MIDIVal.onInputDeviceConnected(device => { | ||
console.log("[ connected ]", `${device.name} (${device.id})`); | ||
}); | ||
|
||
MIDIVal.onInputDeviceDisconnected(device => { | ||
console.log("[ disconnected ]", `${device.name} (${device.id})`); | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { MIDIVal } from "@midival/core"; | ||
import {NodeMIDIAccess} from "../src/index"; | ||
import * as midi from "midi"; | ||
|
||
import { version as versionMidivalCore } from "@midival/core/package.json"; | ||
import { version as versionMidivalNode } from "../package.json"; | ||
|
||
const nodeAccess = new NodeMIDIAccess(midi, { | ||
watchTimeout: 1000, | ||
}); | ||
console.log("------------------------"); | ||
console.log("MIDIVal - Listing outputs") | ||
console.log("@midival/core", versionMidivalCore); | ||
console.log("@midival/node", versionMidivalNode); | ||
console.log("------------------------"); | ||
console.log(); | ||
MIDIVal.configureAccessObject(nodeAccess); | ||
MIDIVal.connect() | ||
.then(access => { | ||
access.outputs.forEach(device => { | ||
console.log("[ output ]", `${device.name} (${device.id})`); | ||
}); | ||
|
||
setTimeout(() => { | ||
nodeAccess.createVirtualOutputPort("HELLO WORLD"); | ||
}, 1200); | ||
}); | ||
|
||
MIDIVal.onOutputDeviceConnected(device => { | ||
console.log("[ connected ]", `${device.name} (${device.id})`); | ||
}); | ||
|
||
MIDIVal.onOutputDeviceDisconnected(device => { | ||
console.log("[ disconnected ]", `${device.name} (${device.id})`); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"name": "examples", | ||
"version": "1.0.0", | ||
"main": "index.js", | ||
"license": "MIT", | ||
"dependencies": { | ||
"@midival/core": "^0.0.17", | ||
"@midival/node": "^0.0.5", | ||
"midi": "^2.0.0" | ||
}, | ||
"devDependencies": { | ||
"ts-node": "^10.8.1" | ||
}, | ||
"scripts": { | ||
"midi_in": "ts-node midi_in.ts", | ||
"midi_out": "ts-node midi_out.ts" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "es2015", | ||
"module": "commonjs", | ||
"strict": false, | ||
"moduleResolution": "node", | ||
"resolveJsonModule": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,156 @@ | ||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. | ||
# yarn lockfile v1 | ||
|
||
|
||
"@cspotcode/source-map-support@^0.8.0": | ||
version "0.8.1" | ||
resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1" | ||
integrity sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw== | ||
dependencies: | ||
"@jridgewell/trace-mapping" "0.3.9" | ||
|
||
"@hypersphere/omnibus@^0.0.6": | ||
version "0.0.6" | ||
resolved "https://registry.yarnpkg.com/@hypersphere/omnibus/-/omnibus-0.0.6.tgz#07a3c415e60d9597878d83595b9e26d54093e9cd" | ||
integrity sha512-FoBtsV9mLHVqQWaqu/p+A26Y0nUEmK1wCuPjfNzey02fzdHOCbFNlaxX0mETql3I3G6xA3/u1H90OC2FdyOyVA== | ||
|
||
"@jridgewell/resolve-uri@^3.0.3": | ||
version "3.0.7" | ||
resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.0.7.tgz#30cd49820a962aff48c8fffc5cd760151fca61fe" | ||
integrity sha512-8cXDaBBHOr2pQ7j77Y6Vp5VDT2sIqWyWQ56TjEq4ih/a4iST3dItRe8Q9fp0rrIl9DoKhWQtUQz/YpOxLkXbNA== | ||
|
||
"@jridgewell/sourcemap-codec@^1.4.10": | ||
version "1.4.13" | ||
resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.13.tgz#b6461fb0c2964356c469e115f504c95ad97ab88c" | ||
integrity sha512-GryiOJmNcWbovBxTfZSF71V/mXbgcV3MewDe3kIMCLyIh5e7SKAeUZs+rMnJ8jkMolZ/4/VsdBmMrw3l+VdZ3w== | ||
|
||
"@jridgewell/trace-mapping@0.3.9": | ||
version "0.3.9" | ||
resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz#6534fd5933a53ba7cbf3a17615e273a0d1273ff9" | ||
integrity sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ== | ||
dependencies: | ||
"@jridgewell/resolve-uri" "^3.0.3" | ||
"@jridgewell/sourcemap-codec" "^1.4.10" | ||
|
||
"@midival/core@^0.0.13": | ||
version "0.0.13" | ||
resolved "https://registry.yarnpkg.com/@midival/core/-/core-0.0.13.tgz#e1efd4913b5ecc687f34bb4f263c6c17ea1689b3" | ||
integrity sha512-E/UXSOfvAo0diyhavbGfdXpVRe9/xZkNGmfe8/DhJ1MjItga4Ibc6gaeT9p92EebAABR5J6k+kKmEQSyp8/pYg== | ||
|
||
"@midival/core@^0.0.17": | ||
version "0.0.17" | ||
resolved "https://registry.yarnpkg.com/@midival/core/-/core-0.0.17.tgz#68c8ed304731c109375be1ecbbf781d6c2741f43" | ||
integrity sha512-MPujYtefqX9RfHBNfA5/nmnCvVTAi1nZTAYwuDTAafQj4ZNs3viH5eRgX/lH0ll70SJDZSjmn1My6oswBsO6Jw== | ||
dependencies: | ||
"@hypersphere/omnibus" "^0.0.6" | ||
|
||
"@midival/node@^0.0.5": | ||
version "0.0.5" | ||
resolved "https://registry.yarnpkg.com/@midival/node/-/node-0.0.5.tgz#96e8fe443624590fe4093b8b4fc5d37d16954d70" | ||
integrity sha512-/UnH/Vtc/Nn0vopKGkc0stdABIzQAmCZYA6DkBp1hA1/ipgVX/uRkxMn0w0Z1OMlsWyb7UemSE4JtvqWsbZnxg== | ||
dependencies: | ||
"@midival/core" "^0.0.13" | ||
|
||
"@tsconfig/node10@^1.0.7": | ||
version "1.0.8" | ||
resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.8.tgz#c1e4e80d6f964fbecb3359c43bd48b40f7cadad9" | ||
integrity sha512-6XFfSQmMgq0CFLY1MslA/CPUfhIL919M1rMsa5lP2P097N2Wd1sSX0tx1u4olM16fLNhtHZpRhedZJphNJqmZg== | ||
|
||
"@tsconfig/node12@^1.0.7": | ||
version "1.0.9" | ||
resolved "https://registry.yarnpkg.com/@tsconfig/node12/-/node12-1.0.9.tgz#62c1f6dee2ebd9aead80dc3afa56810e58e1a04c" | ||
integrity sha512-/yBMcem+fbvhSREH+s14YJi18sp7J9jpuhYByADT2rypfajMZZN4WQ6zBGgBKp53NKmqI36wFYDb3yaMPurITw== | ||
|
||
"@tsconfig/node14@^1.0.0": | ||
version "1.0.1" | ||
resolved "https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.1.tgz#95f2d167ffb9b8d2068b0b235302fafd4df711f2" | ||
integrity sha512-509r2+yARFfHHE7T6Puu2jjkoycftovhXRqW328PDXTVGKihlb1P8Z9mMZH04ebyajfRY7dedfGynlrFHJUQCg== | ||
|
||
"@tsconfig/node16@^1.0.2": | ||
version "1.0.2" | ||
resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.2.tgz#423c77877d0569db20e1fc80885ac4118314010e" | ||
integrity sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA== | ||
|
||
acorn-walk@^8.1.1: | ||
version "8.2.0" | ||
resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" | ||
integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== | ||
|
||
acorn@^8.4.1: | ||
version "8.7.1" | ||
resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.7.1.tgz#0197122c843d1bf6d0a5e83220a788f278f63c30" | ||
integrity sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A== | ||
|
||
arg@^4.1.0: | ||
version "4.1.3" | ||
resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" | ||
integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== | ||
|
||
bindings@~1.5.0: | ||
version "1.5.0" | ||
resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" | ||
integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== | ||
dependencies: | ||
file-uri-to-path "1.0.0" | ||
|
||
create-require@^1.1.0: | ||
version "1.1.1" | ||
resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" | ||
integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== | ||
|
||
diff@^4.0.1: | ||
version "4.0.2" | ||
resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" | ||
integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== | ||
|
||
file-uri-to-path@1.0.0: | ||
version "1.0.0" | ||
resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" | ||
integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== | ||
|
||
make-error@^1.1.1: | ||
version "1.3.6" | ||
resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" | ||
integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== | ||
|
||
midi@^2.0.0: | ||
version "2.0.0" | ||
resolved "https://registry.yarnpkg.com/midi/-/midi-2.0.0.tgz#5035dd0d0c4b381eeb6e9202c785ce81221d0c7a" | ||
integrity sha512-HyCLWa+ET8Aqfu/NxdNkxfCx0EfCJrcZgKuhrY4c9UgkfxRt3ChM7RP1oC5vJf7ALXyuAG47jqr5yUlvSodTPQ== | ||
dependencies: | ||
bindings "~1.5.0" | ||
nan "^2.14.2" | ||
|
||
nan@^2.14.2: | ||
version "2.16.0" | ||
resolved "https://registry.yarnpkg.com/nan/-/nan-2.16.0.tgz#664f43e45460fb98faf00edca0bb0d7b8dce7916" | ||
integrity sha512-UdAqHyFngu7TfQKsCBgAA6pWDkT8MAO7d0jyOecVhN5354xbLqdn8mV9Tat9gepAupm0bt2DbeaSC8vS52MuFA== | ||
|
||
ts-node@^10.8.1: | ||
version "10.8.1" | ||
resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.8.1.tgz#ea2bd3459011b52699d7e88daa55a45a1af4f066" | ||
integrity sha512-Wwsnao4DQoJsN034wePSg5nZiw4YKXf56mPIAeD6wVmiv+RytNSWqc2f3fKvcUoV+Yn2+yocD71VOfQHbmVX4g== | ||
dependencies: | ||
"@cspotcode/source-map-support" "^0.8.0" | ||
"@tsconfig/node10" "^1.0.7" | ||
"@tsconfig/node12" "^1.0.7" | ||
"@tsconfig/node14" "^1.0.0" | ||
"@tsconfig/node16" "^1.0.2" | ||
acorn "^8.4.1" | ||
acorn-walk "^8.1.1" | ||
arg "^4.1.0" | ||
create-require "^1.1.0" | ||
diff "^4.0.1" | ||
make-error "^1.1.1" | ||
v8-compile-cache-lib "^3.0.1" | ||
yn "3.1.1" | ||
|
||
v8-compile-cache-lib@^3.0.1: | ||
version "3.0.1" | ||
resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" | ||
integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg== | ||
|
||
yn@3.1.1: | ||
version "3.1.1" | ||
resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" | ||
integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module.exports = { | ||
roots: ["<rootDir>/src"], | ||
transform: { | ||
"^.+\\.tsx?$": "ts-jest", | ||
}, | ||
verbose: true, | ||
collectCoverage: true, | ||
coverageReporters: ["text-summary", "html"], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,31 @@ | ||
{ | ||
"name": "@midival/node", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"main": "dist/index.js", | ||
"repository": "git@github.com:midival/node.git", | ||
"author": "Kacper Kula <kulak@kulak.at>", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"@types/node": "^16.3.3", | ||
"typedoc": "^0.21.4", | ||
"typescript": "^4.3.5" | ||
"@midival/core": "^0.0.17", | ||
"@types/jest": "^28.1.1", | ||
"@types/midi": "^2.0.0", | ||
"@types/node": "^17.0.42", | ||
"jest": "^28.1.1", | ||
"ts-jest": "^28.0.5", | ||
"typedoc": "^0.22.17", | ||
"typescript": "^4.7.3" | ||
}, | ||
"peerDependencies": { | ||
"@midival/core": "^0.0.17", | ||
"midi": "^2.0.0" | ||
}, | ||
"peerDependencies": {}, | ||
"scripts": { | ||
"compile": "tsc", | ||
"test": "echo 'No tests yet'", | ||
"test": "jest", | ||
"docs": "typedoc", | ||
"deploy": "gh-pages -d docs" | ||
}, | ||
"dependencies": { | ||
"@midival/core": "^0.0.13" | ||
"@hypersphere/omnibus": "^0.0.6" | ||
} | ||
} |
Oops, something went wrong.