{"id":18248822,"url":"https://github.com/igorski/zmidi","last_synced_at":"2025-04-04T15:32:31.287Z","repository":{"id":21335197,"uuid":"24652053","full_name":"igorski/zMIDI","owner":"igorski","description":"Small JavaScript library providing an easy interface to work with Web MIDI, translating messages to notes.","archived":false,"fork":false,"pushed_at":"2024-12-15T09:06:27.000Z","size":387,"stargazers_count":17,"open_issues_count":1,"forks_count":1,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-03T17:05:25.768Z","etag":null,"topics":["javascript-library","web-midi","webaudio","webaudio-api","webmidi"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/igorski.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-09-30T19:19:03.000Z","updated_at":"2024-12-15T09:06:24.000Z","dependencies_parsed_at":"2024-08-03T16:06:20.333Z","dependency_job_id":"a50c9049-71db-4701-acef-dc8091e1aa57","html_url":"https://github.com/igorski/zMIDI","commit_stats":{"total_commits":24,"total_committers":2,"mean_commits":12.0,"dds":0.08333333333333337,"last_synced_commit":"78640f203bb6a18e842128c29ae8820db2d241a3"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igorski%2FzMIDI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igorski%2FzMIDI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igorski%2FzMIDI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igorski%2FzMIDI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/igorski","download_url":"https://codeload.github.com/igorski/zMIDI/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247203100,"owners_count":20900915,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["javascript-library","web-midi","webaudio","webaudio-api","webmidi"],"created_at":"2024-11-05T09:38:24.898Z","updated_at":"2025-04-04T15:32:26.278Z","avatar_url":"https://github.com/igorski.png","language":"JavaScript","readme":"# zMIDI\n\nzMIDI is a small JavaScript library that provides an easy interface to transfer messages from connected MIDI\ndevices into your application and vice versa. zMIDI basically enables your web app to communicate with musical hardware.\n\nInstead of you having to manually translate weird hexadecimal numbers or doing scary masking operations on incoming MIDI messages, zMIDI does the job for you and provides you with enumerated types in an Event-driven model, which makes both more sense in a JavaScript environment and allows for easier development by providing an adequate abstraction layer.\n\nzMIDI is used by WebSID and Efflux, which you can try out live. See the demos section at the end of this README.\n\n## Installation\n\nYou can get zMIDI via NPM:\n\n```\nnpm install zmidi\n```\n\nzMIDI has been written in modern vanilla JavaScript but comes with TypeScript annotations. The annotations rely\non the type annotations for the WebMIDI API. You can install these in your project using:\n\n```\nnpm install --save-dev @types/webmidi\n```\n\n## Project integration\n\nzMIDI is compatible with ES6 Modules, CommonJS, AMD/RequireJS or can be included in the browser via script tags:\n\n### ES6 module\n\n```\nimport { zMIDI, zMIDIEvent, MIDINotes } from \"zmidi\";\n```\n\n### CommonJS:\n\n```\nconst ZMIDILib = require( \"zmidi\" );\nconst { zMIDI, zMIDIEvent, MIDINotes } = zMIDILib;\n```\n\n(you can subsequently use a tool like Browserify to build for the browser).\n\n### RequireJS\n\nUse _zmidi.amd.js_ inside the _dist/_-folder for a prebuilt, minimized AMD library transpiled to ES5.\n\n```\nrequire( [ \"zmidi.amd\" ], function( zMIDILib ) {\n    // do something with zMIDILib-properties:\n    // \"zMIDI\", \"zMIDIEvent\", \"MIDINotes\"    \n});\n```\n\n### Browser:\n\nUse _zmidi.min.js_ inside the _dist/_-folder for a prebuilt, minimized library transpiled to ES5.\n\n```\n\u003cscript type=\"text/javascript\" src=\"./dist/zmidi.min.js\"\u003e\u003c/script\u003e\n\u003cscript type=\"text/javascript\"\u003e\n\n    // do something with globally available actors:\n    // \"zMIDI\", \"zMIDIEvent\", \"MIDINotes\"\n\n\u003c/script\u003e\n```\n\n## Usage\n\n### Ensuring WebMIDI is available at the browser level\n\nWebMIDI is still a W3C draft not implemented globally. Chrome users have already enjoyed this\nfeature for years across desktop and mobile platforms with Edge and Opera users following suit.\n\nYou can [consult this page](https://caniuse.com/?search=midi) to view the latest on browser support.\n\n### Really making sure WebMIDI is available at the application level\n\nQuery the result of _zMIDI.isSupported()_ to really, really make sure it is available!\n\n### Making sure you meet Chrome's security standards\n\nAs of M75, Web MIDI API will now ask for permissions. As such, any app using it will have to be served over HTTPS. Chrome’s permission requiring feature is available only on secure origins so effectively only on these the MIDI API will be allowed. The secure origins meet the following format:\n\n```\n(https, *, *)\n(wss, *, *)\n(*, localhost, *)\n(*, 127/8, *)\n(*, ::1/128, *)\n(file, *, — )\n(chrome-extension, *, — )\n```\n\n## Documentation / Wiki\n\nYou can view the online documentation here on Github :\n\nhttps://github.com/igorski/zMIDI/wiki\n\n## Demos\n\nTo quickly see what zMIDI is capable of, you can try the following URL with a MIDI keyboard attached to your computer :\n\nhttps://rawgit.com/igorski/zMIDI/master/examples/index.html\n\nthose on macOS might find this [guide on creating a virtual MIDI output](https://feelyoursound.com/setup-midi-os-x/) valuable.\n\nfor a demo that packs some more punch, try the following applications:\n\n * [WebSID](https://www.igorski.nl/application/websid)\n * [Efflux](https://www.igorski.nl/application/efflux)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Figorski%2Fzmidi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Figorski%2Fzmidi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Figorski%2Fzmidi/lists"}