< Back to IRCAM Forum

Track append message "not working"

Hello,

I’m trying to make a patch with a dynamic number of inputs, that processes the data and send it to a mubu container. I’m creating the message this way :

function bang(){  
	var s = ""  
	for(var i = 0; i < values.length; i++){  
		s += "" + values[i] + " ";  
	}  
	outlet(1,s);  
}

The outlet is connected to this message : (track inputs append $1). When i do a print of this message, i get something like this : “track inputs append 76 54 23 45 103”. But when i look in my iMubu matrix, it’s full of 0. What am i doing wrong ?

Hi,
could you send your patch?

Best
Riccardo

Enc. the patch.

ScalableInput.maxpat (7 KB)

hi, thanks for the patch.
I can’t test it directly (it is just a subpatch without input_creation.js content) but the only problem I can see
is in the message addtrack. Here you create a time tagged track using a gui interface multiwave (possible only with sampled tracks).
But if I create a track with the same message as in your patch (with @matrixcols 4 for example and without “interface multiwave”) and I send the message “track inputs append 76 54 23 45 103″ this works well: note that the first argument 76 is the time tag and the others the matrix values.
Maybe the problems is in the “@matrixcols $1”, check if the track has the right dimensions.

best

Still doesn’t work, and I don’t understand why, every print looks good, but the mubu container is still full of 0.

Enc an archive of the project.

ScalableInputProject.zip (4.48 KB)

the output of your js object is a singol symbol, not a list of numbers
So imubu is receiving wrong arguments with append message.

I’m now trying to add the data using the messnamed function this way :

messnamed(“mubu_container”,“track inputs append”,values);

Values is an array containing int values.

I’ve a mubu object which scripting name is “mubu_container”.

But when i “send” this message, nothing happens. Is it more of a Max problem, and should i go ask in the Cycling forums, or is it Mubu related ?

Thanks,
Hippolyte.

Enc. the files.

input_creation.js (1.97 KB)

messnamed is likely to work only with Max’s receive objects. You will probably need to send the message directly.

Sending the values array is definitely going to be a better solution than the a big symbol with all the numbers that MuBu doesn’t know how to interpret. What’s actually the message that you want to send to the MuBu object?

Emmanuel gave you the answer. I add just that the message is not “track inputs append” but just “track” and “inputs” and “append” are
the first two arguments.