Hi Dave, I'm glad that the email was useful! I've attached two files here, one is a ugakbari.c file with modifications I've made, the other is a python testing script for the logcurve and expcurve formulas. I misread the data the first time in looking at logcurve and found the same results as you regarding steepness values to use. Regarding: > The initial idea was to make them both i and k-rate as long as it is > feasible to do code like > > k1 init 0.55 > k2 init 8 > > kout logcurve k1, ksteep > > in the absense of proper i-rate initialization, it should be ok to > remove the i-rate stuff right? I'm not quite sure what you are saying here. For the opcode, if you're going to be using krate vars anyways, and the first run of the krate func will overwrite anything done at itime with the code you have. I've found that most krate opcodes with thread 3 that I've seen will use the i-time function to setup some internal state data, precalculate values from i-rate input args, allocate aux channels, etc., and then use the krate func to do the actual output. Without the i-rate funcs, the code you gave above will still give a valid krate val at k-time, but not at i-time, which seems to be perfectly fine as I don't think krate opcodes should be dependable to give a value at itime (maybe others disagree though). > Definitely adding the formula into the manual page is a good idea. In > regards to the steepness parameter, a value of 1.00001 will give almost > a straight line and values like 8, 16, 256, etc will give curves of > increasing steepness. I don't believe there is a limit to how steep the > curve can be. Cool, I'll make a change to the expcurve and logcurve in a moment with your info from above. I'm sure it will be very handy! > > 5)expcurve code seems to be wrong to me! This is the macro defined in > > ugakbari: > > > > #define EXPCURVE(x,y) (exp(x * log(y))-1/(y-1)) > > > > while the UDO code is: > > > > kout = (exp(kfloat * log(ksteep)) - 1)/(ksteep - 1) > > > > I only noticed just now when trying to plot some values and I used the > > values from the macro. It seems it is missing some parentheses and > > should be: > > > > #define EXPCURVE(x,y) ((exp(x * log(y))-1)/(y-1)) > > > > > > Initial tests didn't show it affecting the output but I'll have a look > at the expression in greater detail. One of the main reasons I wanted > to submit these to the language, was to get quality feedback from > individuals such as yourself about ways to improve these, so thank you > very much for your comments; I do quite appreciate the time you have > taken to make these observations and look forward to exploring your > suggestions in much greater detail :) I'm fairly certain now that the original macro is off. If you read it this way: #define EXPCURVE(x,y) ( exp(x * log(y)) - 1/(y-1) ) which is different from your original UDO code. I've made the change in the ugakbari.c file attached here. Well, let me know what you think about the changes in the ugakbari.c file; if they look good to you, I can go ahead and check them in, otherwise, let me know what you'd like different and I can check that in too. steven