# cordova-plugin-midi-sender

> MIDI Communication Plugin

Latest version **0.1.2** (published 2019-10-23) · Apache 2.0 license · 0 weekly downloads

## Install

```sh
npm install cordova-plugin-midi-sender
pnpm add cordova-plugin-midi-sender
yarn add cordova-plugin-midi-sender
bun add cordova-plugin-midi-sender
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.2 |
| Published | 2019-10-23 |
| First published | 2019-10-23 |
| Weekly downloads | 0 |
| License | Apache 2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 30.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Josiah Oslund |
| Maintainers | josiaho |
| Keywords | cordova, ecosystem:cordova, cordova-ios, MIDI, Program, Change, CoreAudio |

## Links

- npm: https://www.npmjs.com/package/cordova-plugin-midi-sender
- Repository: https://github.com/josiaho/cordova-plugin-midi-sender
- Issues: https://github.com/josiaho/cordova-plugin-midi-sender/issues
- npm.io page: https://npm.io/package/cordova-plugin-midi-sender

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 0.1.2 (latest) — 2019-10-23
- 0.1.1 — 2019-10-23
- 0.1.0 — 2019-10-23

## README

MIDISender
======

This is a fork of [cordova-plugin-midi-sender](https://github.com/jonathanwkelly/cordova-plugin-midi-sender). I added the ability to send/receive MIDI **note** and **CC** message types to [Jonathan's](https://github.com/jonathanwkelly) work.


Installation
-------

NPM:

	cordova plugin add cordova-plugin-midi-sender

Repository:

	cordova plugin add https://github.com/josiaho/cordova-plugin-midi-sender.git

Dependencies
-------

`CoreMIDI.framework` is required, and will be linked for you automatically


Methods
-------

**Listen for incoming MIDI messages on all channels:**
	
	cordova.plugins.MIDISender.getIncoming(function(msg) {
	  if (msg.channel){ // Ignore msg sent on plugin initialization
	  
	    /* MESSAGE DATA
	      msg.channel = MIDI channel (1-16)
	      msg.type = Type of MIDI message: 'Program Change', 'Control Change', 'Note On', 'Note off'
	      msg.data = MIDI Data: <number> for PC/CC (1-128), or Note (i.e. "C3") for Note On/Off
	      msg.value = Not present for 'Program Change' messages
	    */
	    
	  }
	});
	
**Send MIDI Messages:**

    // Send Program Change (Channel, Data)
    cordova.plugins.MIDISender.sendProgramChange(1, 30);
    
    // Send NoteOn (Channel, Data, Value)
    cordova.plugins.MIDISender.sendNote(1, 60, 127); // Ch 1, NoteOn C3, Value
    
    // Send Control Change (Channel, Data, Value)
    cordova.plugins.MIDISender.sendControlChange(1, 1, 1);

Permissions
-----------

    <feature name="MIDISender">
        <param name="ios-package" value="MIDISender" onload="true" />
    </feature>

Debugging
-----------

Debug messages are sent to `NSLog`

Resources
-----------

If you're unfamiliar with MIDI, checkout <a href="http://www.midi.org/techspecs/midimessages.php" target="_blank" title="MIDI Manufacturers Association">this spec</a> on MIDI messages.

Credits
-----------

[Jonathan Kelly](https://github.com/jonathanwkelly/cordova-plugin-midi-sender)

---
_Source: https://npm.io/package/cordova-plugin-midi-sender · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
