Forums > MaxMSP

Generate patches dynamically JS

April 30, 2013 | 5:18 pm

Hey,

i’m new to Max/Msp and i’m writing a script which should generate my patches dynamically. So basicly it goes like this:

var first_module = this.patcher.getnamed( "first_module" );
var second_module = this.patcher.getnamed( "second_module" );

function patch ( val ) {
	this.patcher.newdefault(  first_module );
}

module 1 and 2 are simple filters in a patch..but it won’t work! maybe somebody can give me a hint.. thxx in advance!

best

boogie



Lee
May 3, 2013 | 6:07 pm

Iirc, the new default creates a named entity, not an entity from an object, which is what you have. I’m not at computer now, but you should be able to grab the maxclass property of you’re second_module and use that to create the new object… But I’m not entirely sure what you’re trying to achieve here?


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