A check on Max/MSP programming conventions;

Michael Caverly's icon

Michael Caverly

7月 24 2024 | 2:30 午後

Greetings, people;

I know some programming conventions, but next-to-nothing about programming with Max/MSP. I've picked up some excellent advice, and code, from this forum and would like a little clarification, about some specific terminology.

Please, anyone point out if anything I post is definitively wrong and/or just stupid or annoying.

For instance; I believe the term 'Max' refers to a C '74 product, whereas 'Max/MSP' refers to a particular iteration of that product, and the term 'MSP'

There are also many things that, in a boolean sense, I can feel are 'true'; but in any practical sense, I can only grasp at tiny pieces of that truth. For many of those 'tiny pieces' there must be specific rules that have to be adhered to;- but there are many other pieces that are of a more idiosyncratic nature. After all, according to the C '74/Max homepage: 'Max is an infinitely flexible space to create your own interactive software'.

That is awesome, but also scares the shit out of me. So I'll start with 2 examples:

  1. Double Quotation marks " " for messages. I personally tend to use "'s in the literary or semantic context (for direct quotations) so in this post I have avoided " and used ' to preserve the integrity of this example.

  2. Braces [ ] are more like, for Max/MSP objects, but I feel they have a broader application.

That's enough, for now. Kind regards,

Mikey.

Roman Thilenius's icon

Roman Thilenius

7月 24 2024 | 4:05 午後

that is max.
he is the inventor of artistic ice skating on some kind of blue quadratic record player using magic wands. some say he would also have invented music, but that is a misunderstandment.


at v2 the program was calles max/fts (faster than sound)

with v3 the program changed owner and was called max.

then for v3.5 a signal externals collection called MSP (max signal processing) was sold extra.

with v4 it was included, so max was called max/msp.

later with v6 jitter was added for free, too, and then max was called max again.

because there are a lot of differences between these three domains people usually think in "max", "msp" and "jitter" and seperate them from each other. "did you made that with jitter?" - "no, that´s made with max" (==i used [lcd] and [picturecontrol] for the GUI)


however, there are also objects from the jitter bundle which do only audio or only data rate. wherever there is a rule, there is an exception...

i personally see jit.gl. as an extra domain, too.

they way we communicate about data in max mostly comes from how data is represented in the [message] object; the differences between 1 2 3, "1 2 3" and 1, 2, 3 should not be underestimated.


but in case i ever tell you to send "7" into a max object, you can safely assume that i mean as int, and not as symbol (i.e. i only wanted to make clear that it is a message, not which message type.)

and yes, in earlier max versions you had to use single quotes in messageboxes to create a message of data type symbol. but since v5 (i think) it also allows you to use double quotes.

they are easier to find on a windows keyboard, the only disadvantage of doublequotes is that it is now a bit more complicated to create symbols (=strings/characters) which start and end with the character ", while it is a very rare task, it can break old patches from ancient times which do this.


max users do not need to care that everything in max are atoms, they only have to care about ->data types in max and how they appear in the patching canvas.

the third party [printit] object is the best teacher for that kind of thing and can also help to hunt down bugs.


as you can see, the [printit] output also "wrongly" uses the double quotes to denote the data type symbol, while in fact what max sends around is symbol 7

the "infinetly" part of max should not scare you, unless you plan to program your own compiled externals with their own logic and data types. only then it is actually infinetly. 95% of the factory objects share the same paradigms and patterns over and over again.

Michael Caverly's icon

Michael Caverly

7月 24 2024 | 11:28 午後

Based on my competence and inexperience at programming with Max, I am always looking for ways of limiting myself to prevent over expansion. Video tutorials are brilliant cuz they can be watched over and over, and the speed can be adjusted.

There is only One (outer) patcher that I work on. A single oscillator that uses a KSA in a [poly~] object (Internally it also has an [ADSR~] and a onepole filter.)

My overall expectations are for this Max/MSP 'production' are as follows:

Well, several options seem possible.

The ideal endpoint would be to create standalone production, either [.AU] or [.VST]. I imagine this could be at least a year's work, but probably not more than 2 years. I would be grateful for any feedback regarding the priority of the following options:

  1. At least One more 'oscillator' (either just a duplicate KSA thing, or maybe an FM chap). To me it seems like, this would only be worth doing if it could be specified in dynamic code - generated from outside of the [poly~]

  2. A similar thing for additional filters [sfv] and/or [biquad~] both appeal.

  3. Ditto for either a [line~] or [adsr~] or even [phasor~].

  4. Ditto for LFO operators.

  5. Send/Return options don't have a high priority for me at this time. Spatial processing might be an 'in-road' for me in that respect.

  6. And, presentation mode.

Options 1 to 5 all seem to be good candidates for 'dynamic' coding, which {in theory) could concatenate things somewhat. And be as 'hooks' for other [objects] and [processes].

Roman, thank you for all the info you supplied earlier. Max/MSP or more like Max Mathews is part of a fascinating story.

All the best,

Mikey.

Michael Caverly's icon

Michael Caverly

7月 25 2024 | 12:36 午後

ps: Comments for each patch are the TOP priority. 'Dev' will upload when done.