Function and line – *not* line~
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.
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).
line doesn’t support multi segment lists. There are a few alternatives to that, ej.line is one of them.
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.
To this note is it possible to make another function obj mimic the first one?
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.