You will use them when you need them.

Many people use them all the time.

I always have people in my Max courses who ask “what do I need modulo for?” When I explain about using it to extract pitch class information (“how do I know if a C is hit–it can be middle C, or the ‘cello C two ledger lines below bass clef, or C on top of the 5th ledger above violin clef, or *any* C), about half of them get it. The other half come back a week later and ask “how can I recognize if a C is hit–any C).

Bit operations are useful for things like recognizing chords. How that is done is left as an exercise for the reader.

]]>But, I still have no clue what the difference between the bitwise and regular and/or objects (bitand, if X || y vs if x | y, etc) is.

Also, the < < and >> seem useful (just looked them up) but I’ve almost never had to multiply/divide something by a power of two (which strikes me as weird that I haven’t).

]]>less CPU than a calculation of [*~ 10.] but returns the

same result.

but i must say i dont really use it. it is quite rare in DSP

world and more something for building logic, i.e. for messages.

-110

p.s. and oh yeah, “chord regonition”, yes you can also use

binary stuff for encoding multiple stages.

1 of (1-16) = true

and

2 of (1-16) = true

and

5 of (1-16) = true

would require 3 steps in decimal.

converted to binary such a register would read like this:

1 of (1-10000) = true

10 of (1-10000) = true

101 of (1-10000) = true

you can now add those numbers as if they were decimal:

1+10+101=112

and 112 still contains 1,2, and 5 – it can not be some other

combination.

if you now want to compare registers, its only one calculation.

great for realtime.

for a similar thing look into the flags of some older max

objects, they also use such an encoding – actually 1^n –

so that a number of 9 represents 1 and 8, which is 1^1

and 1^4 and means flags 1 and 4 are true.

Roman Thilenius wrote on Sun, 02 August 2009 16:21 |

one thing about “bitwise” is that a bitshift of 1 requires less CPU than a calculation of [*~ 10.] but returns the same result. |

[< < 1] is the same as multiplying by 2. On integers, but that doesn’t work with floating points.

here is an example where I used bitwise operators recently :

(inside the [p asciiToUTF8])

Charles

]]>and that was not the only misleading info in my

hastily fabricated post above.

]]>

And there are ALWAYS word problems to follow.

]]>