I want object that can interpret binary code and bang to each number composing!

Sep 27, 2012 at 8:21pm

I want object that can interpret binary code and bang to each number composing!

Hi, My names Ritz Koh who make a media art piece using Max6 , Arduino & vvvv in Korea.
In Korea, there aren’t enough education center that teach this program so I write question on
this page. My english sentence can have a many problems, But If you try to understand my
intends, I’ll be very thankful to you. so… First, Let me explain what I want to make.

I’m making digital media instrument using Arduino & Max. It has 6 touch sensors and 6 sounds.
so If you a specific touch sensor, It plays a each sound source. But I’m low level user so It has some
programming problem in Max6. You know that If you connect the Arduino & Max, Arduino can
only send a one data and that is Ascii code. So although I want to make a chord[harmony] playing
two sound sources or more, I can’t do that using only way of Ascii.

then I found a Binary code’s data processing principle. So I appoint each sensor numbers to
1,2,4,8,16 & 32 in regular sequence. and If I touch sensor1 & sensor3 at same time, that can
pretend it [1+4=5]. (or sensor 2& 4, It can be [2+8=10]. right?)

But this code generate so many number of cases. (1&2,1&2&4,1&2&4&8… bulabula)
So I want to ‘object’ (Max) that can pretend code that sent from Arduino and detect
binary numbers composing (like 13=1+4+8) , and send a bang to each six numbers.
(1,2,4,6,16 & 32.) But I can’t find this object or way to solve this problem…
so project is discontinued now and I want to get your advice. please help me.

#64527
Sep 27, 2012 at 8:45pm

I fail to understand the problem. Its a relative simple math based problem, so instead of trying to look for pre-made objects, why not simply write a solution yourself?

If you know the, what I like to call, “prime” numbers (1, 2, 4, 8, 16) you’re basically set. Say 21 is pressed. Well, first you can subtract 16 from it and then you keep 5. SO 16 was part of it. Then you can extract 4 from it (so it was part of the sequence) and you’re left with 1. Which was also part of it.

So 1, 4, 16. Pure mathematics, even wikipedia will have formulas online which you can use to solve this. So all that’s left is to build a patch.

#232772
Sep 28, 2012 at 2:44am

Hi @ShelLuser, Thanks for your reply. But I thinked that working spends so many
times that I wanted simple object. But if there aren’t proper max object, I think you’re
right to make my own patch calculating binary code from 1 to 63. You’re saying this
way right?

#232773
Sep 28, 2012 at 3:51am

ShelLuser’s right – there’s no single object that’ll do what you’re talking about, and it’s kind of simple to make one that kicks out all the nice ones and zeros. Of course, there are lots of ways to do it – I guess I’d use this one.

– Pasted Max Patch, click to expand. –
#232774
Sep 28, 2012 at 6:44am

You might find bit and byte in Lobjects from Peter Elsea helpful. ftp://arts.ucsc.edu/pub/ems/Lobjects/

– Pasted Max Patch, click to expand. –

[attachment=204755,4465]

Attachments:
  1. examp.tiff
#232775
Sep 28, 2012 at 7:43pm

I haven’t fully read/understood what you’re trying to achieve, but check out the jasch objects, there are some binary conversion objects in there that may help:

http://www.jasch.ch/dl/

#232776

You must be logged in to reply to this topic.