send message to line

Oct 8, 2006 at 4:03pm

send message to line

HEllo,
I made a script which make a string like :

function bang(){
var a=”0 100 0 200″;
outlet(0,a);
}

and I send it to a line~ object in order to make a complex (or not) envelop to drive a *~ object.

every time i get the message:
error: line~doesn’t understand “0 100 0 200″

If I make a messagebox with “0 100 0 200″ in it and send it to the line~, no problem.
WHat is the way to format it with js?

David from France

#28036
Oct 8, 2006 at 4:12pm

On 8 oct. 06, at 18:03, martinex wrote:

> I made a script which make a string like :
>
> function bang(){
> var a=”0 100 0 200″;
> outlet(0,a);
> }
>
> and I send it to a line~ object in order to make a complex (or not)
> envelop to drive a *~ object.
>
> every time i get the message:
> error: line~doesn’t understand “0 100 0 200″

Hi,

As the error message suggests, you’re sending a wrong message to the
line~ object. You need to send a “list” (an Array in js), or send the
values directly.

function bang() {
outlet(0, 0, 100, 0, 200);
}

or

function bang() {
// array solution 1
var a = [ 0, 100, 0, 200 ]; // create an array of for elements
outlet(0, a);
}

or

function bang() {
// array solution 2
var a = new Array(4);
a[0] = 0;
a[1] = 100;
a[2] = 0;
a[3] = 200;
outlet(0, a);
}

Best,

ej from France too (the world is really small, isn’t it?)

#85651
Oct 8, 2006 at 4:20pm

#85652

You must be logged in to reply to this topic.