linseg equivalent???


    Jul 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

    • Jul 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...
    • Jul 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
    • Jul 13 2006 | 8:48 pm
      I think you'll find some useful info here, starting about halfway through the thread:
      -David
    • Jul 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
    • Jul 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
    • Jul 14 2006 | 12:46 pm
      Take a look at the [gen*] objects in the percolate collection:
      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.
    • Jul 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...
    • Jul 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:
      -- Stefan Tiedje------------x------- --_____-----------|-------------- --(_|_ ----|-----|-----()------- -- _|_)----|-----()-------------- ----------()--------www.ccmix.com
    • Jul 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