question about #0

Nov 15, 2009 at 4:20am

question about #0

Dear all, I’m reading Miller Puckette’s Theory and Techniques of Electronic Music. To help myself understand the examples in the book better, I try to implement some examples in Max/MSP instead of PD.

To avoid name conflicts, these examples utilize a special feature in PD: the symbol $0 will be replaced by a unique id for each patch. After some forum search, I found that[1] #0 seems to be the trick.

However, I can’t any mention in the max5 reference document about this feature. Is this still working in Max5? How can I test it (because I think simply print a “#0″ message won’t display the unique id)?

Any input will be appreciated.

[1]: http://www.cycling74.com/forums/index.php?t=msg&goto=21080&rid=10156&S=516567adf708c16aebf05bfb5d60eea0#msg_21080

#46457
Nov 15, 2009 at 6:55am

Hello maxers,

i don’t know Pure Data, but #0 works in max 5 ; for exemple just put a [coll #0_toto] in an abstraction makes it local to this abstraction (even if you duplicate this abstraction).

edit : zip.

#167230
Nov 15, 2009 at 11:27am

If you open the ExamplesOverview patch from the Extras menu and click on the Max tab there is an example in the Max Tricks pane which should make things a bit clearer.

lh

#167231
Nov 16, 2009 at 3:59am

#0 and $0 work similarly in Max and Pd. The main difference, however, is that in Max #0 only works in abstractions. It does not give a unique id to the parent patch. In Pd, it does.

#167232
Nov 16, 2009 at 5:25am
.mmb wrote on Mon, 16 November 2009 04:59
#0 and $0 work similarly in Max and Pd. The main difference, however, is that in Max #0 only works in abstractions. It does not give a unique id to the parent patch. In Pd, it does.

proposal:

when you need #0 in the root patch, simply make an abstraction
which contains [t #0].

-110

#167233
Nov 16, 2009 at 5:46am

Yeah. I’ve actually gotten in the habit of making the parent patch a bpatcher and putting everything in there. But it does making editing a bit irritating.

I should also point out to larme that #0 works in message boxes, but in Pd $0 does not. You have to do something like this:

[f $0]
|
[$1(

#167234
Nov 16, 2009 at 8:10am

and in max it also works inside symbols.

things like [buffer~ #0_sample1 1000.] are commonly used.

#167235
Nov 16, 2009 at 9:03am

Thanks for all your kind replies. It solves my confusion.

#167236
Nov 16, 2009 at 10:29am
larme wrote on Sun, 15 November 2009 05:20
However, I can’t any mention in the max5 reference document about this feature. Is this still working in Max5?

Larme, you’re right. There is nothing in the reference. I already opened a topic about this more than one year ago:

http://www.cycling74.com/forums/index.php?t=msg&goto=147098

As you may see, nobody reacted.
It is unfortunately not the only things missing in Max5′s documentation, but as you don’t know what is missing, you won’t notice.
It is also missing in Max5.1ß, I just wonder wether #0 is usefull in Max4Live…

It may be a good idea to download Max4 and read its pdf documentation files.

#167237
Nov 16, 2009 at 10:48am

i had the same problem with a huge patch i am working on. i did not want loads of sample players in the library, just one that can be easily edited.

then when i looked through Arne Englefeldt’s ‘almost live’ patch, i have had it for ages. i remember he only has one looper, but it is split into four loopers on the patch itself. then i dug a little deeper and found the [#0_*nameofsample*] argument for the [buffer~] and [groove~], plus [info~].

now i am starting to go through all of my previous patches and doing this to them. too many Smile
a lot easier now.
it should be implemented in with the next update for max in the documentation i think. more so, for the people who dont know about it and cant figure it out. just to show the certain arguments you can use that are not just the regular ones that get things working, but ones to make patching a lot less cumbersome.

anyhow, at least there is a forum post on it now…

#167238
Nov 16, 2009 at 11:24am
lewis g. edwards wrote on Mon, 16 November 2009 11:48
anyhow, at least there is a forum post on it now…

Did you try to search the forum with #0?

It returns unsurprisingly “No Results”.

p

#167239
Nov 16, 2009 at 11:49am

If you use google and $0 as keyword, you can still get some results . But I agree that including it in reference is far better than just providing an example under the extra menu.

#167240

You must be logged in to reply to this topic.