Page 1 of 1

MIDI onstatechange counterpart in JZZ.js

Posted: Thu Dec 21, 2017 6:21 am
by smrz2001
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.

Re: MIDI onstatechange counterpart in JZZ.js

Posted: Thu Dec 21, 2017 8:28 am
by sema
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!

Re: MIDI onstatechange counterpart in JZZ.js

Posted: Thu Dec 21, 2017 8:33 am
by smrz2001
Glad to provide useful input! Thank you for the great work and for the prompt replies!

Re: MIDI onstatechange counterpart in JZZ.js

Posted: Sun Feb 18, 2018 8:15 pm
by sema
JZZ().onChange() will be available in the next release, probably within a week.

Re: MIDI onstatechange counterpart in JZZ.js

Posted: Fri Mar 02, 2018 7:06 pm
by sema
Newly released JZZ v0.4.4 has an onChange() function.
Please see the details at https://jazz-soft.net/doc/JZZ/jzz.html#onChange

Re: MIDI onstatechange counterpart in JZZ.js

Posted: Tue Jun 19, 2018 8:46 am
by smrz2001
Awesome! Thank you.