Unpacking 3 number values from a msg
Hi, how might I go about incoming streaming numbers in a single message. I feel [unpack] might be a good way yet am unsure how to implement this… i have attached a picture of what the message looks like.
The number message attached
Could you specify a bit more what are you looking for, or what would you like to do with the numbers?
Generally speaking, you could unpack such a message with [unpack f f f].
-- Pasted Max Patch, click to expand. --Copy all of the following text. Then, in Max, select New From Clipboard.----------begin_max5_patcher---------- 430.3ocyU9saBBCEF+ZLYuCM8ZjzBHf6t8brrrTwpVGTHzhyMyd2W4TPc57e IK3RHszu1d5uyGGfMOLvAOoXMWgQOhdF43rwn3.ZMJNcBN3b15zLlBVHNmqT r4bra6jkLc5Bgb9qU7TsMTzXhGwE4G62zMBFPS7HnW51jrNunVmw0PLocxVM 8Gkbafv3caYVgTKY4vL3mpDrrsHHlBhESVNLYGWUbEWpYZQgbe1Rn.aiSZ5H sM+fLgrCL+8Obk3S3volrBj+5gAM8lN2+T2KXDPXXbu6dwWz8BBsOYC925dD asmePu6dQ36jMn4qgrGS77o9TzvQgdiBQColVRDI57Uav6Cz.nZiF52iFVPe YXR96ly6X+pVVxReyTBautFeZLTWkLFJxHm1lBNoMMKqfowtGcys5dze28nW o6YONblPdze.fzuYhC7TUQcUZWZzh.xeG2S4JsPBeyXuEY9jLhtaQKDSmxg4 Ia2mPwljwgT6LOjuIrnWBq36BVjKgUTuiUv0f0AreiX0VqwJKWwqTsQ1Rj4E 0kEUMiibsiER6XajwU7UhtsDZTfnZZ9F29H6cA -----------end_max5_patcher-----------
dont forget about "." after 0 in unpack message, it makes this object work with floating point numbers. are you using help files? its a very handy way, to learn max and can help you a lot solving problems :)
Thanks for your help guys. I got as far as this, I should have said. Appologies, I will outline what is happening. The three sets of number is accelerometer data and streams in at a fast rate. I would like to split that into three equally fast streams of different number boxes – the unpack object as far as I can work it needs to have a bang from the original message (of three numbers that I posted a picture of) first before it splits the number. I looked through the help files and the only way I could figure to do this was to send a load of bangs e.h [metro 1] to the message to output the numbers at anywhere near the right rate. There must be a more sensible, more cpu friendly way though…
Thanks for your help and if I have missed a key issue here, apologies.
I basically want to send each different set of values out as midi data so I need it to be outputted at the same rate it comes into the original message.
The unpack object doesn’t require a bang, just a list. However in the picture you posted, you just set the value/contents of the message box. In other words, you connect some object above it to the right inlet of the message box. Just connect that object directly to [unpack] and it’ll work.
I’m an idiot. Thanks for your patience and help.
Forums > MaxMSP