How to properly release a MIDI device object?
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi!
I'm using an external MIDI keyboard, which I'm accessing through
device = mididevice('Teensy MIDI');
after running my code, I can't rerun it without Matlab hanging, and I can't close Matlab since it hangs all the same, and I end up killing it.
I'm pretty sure it's due to the MIDI device not being properly released, combined with the code starting by calling
clear all
when I try to manually 'clear device' I get the same behavior.
I've tried 'release' as well, but to no avail...
Thanks!
0 commentaires
Réponses (1)
Brandon Stevens
le 11 Nov 2022
There are a few ways you can 'release' a MIDI device depending on how you are using it in your code.
If you also use an audio device writer object when accesing your keyboard, you can use 'release' on that system object. For an example, check out the one on this page:
I would not expect just having a mididevice interface to cause MATLAB to hang.
If you have any follow-up questions, please reach out to MathWorks Technical Support
0 commentaires
Voir également
Catégories
En savoir plus sur Musical Instrument Digital Interface (MIDI) dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!