Forums > MaxMSP

Unpacking 3 number values from a msg

Feb 25 2012 | 6:35 pm

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.

Feb 25 2012 | 6:37 pm

The number message attached


  1. Screenshot20120225at18.30.12.png


Feb 25 2012 | 6:55 pm

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].

Feb 25 2012 | 6:56 pm
-- Pasted Max Patch, click to expand. --

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 :)

Feb 25 2012 | 8:29 pm

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.

Feb 25 2012 | 8:31 pm

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.

Feb 25 2012 | 8:35 pm

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.

Feb 25 2012 | 8:44 pm

I’m an idiot. Thanks for your patience and help.

Viewing 8 posts - 1 through 8 (of 8 total)

Forums > MaxMSP