Loading...
Logo
Processing Forum
With the latest releases of processing's 2.0 ControlP5 had to undergo various changes and updates as well. 

First the not so good news, ControlP5 2.0 and higher will not be backwards compatible with processing 1.5.1 and earlier anymore but older versions are still available from the download list on google code. Sketches created with older version will still run with the latest ControlP5 version, I tried my best not to remove outdated methods, see the source code for heavy deprecation overload. 

Now the good news, with ControlP5 2.0 Android is supported and a few changes were necessary most importantly all java.awt dependecies have been removed to support Android mode. This also means that the ControlWindow (to display controllers in a separate window) had to go, but I have included an example (examples/extra/frame) that shows how to create your own custom Frame when in desktop mode which can be used to display controllers.

More examples are now available which demonstate the use and functionality of available controllers. By browsing and reading through the examples you should get a good idea of how to use controlP5. For each sketch inside examples/controllers there is a quick reference of public methods available for each respective controller at the bottom of the sketch's source code. 

All major changes are reflected inside the changelog.txt file available from http://code.google.com/p/controlp5/source/browse/trunk/src/controlP5/changeLog.txt

New controllers include 
- Println (examples/extra/ControlP5console) which allows you to redirect and show all println triggered console message inside a textarea while a sketch is running
- FrameRate (examples/extra/ControlP5frameRate), a controller that shows the current framerate
- Annotations (examples/use/ControlP5annotation) allow you to automatically create controller using the @ControlElement annotation for fields and methods. This has been adapted from the great cp5magic implementation by Karsten Schmidt
- Pointer (examples/extra/ControlP5pointer) allows you to override the mosue input and replace it with your own input, this can be useful when working with mutitouch applications. Pointer is not a full multitouch implementation like tuio but only allows for a single touch input.
- Properties (examples/controllers/ControlP5properties) allow you to save the value of a controller to a file which can be loaded again. This can be helpful when the states of controllers have to be loaded and saved for example for realtime events where different settings are required.
- Snapshots (examples/use/ControlP5snapshot) are similar to properties but instead of saving to a file a snapshot saves the state of a controller to memory.
- ControllerView (examples/use/ControlP5customView), a controller uses the Interface ControllerView to rendered its appearance. The ControllerView can be easily changed by calling setView(ControllerView)

Android mode
I have successfully tested the mouse (touch) dependent controllers with the latest version of processing (2.0b3) the key input as of now is not well supported and therefore the textfield needs to be a bit more patient to be fully functional. 

Install and download
the latest version of controlP5 to use with processing 2.0 is available from the website www.sojamo.de/libraries/controlP5 all development can be followed at code.google.com/p/controlp5 all versions are archived at code.google.com/p/controlp5/downloads/list or you can use the lately introduced library manager for the processing IDE to download controlP5 (go to Sketch → Import Library... → Add Library...)

How to use this thread
I will use this thread to post future updates, if you have questions related to updates or future features, please post them here. If you have problems or need to solve particular controlP5 issues, please create a new thread or use the issue tracker at code.google.com/p/controlp5/issues/list

best,
Andreas


Replies(3)

Re: ControlP5 updates

4 months ago
Hi Andreas, 
I have a problem with colorPIcker..

I have two windows like your example ControlP5frame, and i have this

Copy code
  1.     cp = cp5.addColorPicker("picker")
  2.       .setPosition(10, 170)
  3.        .plugTo(parent, "a_colorr")
  4.         .setColorValue(color(255, 255, 255, 128))
  5.           .setGroup(g1);

and in the parent Window i have this:


Copy code
  1. float[] a_colorr = { 
  2.   255, 255, 255, 255
  3. };


but doesn't work!

I'am using  ControlP5 library > 2.0.4 release 12/23/2012 with Processing 2.0b9


thanks in advance


Re: ControlP5 updates

4 months ago
Thanks Adreas for your wonderful lib and great support!

Re: ControlP5 updates

4 months ago
@albagcorral the ColorPicker only sends updates to a method it is plugged to (and if available). in your case you would need a method called a_colorr(int theColor) {} which would be activated when the colorpicker changes and the color will be passed on as an int (not float array). For example

Copy code
  1.  cp = cp5.addColorPicker("picker").plugTo(parent, "a_colorr");
will be plugged to a method called a_colorr inside the parent object:
Copy code
  1. void a_colorr( int theColor) {
  2.       println(theColor);
  3. }
Could I ask you to move your question (and the answer if it solves the question) into a separate thread since I would like to keep this thread only for updates as indicated above under how to use this thread, that would be great.

@cageehv, you are welcome and thank you.

andreas schlegel, http://www.sojamo.de