Post

Replies

Boosts

Views

Activity

Reply to Open files created in iOS Documents folder
It finally worked since the previously created file was put on a new iCloud folder (however I don't See the local Documents folder and couldn't access to the applications's file (clicking "On my iPad" did nothing). Now, after having added the two properties you suggested I can browse "On my ipad", and see application's name content (generated files). There is a new non-blocking error : DocumentManager] Failed to associate thumbnails for picked URL file:///Users/.../Library/Developer/CoreSimulator/Devices/.../data/Containers/Data/Application/.../Documents/perf.plist with the Inbox copy file:///Users/.../Library/Developer/CoreSimulator/Devices/.../data/Containers/Data/Application/.../tmp/com.Player-Inbox/perf.plist: Error Domain=QLThumbnail Code=2 "(null)" UserInfo={NSUnderlyingError=0x600003dad7d0 {Error Domain=GSLibraryErrorDomain Code=3 "Generation not found" UserInfo={NSDescription=Generation not found}}
Jan ’21
Reply to AUSampler stuck notes
After looking into audioKit source code and finding articles about managing MIDIPacket indeed they contain a tuple data. We have to check its total size and then iterating over the pointer to get messages (status byte followed by one or two value bytes). It now works
Jan ’21
Reply to AUSampler stuck notes
Using AudioKit 4.8 and Wrapper (AKMidiSampler/AKAppleSampler) for Apple's AVAudioUnitSampler fixed the problem, so the problem may come from the way I manage midi messages (however it is similar as how AudioKit does). The code I'm using : err = MIDIInputPortCreateWithBlock(client, portName, &port, onMIDIMessageReceived) And handler defined as : func onMIDIMessageReceived(message: UnsafePointer<MIDIPacketList>, srcConnRefCon: UnsafeMutableRawPointer?) { &#9;&#9;&#9;&#9;let packetList: MIDIPacketList = message.pointee &#9;&#9;&#9;&#9;let n = packetList.numPackets &#9;&#9;&#9;&#9;var packet = packetList.packet &#9;&#9;&#9;&#9;for _ in 0 ..< n { &#9;&#9;&#9;&#9;&#9; &#9;&#9;&#9;&#9;&#9;&#9;let mes: UInt8 = packet.data.0 & 0xF0 &#9;&#9;&#9;&#9;&#9;&#9;let ch: UInt8 = packet.data.0 & 0x0F &#9;&#9;&#9;&#9;&#9;&#9;if mes == 0x90 && packet.data.2 != 0 { &#9;&#9;&#9;&#9;&#9;&#9;&#9; &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;let noteNo = packet.data.1 &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;let velocity = packet.data.2 &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;DispatchQueue.main.async { &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;self.delegate?.noteOn(ch: ch, note: noteNo, vel: velocity) &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;} &#9;&#9;&#9;&#9;&#9;&#9;} else if (mes == 0x80 || mes == 0x90) { &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9; &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;let noteNo = packet.data.1 &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;let velocity = packet.data.2 &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;DispatchQueue.main.async { &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;self.delegate?.noteOff(ch: ch, note: noteNo, vel: velocity) &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;} &#9;&#9;&#9;&#9;&#9;&#9;} &#9;&#9;&#9;&#9;&#9;&#9;let packetPtr = MIDIPacketNext(&packet) &#9;&#9;&#9;&#9;&#9;&#9;packet = packetPtr.pointee &#9;&#9;&#9;&#9;} &#9;&#9;} I also tested without DispatchQueue.main.async (using it instead in the delegate when calling the sampler methods), same problem.
Dec ’20