Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rakannimer/mobx-music
Play music with mobx
https://github.com/rakannimer/mobx-music
Last synced: 12 days ago
JSON representation
Play music with mobx
- Host: GitHub
- URL: https://github.com/rakannimer/mobx-music
- Owner: rakannimer
- Created: 2018-10-16T15:20:35.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-11-29T07:00:58.000Z (about 6 years ago)
- Last Synced: 2025-01-16T23:47:18.489Z (about 1 month ago)
- Language: TypeScript
- Size: 228 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Mobx Music
Play Music with Mobx
[![CircleCI][circleci-badge]][circleci-href]
[![NPM][npm-version-badge]][npm-href]
[![BundlePhobia][bundlephobia-badge]][bundlephobia-href]## Install
```sh
yarn add mobx-music
# Or
npm i mobx-music
```## Usage
```typescript
const { instruments, playingNotes } = await getInstruments(["harmonica"]);
const instrument = instruments.get("harmonica");
instrument.play("A3", 500);
playingNotes.get("A3"); // true
setTimeout(() => {
instrument.stop("A3");
}, 250);
```[circleci-href]: https://circleci.com/gh/rakannimer/mobx-music
[circleci-badge]: https://img.shields.io/circleci/project/github/rakannimer/mobx-music.svg
[npm-href]: https://www.npmjs.com/package/mobx-music
[npm-version-badge]: https://img.shields.io/npm/v/mobx-music.svg
[npm-license-badge]: https://img.shields.io/github/license/rakannimer/mobx-music.svg
[bundlephobia-badge]: https://img.shields.io/bundlephobia/minzip/mobx-music.svg
[bundlephobia-href]: https://bundlephobia.com/result?p=mobx-music