ControlP5 updates
in
Library and Tool Development
•
1 year ago
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