Clear Filters
Clear Filters

Connect Matlab to PureData?

5 views (last 30 days)
David Mascarenhas
David Mascarenhas on 31 Jul 2021
Answered: Akshat on 3 May 2024
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.

Answers (1)

Akshat
Akshat on 3 May 2024
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.

Community Treasure Hunt

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

Start Hunting!