Recent

Author Topic: MIDIPacket on Cocoa is returning invalid data.  (Read 4004 times)

Josh

  • Hero Member
  • *****
  • Posts: 1271
MIDIPacket on Cocoa is returning invalid data.
« on: January 10, 2019, 12:33:53 am »
Hi

I am having an issue retrieving midi packets on cocoa, when the packet is triggered the actual packet contains invalid/null data.

The same routines on carbon are working fine.

I suspect I am doing something wrong for cocoa to work, but I have spent many hrs now trying to track it down, as the adding breakpoint in the callback routine is being Fired and processed, but the data coming in is wrong.

Attached sample small project, you need a midi device,  click the button list and connect first device, then press a button on midi device/controller to send a midi cc/pc message. On carbon all is ok, on cocoa invalid data.

Hope someone has cocoa and a midi controller that can test this, also the send midi data is not working on cocoa.

« Last Edit: January 10, 2019, 12:36:15 am by josh »
The best way to get accurate information on the forum is to post something wrong and wait for corrections.

carl_caulkett

  • Sr. Member
  • ****
  • Posts: 306
Re: MIDIPacket on Cocoa is returning invalid data.
« Reply #1 on: November 13, 2020, 11:51:34 pm »
Hi Josh, it's now late 2020, but in an attempt to gather as much possible info on accessing MIDI data in Lazarus under macOS, I've downloaded your project and am happy to lend my Delphi/Lazarus experience to solving this problem.

I'm especially interested because now that Lazarus 2.0.10 is here with Cocoa support built in without having to do custom builds, it makes it much easier to deal with.

I'm assuming, of course that the problem you mentioned is still a problem. I'd welcome an update on any progress you've made that I haven't yet seen.

Just to make sure that I've set the project up okay, when I run it I get a list of my MIDI controllers in the top listbox. I then select the entry for my Impulse MIDI keyboard. Am I right in thinking that I should then press a note key on the keyboard and something should happen in the app?

Looking forward to hearing from you!

Cheers,
Carl
"It builds... ship it!"

Mac Mini M1
macOS 13.6 Ventura
Lazarus 2.2.6 (release version)
FPC 3.2.2 (release version)

Key-Real

  • Full Member
  • ***
  • Posts: 185

 

TinyPortal © 2005-2018