Page 1 of 1

lemurloader for max

Posted: 03 Feb 2012 14:43
by lucasparis
So I've been trying to get lemurloader to work with max. Here's my goal: I'm building a modular system in max, I have subpatches loading dynamically, basicaly I have slots and I can load different things into the slot (samplers, synths.. etc), I want to have a jzlib container with an interface for each of the type of slots. What I've been trying to do is load my jzlib container into another named container that exist in the interface. This so far works.
the problem is when I want to load another jzlib and destroy the older one. I tried looking at the mu interface to figure this out and found the destroy command but this is not documented anywhere, it's part of those obscure liine programmer things^^
So any tips welcomed!

Re: lemurloader for max

Posted: 03 Feb 2012 17:53
by xanadu
This code defines an OSC script ClearContainer that will clear a container.

Code: Select all

// Syntax MaxMSP: /ClearContainer [ParentPath.]ContainerName

decl root = findobject(OSC_ARGS[0]);

decl obj = getfirst(root);
while (obj)
{
		decl next = getnext(obj);
		destroyobject(obj);
		obj = next;
}
oscout(0, '/ClearContainer', { 'ready' });
Also look at the topic 'Undocumented Functions' on this forum.

Cheers,

Xanadu

Re: lemurloader for max

Posted: 03 Feb 2012 18:21
by lucasparis
thanks for that!
will check out that thread also

Re: lemurloader for max

Posted: 03 Feb 2012 20:53
by Macciza
Hi

Ofcourse if all you want to do is destroy the actual container and contents then

destroyobject(ContainerName) is all you need do ...
then import your new jzlib container into your existing host container . . .

Cheers
MM