Need a MIDI Plugin

I want to build an app that uses MIDI. The Web MIDI API would be a perfect fit except it’s not supported in webkit browsers. Thinking about creating a capacitor plugin that enables the Web MIDI API in the Webview of the Capacitor app.

There is a polyfill in the wild but I don’t have much Objective-C/Swift experience. I’m considering converting this polyfill into a Capacitor plugin but I don’t know where to start :slight_smile:

https://github.com/mizuhiki/WebMIDIAPIShimForiOS/tree/master

Anyone interested in sharing some ideas on how to make this happen?

Thanks!

1 Like

I’m interested in exposing this kind of functionality to an iOS app made with capacitor. While that demo seems promising, I think a good longterm solution would be to write an iOS capacitor plugin that passes along IDAM (Inter Device Audio and MIDI) event information to the embedded web view. Like you, I don’t have a ton of Swift / Objective-C experience, but I’ll DM you and maybe this is something we could work on together.

The iOS plugin documentation seems to expose events that we can listen for on the JavaScript / web view side of things.

This iOS library, Gong, seems like a good start to listen to native MIDI events.

Just wondering if you got anywhere with this problem. I’ve tried the JZZ plugin and it works when serving to the browser but not on an iOS device. I discovered the old Cordova midi-sender plugin

but there is no native wrapper for it and the suggestions here don’t seem to work. The plugin installs correctly but none of my JS calls seem to be getting through.

Hey i just started creating a capacitor midi plugin, it still needs a lot of work, And also the iOS part, but if i’ll get access to a mac i’ll add it. Here is the link capacitor-midi - npm
If anyone is interested in contributing, that would be very welcome.