Generate patches dynamically JS

Apr 30, 2013 at 5:18pm

Generate patches dynamically JS

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

#68023
May 3, 2013 at 6:07pm

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?

#244415

You must be logged in to reply to this topic.