Forums > MaxMSP

linseg equivalent???

July 13, 2006 | 7:41 pm

Hi everyone:

Does anyone know of an object for generating segmented lines outside of the signal domain? (other than bline)

For CSound people: I’m looking for the equivalent to "linseg"

I can use bline or multiple line objects, but there MUST be a simple, scheduler-driven line segment generator…right?

I am trying not to use line~ because I need to have around 200 of these, and that can get taxing on the CPU when combined with a bunch of GL stuff.

Any pointers or links to externals would be greatly appreciated.

Thanks in advance,

Paul


July 13, 2006 | 8:11 pm

just got my first cup of coffee so i may be misreading…

have you checked out the [line] object? it works like [line~] but not
signal rate.

i use [line] very much like the "linseg" opcode in csound.
its just that the syntax for the pfields is slightly different…


July 13, 2006 | 8:27 pm

Actually line does not work like the csound linseg.
linseg would allow you to specify a line consisting
of various stages (in milliseconds). I guess you could
simluate that with a line and a coll, but that is
kind of messy. I think your best bet would be
"funtion", the graphical breakpoint function.

Anthony


July 13, 2006 | 8:48 pm

I think you’ll find some useful info here, starting about halfway
through the thread:

http://www.cycling74.com/forums/index.php?t=msg&goto=57596

-David


July 14, 2006 | 3:15 am

Well,

It sounds like there is no single object in Max/MSP that performs the same task as CSound’s opcode "linseg."

line only performs single line ramps (between only two points), and bline requires an additional timing mechanism. Line~ is the closest, but it is driven by the audio engine.

I just thought I would throw the question out there in case someone had an external…

At least my question somehow managed to spark a more interesting thread concerning GPS. Too bad that my mundane thread title is likely steering many GPS-knowledgable folks away from the secret discussion within…

Thanks to all who responded to my question, and good luck with the GPS integration.

Paul


July 14, 2006 | 5:51 am

Thanks for the heads up – the GPS thread is now split out.

I’m using zigzag~.If you’re not so worried about timing you might be able to roll your own pretty easily in js.

-A


July 14, 2006 | 12:46 pm

Take a look at the [gen*] objects in the percolate collection:

http://music.columbia.edu/PeRColate/

They instantiate many of the old cmix/csound function table ugens.
Another alternative would be to use the [rtcmix~] object (new version
coming very soon!) and do something like this in the script:

env = maketable("line", 1000, 0,0, 1.5,1, 3.5,0)

st = 0.0
for (i = 0; i < 1000; i = i+1) {
val = samptable(env, i)
MAXMESSAGE(st, val)
st = st + 3.5/1000
}

will schedule a sequence of 1000 values to be output from the [rtcmix~]
object for 3.5 seconds, fading up from 0 to a value of 1.0 for the first
1.5 seconds and then back down to 0.0 to the end.

brad

http://music.columbia.edu/~brad


July 14, 2006 | 1:00 pm

umm. sorry for the confusion. but linseg and line offer very similar
functionality.
either one doesnt do much on its own.

its only when you feed linseg a score event with lots of line segments
described by a startpoint a duration and an endpoint (no MacCsound
infront of me so i forgot the exact ordering) that it does anything…

line and line~ can be used the same way…
the syntax is just slightly different. you only need to describe the
end point and duration, and a line will be generated from where ever it
last was to this new point.

now will a slight variation in syntax one can use line just like
linseg. you give it a startpoint and a duration of zero ms and and end
point and a duration of the line segment… you can then describe
multi segment lines with four argument lists…

in max, just like your csound score file, it takes lots of numbers to
describe a multi segment line. you cant just plug a number box into
line and expect a multi seg line. you need to feed lists to line…

i use my csound orcs and max synth patches interchangibly, driven by
the same score file. i just have to insert an interpretation patch. so
the score data can be mapped to create/control same sounds in either
system…

if you are interested in a csounds.com project it might be fun to make
a max object to csound opcode thesaurus, with examples of how a
variation in syntax will allow one to use the unit generators from
either system interchangibly…


July 17, 2006 | 8:12 am

Paul wrote:
> Does anyone know of an object for generating segmented lines outside
> of the signal domain? (other than bline)

take my [lines] abstraction (attached), it’s designed as a line~
replacement:

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 213 152 29 196617 gate;
#P newex 213 86 29 196617 == 2;
#P newex 99 266 29 196617 sel 1;
#P newex 99 243 29 196617 == 1;
#P newex 130 86 31 196617 > 2;
#P newex 130 152 40 196617 gate;
#P newex 130 64 31 196617 zl len;
#P newex 130 173 51 196617 zl reg;
#P newex 13 42 178 196617 t l 3;
#P outlet 181 297 15 0;
#P newex 181 266 33 196617 gate;
#P newex 181 243 26 196617 < = 2;
#P inlet 159 22 15 0;
#P inlet 86 22 15 0;
#P newex 130 195 85 196617 t l l b;
#P newex 130 266 47 196617 gate;
#P newex 130 243 32 196617 > 2;
#P newex 130 217 32 196617 zl len;
#P newex 13 106 168 196617 zl slice 2;
#P newex 13 128 157 196617 line $1;
#P outlet 13 296 15 0;
#P inlet 13 22 15 0;
#P window linecount 5;
#P comment 25 160 100 196617 this can replace the line object and will
do it like line~ with as many point time pairs as you want.;
#P connect 3 1 17 1;
#P fasten 3 1 22 1 165 149 237 149;
#P connect 21 0 22 0;
#P connect 16 0 18 0;
#P fasten 16 0 21 0 135 83 218 83;
#P connect 8 2 12 1;
#P connect 12 0 13 0;
#P fasten 20 0 13 0 104 293 186 293;
#P fasten 22 0 13 0 218 293 186 293;
#P connect 11 0 12 0;
#P fasten 14 1 6 0 186 239 135 239;
#P connect 14 1 11 0;
#P fasten 5 0 19 0 135 239 104 239;
#P connect 5 0 6 0;
#P fasten 5 0 11 0 135 239 186 239;
#P connect 4 1 15 1;
#P connect 8 1 7 1;
#P connect 10 0 3 2;
#P connect 6 0 7 0;
#P connect 8 0 5 0;
#P connect 15 0 8 0;
#P connect 17 0 15 0;
#P connect 18 0 17 0;
#P connect 14 0 4 0;
#P fasten 14 0 16 0 18 61 135 61;
#P connect 19 0 20 0;
#P connect 9 0 3 1;
#P connect 3 0 2 0;
#P connect 4 0 3 0;
#P fasten 7 0 4 0 135 289 8 289 8 102 18 102;
#P connect 1 0 14 0;
#P window clipboard copycount 23;


Stefan Tiedje————x——-
–_____———–|————–
–(_|_ —-|—–|—–()——-
– _|_)—-|—–()————–
———-()——–www.ccmix.com


July 18, 2006 | 3:51 pm

Thanks to all for your responses. If anyone else is interested in a "linseg" equivalent, check out the previous message in this thread. Stefan Tiedje’s [lines] abstraction is perfect for the job. Thanks a lot Stefan!

Best,

Paul


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