XML Feeds

.

[maxmsp] problem sending out messages from [js]...

Andrew andrew.jensen at yahoo.com
Sun May 25 21:00:43 MDT 2008


Hi,

I'm having a funny problem sending a message out of a [js] object.  I want to send out the message:

getpixel 0 1

but the object sends

"getpixel 0 1"

which isn't liked by the [lcd] object I've plugged it into.

Here's the [js] code I'm using; if you'd like to see the rest of the max patch I can upload that too (I'm guessing the problem can be solved somehow in the [js] object)

//////////////////////
//imgRead.js
//////////////////////

inlets = 1;
outlets = 1;

var xx = 0;
var yy = 0;

var imgWidth = 0;
var imgHeight = 0;

function bang()
{
	if(xx == imgWidth)
	{
		xx = 0;
		yy += 1;
	}
	else
	{
		xx += 1;
	}
	
	//send:
	//getpixel x y
	//to the [lcd] object
	
	//problem: I'm getting "getpixel x y" in doublequotes.
	
	var message = 'getpixel ' + xx + ' ' + yy;
	outlet(0, message);
}

function size(width, height)
{
	//configure the width and height of the image
	
	imgWidth = width;
	imgHeight = height;
	//post(width + ', ' + height);
}

//////////////////////



More information about the maxmsp mailing list