Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jazz-soft/jzz-input-uke
SVG MIDI Ukulele
https://github.com/jazz-soft/jzz-input-uke
midi svg ukulele
Last synced: 3 days ago
JSON representation
SVG MIDI Ukulele
- Host: GitHub
- URL: https://github.com/jazz-soft/jzz-input-uke
- Owner: jazz-soft
- Created: 2021-11-27T04:15:03.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-02-05T06:08:22.000Z (12 months ago)
- Last Synced: 2024-12-18T13:08:37.483Z (about 1 month ago)
- Topics: midi, svg, ukulele
- Language: JavaScript
- Homepage:
- Size: 71.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# JZZ-input-Uke
SVG MIDI Ukulele[![npm](https://img.shields.io/npm/v/jzz-input-uke.svg)](https://www.npmjs.com/package/jzz-input-uke)
[![npm](https://img.shields.io/npm/dt/jzz-input-uke.svg)](https://www.npmjs.com/package/jzz-input-uke)
[![build](https://github.com/jazz-soft/JZZ-input-Uke/actions/workflows/build.yml/badge.svg)](https://github.com/jazz-soft/JZZ-input-Uke/actions)
[![Coverage Status](https://coveralls.io/repos/github/jazz-soft/JZZ-input-Uke/badge.svg?branch=main)](https://coveralls.io/github/jazz-soft/JZZ-input-Uke?branch=main)## Install
`npm install jzz-input-uke --save`
or `yarn add jzz-input-uke`
or get the full development version and minified scripts from [**GitHub**](https://github.com/jazz-soft/JZZ-input-Uke)## Usage
##### Plain HTML
```html//...
```##### CDN (jsdelivr)
```html//...
```##### CDN (unpkg)
```html//...
```##### CommonJS
```js
var JZZ = require('jzz');
require('jzz-input-uke')(JZZ);
//...
```##### TypeScript / ES6
```ts
import { JZZ } from 'jzz';
import { Uke } from 'jzz-input-uke';
Uke(JZZ);
//...
```## Example HTML
```htmlJZZ.synth.Tiny.register('Web Audio');
var out = JZZ().openMidiOut();
var uke = JZZ.input.Uke({ at: "uke_div" });
uke.viewbox(-3.1, -.15, 3.2, 1.35);
uke.transform(1, 3, -3, 1, 0, 0)
uke.connect(out);```
## API
#### Construction
```js
var uke = JZZ.input.Uke(args);
// or
JZZ.input.Uke.register('My Cool Ukulele', args);
var uke = JZZ().openMidiIn('My Cool Ukulele');
```
`args` is an object with th optional keys:
- `at`: DOM element to insert SVG, or its ID as string; default: the bottom of the page;
- `frets`: number of frets; default: `18`;
- `strings`: tuning; default: `gCEA`;
- `channels`: MIDI channels for each string; default: `[0, 1, 2, 3]`;
- `active`: if `false`, ignore the user interaction; default: `true`#### Connection
```
var midi_in = JZZ().openMidiIn();
var midi_out = JZZ().openMidiOut();
midi_in.connect(uke);
uke.connect(midi_out);
```