How to properly release a MIDI device object?
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (1)
Brandon Stevens
el 11 de Nov. de 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 comentarios
Ver también
Categorías
Más información sobre Musical Instrument Digital Interface (MIDI) en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!