I have built a foot pedal board to use with Ableton Live, so I am building a Max patch in Max4Live to record clips, trigger clips and overdub clips from my board. The board looks like this:
I will be using an Arduino to send messages via serial to Max. This is the protocol I have come up with (uses 8 bits):
Bit 0 - Mode switch 1 (Top button on far right of my board)
Bit 1 - Mode switch 2 (Bottom button on far right of my board)
Bit 2 through 4 - 3 bits to give Y axis position of button, 0, 1, or 2
Bits 5 through 7 - 3 bits to give X axis position of buton presses, 0, 1, 2, 3, 4, 5, or 6
I will send a newline character after each message so I know where a message begins and ends.
I need to isolate these individual bits and convert them to an integer in my Max patch so I can do something meaningful with them, all I can find is audio-rate bit operations, not what I want. Can anyone tell me what to do?
Also, how to I paste my patch I currently have in the forum? Can't figure out how to that. Thanks