why do I need to follow right to left rules in max

marlon brando's icon

Hi,

Just trying to understand this program.
Why is the right to left thing necessary?

It is really awkward!

MaxforLive is aimed at musicians, but this stuff is musician-unfriendly, I think.

marlon brando's icon

Can I place a poly message input with any number wherever I want in the poly subpatch and use swap?

Matthew Aidekman's icon

Here's the way to look at it: Chinese has up to down, English has left to right, Mathematics has order of operations and max has right to left.

With out seeing a specific example of why it's annoying (other than the !@#$%^&* gate object), there's no other help I can give.

marlon brando's icon

Thanks,

but that does not make me understand why it needs to have it.
Reaktor doesnt have it.

Gregory Taylor's icon

marlon brando wrote on Fri, 31 July 2009 06:13Hi,

Just trying to understand this program.
Why is the right to left thing necessary?

It is really awkward!

MaxforLive is aimed at musicians, but this stuff is musician-unfriendly, I think.

I'm a musician and it makes complete sense to me, so perhaps musicianship isn't your problem. The right to left thing *is* a convention, all right. It's not even very difficult to explain (it's certainly mentioned in um... wow, tutorial number 2, and it's actually the subject of tutorial number 5. Love those Max 5 tutorial rewrites!), even.

Consider the following stupidly simple example:

Max Patch
Copy patch and select New From Clipboard in Max.

In order for this whole graphic paradigm thing to work at all, you need to know the order in which messages are sent out an object if there's more than one outlet, and you also need to know about something similar in terms of what happens with an object with more than one inlet (which inlet makes things happen? All of them? One of them? If so, which one?). This example takes a message, unpacks it, then packs it up again, and then sends it out. It works because there are a couple of simple rules that are always predictable and always work. The main obvious ones are:

The unpack object spits each list element out one at a time from right to left (last to first).

Since almost every single Max object in the world uses its left inlet (the "hot" inlet) to trigger a calculation or some activity, you know that patching the unpack and pack objects together will do what you expect: when the first list item gets spit out the left inlet of the unpack object, the other three numbers will already have arrived in a precise order in the pack object and be waiting to be sent out once that last number shows up in the left inlet. The combination of the right-to-left rule and the hot inlet rule means the whole thing "just works."

The other bit that might be a tiny bit less obvious to you if being a musician means that you don't know anything about how computers work is that you really NEVER send four separate things out those inlets 'at the same time.' One act MUST precede another, even if by a teensy amount.

