to create a patcher window with sccript

Mar 17, 2006 at 1:23pm

to create a patcher window with sccript

Mar 17, 2006 at 1:53pm


I am not sure about what you mean by “not as an abstraction”. Do you
mean opening a patcher from another patcher ? I f so, you can send
‘load your/path/to/patch/to/load’ to a [pcontrol].
Is this what you are after ?



Mar 17, 2006 at 2:37pm

Mar 18, 2006 at 11:14pm

Hi Sebastien,
From the max java api documentation:

|MaxPatcher| can be used in conjunction with |MaxBox| to dynamically
modify and create patchers on the fly. The interface exposed is very
similar to the functionality exposed by the js javascript external and
thus much of that documentation for that external is applicable well.

public class maxpatchertest extends MaxObject {

public void makepatcher()

MaxPatcher p = new MaxPatcher(50,50,200,200);
MaxBox b11 = p.newDefault(20,20,”toggle”,null);
MaxBox b21 = p.newDefault(50,20,”toggle”,null);
MaxBox b31 = p.newDefault(80,20,”toggle”,null);
p.getWindow().setTitle(“TEST PATCH”);



… and from the javascript in max pdf

The Patcher object is a Javascript representation of a Max patcher. You
can find, create,
modify, and iterate through objects within a patcher, send messages to a
patcher that you
would use with the thispatcher object, etc.
There are currently three ways to get a Patcher, use the Constructor,
access the patcher
property of a jsthis (accessed as this.patcher), or use the subpatcher()
method of a
Maxobj object.
Patcher Constructor
var p = new Patcher(left,top,bottom,right);
left, top, bottom, right: global screen coordinates of the Patcher window
var p = new Patcher();
Uses 100,100,400,400 as default window coordinates

Good luck, and keep up the great work.


Mar 19, 2006 at 7:50am


You must be logged in to reply to this topic.