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

Message loss on low frame rate #21

Open
Dimavj opened this issue Jun 10, 2017 · 11 comments
Open

Message loss on low frame rate #21

Dimavj opened this issue Jun 10, 2017 · 11 comments
Assignees
Labels

Comments

@Dimavj
Copy link

Dimavj commented Jun 10, 2017

Hi Keijiro!
I'm launching several particle systems and objects in unity, and have programmed disable/enable toggles with midi notes.
In the Editor it runs almost right, but it forgives some notes ... but in build, there's no notes arround entering my scene.
in Editor I can see notes in your midiJack Window, but when they call some debug.log ... it appears only in some of the hits of my midi touch-osc controller.

So, There's some strategy to give more 'presence' to our notes? or rate?... I see the application too busy in launching particles than listening to midinotes...

Well, thanks for help!
Albert.

@Dimavj Dimavj changed the title lost notes Lost notes Jun 10, 2017
@Dimavj
Copy link
Author

Dimavj commented Jun 10, 2017

Hi Again...
I just "SOLVED" it by listening 5 times in the same update function for the notes...
I think is not the best solution but, it goes acceptable for me.
thanks.

@keijiro keijiro self-assigned this Jun 12, 2017
@keijiro
Copy link
Owner

keijiro commented Jun 12, 2017

Did you close Unity Editor before running the build? Unity Editor should be closed before running the standalone build because MIDI devices are exclusively retained by a single application on some systems.

@Dimavj
Copy link
Author

Dimavj commented Jun 12, 2017

Hi,
Yes I've closed the editor sure...
Thanks

@keijiro
Copy link
Owner

keijiro commented Jun 12, 2017

Thanks for confirming.

Although I've never experienced such a situation, it could happen when the frame rate is quite low. You can use delegates to avoid this kind of message-loss issue. See the example for further details.

https://github.com/keijiro/MidiJack/blob/master/Assets/Example%20Delegate/DelegateTester.cs

@Dimavj
Copy link
Author

Dimavj commented Jun 12, 2017

Yes, I've beeing re-testing it right now, and it occurs again.
Thank you very much for the answer!
Well, I'm not famirliarized with delegates, I'll look for some tut or explaination to learn how to use it, so, have you some suggestion?
Cheers.
Albert

@keijiro
Copy link
Owner

keijiro commented Jun 12, 2017

@keijiro keijiro changed the title Lost notes Message loss on low frame rate Jun 12, 2017
@keijiro keijiro added bug and removed question labels Jun 12, 2017
@Dimavj
Copy link
Author

Dimavj commented Jun 12, 2017

Hi Keijiro,
Finally I've learned how to use your delegate's functions from your example.
It's all going on
Thank you a lot for your work on MidiJack, is a useful, simple, and complete tool
I'm closing the thread,
Cheers.
Albert.

@Dimavj Dimavj closed this as completed Jun 12, 2017
@keijiro
Copy link
Owner

keijiro commented Jun 13, 2017

The original problem hasn't been solved yet. Please keep this ticket opened.

@keijiro keijiro reopened this Jun 13, 2017
@TxTx123
Copy link

TxTx123 commented Mar 10, 2019

Hi Keijiro,
This script sometimes misses MIDI input and can not be controlled reliably in the update function.
Although using delegate will work good.

Is there a technique to reliably receive MIDI signals with GetKeyDown Function?
Best regards,

@Eumi
Copy link

Eumi commented Mar 31, 2019

For me the GetKeyDown function also misses a lot of notes and i am a total beginner in C# idk how to use delegate =,o its all too complicated =p

@tomkail
Copy link

tomkail commented May 1, 2019

I'm also finding that down notes are occasionally skipped. Seems they aren't registered during DequeueIncomingData. Could you share how this data stream works? Might higher frame rates help?

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

No branches or pull requests

5 participants