Forums > MaxMSP

function: distinguish between listdump and mousereport


Jun 16 2014 | 2:28 pm

Hello! I use a function object in curve mode and use the listdump message a lot. Now I want to implement a new feature and I need to use the mousereport message. The problem is that both messages output to the same outlet without any message prepended and I don’t know how to tell them apart.

Looking at the list’s length can’t tell the difference between mousereport’s output and listdump’s output when there is only one point in the object.

I managed to solve the problem using regular expressions to observe if the last number of the list is an integer or a float, but I’d like to know if there is a simpler way to solve this.

Any ideas or suggestions are welcome! :)

Jun 17 2014 | 2:18 am

You can check the length of the list:


-- Pasted Max Patch, click to expand. --

Jun 17 2014 | 9:49 am

Your solution only works when in linear mode. My function object works in curve mode, and as I mentioned on my first post, your patch doesn’t distinguish correctly between the output of mousereport and listdump when there is only one point in the function object.

Thank you for your reply, though.

Jun 18 2014 | 2:52 am

I missed the curve mode thing… well you can use listdump argument?


-- Pasted Max Patch, click to expand. --

Jun 18 2014 | 4:24 am

I totally missed that! It will do the trick.

Thank you very much! :)

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

Forums > MaxMSP