I managed to create a max-for-live device from Kinect data. My next step would be sectioning the kinect data to choose the clips to loop.
It has such a journey to learn Max and the Live Object Models. I am so happy that this is so close to my ultimate goal for my project.
In the first iteration, I created a patch where you can select which clip you want to loop.
For my last iteration, I created a more comprehensive device where first scene of the clips in idle state will be played at 120.0 bpm.
When you turn off the toggle, the toggles receiving the Kinect data will be turned on. The data will be converted to panning and tempo respectively from the x and y coordinate. Afterwards, I can change which clip in which track I want to loop, for how long of the loop, and for how many times of the loop. I used loop_end, loop_length, set_looping (which is a boolean) and some mathematics to determine so.
As the following Max patch shows, to calculate how many times the loop goes, I used this equation as my guideline:
Loop_length = Loop_Frequency *Loop_Time
For Loop_Length, it is the index box of 12 shown below. Loop_Frequency as in how many times the clip will loop for the length determined by the user, is the index box of 2. For the Loop_Time, I converted BPM into beats per seconds and then multiplied with the result of Loop_Frequency times (1 second divided by the beats per seconds). I need the Loop_Time to determine the delay time to set the looping to be false. This will avoid the clip going on forever.
I am quite happy with what my process and for the next step, I will section the Kinect and assign the clips to be played by the position of the head from Kinect data. So instead of me manually changing the clips, my body will be controlling the changes.
I also am currently creating a generative music by using the data to change the pitch in pitchshifter patch.
If I have time, there are some parts I want to finetune:
- Allow each clip in the idle state to play at different time rather than the same time
- Allow each clip in the active state to be playing the same time the person is in that section