It would probably get convoluted pretty quickly, but you could possibly record CV and store it in a [buffer~] with [poke~], and then change/alter its output with [peek~] and [function]… it would be great to be able to record into a buffer and output that as a breakpoint envelope, but I don’t think that functionality exists.

Right, pretty sure it doesn’t exist. Just gathering advice about how I might create such a thing.

This link looks like a very good place to start to me.
The key thing here is that function has a curve mode - that should give the sort of functionality you are after I think.
Quote from the article:
Line mode allows only for linear connections between points, whereas curve mode allows for connecting lines to be curved. If in curve mode, lines can be manipulated into curves by alt-click-dragging the line.

It’s then about capturing the CV input from the ES module at an interval of your choosing and turning that into the appropriate format message to plot points on the function object. Obviously, resolution then becomes an issue - capturing once a second would give very different results to capturing every 50ms for example.

1 Like

I’m thinking you want to capture pretty frequently (like a small number of milliseconds) and then use curve fitting optimizations to reduce the number of handles required to reproduce the short-sample curve. Easier said than done!

2 Likes

As is often the case with Max!

I had a very quick go at proof of concept CV capture to function object.

cv capture.maxpat (11.0 KB)

2 Likes

Thanks! Can’t wait to check it out.

That’s an article I wrote a few years back. Pleased it’s still of interest :slight_smile:

You’re right in that it is not about recording CV, but some of the approaches in that device might be useful for altering CV afterwards. I’ve not looked at it for a while, but being able to move sets of points, or shape every x curve is pretty fun.

As for the CV record, I agree that selective sampling is perhaps the key. You could easily sample at changes of direction (which would record a saw wave for example) or at points after x change has occured to create approximations.

Curve values can also be set with messages, so there is scope for this to work. The curve approximation stuff is definitely the complex bit that’s not inbuilt in Max. @jasonw22 - do you have a good source for that info?

I’m sure the journey will be interesting though - feels the sort of project that could easily end up as something completely different from the intention, but just as useful.

another thought - ej.function is also a great graphical function eidtor - and has a few different options: http://www.e–j.com/index.php/ej-function/

Forgetting the whole translate into function part of this, just recording CV then playing it back (in various ways) is probably going to be useful for a lot of people here. Altering the playback with other CV or functions is also potentially interesting, as is tools for doing things like inverting, smoothing, modulating etc on playback.

4 Likes

Here is an overview of different types of curve fitting:

I think there are a lot of different potential bits and pieces people have made that can help with parts of this. Just need to find some time to pull some of those pieces together and start patching/debugging.

1 Like