{"id":13804432,"url":"https://github.com/notthetup/midimessage","last_synced_at":"2025-04-30T07:49:44.701Z","repository":{"id":36654102,"uuid":"40960409","full_name":"notthetup/midimessage","owner":"notthetup","description":"Simple Web-MIDI Message Parser","archived":false,"fork":false,"pushed_at":"2022-03-05T08:11:48.000Z","size":27,"stargazers_count":35,"open_issues_count":3,"forks_count":9,"subscribers_count":5,"default_branch":"gh-pages","last_synced_at":"2025-04-30T07:49:39.141Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://notthetup.github.io/midimessage","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/notthetup.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":"2015-08-18T08:34:41.000Z","updated_at":"2024-02-17T23:42:01.000Z","dependencies_parsed_at":"2022-09-05T17:00:25.275Z","dependency_job_id":null,"html_url":"https://github.com/notthetup/midimessage","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/notthetup%2Fmidimessage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/notthetup%2Fmidimessage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/notthetup%2Fmidimessage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/notthetup%2Fmidimessage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/notthetup","download_url":"https://codeload.github.com/notthetup/midimessage/tar.gz/refs/heads/gh-pages","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251666226,"owners_count":21624290,"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":[],"created_at":"2024-08-04T01:00:47.710Z","updated_at":"2025-04-30T07:49:44.679Z","avatar_url":"https://github.com/notthetup.png","language":"JavaScript","funding_links":[],"categories":["Packages"],"sub_categories":["MIDI"],"readme":"# midimessage\n\n[![npm version](https://badge.fury.io/js/midimessage.svg)](http://badge.fury.io/js/midimessage)\n\nSimple MIDI Message Parser for JavaScript. This parser takes in a [MIDIMessageEvent](http://webaudio.github.io/web-midi-api/#MIDIMessageEvent) and returns a plain Javascript Object with propties indicating the data in the MIDI message.\n\n## Installation\n\n`npm install midimessage`\n\n## Usage\n\n```js\nvar MIDIMessage = require('midimessage');\n\nmidiInput.onmidimessage = function(event){\n\tvar midiMessage = MIDIMessage(event);\n\tconsole.log(\"Parsed\", midiMessage);\n}\n```\n\n## API\n\n`MIDIMessage` : _Function_ - Takes a MIDIMessageEvent as the only argument and decodes the data in the MIDIMessageEvent. Returns a MIDIMessage Object which has various properties set to values based on the MIDIMessage.\n\nThese properties are based off the [MIDI Message Standard](http://www.midi.org/techspecs/midimessages.php) as defined in the [MIDI Spec](http://www.midi.org/techspecs/)\n\nThese are some of the properties that may be exposed (based on the incoming MIDI message) :\n\n- `channel`: __Number__ (0-127) - MIDI Channel Number.\n- `messageType`: __String__ - Type of message. Possible values defined below.\n- `key`: __Number__ (0-127) - The key (note) number. Defined on -`noteon`,`noteoff`,`keypressure` messages.\n- `velocity`: __Number__ (0-127) - Velocity. Defined on `noteon`,`noteoff` messages.\n- `controllerNumber`: __Number__ (0-127) - Controller Number. Controller numbers 120-127 are reserved as \"Channel Mode Messages\".\n- `controllerValue`: __Number__ (0-127) Controller Value. Has various meanings based on `controllerNumber`.\n- `channelModeMessage`: __String__ - Channel Mode Message. Specific messages for Channel Modes based on `controllerNumber`. Possible values defined below.\n- `pressure`: __Number__ (0-127) - Pressure value.\n- `pitchBend`: __Number__ (0-16383) - Pitch Bend value. Center (no pitch change) is 8192.\n\n\nPossible values of `messageType` property.\n\n```js\n[\n'noteon', // Note On event.\n'noteoff', // Note Off event.\n'keypressure', // Polyphonic Key Pressure (Aftertouch).\n'controlchange', // Control Change.\n'programchange', // Program Change.\n'channelpressure', // Channel Pressure (After-touch).\n'pitchbendchange', // Pitch Bend Change.\n]\n```\n\n\nPossible values of `channelModeMessage` property.\n\n```js\n[\n'allsoundoff', // All Sound Off.\n'resetallcontrollers', // Reset All Controllers.\n'localcontroloff', // Local Control Off.\n'localcontrolon', // Local Control On.\n'allnotesoff', // All Notes Off.\n'omnimodeoff', // Omni Mode Off.\n'omnimodeon', // Omni Mode On.\n'monomodeon', // Mono Mode On (Poly Off).\n'polymodeon' // Poly Mode On (Mono Off)\n]\n```\n\n# License\n\nMIT\n\nSee License file\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnotthetup%2Fmidimessage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnotthetup%2Fmidimessage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnotthetup%2Fmidimessage/lists"}