{"id":19515179,"url":"https://github.com/krmax44/midy","last_synced_at":"2025-10-08T06:32:34.867Z","repository":{"id":57296917,"uuid":"243068992","full_name":"krmax44/midy","owner":"krmax44","description":"A super-minimalistic MIDI library.","archived":false,"fork":false,"pushed_at":"2020-09-12T12:04:11.000Z","size":164,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-09T02:05:23.393Z","etag":null,"topics":["midi","web-midi"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/krmax44.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}},"created_at":"2020-02-25T18:21:14.000Z","updated_at":"2020-09-12T12:04:13.000Z","dependencies_parsed_at":"2022-09-01T13:01:56.057Z","dependency_job_id":null,"html_url":"https://github.com/krmax44/midy","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krmax44%2Fmidy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krmax44%2Fmidy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krmax44%2Fmidy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krmax44%2Fmidy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/krmax44","download_url":"https://codeload.github.com/krmax44/midy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240766677,"owners_count":19854114,"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":["midi","web-midi"],"created_at":"2024-11-10T23:38:51.662Z","updated_at":"2025-10-08T06:32:29.838Z","avatar_url":"https://github.com/krmax44.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Midy\n\n[![GitHub CI Status](https://img.shields.io/github/workflow/status/krmax44/midy/build/master)](https://github.com/krmax44/midy/actions?query=workflow%3Abuild)\n[![Code Coverage](https://img.shields.io/codecov/c/github/krmax44/midy)](https://codecov.io/gh/krmax44/midy)\n[![bundle size](https://img.shields.io/bundlephobia/minzip/midy)](https://bundlephobia.com/result?p=midy)\n[![npm version](https://img.shields.io/npm/v/midy)](https://www.npmjs.com/package/midy)\n\nA super-minimalistic MIDI library.\n\n## Installation\n\n```bash\nyarn add midy\n# or using npm\nnpm i midy\n```\n\n## Example\n\n```js\nimport Midy from 'midy';\n\nconst midy = new Midy();\nif (await midy.requestAccess()) {\n\tmidy.on('noteDown', (note, channel, velocity) =\u003e {\n\t\tconsole.log('A key was pressed!', note, channel, velocity);\n\t});\n}\n```\n\n## Methods\n\n| Method name     | Parameters                               | Description                                                                        | Type               |\n| --------------- | ---------------------------------------- | ---------------------------------------------------------------------------------- | ------------------ |\n| `requestAccess` | _none_                                   | Request access to the Web MIDI API.                                                | `Promise\u003cboolean\u003e` |\n| `on`            | event name `string`, listener `function` | Register an event listener. See [Houk API](https://github.com/krmax44/houk/#api)   | `void`             |\n| `off`           | event name `string`, listener `function` | Unregister an event listener. See [Houk API](https://github.com/krmax44/houk/#api) | `boolean`          |\n\n## Events\n\n| Event name    | Description                       | Parameters                                                   |\n| ------------- | --------------------------------- | ------------------------------------------------------------ |\n| `noteUp`      | Triggered once a key is released. | MIDI note `number`, MIDI channel `number`, velocity `number` |\n| `noteDown`    | Triggered once a key is pressed.  | MIDI note `number`, MIDI channel `number`, velocity `number` |\n| `midiMessage` | Raw MIDI events.                  | MIDI event `MIDIMessageEvent`                                |\n\n## Properties\n\n| Property name | Description  | Type            |\n| ------------- | ------------ | --------------- |\n| `access`      | MIDI access  | `MIDIAccess`    |\n| `inputs`      | MIDI inputs  | `MIDIInputMap`  |\n| `outputs`     | MIDI outputs | `MIDIOutputMap` |\n| `state`       | Access state | `'none'         | 'pending' | 'granted' | 'denied'` |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrmax44%2Fmidy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkrmax44%2Fmidy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrmax44%2Fmidy/lists"}