Forums > Javascript

External of simple js?

Jun 12 2010 | 7:15 am

This would be very usefull for using in conjunction with a matrixctrl, when feeding the input of a grid controller (especially in m4l). I’m using the js now to cut down data flow, but I’m thinking it would work better if it were built as a C (or Java) external and could operate at high priority. Perhaps its unimportant (because matrixctrl is always defered? I can’t tell and I’ve been looking around)…if so, someone please set me straight.

It merely filters data from the cells of a matrixctrl from being sent when the matrixctrl receives a bang and the data hasn’t changed since the last bang. Its basically a [change] object, but for a matrixctrl.


var matrix=[];


function init()

function list(x, y, v)
        outlet(0, x, y, v);

Any help greatly appreciated. It would be easy (I suppose) to have two arguments specifying the dimensions of the matrixctrl.

Jun 12 2010 | 1:23 pm

I remember posting something similar in an older thread. Have a look at the other solutions there.


Jun 12 2010 | 10:14 pm

Thanks for the response, Luke.

Unfortunately, those don’t work for me either.

I’m using this for several patches in m4l. The js bogs the system, and besides won’t operate at high priority (the immediate property in m4l js doesn’t play well with ableton, apparently, so all js is stuck in deferred queue). I need some kind of external.

I thought the pattr trick might work, but it still sends EVERY cell each time one of the cells change. I’m looking for something cheap that will do the job, and I’m thinking C or Java is the way. Unfortunately, I don’t know either, so hopefully someone can help me out.

Your js is actually exactly what I’m looking for, only in a form that is overdrive friendly.

Thanks again :)

Jun 13 2010 | 8:50 am

(the immediate property in m4l js doesn’t play well with ableton, apparently, so all js is stuck in deferred queue)

In a straight Max patch this would be fine, but in m4l the immediate property causes instability. I haven’t gotten a technical answer as to why yet, but the bottom line is that it doesn’t work. I know for a fact (through experimentation) that if you try to run two identical js objects in different m4l patches with any functions immediate property set to (1), it will crash Live. I’ve also used unique js objects with funciton.immediate=1, and although it does run the function in high priority for a while without crashing, it totally foobars audio in m4l when doing anything that I might want to do.

Thats why I’m looking for a solution that is external.

Thanks for posting, I’m hoping a simple solution that I’ve overlooked (like the one you posted) will be a the answer.

Jun 14 2010 | 5:46 pm

Nice one! Creative thinking wins again :) I was exploring the idea of using a funbuff early on, but for some reason didn’t get that far. I’ll try this out in place of the js’s I’m using and see if it works better.

You rock Pizza Olives! Thanks again :)

Viewing 5 posts - 1 through 5 (of 5 total)

Forums > Javascript