As a thought experiment, consider how difficult it would be to figure out how to program in Max if the order that things were sent out depended on the order in which you connected the outlet of one object to the inlet of another (and, of course, you've got no way of knowing WHICH inlet was connected to WHICH outlet, do you?)....

The basic rules that Max tutorial 5 explains simply and clearly might not be immediately intuitive to you, but they're consistent in their use (the fact that adjectives seem to be treated like verbs in Japanese isn't intuitively obvious to me, but it's a convention that, once learned, will reliably produce results). Just in case you want to get fancy, there are even ways to make things even more determinant (the trigger object, which you should read up on), and even a way to change the inputs to a "hot" inlet without triggering the calculation (the "set" message).

Languages have rules. These rules are remarkably clear (if unintuitive to you personally) and reliable. I hope this helps to at least suggest *why* Max was "born that way."

Matthew Aidekman's icon

I haven't gotten deep into reaktor but something tells me that since it runs on a computer and you can predict the outcome, it executes things in order. Are you criticizing the manner in which max executes a patch or are you saying that your creating an abstraction and don't wish to adhere to the same standards as the built in objects?

Either way I would suggest very highly that you don't fight it. I'm having a hard time trying to think of how the computer could understand what order to execute commands in if it didn't follow rules like this.

You may be comparing max to reaktor simply by reason of aesthetics. Be warned. It's a different beast.

Obviously your a new comer (welcome!) I'll walk you through posting examples.

A. create a patch showing what about right to left order is confusing you and make sure you insert comments explaining it.
B. Select all.
C. Choose Edit/Copy Compressed
D. Come here, to the forum, and hit paste.

Matthew Aidekman's icon

Gregory Taylor wrote on Fri, 31 July 2009 06:55marlon brando wrote on Fri, 31 July 2009 06:13Hi,

Just trying to understand this program.
Why is the right to left thing necessary?

It is really awkward!

MaxforLive is aimed at musicians, but this stuff is musician-unfriendly, I think.

I'm a musician and it makes complete sense to me, so perhaps musicianship isn't your problem. The right to left thing *is* a convention, all right. It's not even very difficult to explain (it's certainly mentioned in um... wow, tutorial number 2, and it's actually the subject of tutorial number 5. Love those Max 5 tutorial rewrites!), even.

Consider the following stupidly simple example:

----------begin_max5_patcher----------
358.3ocuT00SCCBE8Y5uBBOOWJerrou4uCyhg0ha3ZglBMVcY+2cP6zNkXwL
soIP3vk68bNbKGR.nM5VgAAuC9.D.Nj..dHG.neM.UxayJ3FeXHk3E8lmQy5
1xJZsd3pZoxdFU0TJUEBq+D3dvJtMamTs8wZQlsqhX1h4oyf3UqbSTlajjNO
Ett+LxbexOUvaVLH45F64rm1i9jVYU7RgO96qk7BzfcLx276fIyScnGSRbCy
tRMyy1CkceAkNaboy7ReI8mjNKrzwiJ8tfsuVI5JJB8Q5++bkF0n9RDsD3H7
EZXeg868Eeuano+R+pTXL7shuYXLHERf3fNEYTmZ0stQ1xtejBaTjosAxGCp
Pp95KKdU3vuzkL5l5ryUnmuvOERtvXkJtUpUChgdQL6j44B0vGDJk4U5SWg8
T.tN3MVrLProxy-Connection: keep-alive
Cache-Control: max-age=0

AiXSNivQvH7jxHRDLhLoLhFAinSFiXQzGs3J5iNs3Xx6.Proxy-Connection: keep-alive
Cache-Control: max-age=0

Zx
4C
-----------end_max5_patcher-----------

In order for this whole graphic paradigm thing to work at all, you need to know the order in which messages are sent out an object if there's more than one outlet, and you also need to know about something similar in terms of what happens with an object with more than one inlet (which inlet makes things happen? All of them? One of them? If so, which one?). This example takes a message, unpacks it, then packs it up again, and then sends it out. It works because there are a couple of simple rules that are always predictable and always work. The main obvious ones are:

The unpack object spits each list element out one at a time from right to left (last to first).

Since almost every single Max object in the world uses its left inlet (the "hot" inlet) to trigger a calculation or some activity, you know that patching the unpack and pack objects together will do what you expect: when the first list item gets spit out the left inlet of the unpack object, the other three numbers will already have arrived in a precise order in the pack object and be waiting to be sent out once that last number shows up in the left inlet. The combination of the right-to-left rule and the hot inlet rule means the whole thing "just works."

The other bit that might be a tiny bit less obvious to you if being a musician means that you don't know anything about how computers work is that you really NEVER send four separate things out those inlets 'at the same time.' One act MUST precede another, even if by a teensy amount.

As a thought experiment, consider how difficult it would be to figure out how to program in Max if the order that things were sent out depended on the order in which you connected the outlet of one object to the inlet of another (and, of course, you've got no way of knowing WHICH inlet was connected to WHICH outlet, do you?)....

The basic rules that Max tutorial 5 explains simply and clearly might not be immediately intuitive to you, but they're consistent in their use (the fact that adjectives seem to be treated like verbs in Japanese isn't intuitively obvious to me, but it's a convention that, once learned, will reliably produce results). Just in case you want to get fancy, there are even ways to make things even more determinant (the trigger object, which you should read up on), and even a way to change the inputs to a "hot" inlet without triggering the calculation (the "set" message).

Languages have rules. These rules are remarkably clear (if unintuitive to you personally) and reliable. I hope this helps to at least suggest *why* Max was "born that way."

Well done. This is why he writes the manual...

Just to add to this.. Why do we perceive reality in dimensions? Think of the alternatives. that's why!

Gregory Taylor's icon

Q: Why do we have time?
A: So that everything doesn't happen at once.

Q: Why do we have space?
A. So that everything doesn't happen to me.

Roman Thilenius's icon

marlon brando wrote on Fri, 31 July 2009 14:40Thanks,

but that does not make me understand why it needs to have it.
Reaktor doesnt have it.

there must be one method to give you the option to tell the
program which message should be fired first.

you might hate the rtl, but if it wouldnt be there, we would
have something else.

-110

Alexandre's icon

If we would have the possibility to put the objects in diagonal, I would have like the chinese way, up to down.
Just joking.

Roman Thilenius's icon

Matthew Aidekman wrote on Fri, 31 July 2009 15:03

Just to add to this.. Why do we perceive reality in dimensions? Think of the alternatives. that's why!

and why do women percieve a different reality than normal people?

Roman Thilenius's icon

Alexandre wrote on Fri, 31 July 2009 19:30If we would have the possibility to put the objects in diagonal, I would have like the chinese way, up to down.

max objects could have different colors, like a gradient from
red to yellow for the output order, i am sure it work too to
program like that.

or fat, midddle, and thin connections.

or the cords and the outlets could show numbers 1,2,3 on mouseover.

well, but it is right to left now.

Exit Only's icon

The lack of an explicit order of operations is one of the primary reasons I don't use Reaktor. Knowing exactly when an event will happen in relation to a all other events is a good thing.

marlon brando's icon

Nick Inhofe wrote on Fri, 31 July 2009 13:44The lack of an explicit order of operations is one of the primary reasons I don't use Reaktor. Knowing exactly when an event will happen in relation to a all other events is a good thing.

Do you know anything about how events get prioritized in Reaktor?

Matthew Aidekman's icon

http://www.semaforte.com/reaktor/faq.htm#6.5.1" target="_blank">???

ash's icon

marlon brando wrote on Fri, 31 July 2009 05:13 MaxforLive is aimed at musicians, but this stuff is musician-unfriendly, I think.

Fundamentally, Max is programming. I would say music notation is unfriendly. To leverage either one, you have to speak the language.

Don't get discouraged, keep learning; the community is always here to help.

marlon brando's icon

Thanks all,

Hope I did not step on any ones toes when I expressed some frustration white my patching.

Cheers

Matthew Aidekman's icon

Learning new languages is always frustrating at first. It's ALWAYS been the case that I say "This is stupid! It's not exactly like this language I've been programming in lately!"

I feel your pain. I promise once you get over it it, you'll be happy you stuck it out.

Griotspeak's icon

while the question has been answered pretty well and someone may have already said this;

i think the awkwardness is intentional. one problem that always crops up in programming is getting too comfortable and making assumptions. becoming fluent in a spoken or written language creates a tendency toward this comfort.

For me, the right to left paradigm causes me to use triggers shamelessly. i have even started writing annotations explaining what happens and in what order for more involved trigger sequences. in this sense more notes are better, so i appreciate the fact that i will almost never feel comfortable without being explicit about the order of operations with a trigger.