Kinect with Max and Processing

I am using Kinect V1 with Synapse for Max and sending the OSC data to Processing. But I am receiving so many glitches that are destroying all the audio sound after 50 seconds of data flow. I am using 512 I/O Vector and Signal Vector size. The sampling rate is 44100 Hz. I also tried 512 (I/O) to 64 (Signal). What do you suggest?

Here is an example of how it starts after 50 seconds and how it ends when I stopped the Processing.
You can listen to the audio example here:

1 Like

It is challenging addressing a problem like this as you have multiple software/applications running together. One suggestion is to run your code in a faster system, if possible, to see if processing time is compromised by the operations you are doing there. Another alternative would be to disable different features of your softare and see which one is causing the problem. There are two problem I can think of that could be happening here:

  1. Either you are processing lots of information and the system resources cannot keep up
  2. Or you could be experiencing a bottle neck due to oscP5.

For the second part, there are other options that could work better, like UDP broadcasting or using sockets. I do not have too much experience on them. I know that UDP can transfer video streaming, for instance. However, it might work only with limited video resolutions. I haven’t work with the code enough to advertise it as a solution, but I would like to recommend it anyways.

Can you elaborate more about what your code is doing? I am guessing you are transfering video. I understand you are transfering audio. What is generated and output by every branch of your program? Are you moving the depth map from kinect on the oscP5 connection as well?


1 Like

Thank you so much for your comments kfrajer,

I am trying to disable different features but still couldn’t figure it out the problem. I removed the Synapse and used mouseX and mouseY locations instead of human tracking and the problem still remains.

I think my problem is receiving so many messages from Processing. I will try to limit the data to find when it starts to generate glitches. Cause I don’t know how many data is too many. It can also be the way I send them to Max, though.

I am transferring the tracked user skeleton’s X and Z joint positions from Kinect-via-Synapse (Max version) to Processing. But I am only tracking head and shoulders. Then, I am sending so many other data that are generated within Processing. They are both related and kind of unrelated to human location. But none of them are audio signals. I am basically sending different numbers from Processing to Max within different poly~ objects and then using these numbers to generate audio by mapping them to different parameters of a sound wave (e.g amplitude, frequency).