How to remove an object in the patcher from JAVA ?

May 30, 2012 at 11:59am

How to remove an object in the patcher from JAVA ?

Calling/placing my set of abstraction from JAVA in the patcher, I’d need also to remove them.

Does it exist a “remove” method as in JS ?

May 30, 2012 at 12:01pm

answering to myself for reference purpose:


remove() exists basically & obviously :)

Feb 20, 2013 at 10:00am

Hey Julien,
can you give me a short workaround about the delete method? I read the api ad tried out several versions in java but it doesn’t work. In js it was really easy but in java i didn’t get it working. that is my simple code, i am working on.

import com.cycling74.max.*;

class Verschaltung extends MaxObject{
MaxPatcher p = getParentPatcher();

public Verschaltung()


public void create(int x,int y){
MaxBox b11 = p.newDefault(20,20,”toggle”,null);
MaxBox b21 = p.newDefault(50,20,”toggle”,null);
MaxBox b31 = p.newDefault(80,20,”toggle”,null);
MaxBox b41 = p.newDefault(x, 80, “flonum”, null);
MaxBox b51 = p.newDefault(20, y, “number”, null);
MaxBox b61 = p.newDefault(20, 400, “pak”, null);
public void deleteAll(){


Feb 20, 2013 at 2:13pm

OK, i figured it out, how to remove an object. But now i have my number box and want to initiate it with an value. I created an Atom[] of the length 1 and filled it with “1″. But the value doesn’t change in the maxpat.


You must be logged in to reply to this topic.