Decoding Parameters

39 views
Skip to first unread message

John Fino

unread,
Jul 1, 2011, 1:17:15 PM7/1/11
to structur...@googlegroups.com
Hi all, I have almost 0 coding experience, so bear with me. What I'm looking for is more control over the Zscale and Zskew - specifically to be able to change the actual numbers, not just move the slider.
I've figured out how to make the slider longer so I can get more precision when using the mouse, but it would be nice to be able to manually input, say, 9.50 on the Zskew, rather than finagling the pixels with my apparently not so steady hand.

I found there's a NumberBox control for IP5, but don't know how to (or if it's possible to) add one each for zscale and zskew. Can anyone help me?

Kyle McDonald

unread,
Jul 6, 2011, 12:15:29 PM7/6/11
to structur...@googlegroups.com
in the "ThreePhase" source, there is a "Controls" tab. you'll see there:

control.addSlider("zscale", -256, 256, zscale, 10, y += 10, 256, 9).setWindow(controlWindow);
control.addSlider("zskew", -64, 64, zskew, 10, y += 10, 256, 9).setWindow(controlWindow);

the first two numbers are the range, and then it gives the default value (defined at the top of the file). if you know a more precise range for your scans, you could just try changing this.

alternatively, you could replace addSlider with addNumberBox like in this example:

http://www.sojamo.de/libraries/controlP5/examples/ControlP5numberbox/ControlP5numberbox.pde

kyle
Reply all
Reply to author
Forward
0 new messages