We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Pages: 1 2 3 ... 17
controlP5 (Read 126741 times)
controlP5
Nov 14th, 2006, 10:36am
 
hi,
i know there are some controller libraries out there, so here is another one.

controlP5 is a controller library for processing that works in authoring, application, and applet mode. controllers can be added to a processing sketch, can be organized in tabs, and can be placed in separate control windows.
all controllers are drawn on top of a processing sketch - after your content has been drawn. several key combinations allow the user to show and hide, save and load, and key-control controllers in a controlP5 setup. these setups can be saved and loaded locally or to/from a server.
the position of a controller can be adjusted during runtime by moving a controller with the ALT-key down.
additionally a drop event is implemented in controlP5 which allows the user to drag files, folders, text, images, content from browsers and other applications onto a sketch. the dropped content is then accessible or can be loaded within a sketch.

more info, documentation and examples to get an idea how the library works and can be used, at
http://www.sojamo.de/controlP5

a basic example can be found here:
http://www.sojamo.de/iv/pr/controlP5/applet/index.html


andi



Re: controlP5
Reply #1 - Nov 14th, 2006, 4:28pm
 
this is exciting!
Re: controlP5
Reply #2 - May 15th, 2007, 6:51pm
 
Hi,
I'm using controlP5, it's very usefull. I like it a lot. But I've one question I can't resolve. How can I acces to the slider value to change it. I want to change the slider value using a midi controller.

Thanks!

Aleix
Re: controlP5
Reply #3 - May 19th, 2007, 11:10pm
 
Hello!

I'm trying to use controlP5 from the eclipse IDE, and I've run into the following: If I try to open additional ControlWindows (see code below), they will appear on the screen, but they will be empty, that is no control elements drawn/visible. also the background color will only appear as a small colored dot in the middle of the window. However, If I execute the same code from the Processing environment, everything works fine. Buttons/Controls in the main window of the PApplet also appear as expected.. (eg. deleting the last line of the setup method)

Anybody experienced this before or an idea wher it comes from??? Any help would be greatly appreciated!!!


Hendrik


import processing.core.PApplet;
import controlP5.*;

public class testWindow extends PApplet{


ControlP5 controlP5;

int myColorBackground = color(0,0,0);

ControlWindow controlWindow;

public int sliderValue = 40;

public void setup() {
 size(400,400);
 frameRate(25);
 controlP5 = new ControlP5(this);
 controlWindow = controlP5.addControlWindow("controlP5window",400,200);
 controlWindow.setBackground(color(0,0,100));
 Controller mySlider = controlP5.addSlider("sliderValue",0,255,40,40,100,10);
 mySlider.setWindow(controlWindow);
}
 
public void draw() {
 background(sliderValue);
 controlP5.draw();
}

}
Re: controlP5
Reply #4 - May 24th, 2007, 8:27am
 
Hi,

I'm using cP5 in my sketch and I encountered the problem, that I'm getting weird controls when I set rectMode(CENTER).

Seems like the library depends on rectMode(CORNER) to draw everything properly.

Any ideas? I don't find any mail address to reach the author.

regards
 Ilu
Re: controlP5
Reply #5 - May 24th, 2007, 11:53am
 
hi,
there is a preliminary version of controlP5 available at http://www.sojamo.de/controlP5 version 0.1.8

* rectMode and ellipseMode issue fixed.

* added global controllers.  these controllers are stored in a tab called global. to make a controller global, use controlP5.controller("theControllerNameHere").setTab("global"). controllers can be hidden with the key-combination alt-h, to prevent global controllers from being hidden, use controlP5. setGlobalControllersAlwaysVisible(true/false).

* added setValue(float theValue) to set controller values after the initialization of a controller, so values can be set from processing any time with controller.setValue(float theValue)

* auto initialization is configurable. use controlP5.setAutoInitialization(true/false); . this means, if you set the auto initialization to false, controllers wont fire anymore after they are created.

* added Textlabel to leave notes on the screen. Textlabel is multiline and flexible in width/height and has a scrollbar. not dragable yet, but try here  http://www.sojamo.de/content/p5/controlP5/examples/ControlP5Textlabel/ControlP5Textlabel.pde

* TextField, added getText() to the TextField to request the current text of the controller without having to confirm the textline with return.

* there where issues with controlWindows which are supposed to be fixed now, but i have only tested this on osx.

* controllers can be shown and hidden individually. controller.show(), controller.hide(), check if a controller is visible with controller.isVisible()

* controllers can be moved from one tab to the other with controller.moveTo(String theTabName)

* remove controllers from controlP5 with controlP5.remove(String theControllerName) or controlP5.remove(Controller theController)

* added a multilist controller, basically a multidimensional menu. an example can be found at http://www.sojamo.de/content/p5/controlP5/examples/ControlP5List/ControlP5List.pde
you have to import controlP5.extended.*; though

there is more, i will compile all the changes for the final  release. this is an in progress version, so there shouldn't be problems but there might be. official release will be end of june.

best,
andi


Re: controlP5
Reply #6 - May 24th, 2007, 4:49pm
 
is it possible to change the font?
Re: controlP5
Reply #7 - May 24th, 2007, 5:02pm
 
there wont be support for PFont but i will find a way for putting in custom pixelfonts.

andi
Re: controlP5
Reply #8 - Jun 13th, 2007, 12:38pm
 
Hi andi,

What's the name of the font used in ControlP5 interfaces?
I'd love to use the same one in order to maintain the visual integrity of my sketch.

Thank you very much for your all effort on this very useful library.

nao  
Re: controlP5
Reply #9 - Jun 13th, 2007, 1:35pm
 
hi,
the font is called standard_07_57 and is available at miniml.com

andi
Re: controlP5
Reply #10 - Jun 13th, 2007, 4:06pm
 
Hi Andi,

Great (looking) interface library, cheers! I've used 0.1.1 in some of my projects. Also, the examples were very useful.

- ControlWindow. I am experiencing the same problem as Trottelgoof described earlier. I've tried version 0.1.1 and the 0.1.8 preliminary version. I am getting a square in the center of the control window when I run my sketch from Processing, no controls. (update: ControlWindow does work with Eclipse)

- draw() method
I've tried to use some controls in a P3D sketch. They show up with the draw method and work fine. But the controls are in 3d space. Is it supposed to work like that? I expected the draw method to create some sort of 2d overlay on top of the 3d sketch.

Thanks again.
Re: controlP5
Reply #11 - Jun 15th, 2007, 1:44pm
 
Hi, thank you very much for doing this. Very cool interface, I like it a lot and hope you will not stop development!

I have a problem with 0.1.1 when use the "translate" command, then it is not possible to use the slider. I also tried version 0.1.8. Any help?

Thanks & go on with your great work!
Klaus

Re: controlP5
Reply #12 - Jun 15th, 2007, 6:10pm
 
hi klaus,
with translate you "displace objects within the display window", which also applies to whatever gets drawn by controlP5, as all controlP5 elements are drawn at the end of the draw method. to get around this you could use pushMatrix() and popMatrix() to encapsulate your translations, e.g.
Code:

void draw() {
pushMatrix();
// all your drawings go here, e.g.
translate(100,100);
fill(255);
rect(0,0,20,20);
popMatrix();
}

hope this helps,
andi
Re: controlP5
Reply #13 - Jun 18th, 2007, 9:12am
 
Hi andi,

thank you very much, works perfect! Great!

Klaus

Re: controlP5
Reply #14 - Jun 18th, 2007, 11:38am
 
One more question:

Will there be a possibility to change the color and or fontcolor of the controls?

Klaus
Pages: 1 2 3 ... 17