Field as Score Tool For Max/MSP & Quartz Composer

36 views
Skip to first unread message

Tom Fuerstner

unread,
May 1, 2011, 3:49:57 AM5/1/11
to Field-development
hi,

after using Field already for more than year it became my favourite
'media score tool'. to be enabled to inject Python code into Max/MSP
is great. even more important is its OSC functionality to control/
trigger all the other interesting media programs. but one thing i
still miss is the 'max patch import' or better 'max patch draw' tool.
can you please make the code public that you already built for this
purpose! for sure there's a lot to learn from. especially how to
create customized visual elements. this would be sooo helpful.

br,

/tom_fuerstner

Marc Downie

unread,
May 1, 2011, 11:56:30 AM5/1/11
to field-de...@googlegroups.com
On Sun, May 1, 2011 at 2:49 AM, Tom Fuerstner <i.sc...@gmail.com> wrote:
> hi,
>
> after using Field already for more than year it became my favourite
> 'media score tool'. to be enabled to inject Python code into Max/MSP
> is great. even more important is its OSC functionality to control/
> trigger all the other interesting media programs.

Very, very glad to hear it.

> but one thing i
> still miss is the 'max patch import' or better 'max patch draw' tool.
> can you please make the code public that you already built for this
> purpose! for sure there's a lot to learn from. especially how to
> create customized visual elements. this would be sooo helpful.

Ask and ye shall receive. Sheet attached.

Caveats:

