<?xml version="1.0" encoding="UTF-8"?>
	<rss version="2.0"
		xmlns:content="http://purl.org/rss/1.0/modules/content/"
		xmlns:wfw="http://wellformedweb.org/CommentAPI/"
		xmlns:dc="http://purl.org/dc/elements/1.1/"
		xmlns:atom="http://www.w3.org/2005/Atom"

			>

	<channel>
		<title>Cycling 74  &#187;  Topic: Bitwise operators in MSP</title>
		<atom:link href="http://cycling74.com/forums/topic/bitwise-operators-in-msp/feed" rel="self" type="application/rss+xml" />
		<link>http://cycling74.com/forums/topic/bitwise-operators-in-msp/feed</link>
		<description></description>
		<pubDate>Wed, 19 Jun 2013 02:59:19 +0000</pubDate>
		<generator>http://bbpress.org/?v=2.2.4</generator>
		<language></language>

		
														
					
				<item>
					<guid>http://cycling74.com/forums/topic/bitwise-operators-in-msp/#post-44977</guid>
					<title><![CDATA[Bitwise operators in MSP]]></title>
					<link>http://cycling74.com/forums/topic/bitwise-operators-in-msp/#post-44977</link>
					<pubDate>Sat, 01 Aug 2009 00:11:08 +0000</pubDate>
					<dc:creator>Sub Avian Flow</dc:creator>

					<description>
						<![CDATA[
						<p>What kind of situation will I ever use these operators (I&#8217;m new to programing) in MSP? The help and reference files don&#8217;t really shed any light on how any of these objects would work in practical situations. Sorry if this is a general question. Just a little curious.</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/bitwise-operators-in-msp/#post-162014</guid>
					<title><![CDATA[Re: Bitwise operators in MSP]]></title>
					<link>http://cycling74.com/forums/topic/bitwise-operators-in-msp/#post-162014</link>
					<pubDate>Sun, 02 Aug 2009 20:48:24 +0000</pubDate>
					<dc:creator>Peter Castine</dc:creator>

					<description>
						<![CDATA[
						<p>
<table border="0" align="center" width="90%" cellpadding="3" cellspacing="1">
<tr>
<td class="SmallText"><b>Sub Avian Flow wrote on Sat, 01 August 2009 02:11</b></td>
</tr>
<tr>
<td class="quote">What kind of situation will I ever use these operators (I&#8217;m new to programing) in MSP? The help and reference files don&#8217;t really shed any light on how any of these objects would work in practical situations. Sorry if this is a general question. Just a little curious.</td></tr></table></p>



<p>
You will use them when you need them.</p>
<p>Many people use them all the time.</p>
<p>I always have people in my Max courses who ask &#8220;what do I need modulo for?&#8221; When I explain about using it to extract pitch class information (&#8220;how do I know if a C is hit&#8211;it can be middle C, or the &#8216;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 &#8220;how can I recognize if a C is hit&#8211;any C). </p>
<p>Bit operations are useful for things like recognizing chords. How that is done is left as an exercise for the reader.</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/bitwise-operators-in-msp/#post-162015</guid>
					<title><![CDATA[Re: Bitwise operators in MSP]]></title>
					<link>http://cycling74.com/forums/topic/bitwise-operators-in-msp/#post-162015</link>
					<pubDate>Sun, 02 Aug 2009 20:59:12 +0000</pubDate>
					<dc:creator>MuShoo</dc:creator>

					<description>
						<![CDATA[
						<p>Modulo is a great thing (I just discovered it&#8217;s usefulness a few months ago, when trying to figure out how to turn a 16 bit number into two 8 bit numbers for sending controller data to pro tools)</p>
<p>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.</p>
<p>Also, the < < and >> seem useful (just looked them up) but I&#8217;ve almost never had to multiply/divide something by a power of two (which strikes me as weird that I haven&#8217;t).</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/bitwise-operators-in-msp/#post-162016</guid>
					<title><![CDATA[Re: Bitwise operators in MSP]]></title>
					<link>http://cycling74.com/forums/topic/bitwise-operators-in-msp/#post-162016</link>
					<pubDate>Sun, 02 Aug 2009 22:21:34 +0000</pubDate>
					<dc:creator>Roman Thilenius</dc:creator>

					<description>
						<![CDATA[
						<p>one thing about &#8220;bitwise&#8221; is that a bitshift of 1 requires <br />
less CPU than a calculation of [*~ 10.] but returns the<br />
same result.</p>
<p>but i must say i dont really use it. it is quite rare in DSP <br />
world and more something for building logic, i.e. for messages.</p>
<p>
-110</p>
<p>
p.s. and oh yeah, &#8220;chord regonition&#8221;, yes you can also use<br />
binary stuff for encoding multiple stages.</p>
<p>1 of (1-16) = true<br />
and<br />
2 of (1-16) = true<br />
and<br />
5 of (1-16) = true</p>
<p>would require 3 steps in decimal.</p>
<p>
converted to binary such a register would read like this:</p>
<p>1 of (1-10000) = true<br />
10 of (1-10000) = true<br />
101 of (1-10000) = true</p>
<p>you can now add those numbers as if they were decimal:</p>
<p>1+10+101=112</p>
<p>and 112 still contains 1,2, and 5 &#8211; it can not be some other<br />
combination.</p>
<p>if you now want to compare registers, its only one calculation.<br />
great for realtime.</p>
<p>
for a similar thing look into the flags of some older max <br />
objects, they also use such an encoding &#8211; actually 1^n &#8211; <br />
so that a number of 9 represents 1 and 8, which is 1^1 <br />
and 1^4 and means flags 1 and 4 are true.</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/bitwise-operators-in-msp/#post-162017</guid>
					<title><![CDATA[Re: Bitwise operators in MSP]]></title>
					<link>http://cycling74.com/forums/topic/bitwise-operators-in-msp/#post-162017</link>
					<pubDate>Mon, 03 Aug 2009 06:21:51 +0000</pubDate>
					<dc:creator>Ch</dc:creator>

					<description>
						<![CDATA[
						<p>Hi,</p>
<p><table border="0" align="center" width="90%" cellpadding="3" cellspacing="1">
<tr>
<td class="SmallText"><b>Roman Thilenius wrote on Sun, 02 August 2009 16:21</b></td>
</tr>
<tr>
<td class="quote">one thing about &#8220;bitwise&#8221; is that a bitshift of 1 requires <br />
less CPU than a calculation of [*~ 10.] but returns the<br />
same result.</td></tr></table></p>



<p>[< < 1] is the same as multiplying by 2. On integers, but that doesn&#8217;t work with floating points.</p>
</p><p>here is an example where I used bitwise operators recently :</p>
<p><a href="http://www.cycling74.com/forums/index.php?t=msg&#038;goto=175336&#038;rid=8548&#038;S=452cbe5b64b51b3d7381e48295311ea0#msg_175336">http://www.cycling74.com/forums/index.php?t=msg&#038;goto=175336&#038;rid=8548&#038;S=452cbe5b64b51b3d7381e48295311ea0#msg_175336</a></p>
<p>(inside the [p asciiToUTF8])</p>
<p>Charles</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/bitwise-operators-in-msp/#post-162018</guid>
					<title><![CDATA[Re: Bitwise operators in MSP]]></title>
					<link>http://cycling74.com/forums/topic/bitwise-operators-in-msp/#post-162018</link>
					<pubDate>Mon, 03 Aug 2009 17:00:19 +0000</pubDate>
					<dc:creator>Roman Thilenius</dc:creator>

					<description>
						<![CDATA[
						<p>
<table border="0" align="center" width="90%" cellpadding="3" cellspacing="1">
<tr>
<td class="SmallText"><b>Quote:</b></td>
</tr>
<tr>
<td class="quote">
[< < 1] is the same as multiplying by 2.</p>
</td>
</tr>
</table>
</p><p>and that was not the only misleading info in my <br />
hastily fabricated post above. </p>
<p><img src="images/smiley_icons/icon_smile.gif" border=0 alt="Smile"/></p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/bitwise-operators-in-msp/#post-162019</guid>
					<title><![CDATA[Re: Bitwise operators in MSP]]></title>
					<link>http://cycling74.com/forums/topic/bitwise-operators-in-msp/#post-162019</link>
					<pubDate>Thu, 06 Aug 2009 21:28:00 +0000</pubDate>
					<dc:creator>Sub Avian Flow</dc:creator>

					<description>
						<![CDATA[
						<p>Thanks guys. I figured as much that bitwise operators are most useful for logic programming. I think I will  be much more likely to use the max bitwise operators rather than the MSP objects. At least for now. </p>
<p>
<img src="images/smiley_icons/icon_smile.gif" border=0 alt="Smile"/></p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/bitwise-operators-in-msp/#post-162020</guid>
					<title><![CDATA[Re: Bitwise operators in MSP]]></title>
					<link>http://cycling74.com/forums/topic/bitwise-operators-in-msp/#post-162020</link>
					<pubDate>Fri, 07 Aug 2009 01:56:16 +0000</pubDate>
					<dc:creator>Matthew Aidekman</dc:creator>

					<description>
						<![CDATA[
						<p>It&#8217;s MATH! It&#8217;s inherently abstract.   Someone in the class always says &#8220;What the &#038;%^%W# am I ever going to use this for!&#8221; &#8220;I hate graphing!&#8221; &#8220;I hate imaginary numbers! &#8220;</p>
<p>And there are ALWAYS word problems to follow.</p>
						]]>
					</description>

					
					
				</item>

					
		
	</channel>
	</rss>

