Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jazz-soft/jzz-synth-osc
Fallback MIDI-Out implementation
https://github.com/jazz-soft/jzz-synth-osc
audio midi web-audio web-audio-api web-midi web-midi-api webaudio webaudioapi webmidi webmidiapi
Last synced: about 1 month ago
JSON representation
Fallback MIDI-Out implementation
- Host: GitHub
- URL: https://github.com/jazz-soft/jzz-synth-osc
- Owner: jazz-soft
- Created: 2018-01-25T03:19:59.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2024-04-15T06:49:47.000Z (9 months ago)
- Last Synced: 2024-05-02T05:04:53.432Z (8 months ago)
- Topics: audio, midi, web-audio, web-audio-api, web-midi, web-midi-api, webaudio, webaudioapi, webmidi, webmidiapi
- Language: JavaScript
- Size: 57.6 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# JZZ-synth-OSC
A simple MIDI-Out implementation for the systems with no better option available.
Mainly, for use as a template for your own JZZ-compatible synths.
For real world applications,
please consider using [JZZ-synth-Tiny](https://www.npmjs.com/package/jzz-synth-tiny) instead.[![npm](https://img.shields.io/npm/v/jzz-synth-osc.svg)](https://www.npmjs.com/package/jzz-synth-osc)
[![npm](https://img.shields.io/npm/dt/jzz-synth-osc.svg)](https://www.npmjs.com/package/jzz-synth-osc)
[![jsDelivr](https://data.jsdelivr.com/v1/package/npm/jzz-synth-osc/badge)](https://www.jsdelivr.com/package/npm/jzz-synth-osc)
[![build](https://github.com/jazz-soft/JZZ-synth-OSC/actions/workflows/build.yml/badge.svg)](https://github.com/jazz-soft/JZZ-synth-OSC/actions)
[![Coverage Status](https://coveralls.io/repos/github/jazz-soft/JZZ-synth-OSC/badge.svg?branch=master)](https://coveralls.io/github/jazz-soft/JZZ-synth-OSC?branch=master)## Install
`npm install jzz-synth-osc`
or `yarn add jzz-synth-osc`
or get the full development version and minified scripts from [**GitHub**](https://github.com/jazz-soft/JZZ-synth-OSC)## Usage
##### Plain HTML
```html
//...
```##### CDN (jsdelivr)
```html
//...
```##### CDN (unpkg)
```html
//...
```##### CommonJS
```js
var JZZ = require('jzz');
require('jzz-synth-osc')(JZZ);
//...
```##### TypeScript / ES6
```ts
import { JZZ } from 'jzz';
import { OSC } from 'jzz-synth-osc';
OSC(JZZ);
//...
```##### AMD
```js
require(['JZZ', 'JZZ.synth.OSC'], function(JZZ, dummy) {
// ...
});
```##### //...
```js
JZZ.synth.OSC().noteOn(0, 'C5', 127)
.wait(500).noteOn(0, 'E5', 127)
.wait(500).noteOn(0, 'G5', 127);
.wait(500).noteOff(0, 'C5').noteOff(0, 'E5').noteOff(0, 'G5');
```## Using in Node.js with headless Web Audio
```js
const WAAPI = require('node-web-audio-api');
const JZZ = require('jzz');
require('jzz-synth-osc')(JZZ);global.window = { AudioContext: WAAPI.AudioContext };
JZZ.synth.OSC()
.or(function() { console.log('Cannot open MIDI-Out!\n'/* + this.err() */); })
.note(0, 'C5', 127, 500).wait(500)
.note(0, 'E5', 127, 500).wait(500)
.note(0, 'G5', 127, 500).wait(500)
.note(9, 'C6', 127, 500).wait(500)
.and(function() { JZZ.lib.closeAudioContext(); });
```## More information
Please visit [**https://jazz-soft.net**](https://jazz-soft.net) for more information.
Your questions and comments are welcome [**here**](https://jazz-soft.org).