Electronic Music mailing list archives

Previous Message: Re: poly~ or thispoly~ does not work
Next Message: Soundfile preview for sfplay~

From: Adam Murray ()
Date: May 12, 2008
Subject: Re: Announcing ajm objects
Quote: bitbutter wrote on Sun, 11 May 2008 03:58
----------------------------------------------------
> 
> I'd like to refactor a complicated max patch into a cleaner MVC-like structure. Do you think ajm.ruby is suitable for this?

I normally use ajm.ruby to replace fairly small parts of my patch when the logic gets too complicated and I can more easily express them in Ruby. Regarding MVC, I tend to use ajm.ruby for pieces of the controller logic or generating the model. 

I'm not using Ruby for the MVC structure itself. For MVC-like structures inside a Max patch, I'm using Max's pattr objects (pattr, pattrforward, pattrstorage, etc). It works well for my purposes. 

That isn't to say you couldn't do all the MVC in Ruby. Whether or not it is suitable depends on where you choose to draw the line between Max patching and Ruby code. 


> Is it possible to somehow have separate ajm.ruby instances communicate with one another without relying on max messages between them? (eg a 'controller' object that talks to a separate controller object elsewhere) or should I be picturing one big ajm.ruby object (with many outputs?)

I am planning on releasing a new version soon, hopefully this week (watch this thread for a link). One of the new features is a shared evaluation context, so you can send a script to one object and share all the variables, classes, etc between multiple ajm.ruby objects. This feature may help you, but it's just a data sharing mechanism and doesn't provide a convenient way to communicate between the objects. You could use the standard Max send/receive objects to send messages between ajm.ruby objects, or perhaps they could talk directly using networking APIs. 

There's a lot of unexplored territory here, so please share any successes or failures. Feel free to email me directly if you don't want to spam the forum.


--
Adam Murray
compusition.com
_______________________________________________
maxmsp mailing list [EMAIL REMOVED] http://www.cycling74.com/mailman/listinfo/maxmsp

+ Announcing ajm objects Adam Murray (02/12/08)
+---Re: Announcing ajm objects Zip Boterbloem (02/13/08)
+------ Re: Announcing ajm objects Adam Murray (02/13/08)
+--------- Re: Announcing ajm objects Adam Murray (02/13/08)
+------------ Re: Announcing ajm objects bitbutter (05/11/08)
+--------------- Re: Announcing ajm objects Adam Murray (05/12/08)

Previous Message: Re: poly~ or thispoly~ does not work
Next Message: Soundfile preview for sfplay~