Forums > MaxMSP

Data typing question

December 10, 2008 | 10:15 pm

I’m building an abstraction that needs to handle a lot of different
data types, and as we know, if you need a trigger object for anything,
[t l l] will pass any data type through its outlets. The problem is
on the way out. You then cannot use something like [route int list],
because an integer, once it has passed through [t l l], is no longer
an integer, but a one-item long list. See example below:

– Pasted Max Patch, click to expand. –

It would be nice if there was something like an "anything" value you
could put in a trigger (hint hint), but as there isn’t, does anyone
have a handy trick for restoring things to their original data types
(list, int, float, symbol) after getting labeled a list, short of
brute force methods like counting the number of items, testing for
ASCII, and so on? Any ideas welcome.

Thanks all!

M


December 11, 2008 | 12:10 am

I don’t understand your use of the trigger object.

What I often do is hang a route off of my inlets so that I can accept
various types, and do the right thing.

– Pasted Max Patch, click to expand. –

-C


December 11, 2008 | 9:40 am


December 11, 2008 | 2:58 pm


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