|
Author |
Topic: Processing 1.0 API (Read 616 times) |
|
REAS
|
Processing 1.0 API
« on: Feb 19th, 2003, 7:02pm » |
|
We've been working very hard the last few days to finalize the API for Processing V1.0. We're still working on Sound. It's posted at: http://proce55ing.net/reference/index.html Comments and suggestions?
|
|
|
|
Glen Murphy
|
Re: Processing 1.0 API
« Reply #1 on: Feb 20th, 2003, 1:01am » |
|
With sound, I would like some way to do realtime stereo separation (panning), or realtime volume control of multiple sources. I realise that this isn't really very well supported under Java at the moment, so I know it's a long shot. But it'd just be nice Same goes for microphone recording - I know a few people here seem to want to be able to access waveform data.
|
|
|
|
skloopy
|
Re: Processing 1.0 API
« Reply #2 on: Feb 20th, 2003, 1:44am » |
|
I'll second that. If possible it'd be great to support alpha transparency and GIF transparency, too!
|
|
|
|
Dan
|
Re: Processing 1.0 API
« Reply #3 on: Feb 20th, 2003, 9:47am » |
|
How about building one of the 3D sound APIs into P5 (I've not researched this at all so it might not be feasible for a crossplatform tool). PNG Alpha support would be cool
|
|
|
|
_REAS Guest
|
Re: Processing 1.0 API
« Reply #4 on: Feb 20th, 2003, 10:24am » |
|
Alpha is definately in the specification. It's obscured by the list. It will be: fill(v1, v2, v3, alpha) stroke(v1, v2, v3, alpha) color(v1, v3, v3, alpha)
|
|
|
|
franklin_mint
|
Re: Processing 1.0 API
« Reply #5 on: Feb 21st, 2003, 5:59pm » |
|
A constant for 'E' should probably be included, even though it's in java.lang.Math.
|
« Last Edit: Feb 21st, 2003, 5:59pm by franklin_mint » |
|
|
|
|
mawend
|
Re: Processing 1.0 API
« Reply #6 on: Feb 23rd, 2003, 7:43am » |
|
Some more light controls might be nice. Something like lightType() with point, spot, and parallel as options would be cool. The lights should have transforms, lookats, coneangle, falloffs, and so forth. It would be nice to specify shadow controls, but I'm gussing that a crossplatform tool that doesn't assume hardware acceleration would make that unlikely. Also, it would be nice to build in linstep() and smoothstep() functions. thanks Mark
|
|
|
|
REAS
|
Re: Processing 1.0 API
« Reply #7 on: Feb 24th, 2003, 7:14pm » |
|
Mark, Please explain what your linstep() and smoothstep() functions do. + Casey
|
|
|
|
mawend
|
Re: Processing 1.0 API
« Reply #8 on: Feb 26th, 2003, 7:07am » |
|
Sorry I wasn't more specific. linstep(float1,float2,float3) and smoothstep(float1,float2,float3) are pretty common in some of the other 3D scripting languages I've used like Maya's MEL and even good ol' Dynamation's Sophia. linstep returns a float between zero and one that indicates what percentage between the first and second arguments the third argument lies. If the third arg is less than the first, then linstep returns zero, and if the third arg is greater than the second, then linstep returns one. linstep linearly interpolates between the first two args, while smoothstep does an ease-in-ease-out curve like a cubic polynomial so that the slope of the interpolation is zero when the third arg is equal to either the first or the second args. I use these types of functions all the time to "normalize" value ranges. For example, if I've got a variable that varies between 50 and 500, then I'd normalize it with norm_val = linstep(50,500,val). Sure, linstep and smoothstep are easy to turn into little functions with p5, but they are so commonly useful that it would be nice if they were built-in. That's all. Mark
|
|
|
|
fry
|
Re: Processing 1.0 API
« Reply #9 on: Feb 26th, 2003, 2:41pm » |
|
that sounds useful.. do you know of any online docs that would have all the specifics?
|
|
|
|
mawend
|
Re: Processing 1.0 API
« Reply #10 on: Feb 27th, 2003, 7:54am » |
|
Here's a little method for calculating linstep: float linstep(float minV, float maxV, float var) { return max(0,min(1,(var-minV)/(maxV-minV))); } I'll have to go check the math to get a smoothstep version right, and I'll get back to you. There's an online maya manual at this link, which has some nice graphical explanations of the functions: http://caad.arch.ethz.ch/info/maya/manual/UserGuide/Express/ExpressFunc. fm10.html cheers, Mark
|
|
|
|
mawend
|
Re: Processing 1.0 API
« Reply #11 on: Mar 1st, 2003, 7:42am » |
|
Okay, with a little help from a friend who is a bit fresher on solving systems of equations than I am (thanks Laurent), here's a smoothstep method: float smoothstep(float minV, float maxV, float var) { float lin = max(0,min(1,(var-minV)/(maxV-minV))); return lin*lin*(3-2*lin); }
|
|
|
|
Martin
|
Re: Processing 1.0 API
« Reply #12 on: Mar 9th, 2003, 11:32am » |
|
for the lazy ones... floodfill(); and gradient(); would be nice
|
|
|
|
|