Function and line – *not* line~

May 13, 2013 at 9:09am

Function and line – *not* line~

Hi there,

I’m learning Max-MSP (still), so forgive any stupidity.

When connecting a line (please note, not a line~) object to a function box, is it possible for the line object to accept multiple points, or just one?

I’m trying to get a numerical list generated with multiple points from a function box, but line seems to reach the first point and then stop. Is this:

a) Something I’m doing wrong?
b) a limitation of the line object?
c) something else?

I do understand the difference between line and line~, but I want a numerical list, not a signal.

Many thanks

Mike

#249109
May 13, 2013 at 9:46am

Mike,

 

Check the function object’s help file. When it receives a bang, it outputs first the initial value, then a list of value/duration pairs. Two separate messages just as line takes (just like a single message box with a comma after the first number).

 

slo

#249114
May 13, 2013 at 9:56am

line doesn’t support multi segment lists. There are a few alternatives to that, ej.line is one of them.

#249116
May 13, 2013 at 10:19am

Slo, thanks for setting this out.  This is what I’d surmised, I just wanted to make sure I wasn’t making a mistake.

Emmanuel – thanks, ej.line did the trick nicely for me,

Many thanks, both.

Mike

#249118
Jul 7, 2013 at 9:55pm

To this note is it possible to make another function obj mimic the first one?

#255174
Jul 8, 2013 at 2:58am

It may help to be aware that the plain-vanilla line object was written about a decade before the MSP version. The two were probably written by different people, and were certainly developed with different assumptions about how much an object should do without additional patching.

Max objects in the late 1980s were very bare-bones items; in the course of the 1990s (and continuing to this day) objects are tending to provide more and more optional services.

It may seem a little surprising that Cycling ’74 hasn’t updated [line] to handle lists of target/interval pairs the way [line~] does. But the function is easy enough to patch (viz. ej’s approach). And any change to existing behavior always has the potential of wrecking havoc with some portion of the millions and millions of existing patches out in the world. It seems a little unlikely in this particular case, but it’s a problem that most newcomers to Max tend to underrate.

#255200

You must be logged in to reply to this topic.