Anal Probe help file question

May 21 2013 | 7:18 pm
Hi,
I have a small and simple question regarding the help file that comes with ANAL. What is the logic behind using the shift operator to store numbers in the "high seven bits"? I'm obviously missing an important mathematical-theoretical foundation, so please, someone enlighten me.  Is this just a more efficient method of handling values, or long list of values?

• May 21 2013 | 10:35 pm
Not really a question about [anal] and its good friend [prob], but about simple bit manipulation and binary numbers.
You probably did binary numbers in about second grade and since forgot them. I'm not going to write a primer for you, but you might want to take a look at the Wikipedia article on Binary Numbers (which, unfortunately, probably goes into too much detail for your purposes).
Let's do an analogy with decimal numbers to get you on the road. Say you've got two 3-digit numbers that you need to store as a single number (or index). Assume, furthermore, that the representation has to be unambiguous, you need to be able to re-create the original pair of numbers from the representation, and you can use 6-digit numbers for storage.
The obvious trick is to take the first 3-digit number, "shift" it 3 places to the left (also known as "multiplying by 1,000" or "tagging on three zeros on the right"), and then add the second 3-digit number to the rightmost digits.
As an example, if the first value is 123 and the second value is 987, you shift 123 to get 123,000. Then add 987 to get 123,987. Extracting the original two values is left as an exercise for the reader, as well as the proof that the 6-digit representation is unique for every possible pair of 3-digit numbers.
Binary is just the same in binary. To pull the trick off in binary, you do need to be aware of how many binary digits (that's where the word "bits" comes from) you need for representing your values.
Hope this helps.
• May 21 2013 | 11:10 pm
Thanks Peter. Now I understand, and am ready to grease up on my math.
I never was that good with maths, but I'm fairly good with logic. I wonder how many Maxers have had to take out their (algebra, trig, etc.) books off the shelves...
• May 22 2013 | 8:36 am
Max is at least 90% logic, really. The rest is in the helpfiles, more or less :)
I've only twice had to dig real deep in some math, and both were for doing some cartopol/poltocar magic.
• May 22 2013 | 6:17 pm
Thank you for that insight. Are you also including MSP in this 90%? I ask because I'm somewhat baffled by having to re-learn trig and algebra for making things sound the way you want them to sound. Not that I'm not prepared, or willing to do so,  BTW.
• May 22 2013 | 6:36 pm
I've just been (re-)reading some literature on what it looked like to program computer music back in the "Good Old Days" of the 1970s. Not to put too fine a point on it, but what we have to do in Max/MSP is, well, baby-talk compared to the math that was needed four decades ago.
I'm enough of a UI person to want to argue that there should be no math at all required to make music with computers. The computer ought to be completely transparent, no matter what you're doing with it. OTOH, it seems for some stuff you still do have to look under the hood. And Max/MSP does have a fairly geeky history, so tinkering with the carburetor and spark plugs is pretty much de rigueur.
• May 22 2013 | 6:42 pm
"sound the way you want them to sound"?
Honestly, the example you've shown (markov chain that stores data in a funky way "inside a number") isn't really representative of max in general ;)
Sure, there's some difficult math involved in msp things like the FFT stuff, and building windows for transforms etc, but that's what the objects are for; they help us by doing those things, so that we don't need to learn them.
I think the helpfile you showed does "too good of a job" explaining *how* it does things, we don't really need to know them, even though some of us on here enjoy diving into the deep end for that information.
basic math and somewhat of an intermediate understanding of logical operators and you're good to go. Oh, and with msp, understanding basic sound design building blocks really helps a lot, too.
Also, for the sticklers, the objects are "anal" and "prob", which are abbreviations, whereas "anal probe" is something altogether Freudianly different ;)
• May 22 2013 | 6:56 pm
HAHAHAHAHAHAAAAA "Anal Probe"!
Just wanted you to know, although most of this community consists of crusty, outdated, obsolete old folks and therefore humor of any kind doesn't go over well here, yours was not lost on me(even the part where you write, "time to grease up..." baaaahahahahahaha!).
Thank you for bringing a small bit of temporary life to a decrepit community, i truly appreciate it :)
• May 22 2013 | 7:54 pm
i wonder why the anal example shows that this way, using binary format.
i think i would do this on the decimal layer in this situation, so that i end up with numbers up to 1280128.
using bin conversion seems only interesting when you exceed 8 digits so that it stops working the decimal way.
• May 22 2013 | 8:33 pm
Hahahaha! You're welcome Tokyo Rose. I did almost retract my words, but then again, I'm pretty sure that (most) Max programmers are deep in their hearts just some silly folk. I have seen tons of other objects with equally funny names.
Regarding maths in Max, perhaps this is getting off-topic but I wonder if the old academic adagio of learning from the rudiments is really applicable to MSP. What I mean with this is taking introductory classes and reading technical books with lots of mathematics to learn DSP. I guess it distills to the usual problem we encounter with Max, when we find we are taking way too much time honing our patching skills in detriment to actual music-making.
• May 22 2013 | 9:22 pm
btw, in maxmsp version 4.2 - 4.5 for OSX cycling74 had chronic constipation implemented into [anal]: the "reset" function did not work, which made the object more or less unusable.
-110
• May 23 2013 | 12:08 am
Actually,
110: Which Max version are you using? Have you checked your anal? I'm using 6.1 and mine is exhibiting problems of that very nature. The reset command is not wiping the memory, but the clear command works alright. Also, I don't know if this is normal (probably related to the above discussion) but number pairs above 128 do not get indexed.
Time to call Dr. Kellogs, perhaps?
• May 23 2013 | 9:41 am
My, how charming it is to see a new generation discovering the [anal]-[prob] joke.
It's not that the older correspondents are "crusty, outdated, obsolete." It's just we got the pun when Rose was in short pants (more likely, nappies). Nowadays it's as fresh as a chicken-crossing-the-road routine.
Cue: "Don't they teach kids anything nowadays?"
• May 23 2013 | 1:29 pm
>>110: Which Max version are you using?
4.1 and 4.63 for development, and 4.5x and 5.x for casual testing.