edit openMHA code and get private variables
edit openMHA code and get private variables
Thank you for the package, it is great. I can connect openMHA to MATLAB and run the desired plugin on my data.
The problem is that I want to monitor the openMHA variables during runtime.
The "mha_get(mha,'');" just return the value that had been set in the .cfg file.
Would you please help me to know how I can do that?
The problem is that I want to monitor the openMHA variables during runtime.
The "mha_get(mha,'');" just return the value that had been set in the .cfg file.
Would you please help me to know how I can do that?
-
- Posts: 119
- Joined: Mon Jun 24, 2019 12:51 pm
Re: edit openMHA code and get private variables
Please clarify what you want to achieve, e.g. by giving an example of the desired outcome.
Re: edit openMHA code and get private variables
Thank you for your reply.
I am using the adaptive differential microphone array, 'adm'. In this case, e.g. there is a private variable named, "m_beta" which is updated for every frame of data. How can I access the value of this variable during the run time?
I am using the adaptive differential microphone array, 'adm'. In this case, e.g. there is a private variable named, "m_beta" which is updated for every frame of data. How can I access the value of this variable during the run time?
-
- Posts: 119
- Joined: Mon Jun 24, 2019 12:51 pm
Re: edit openMHA code and get private variables
Not every C++ variable that you find in the source code of the plugins is exported to the configuration tree, and therefore not every C++ variable is accessible from Matlab. You can find the accessible configuration variables for each plugin in the plugin manual, http://www.openmha.org/docs/openMHA_plugins.pdf
Re: edit openMHA code and get private variables
Thank you for your clarification.
So is there a way, not necessarily from MATLAB, to access all the C++ variables?
So is there a way, not necessarily from MATLAB, to access all the C++ variables?
-
- Posts: 119
- Joined: Mon Jun 24, 2019 12:51 pm
Re: edit openMHA code and get private variables
Two possibilities:
1. Use a debugger, set breakpoints, display the variables you are interested in.
2. Hack the source code to export the data that you are interested in in some suitable form, recompile.
It's all open source after all.
1. Use a debugger, set breakpoints, display the variables you are interested in.
2. Hack the source code to export the data that you are interested in in some suitable form, recompile.
It's all open source after all.
Re: edit openMHA code and get private variables
Thank you again for your reply.
For the first possibility, I have to write a test_code to call the desired function and monitor the variable. I didn't find any available test_code, and recompile the code. Is there any step-by-step guide file for compiling the openMHA package?
For the first possibility, I have to write a test_code to call the desired function and monitor the variable. I didn't find any available test_code, and recompile the code. Is there any step-by-step guide file for compiling the openMHA package?
-
- Posts: 119
- Joined: Mon Jun 24, 2019 12:51 pm
Re: edit openMHA code and get private variables
Thank you so much for your help.
Now I can edit and compile the code. :)
Now I can edit and compile the code. :)