select some data contained within a UDP packet received on MAX
I received these packages in them contain data of various kinds from the sensors and separated by semicolons, I would just take some information from these data, there is a way to select which characters or otherwise take what information and discard the rest?
the format of the received packet is done this way:
DeviceID;ActorName;BoneName;QuaternionW;QuaternionX;QuaternionY;QuaternionZ;AccX;AccY;AccZ;GyroX;GyroY;GyroZ;MagnX;MagnY;MagnZ
Many thanks in advance for your help
You could use [regexp ; @substitute " "] to remove the semicolons and then use zl.nth or zl.lookup to select the info you want to process.
Thanks a lot of rapid response . I have read the help of the command regexp but being still impractical program I need a hand . These packages udp I receive are streaming ( I get one per second ) and have that size that I posted . Someone I can give an example of pacth ? Thanks a lot of patience . For now I used the command MXJ net.udp.recv to get packages udp ... then ? What do I send the output of the object ?
Here it is. Thank you.
Where i have to copy this text in max? I use max 6.1. Thanks
Ok I did it ! I am viewing the patch and everything works perfectly ! Thank you very much. There is only a small detail . The output is an object " message " . I I need a real-time format because UDP packets arrive in time ... there is a way ? Now if I choose ACC as a field in the message shows me the actual value ... Thanks again
I solved this too ! ( I think I'm getting good ) ... How LAST request wanted to know if there was a way to select ACC in individual fields as ACCX ; ACCY ; ACCZ and not all together as happens now ... thanks a lot
Ok the real time is correct . Now I need is to be able to separate the field ACCX and ACCY and ACCZ ... I wish it were possible to read the 3 values separately .
Thank you very much
I wish that a zl.mth just give me the value acc x and another zl.mth give me instead acc y so it can be processed separately
[regexp - @substitute " "]
eii RICK everything works perfectly now !!
I want to thank you with all my heart for helping me with this problem, you saved me.
If I need more help with MAX will not hesitate to contact you, you were great!
thank you very much
@RICK
hello guys
I have a patch that receives UDP packets through the object RECEIVE UDP but she receives packets too slowly for the application for which I need. And 'possible to set the speed of receiving the packages of MAX? Or as this object uses Java is possible that he has a setting that I should change?
Thanks in advance for your help !!
regards Luca
@RICK
i use the object MJX.UDP.RECV