Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jazz-soft/polymer-midi-player
MIDI Player Web Component
https://github.com/jazz-soft/polymer-midi-player
midi midi-player polymer webcomponent
Last synced: about 1 month ago
JSON representation
MIDI Player Web Component
- Host: GitHub
- URL: https://github.com/jazz-soft/polymer-midi-player
- Owner: jazz-soft
- License: mit
- Created: 2018-11-10T05:32:02.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-12-14T05:33:06.000Z (11 months ago)
- Last Synced: 2024-05-02T05:04:54.145Z (7 months ago)
- Topics: midi, midi-player, polymer, webcomponent
- Language: JavaScript
- Homepage:
- Size: 468 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# polymer-midi-player
[![npm](https://img.shields.io/npm/v/polymer-midi-player.svg)](https://www.npmjs.com/package/polymer-midi-player)
[![Published on webcomponents.org](https://img.shields.io/badge/webcomponents.org-published-blue.svg)](https://www.webcomponents.org/element/polymer-midi-player)## MIDI Player Web Component
Supports MIDI 1.0 SMF and MIDI 2.0 Clips![midi-player](https://jazz-soft.github.io/img/midi-player.png)
Playing MIDI files via *Web Audio* and *Web MIDI*
## Usage
### Install the Web Component
`npm install polymer-midi-player --save`### HTML
```html
import 'polymer-midi-player';
```
```html```
## Attributes
`src` - MIDI file URL
`data` - contents of the MIDI file as String;
can be used as an alternative to `src`
`autoplay` - start playback immediately
`loop` - the number of repeats, or `true` for an infinite loop## API
`play()`
`pause()`
`resume()`
`stop()`## Testing with Polymer
Make sure the Polymer CLI is installed:
`npm install -g polymer-cli`
In the project directory:
run `npm install`
run `polymer serve --open`## See also:
https://github.com/jazz-soft/JZZ-gui-Player
https://github.com/jazz-soft/react-midi-player