WebMIDIKit icon indicating copy to clipboard operation
WebMIDIKit copied to clipboard

Looking to use in iOS and starting with CoreAudio macOS migration

Open cdbattags opened this issue 4 years ago • 4 comments

AudioGetCurrentHostTime() and AudioConvertNanosToHostTime(UInt64($0 * 1000000)) don't exist on iOS so we need to use https://developer.apple.com/library/archive/qa/qa1643/_index.html

any idea how we should go about using the CAHostTimeBase obj-c class in order to get this done?

cdbattags avatar Nov 24 '19 09:11 cdbattags

mach_absolute_time() should be a 1 for 1 of AudioGetCurrentHostTime() I believe

cdbattags avatar Nov 24 '19 09:11 cdbattags

Hey, I couldn't get anything working so I forked kylestew's fork and made some changes

Check out https://github.com/Reiszecke/WebMIDIKit if you haven't found a solution yet.

Reiszecke avatar Jul 16 '20 17:07 Reiszecke

I'll look into this at some point.

adamnemecek avatar Jul 16 '20 17:07 adamnemecek

oh you are still active okay :D

My fork isn't clean, at the moment I can't test it as I'm working on something else but basically

  • the Swift.package file needs to be updated
  • manufacturer name doesn't work on iOS
  • the issue opened here had to be adressed
  • the midi.inputs object isn't iteratable which is why I've added the midi.hotfixInputs

and then everything is working. At least it does for my test project.

All these have been addressed in my fork so whenever you find the time for it feel free to make similar changes

Also, I'm apparently too dumb to get the data from a MIDIEvent so I made it public. No idea how you're supposed to use it but the readme refers to a MIDIPacket callback which isn't there anymore.

Reiszecke avatar Jul 16 '20 18:07 Reiszecke