bpfunction editor, but with curves?


    Aug 22 2007 | 9:39 pm
    is there any object like function, where the user can input data points and max will interpolate between them, but ALSO where there is curve drawing functionality?
    for example, in the program reaktor there is a breakpoint function editor where between every breakpoint there is a midpoint which can be dragged in order to shape the line/curve between the breakpoints.
    thank, any info would be much appreciated

    • Aug 22 2007 | 11:09 pm
      or in photoshop there are nice curve drawing tools. In Cubase there are decent curve, sinewave, etc. drawing tools too.
      I'm thinking of something like this. How can i make this happen in Max/MSP?
      Does Jitter offer anything more like this than what's available in Max/MSP?
    • Aug 22 2007 | 11:54 pm
      Max Planck skrev: > or in photoshop there are nice curve drawing tools. In Cubase there are decent curve, sinewave, etc. drawing tools too. > > I'm thinking of something like this. How can i make this happen in Max/MSP? > > Does Jitter offer anything more like this than what's available in Max/MSP? > Have you checked out [techno~] ?
    • Aug 23 2007 | 12:01 am
      Hi Max, depending on the number of points you have in you breakpoint, maybe you could implement jasch's Bezier object to interpolate between points. hope this helps,
      cheers j
    • Aug 23 2007 | 4:16 am
      Believe me, I've been wishing for the same thing. If the lines in-between breakpoints on function had little dots to drag the curve (for curve~), it would be fantastic. I've been wanted those in Max ever since I first saw them in Native Instruments Absynth.
    • Aug 23 2007 | 11:18 am
      techno~ is sort of like what i want, but the curve drawing is too limited (you don't have enough control of the curve to be able to draw every possible curve, as far as I can tell).
      As for using a curve generating function to interpolate between two points: I don't think it would work too well as far as i can tell, because this interpolation would not be displayed graphically. Although, I could route the output of the curve generating function into a GUI function editor, this would give me a graphic display.
      But this just seems like such an overly complicated way to do it... aren't there any GUI objects that allow curve drawing with the ease, simplicity, and power of, for example, photoshop's curve drawing tools?
    • Aug 23 2007 | 12:48 pm
      yeah, i've been wishing for this, as well. and techno is too fiddly for me. every time i try using it, i get frustrated. integrating curves into function would be a nice start.
    • Aug 23 2007 | 2:43 pm
      hi, as jdh said, you can use [bspline] see http://www.jasch.ch and here is a small exemple to begin with :
      peace
      a
    • Aug 23 2007 | 4:36 pm
      Thank you very much for that, dGarden.
    • Aug 24 2007 | 8:54 am
      thanks dGarden!
      it's too bad [bspline] doesn't have a better GUI. If I knew more about Max I could probably make one, but since I don't it would take me a long time.
      I'm surprised that there isn't something like this included with Max/MSP... curve drawing tools seem pretty basic and broadly useful.
      If anyone has curve drawing tools with a better GUI, would you please share them with us?
    • Aug 26 2007 | 2:00 pm
      can anyone explain why it is that when more than 4 break points are added the curve function window begins to get shorter and cuts off the last part of the function curve. try putting more break points with clickadd $1 to see what i mean.. just curious.
      thanks matt
    • Aug 26 2007 | 4:09 pm
      Does this new one do what you want ??
    • Aug 26 2007 | 4:17 pm
      Quote: dGarden wrote on Sun, 26 August 2007 10:09 ---------------------------------------------------- > Does this new one do what you want ??
      this is a great.. thanks again. I hope you didn't think i was complaining about the patch i was just curious. I study them and try to figure them out, couldn't really see why it did that.
      matt
    • Aug 26 2007 | 4:44 pm
      well, [bspline] accept list of all control point (x,y,z) and dump message of [function] object only give you (x,y) of each point because of 2D. So you have to add (z) with [zl join] and to group all the points (xyz) in one list. You could do it with [zl group] but you have to know how many elements you want to group.
      In the case of the first patch, there was 4 control points (x,y,z), so the [zl group] argument was 12. So if you add one or more points, it will consider only the 4 first control points...
      Hope it help you
      peace
      a
    • Aug 27 2007 | 9:43 am
    • Aug 29 2007 | 4:37 pm
      Hello,
      Some time ago I modified ej.function (ejies - www.e--j.com/) a JSUI extension to the 'function' object, to support curves. Also it outputs its data in curve~ format rather than line~. I sent this to ej but I haven't checked to see if it's been added to the package.
      I'll have to check the license but I'm fairly sure it's a creativecommons license and I could upload this to my c74/share page.
      Let know if you're interested or if the other solutions are sufficient.
      Martin
    • Aug 29 2007 | 5:25 pm
      I am *SO* interested in this. I've built a patch to add in the exponent to the 'line' output of function so it works with curve, but I always dreamed of having the functionality built in!
    • Aug 29 2007 | 7:05 pm
      That's superhappyfun and will be very useful!
      Am I right in assuming the "points" has no (theoretical) limit, but the degree can only be 1,2,3?
      Nice work!
      --CJ
    • Aug 29 2007 | 9:15 pm
      there are a couple of editors based on waveform~ here
      the qraq_2 file and the patch i pasted in might be useful. they snap to a grid and can be used to make rhythmic envelopes, stored in a buffer~
    • Sep 04 2007 | 4:22 pm
      Hey Martin, just wondering if you will be posting your modified ej.function.js object, soon?
      also, dGarden, is it just me or does adding more points cause function2 to run faster and faster?
    • Sep 07 2007 | 6:57 am
      Hello,
      I've uploaded this to my share page....
      Regards, Martin
    • Sep 07 2007 | 10:51 am
      thanks for doing that....been waiting for someone to make that for several years! very nice....
    • Sep 07 2007 | 11:18 am
      Thank you very much Martin for this needed feature.
    • Sep 07 2007 | 12:46 pm
      Hi, I'm so grateful for your work. I can finally do what I've wanted to do in a certain patch I've been working on for awhile. Here's a test patch I made to demonstrate two problems I've encountered. 1) Max crashes on my Windows XP machine when Overdrive is On (haven't tested on my MacBook, yet). 2) Occasionally, I hear signal degradation with this configuration but Max has never run quite smoothly on any of my XP machines so this one will have to be pending until I can test with my Mac. Thanks, again. Here's the patch.
    • Sep 07 2007 | 3:49 pm
      Cebec,
      I too get a crash on Win XP with your patch when Overdrive is ON. But it seems stable on a Mac. Unsure whether this is curve~ or curve.function.js or something else. I haven't made the changes in ejies 1.57 to curve.function not sure if this is relevant.
      Regarding signal degradation: I don't have any of this. BUT - If you click the "reset to normal playback" button in your patch (i.e., a diagonal line bottom-left to top-right) there is a slight pitch-shift in playback as the file progresses. This suggests that when a curve has a value 0.0 it is actual slightly positive. However, the data sent out of curve.function is a curve of 0.0 so the curve~ object mustn't be generating linear segments when a curve is 0.0. In the drawing commands for curve.function I assume the curve is linear if the curve value is within +-0.001 although the actual curve would still be output if it was closer to 0.0 than that.
      Actually I just checked in the curve code from cyclone (from where most of the curve stuff was derived) and this has been noted before.
      BTW I just remembered that you can fine tune the curve when mousing by using alt-shift-drag.
    • Sep 07 2007 | 3:56 pm
      Thanks for checking it out. And for the tip on fine-tuning the curve. Is it a bug, then, that curve doesn't create linear segments at 0.0? It seems from the .help that this should be the case.
    • Sep 07 2007 | 4:49 pm
      Also, it doesn't understand the setrange message.
    • Sep 07 2007 | 4:59 pm
      On 7 sept. 07, at 17:49, Martin Robinson wrote:
      > Cebec, > > I too get a crash on Win XP with your patch when Overdrive is ON. > But it seems stable on a Mac. Unsure whether this is curve~ or > curve.function.js or something else. I haven't made the changes in > ejies 1.57 to curve.function not sure if this is relevant.
      The problem is I did a few additions in 1.57, and the file format for example is different (ascendent compatibility as usual), so your modification to the file format will be in conflict.
      ej
    • Sep 07 2007 | 7:22 pm
      Quote: cebec wrote on Fri, 07 September 2007 10:49 ---------------------------------------------------- > Also, it doesn't understand the setrange message. ----------------------------------------------------
      Here's the error message:
      error: js: curve.function.js: Javascript TypeError: courbe has no properties, line 255 error: js: error calling function setrange
      Line 255 is the beginning of the setrange function.
      Thanks!
    • Sep 07 2007 | 7:48 pm
      It's the beginning of the calcFunctionCurves function, sorry.
    • Sep 07 2007 | 8:57 pm
      re: the setrange message
      We're getting into js-dev here but as it's a minor piece of code hopedully no-one will mind.
      Pending updating my share page (although I'll probably try to sync with the current ejies version before doing that) you can fix this bug, it's in the setrange function, so in the curve.function.js file -
      FIND: "function setrange(a, b, courbe)"
      then in that function (i.e. between the next curly brackets { } )
      FIND: "calcFunctionCurves(courbe);"
      and replace it with: "calcFunctionCurves(tmpF);"
      DON'T do a global find/replace, only change this instance.
      M
    • Sep 07 2007 | 9:11 pm
      Thank you! :)
    • Sep 24 2007 | 8:17 pm
      New version of curve.function uploaded to my C74 share page. New help file, ejies 1.57 compatible (I hope)
    • Sep 24 2007 | 10:17 pm
      Thank you, again! I use this every day.
    • Sep 25 2007 | 12:11 am
      I tried using this (looks awesome in the help file) by typing "js curve.function" and I got the following error:
      error: js: curve.function: Javascript ReferenceError: sketch is not defined, line 2951
    • Sep 25 2007 | 12:21 am
    • Sep 25 2007 | 1:58 am
      Oh, just wanted to mention that I'm the one using this to generate file playback positions (as noted in the help). If anyone needs any patches or assistance whatsoever in helping to remedy this or to port cyclone from pd to max/msp, let me know!
    • Sep 25 2007 | 12:39 pm
      On 25 sept. 07, at 11:46, Andreas Wetterberg wrote:
      > And then in my opinion the easiest thing to do is to add it to > prototypes, and then if you want to load the object, type "jsui" > and select it from the prototypes.
      Exactly! You could also add a line in one of the shortcuts file of the C74:/init folder:
      max shortcut curve js ej.lui.js curve.function;
      I could add that to the ejies-shortcut, as it's required for the curve.function.
      ej
    • Sep 25 2007 | 3:38 pm
      Are there any plans to incoporate bpfunction curve support in an offical ejies release?
    • Sep 26 2007 | 1:39 pm
      Hi, I'm still experiencing crashes with curve.function.js in Max 4.6.3 on Windows XP as soon as Overdrive is turned ON.
      Also, loading the ej.function.js help from the ejies overview (ejies 1.57) gives me the error ej.function.js: doesn't understand fsaa (bad function name or message name).
      Neither occur on my MacBook.
      Matt
    • Sep 26 2007 | 1:51 pm
      Quote: cebec wrote on Wed, 26 September 2007 07:39 ---------------------------------------------------- > Hi, > I'm still experiencing crashes with curve.function.js in Max 4.6.3 on Windows XP as soon as Overdrive is turned ON. > > Also, loading the ej.function.js help from the ejies overview (ejies 1.57) gives me the error ej.function.js: doesn't understand fsaa (bad function name or message name). > > Neither occur on my MacBook. > > Matt ----------------------------------------------------
      For example, the crash occurs as soon as I connect and activate a metro which is connected to the curve.function.js object while DSP is ON and Overdrive is ON. It may have something to do with banging the object since my other patch, while not using a metro, relies on bangs to the curve.function.js and it crashes, as well.
    • Sep 26 2007 | 3:27 pm
      Are there any plans for an official ejies release with bpfunction curve support?
    • Sep 26 2007 | 10:17 pm
      Does it crash if you use ej.function instead of curve.function?
    • Sep 27 2007 | 12:47 pm
      Sorry for the delay. Wow, I should've tested that, already. Yes, it crashes with ej.function.js, as well.
    • Sep 27 2007 | 4:10 pm
      I suspect it is something to do with the javascript/sketch implementation on Windows then, perhaps ej has already investigated?
      I assume it is crashing in response to bangs from a metro?
      Try putting the bangs through a deferlow object and see if it still crashes. (If so it might be an interim work around.)
      M
    • Sep 27 2007 | 4:18 pm
      Quote: martinrobinson wrote on Thu, 27 September 2007 10:10 ---------------------------------------------------- > I suspect it is something to do with the javascript/sketch implementation on Windows then, perhaps ej has already investigated? > > I assume it is crashing in response to bangs from a metro? > > Try putting the bangs through a deferlow object and see if it still crashes. (If so it might be an interim work around.) > > M ----------------------------------------------------
      Yep, in response to bangs from any source, not just from a metro. I put the bangs through a deferlow object and it works, i.e., no crash Thanks!
    • Sep 30 2007 | 4:56 pm
      matt schrieb: > or to port cyclone from pd to max/msp, let me know!
      But Max itself is already the more complete cyclone library... ;-) Or do you want a compatibility library for objects used in Pd, which don't exist in Max? A much much less complete starting point for that is in my abhaXions...
      Stefan
      -- Stefan Tiedje------------x------- --_____-----------|-------------- --(_|_ ----|-----|-----()------- -- _|_)----|-----()-------------- ----------()--------www.ccmix.com
    • Sep 30 2007 | 5:45 pm
      Ah, :) I specifically meant in reference to the bug in curve~ where 0.0 is not truly linear.
    • Nov 01 2007 | 11:05 pm
      BTW: I'm in the process of porting the cyclone curve~ to mxj~ hoping it will be more linear when curve is 0.
      M
    • Nov 04 2007 | 1:45 pm
      Super! Thank you, Martin!
    • Nov 15 2007 | 6:59 am
      Hello,
      A prelim version of [mxj curve~] is now on my share page: https://cycling74.com/twiki/bin/view/Share/MartinRobinson
      I did a bit of testing but it was a relatively quick port from cyclone's curve~ object. I changed the bang outlet behaviour to be more like curve~/line~ (rather than banging at the end of every curve segment in a more complex breakpoint shape).
      Regards,
    • Nov 15 2007 | 11:53 pm
      Thank you, Martin! In my initial tests, this is working great!