Connect Matlab to PureData?

5 次查看(过去 30 天)
David Mascarenhas
David Mascarenhas 2021-7-31
回答: Akshat 2024-5-3
Hello,
I have a heavy code that runs in Matlab which gives me eventually lots of acoustic information as an output for some input parameters.
PureData (https://puredata.info/) is another programming language that I require to do some audio/acoustic post-processing. This can only be done in PureData. For this i need the code in PureData and Matlab to communicate in real time.
I plan to make a PureData code with the core of it being a Matlab code so that the PureData code can post-process it without delay.
Until now i was running the Matlab code and saving each data point on the locally and the running the PureData code after that.
Is there anyway to connect both of them locally so that both codes runs as one (Matlab nested in PureData)?
Any help is appreciated.
Thank you!!
David.

回答(1 个)

Akshat
Akshat 2024-5-3
Hi David,
In general whenever we want to do real time communication between two programs/processes, we use UDP or TCP/IP to communicate.
However, I am not sure exactly what you mean by "MATLAB nested in PureData", you can write to a port using the "udpport" function. On the receiving end for PureData, you can use the "netreceive" function.
The documentation for both are:
Feel free to follow up with a little more information, like the code and sample data you are using to perform the task.
Hope this helps.

类别

Help CenterFile Exchange 中查找有关 Nonlinear Optimization 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by