js objects don't have enough outputs

paulrgreen's icon

I'm new to Max but I must admit so far from what I've seen the possibilities are endless as to its application.

My problem is that I am trying to write a patch that I've seen posted onto the net that connects a Microsoft Kinect using Synapse. I've used Synapse before connecting to Max using Max for Live's M4L patches into Ableton however using it standalone is new to me.

My problem is that I am trying to use the 'js getChamp' and the 'js parseSynapse' objects. When I've seen snapshots on the internet of patches built it shows the js getChamp onject as having 1 inlet 2 outputs and the 'js parseSynapse onject with 3 outlets. When I select the objects they both load with 1 inlet and 1 outlet. I've looked around the internet and seen post about altering the objects using javascript but this is beyond my ability at the moment. Any help would be greatly appreciated to get me on my way.

Peter Castine's icon

The number of inlets/outlets in a [js] object is determined by assignments to properties named "inlets" and "outlets" in the Javascript code. You should have something like the following, probably at the top of the .js file:

inlets = 1;
outlets = 3;

This is described pretty clearly in the "Javascript in Max" help files.

Also note that if you change these values in the .js file after the [js] object has been instantiated, I am pretty sure that you won't see the change until you reinstantiate the [js] object. This is about the only change that isn't automatically adjusted if you have autowatch turned on.