1. you are correct that it's really a max patch draw tool rather than
a max patch import in any significant way. I hacked it together for
all of a screenshot.
2. but it doesn't take the path of least resistance — that would be no
fun — it maps max boxes to Field code boxes and injects drawing code
into those boxes.
3. it then uses callbacks to draw and maintain the connections between
these boxes so you can drag them around and they still look connected.
4. this doesn't actually give you much except for a window onto some
underdocumented things in Field. But it does try to spot Max boxes
that have valid "scripting names" and tell the Max plugin about them
(since the max plugin uses "scripting name" to identify potential
targets of Field / Max communication). Code you type in to those
boxes, or subelements of those boxes, ends up going to max.
5. there s a bug in Field 12's MergeGroup class that I have to work
around in the sheet that makes this code a shade more cryptic than it
ought to be. (But since I never got around to writing up MergeGroup
(it's a class that helps create and delete subelements on demand)
nobody could notice it until now.) This sheet will make a nice
addition to the set of things I test before calling a release a
release.

All in all, it's cute, but I've never found a use for it.

Takeaway things, if you were looking to tutorialize this sheet to find
the things that are maybe under-documented in Field:

1. @overrideShouldSetFrame and friends are pretty useful (see
http://openendedgroup.com/field/wiki/ExtendingFieldInField ).
overrideShouldSetFrame isn't even mentioned on that page which is
silly — its the callback you want it you want some code to run when
any sub element changes frame

2. properties that start with decoration_ are interpreted as lists of
PLines by any box
(http://openendedgroup.com/field/wiki/AdHocUi#Addingdecorations). This
is great for adding decorations to elements anywhere.

3. MergeGroup needs it's own tutorial (and test sheet) if people are
really going to get into dynamically creating boxes.

have fun!

Marc.

> br,
>
> /tom_fuerstner
>
> --
> You received this message because you are subscribed to the Google Groups "Field-development" group.
> To post to this group, send email to field-de...@googlegroups.com.
> To unsubscribe from this group, send email to field-developm...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/field-development?hl=en.
>
>

drawMaxPatch.field.zip

Tom Fuerstner

unread,
May 1, 2011, 1:03:33 PM5/1/11
to field-de...@googlegroups.com
Marc,

thanks for the explanations and the patch. although i'm confused cause the drawMaxPatch is empty. at least i expected an "Import" visual element. do i get something wrong ?

br,

/tom_fuerstner
--
Tom Fuerstner

-------

(c)2010  ><{{{{{{°> tom surfs along!

-------

Keep it private!  So, please use my PGP public key for important messages!

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG/MacGPG2 v2.0.16 (Darwin)

mQENBE0AguYBCACs8I7yPOBywdSD/NK6egvugcPv4uRMdcA2rpKOfJpLAVJRE7gj
RYiV/kujaO/vXylBekzwVP18S1RiCDVWpvlBDhpINX4ot25Uylg0GGReASNTqEC5
hadf78E3opU8KryPPb6LTZCjfNrvUjbDB+FyLAWbFbIjrPE1hLVwBl6ScYWmYytt
ZRYYe6x3J6pJ8rNP5HDv/9hCxlysayQkqvNwaL7H6OlzehD1GozDEldX53lkD5Nv
pajk7SnJAWIFigi+b+jd2YkXAbckMPxKngbqYs16xbBcDLjIQEFjIehiLEG+792p
8rFlOnVRLES5IIrL7IPgmoXkXzX9/DvAy5erABEBAAG0IE5lc3RvciBTaWxrIDxp
LnNjcmlwdEBnbW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LV
n9AieP5abgR1A6IHTbcWiNcHwuD56zDG+WT8vJ1Lf/WD2LwVsoihDyAWvpMxM7i/
JI1J+QckaO83OMqcVikpBgV9e9cAACJOiIvv8VauFxAh89kaT4DWByasFh+FFGXa
0zR2xQ/aCyKkr522B/92Dmus6eFC2jLr/aF1MyRlX7lqR5UTT/pLp2WaJQKtlnA4
WRfHksK3SYjSLfiaJStbQNW644WcJNcMB0n8L4GCmvhxezBORXKmvhjgu6GkhsWA
Jtu0edRs8hixA2vZCyPHXNu5OqIJQ1V3v8HTswC1mWLX7gvMF1NgIn1Cfo46cYVP
piafgtN1XYBI9oY0VpuIra1jJJmunamJhCMxKFIhPSs3VVUs1gjaK8qGhxWApxyn
nAMbTzyeVoIdeDvm8E9j0hfJ0UqpSIfJy/W6MJ3bp7+5CuJlDEZz0nRQfKsHo2EM
fW9k6abAY/0+HGyGu5c7RjqDWOdXIvvfLC5792kr
=aiEC
-----END PGP PUBLIC KEY BLOCK-----

Marc Stieglitz

unread,
May 1, 2011, 12:19:33 PM5/1/11
to field-de...@googlegroups.com
Hi Marc

This is an embarrassing question. If I didn't know a prior that there was a page ExtendingFieldinField under http://openendedgroup.com/field/wiki/ how would I have know it was there? Is there a way to know what pages are linked to /wiki/?

Anyway, hope all is well.

M

> <drawMaxPatch.field.zip>

Marc Downie

unread,
May 1, 2011, 1:33:08 PM5/1/11
to field-de...@googlegroups.com
On Sun, May 1, 2011 at 12:03 PM, Tom Fuerstner <i.sc...@gmail.com> wrote:
> Marc,
> thanks for the explanations and the patch. although i'm confused cause the
> drawMaxPatch is empty. at least i expected an "Import" visual element. do i
> get something wrong ?

And that's what I get for packaging stuff off of my development
machine. Previous sheet depends on bleeding edge Field stuff. Attached
is one that should open on everybody else's machines.

Marc.

drawMaxPatch2.field.zip

Marc Downie

unread,
May 1, 2011, 1:42:24 PM5/1/11
to field-de...@googlegroups.com
It's a fine question.

In this particular case that page is cross-linked from a bunch of
other pages. Additionally, like almost all pages that are added, it's
mentioned here:

http://openendedgroup.com/field/wiki/FieldNews

When it's added, and linked off of the main documentation page:

http://openendedgroup.com/field/wiki/StandardLibrary

This one is also in a tutorial:

http://openendedgroup.com/field/wiki/FieldGATech#IntermediatetopicsinCodinginField

For those who want to follow along, all page edits to the wiki can be
tracked here:

http://openendedgroup.com/field/timeline?from=05%2F01%2F2011&daysback=300&milestone=on&ticket=on&changeset=on&wiki=on&update=Update

Although by snooping around there you may catch pages that are being
written and passed around "internally" that refer to stuff that isn't
ready for prime-time yet (for example, work on new "FLine" cleaned up
version of PLines is going on there).

But all-in-all I completely agree. Right now I suspect that it's the
lack of reference documentation that's making you and others feel like
you need to be a little clairvoyant to know what Field has going on.

Write permission to anybody who wants to seriously contribute to the wiki...

best,

Marc.

marc stieglitz

unread,
May 1, 2011, 2:09:08 PM5/1/11
to field-de...@googlegroups.com
Perfect.  Thanks
Marc Stieglitz
Associate Professor
School of Civil & Environmental Engineering
Georgia Institute of Technology

Room 101
Daniel Env. Eng. Laboratory
200 Bobby Dodd Way
Atlanta, GA 30332-0373
(404) 939-4801
marc.st...@ce.gatech.edu

Tom Fuerstner

unread,
May 1, 2011, 2:13:25 PM5/1/11
to field-de...@googlegroups.com
;-)

now it gets interesting !

still no success. obviously there is now something in drawMaxPatch2.field. but i can't see or find it.  the file size is now 328 kb. before it was only 24 kb. 
so, no problem to open the file with my Field alpha 12 version.  but still no visual elements. also no classes or objects/elements to find with the inspector.

max plugin works as expected. extending field in field with custom overrides also works without any problem.

i'm using field on a new macbook pro where it normally "rocks" 

br,

/tom

Marc Downie

unread,
May 1, 2011, 2:44:36 PM5/1/11
to field-de...@googlegroups.com
Third time lucky? (and two backward-incompatibility-introducing bugs
in the development tree squashed).

Marc.

drawMaxPatch3.field.zip

Tom Fuerstner

unread,
May 1, 2011, 2:47:15 PM5/1/11
to field-de...@googlegroups.com
yes, yes, yes.

thank you for your patience and thank you for making me 'code happy'. this opens up a new world for me. 

all the best,

/tom
Reply all
Reply to author
Forward
0 new messages