Closed noboru-i closed 3 years ago
I don't see any difference between the two variations. Can you share some more information about your setup and the BLE data your are receiving?
@mortenboye Thank you for replying.
I tried to create a small snippet in the Playground. Is it help you..?
That’s curious. I did the same experiment on http://online.swiftplayground.run and saw no difference.
I also tried in the plugin to hardcode high values for tsHigh and tsLow, but saw no difference here either.
I’m not sure if our environments are different or something, but I’m happy to implement the change, if you think it will make a difference on your side.
On Wed, 21 Apr 2021 at 16.25 noboru ISHIKURA(JP) @.***> wrote:
@mortenboye https://github.com/mortenboye Thank you for replying.
[image: image] https://user-images.githubusercontent.com/1567757/115569645-641ad000-a2f8-11eb-9b23-27c0c0e0dff7.png MyPlayground.playground.zip https://github.com/InvisibleWrench/FlutterMidiCommand/files/6351547/MyPlayground.playground.zip
I tried to create a small snippet in the Playground. Is it help you..?
— You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/InvisibleWrench/FlutterMidiCommand/issues/30#issuecomment-824104032, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAETRGSSY7MP3XO6BYFCIETTJ3N6TANCNFSM43JMAX3A .
@mortenboye Thank you for checking 👍
I tried on http://online.swiftplayground.run/ with MyPlayground.playground.zip
's code.
It seems results have differences.
I cannot find a difference in our environment... 😢
Thanks you for double checking. I have just pushed/released v0.3.2 with the proposed change. Thanks again for your contribution.
Thank you so much 🎉
@mortenboye @noboru-i Does anybody know in what unit the MidiPacket.timestamp is for iOS?
Reading the native docs I can see there's some value that needs to be factored in, but how can I get that value? Is it always the same or system-specific?
I checked the received
MidiPacket.timestamp
. Its range seems 0 to 255.But MIDI specification has 13 bit, so the range is 0 to 8192.
I thought, https://github.com/InvisibleWrench/FlutterMidiCommand/blob/644dd94431eda60724f5ffda4103ac5e096dd263/ios/Classes/SwiftFlutterMidiCommandPlugin.swift#L1043
tsHigh
type isUInt8
. So we may cast it before shift operation.timestamp = UInt64(tsHigh) << 7 | UInt64(tsLow)
Using: flutter_midi_command: 0.3.0 flutter: 2.0.4 Xcode: 12.4