Hi sema,
I'm wondering if JZZ.js has asynchronous device (dis)connection detection like Web MIDI API does via its onstatechange handler. I couldn't find anything in the JZZ.js documentation, code, or examples for this. I am trying to detect device (dis)connection automatically without having to call refresh().
Any suggestions?
Best regards.
MIDI onstatechange counterpart in JZZ.js
Re: MIDI onstatechange counterpart in JZZ.js
We don't have this feature in the current version, but it's a great idea to implement in the future.
What you can do now - is to periodically call the refresh() function.
And thank you for the idea!
What you can do now - is to periodically call the refresh() function.
And thank you for the idea!
Re: MIDI onstatechange counterpart in JZZ.js
Glad to provide useful input! Thank you for the great work and for the prompt replies!
Re: MIDI onstatechange counterpart in JZZ.js
JZZ().onChange() will be available in the next release, probably within a week.
Re: MIDI onstatechange counterpart in JZZ.js
Newly released JZZ v0.4.4 has an onChange() function.
Please see the details at https://jazz-soft.net/doc/JZZ/jzz.html#onChange
Please see the details at https://jazz-soft.net/doc/JZZ/jzz.html#onChange
Re: MIDI onstatechange counterpart in JZZ.js
Awesome! Thank you.