desactivate a part of patch

adonfadonf's icon

i use sometimes a patch with on/off device... for on/off object in a patch, i can use javascript for objects to delete but do you have an easier way ? i can disconnect cable between object or create several max for live device.
i dedicate this post to my cat crashed with a car.

adonfadonf's icon

inlets = 1;
a = inlet[1];
function msg_int(a)
{
b = this.patcher.newdefault (0,30,"message");
b.set(23);
c = this.patcher.newdefault (100,100,"route", 5, 3, 40, 50);
this.patcher.connect (b, 0, c, 0);
};