GMU:Tutorials/Networking/Controlling Processing with The Captury: Difference between revisions

From Medien Wiki
Line 23: Line 23:
<br>
<br>
'''PART 01 – Connect the Captury and Processing'''
'''PART 01 – Connect the Captury and Processing'''
*To build a connection between the Captury and Processing, the listening port and the port of the remote location address need to be same. This could basically any number, and using a 4- or 5-digit number to stay out of the range of most common ports.
*To build a connection between the Captury and Processing, you need to define port number. This could basically any number, and using a 4- or 5-digit number to stay out of the range of most common ports.
<source lang="Java" line start= "18">
<source lang="Java" line start= "18">
int localport = 12000;
int localport = 12000;
Line 47: Line 47:
动捕系统截图圈出名称
动捕系统截图圈出名称


*Incoming OSC messages are forwarded to the oscEvent method. Print the Address Pattern and the Typetag of the received OSC messages in the console.
*Incoming OSC messages are forwarded to the oscEvent method and this function runs every time you receive data. Print the Address Pattern and the Typetag of the received OSC messages in the console.
**Address Pattern is used to differentiate between different messages you are sending on one port. Here to differentiate between different bones and skeletons.  
**Address Pattern is used to differentiate between different messages you are sending on one port. Here to differentiate between different bones and skeletons.  
**Typetag is used to define what the data type is. For the data of position x, y, z receiving from the Captury, they are all float 32 type and will be showed in console as 'f' ('i' for int 32, 's' for OSC-string, 'b' for OSC-blob, etc.)
**Typetag is used to define what the data type is. For the data of position x, y, z receiving from the Captury, they are all float 32 type and will be showed in console as 'f' ('i' for int 32, 's' for OSC-string, 'b' for OSC-blob, etc.)
Line 61: Line 61:
本地接收信息框截图
本地接收信息框截图


*To make sure that all the bones in use are available and refresh them every second or so.
*To make sure that all the bones in use are available and refresh them every second or so. And
<source lang="Java" line start= "58">
<source lang="Java" line start= "58">
void refreshSubscriptions() {
void refreshSubscriptions() {