Hello, I'm trying to use the AWE Designer GUI, while also using the Matlab API to automate unit tests for the system I am creating. I load AWE Designer from the Matlab console using the `awe_designer` command. The AWE-related functions that I use in my Matlab scripts are `awe_init`, `load_awd`, `build`, and `process`, and I also change the `AWE_INFO` global variable. After running such a Matlab script, I find that my AWE Designer window becomes unresponsive, and I have to close it, call `clear all` in the Matlab console, and then call `awe_designer` again, and load my awd file again using the Designer GUI.
Everything technically works, but it would be a lot more convenient if I didn't have to go through this whole procedure (closing AWE Designer, clearing variables, re-launching AWE Designer, and re-loading my system) every time I want to run one of my Matlab test scripts and then interact with the Designer GUI. Is there something I'm missing that will allow me to run my Matlab test scripts, and then interact with the Designer GUI, without having to go through this procedure?
Many thanks,
Jake
2:39pm
Hi Jake,
This is not expected behavior. Running test scripts from the Matlab console should not ever prevent the Designer GUI from running. One possibility however is that since Matlab is single-threaded, if Matlab busy running your script, it won't respond to GUI window events simultaneously. Thus a good rule of thumb is to not to run long scripts if you also want to use Designer GUI functionality at the same time.
Is this perhaps what could be causing the issue on your end? If not, could you please provide the script that is giving you trouble? My email is KKluka@dspconcepts.com so you won't have to share on the public forums.
Thanks,
Kevin
6:17am
Hi Kevin, thanks for your reply. This problem is persisting for me after the Matlab scripts finish running. I have recreated a fairly minimal example, with which I am still having the same problem, which I am happy to share on the public forum. I have also done a screen recording to demonstrate the problem (also attached).
It's worth mentioning also that certain features of the Designer GUI are still responsive after running the Matlab script, EG the zoom in/zoom out buttons, and I can drag modules around to different locations (I didn't show this in the screen capture), but most features of the GUI (saving, loading, playing, and the file, edit, view etc context menus) are unresponsive.
Thanks,
Jake
1:14pm
Hi Jake,
Thanks for sharing the information with me. If you delete/comment out the 'clear global' command, Audio Weaver Designer should function normally and you'll be able to switch between scripting in Matlab and using the Designer GUI seamlessly. Since Audio Weaver is running a bunch of Matlab code underneath the Designer GUI, clearing the global variables may yield non-ideal functionality.
Thanks,
Kevin
4:43am
Hi Kevin, thanks for the reply, I removed the 'clear global' command and this has solved the problem. It's worth noting as well that if I include a `clear all` command in my Matlab script/function (which from my experience is quite common practise) then I have the same problem again. So it seems like the `clear variables` is the way forward for clearing the Matlab workspace.
Thanks,
Jake
9:55am
Hi Jake,
Thanks for the info about 'clear all', it is good for posterity. Glad we were able to resolve the issue!
Thanks,
Kevin