PD to Max conversion

May 21, 2008 at 5:59pm

PD to Max conversion

Hey, was just wondering if anyone could help me convert a PD patch into a working max version. I’ve done most of it but I’m stuck on a few minor details, such as where there is a message box that starts with a “;” that seems to be sending data elsewhere.

If anyone could help me with this predicament then I’d be most grateful.

Thank-you :)

#37996
May 21, 2008 at 11:02pm

Dominic wrote:
> I’m stuck on a few minor details, such as where there is a message box that starts with a “;” that seems to be sending data elsewhere.
>

Hi.
From Max documentation (“Message” chapter):

“A semicolon (;) sends a message to a receive object. The 1st item
following a semicolon is the name of the receive object. The rest of the
message is sent to that object, rather than out the outlet…”

It’s the same in max and pd ;)

Ciao

– Pasted Max Patch, click to expand. –
#131565
May 22, 2008 at 2:20am

Whoops…thanks for that gusanomaxlist.

Well it all seems fine to me now…can’t figure out why it’s still not working the same as the in PD patch.

I’ll upload the max patch just incase anyone feels like having a skwizz

#131566
May 22, 2008 at 9:16am

No takers…fair enough.

Could someone please explain this: Inside the “Mycircle” sub patcher it starts off with “r $1″ but max doesn’t understand this and reports an error stating: “$” variable out of range.

So although the sound is coming through ok, the selector section that is providing the modulation isn’t working properly.

#131567
May 22, 2008 at 9:47am

there’s really no difference between max and Pd in this regard, this
technique is older than both Max or Pd, it dates back to prehistoric
MaxFTS days…

/*j

> Hey, was just wondering if anyone could help me convert a PD patch
> into a working max version. I’ve done most of it but I’m stuck on a
> few minor details, such as where there is a message box that starts
> with a “;” that seems to be sending data elsewhere.
>
> If anyone could help me with this predicament then I’d be most
> grateful.

#P window setfont “Sans Serif” 9.;
#P window linecount 2;
#P message 196 51 86 196617 ; flashxy 450 600;
#P message 196 21 86 196617 ; flashxy 200 200;
#P window linecount 1;
#P newex 453 306 54 196617 print poly;
#P window linecount 2;
#P message 465 150 63 196617 ; one hit bang;
#P message 445 119 63 196617 ; one hit bang;
#P message 425 88 63 196617 ; one hit bang;
#P window linecount 1;
#P newex 425 55 71 196617 sel 49 50 51;
#P newex 425 19 40 196617 key;
#P window linecount 2;
#P message 310 356 87 196617 ; one create $1 $2;
#P message 293 325 87 196617 ; one create $1 $2;
#P message 276 294 87 196617 ; one create $1 $2;
#P window linecount 1;
#P newex 276 257 61 196617 route 1 2 3;
#P newex 137 223 32 196617 print;
#P newex 66 328 42 196617 s three;
#P newex 49 302 35 196617 s two;
#P newex 32 276 33 196617 s one;
#P newex 32 221 61 196617 route 1 2 3;
#P message 53 137 39 196617 create;
#P newex 32 184 74 196617 pack 0. s 0. 0.;
#P newex 32 102 31 196617 t f b;
#P newex 32 63 95 196617 poly 3 1;
#P newex 32 21 52 196617 r flashxy;
#P comment 44 411 172 196617 mycircle one -> abstraction missing;
#P connect 16 2 19 0;
#P connect 16 1 18 0;
#P connect 16 0 17 0;
#P connect 15 0 16 0;
#P connect 11 2 14 0;
#P connect 11 1 13 0;
#P connect 11 0 12 0;
#P connect 4 0 6 0;
#P connect 4 0 10 0;
#P connect 6 2 9 0;
#P connect 6 1 8 0;
#P connect 6 0 7 0;
#P connect 2 2 4 3;
#P connect 2 1 4 2;
#P connect 5 0 4 1;
#P connect 3 1 5 0;
#P connect 3 0 4 0;
#P connect 2 0 3 0;
#P connect 1 0 2 0;
#P window clipboard copycount 23;

#131568
May 22, 2008 at 10:04am

1st of all, in your pd patch, [mycircle one], [mycircle two], … are
abstractions, not subpatchers, so we couldn’t see what was inside as you
didn’t provide them with the main patch…

You did convert them into patchers in the max patch so, I could have a
look and found some mistakes.

A big difference between Max and PD is how they deal with patcher
creation arguments.
Max will use “#1″, PD will use “$1″.
So, if an *abstraction* in Max called [mycircle one] contains a [r #1]
object, it will become [r one] as soon as the abstraction is created
(because “one” is the first creation argument of the abstraction).
In PD, in an *abstraction* called [mycircle one], a [r $1] object will
become [r one], and so on…

In your max patch, you are using these “r $1″ as messages, they should
be objects and they should receive informations from these [;one ...(
messages we talked about.
And if you still wanna use the creation arguments, you should convert
all [p mycircle...] patchers to abstractions, and change [r $1] to [r #1].
(Another solution would be to name [r #1] -> [r one] in [p mycircle
one], [r #1] -> [r two] in [p mycircle two] and so on…).

Hth

Ciao

#131569
May 22, 2008 at 10:21am

On 22 mai 08, at 11:16, Dominic wrote:

> Could someone please explain this: Inside the “Mycircle” sub patcher
> it starts off with “r $1″ but max doesn’t understand this and
> reports an error stating: “$” variable out of range.
>
> So although the sound is coming through ok, the selector section
> that is providing the modulation isn’t working properly.

I don’t have any errors, but I dodn’t try much to get some.

A few comments:

there are 2 [p mycircle one] in your patch (one is hidden behind
another patcher), one is correct but not the other one because:
you probably want the object [r ], not the message r. You should have
a look at [patcherargs].
It is possible to create abstractions in Max, which is much more handy
than having 6 identical [p mycircle]. You then have to learn stuff
like [r #1].

The [line~] object should probably be triggered when hit is received,
as its output stays at 0. 2 seconds after create is sent.

Hope it helps,

p

_____________________________
Patrick Delges

Centre de Recherches et de Formation Musicales de Wallonie asbl

http://www.crfmw.be/max

#131570
May 22, 2008 at 11:41am

Thank-you so much.

Those last few nuggets of information were invaluable to me.

:)

#131571
May 22, 2008 at 11:41am

Dominic schrieb:
> I’ll upload the max patch just incase anyone feels like having a
> skwizz

You need to save the [p mycircle ...] as a subpatcher, and replace the
message [r $1] with and object [r #1]. Then it will load them with
appropriate parameters and create the receive object… You could also
just create an input to these patchers and connect them instead of these
send/receive constructions….

Its good to understand the functionality in general if you do such a
port, then its easy to find out why it doesn’t work… ;-)

The tutorials in Max and in Pd are both pretty good now (Pd gained a lot
of documentation in the past, but with Max 5 cycling is again pretty
much ahead… ;-)

good luck…

Stefan


Stefan Tiedje————x——-
–_____———–|————–
–(_|_ —-|—–|—–()——-
– _|_)—-|—–()————–
———-()——–www.ccmix.com

#131572

You must be logged in to reply to this topic.