Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an option to receive the raw MIDI packets as received from the device without buffering #111

Open
intonarumori opened this issue May 13, 2024 · 1 comment

Comments

@intonarumori
Copy link

I have a use case where I need access to the raw MIDI packets sent by a MIDI device.
Specifically I’d like to circumvent the part of the platform code where the library buffers data to wait for every part of a SysEx transfer to be received first before forwarding it to Flutter.

I'm working with samplers from the `80s where not all parts of the MIDI specifications was formalized, so it's crucial to be able to access incoming data without any buffering.

I've implemented a solution with the following goals in mind:

  • Since this is a very specific, advanced use case it should not affect existing code using the library
  • I've added a flag to enable "raw MIDI data receiving", which by default is set to false
  • When enabled it forwards every MIDI packet as received without processing of buffering it first

I've implemented this by modifying the platform interface and added the platfrom specific implementation for iOS here:
#110
InvisibleWrench/flutter_midi_command_platform_interface#2

Let me know what you think, thanks.

@mortenboye
Copy link
Contributor

I can appreciate this use case.
Just curious, do you intent to handle all midi parsing on your own for all communication or only for SysEx and maybe only sometimes?

The PR contains a bunch of port handling as well. Is that related to your other ticket?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants