{"id":13433264,"url":"https://github.com/nfroidure/midiplayer","last_synced_at":"2025-04-24T02:07:45.187Z","repository":{"id":10837443,"uuid":"13116565","full_name":"nfroidure/midiplayer","owner":"nfroidure","description":"Play MIDI file right in your browser with the WebMIDIAPI","archived":false,"fork":false,"pushed_at":"2020-01-02T16:14:17.000Z","size":33,"stargazers_count":57,"open_issues_count":2,"forks_count":12,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-24T02:07:38.097Z","etag":null,"topics":["hacktoberfest","midi","midiplayer"],"latest_commit_sha":null,"homepage":"https://karaoke.insertafter.com/","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/nfroidure.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-09-26T08:12:58.000Z","updated_at":"2024-04-28T17:17:35.000Z","dependencies_parsed_at":"2022-09-01T20:50:49.965Z","dependency_job_id":null,"html_url":"https://github.com/nfroidure/midiplayer","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/nfroidure%2Fmidiplayer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nfroidure%2Fmidiplayer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nfroidure%2Fmidiplayer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nfroidure%2Fmidiplayer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nfroidure","download_url":"https://codeload.github.com/nfroidure/midiplayer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250546081,"owners_count":21448260,"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":["hacktoberfest","midi","midiplayer"],"created_at":"2024-07-31T02:01:23.295Z","updated_at":"2025-04-24T02:07:45.138Z","avatar_url":"https://github.com/nfroidure.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# MIDIPlayer\n\u003e MIDIPlayer allows you to play MIDI files in your browser with the help of the\n WebMIDIAPI.\n\n[![NPM version](https://badge.fury.io/js/midiplayer.svg)](https://npmjs.org/package/midiplayer)\n[![Dependency Status](https://david-dm.org/nfroidure/midiplayer.svg)](https://david-dm.org/nfroidure/midiplayer)\n[![devDependency Status](https://david-dm.org/nfroidure/midiplayer/dev-status.svg)](https://david-dm.org/nfroidure/midifile#info=devDependencies)\n\nMIDIPlayer can be used either in modern browsers\n ([pick the last bundle](https://github.com/nfroidure/MIDIPlayer/blob/master/dist/MIDIPlayer.js))\n or with NodeJS by installing the following\n [NPM module](https://npmjs.org/package/midiplayer) :\n```bash\nnpm install midiplayer\n```\n\nThis player is used for this [MIDI Karaoke Player](https://karaoke.insertafter.com/)\n\n## Usage\n```js\n//Require MIDIPlayer and MIDIFile modules\nvar MIDIPlayer = require('midiplayer');\nvar MIDIFile = require('midifile');\n\n\nnavigator.requestMIDIAccess().then(function(midiAccess) {\n\t// Creating player\n\tvar midiPlayer = new MIDIPlayer({\n\t  'output': midiAccess.outputs()[0]\n\t});\n\n\t// creating the MidiFile instance from a buffer (view MIDIFile README)\n\tvar midiFile = new MIDIFile(buffer);\n\n\t// Loading the midiFile instance in the player\n\tmidiPlayer.load(midiFile);\n\n\t// Playing\n\tmidiPlayer.play(function() {\n\t\tconsole.log('Play ended');\n\t});\n\n\t// Volume\n\tmidiPlayer.volume = 80; // in percent\n\n\t// Pausing\n\tmidiPlayer.pause();\n\n\t// Resuming\n\tmidiPlayer.resume();\n\n\t// Stopping\n\tmidiPlayer.stop();\n\n\t// Playing again and loop\n\tmidiPlayer.play(function playCallback() {\n\t\tmidiPlayer.play(playCallback);\n\t});\n\n}, function() {\n\tconsole.log('No midi output');\n});\n```\n\n## License\nCopyright Nicolas Froidure 2013. MIT licence.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnfroidure%2Fmidiplayer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnfroidure%2Fmidiplayer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnfroidure%2Fmidiplayer/lists"}