CPU/Memory Javascript vs Max

Mike S's icon

Hi All,

Is there any advantage gained in terms of CPU / memory by putting parts of a Max patch in to JS?

I have a MIDI learn function which uses a lot of select objects. As the patch is really dense to begin with, would I save any space by putting this in to JS and using a load of if statements?

jamesson's icon

Depends on a lot of factors - only way to determine is to test :/

mattyo's icon

If you're overwhelmed with select objects, you might want to look at a structure using coll/forward:

Max Patch
Copy patch and select New From Clipboard in Max.

M

jaeho's icon

I would not use JS if accurate timing mattered.