Forums > MaxMSP

ej.function, adding commas, dealing with domain resizing

Jul 11 2011 | 1:17 am

I am using ej.function as real time variable envelop for a looper connected to pattr and a receive object. I would like to be able to easily save the ej.function shapes and then send them via list messages back to ej.function in real time. I have encountered two problems.
1. By banging the dumplist, it outputs the xy values as a list, but to use that list to set a new ej.function, commas need to be added in between the points. Seems like this would be easy to do automatically, but it isn’t. Do I need to make a counter/coll system to automatically add the commas, knowing that the number of points may be different each time?
2. The domain size changes the point values. As I will be changing the domain in real time, I think I need a system that can scale this information automatically. How would this be done most effectively?

I have attached a file with comments and examples. Any advice, tricks, suggestions would be greatly appreciated!


Jul 11 2011 | 1:49 am

haven’t looked at your patch… sorry. A comma in max just means that whatever comes next is a new value/symbol/list until the next comma. have a look at the patch below. if you have a list with 10 elements and you know that you have, say x/y pairs, you can use [zl iter 2] to output two elements at a time…

I don’t really know the ej.function, but with the max function you can say "setdomain $1" and the points are scaled automatically to your new envelope length… I would assume ej.function has similar functionality. might e wrong though.

-- Pasted Max Patch, click to expand. --

Jul 11 2011 | 5:09 am

now that I actually had a quick peak at your patch, I see what you mean by the domain change. here is an attempt at fixing the issue… it’s a bit of a hack but seems to work. This assumes that you created your function with domain set to 1… some more hacking will be necessary if that changes.

-- Pasted Max Patch, click to expand. --

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

Forums > MaxMSP