question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

controlP5 examples

See original GitHub issue

Hi,

I’m a teacher trying to use processing.py in HS. I have limitations, so little snippets of documentation really help.

The controlP5 example here in gitHub under examples.py/ThirdParty doesn’t work. You move the sliders but the rectangles don’t change color. After creating sliderValue you can’t access the value later with fill(sliderValue) as you can in the Java version.

In the closed Bug #52 thread, JDF uses something like the following (but with Textfield):

cp5.addSlider("A").setPosition(100, 200).setRange(0,255).setValue(100).setSize(200, 40) print cp5.get(Slider,"A").getValue()

This also works slider1=cp5.addSlider("A").setPosition(100,200).setRange(0,255).setValue(100).setSize(200,40) print slider1.getValue()

which is probably 6 of one, half a dozen of another. Is it? The second approach renders the “A” as something of a dummy name, but slider1.getValue() seems more readable.

  1. Will the ability to just use the slider name (as in the Java version) as a variable be added?
  2. Should we make working Python versions of some controlP5 examples?
  3. If we make Python examples that work now, should it be with cp5.get(Slider,"A").getValue() style or slider1.getValue() style?
  4. Can I help?

Thanks! ms

Issue Analytics

  • State:open
  • Created 9 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
jdfcommented, Jul 27, 2016

I wonder if I should go ahead and just wire in controlEvent like I do with other libraries.

2reactions
itubalcommented, Jul 26, 2016

Hi all: I’m trying to use ControlP5 in Python mode … the function controlEvent(theEvent): doesn’t work!! Can anybody help me? The source code is in https://github.com/PymientoProject/josemaria/tree/master/SuperFormulaPy

Read more comments on GitHub >

github_iconTop Results From Across the Web

processing GUI, controlP5 - Andreas Schlegel
controlP5 is a library written by Andreas Schlegel for the programming ... Reference and examples are included in the controlP5 folder.
Read more >
controlP5 - A gui library for processing.org - GitHub
ControlP5 is a project that started in 2006 as a very simple GUI for controlling Processing parameters for better debugging, testing and interaction...
Read more >
Processing ControlP5 example 1: user interface
ControlP5 is a GUI and controller library made by Andreas Schlegel. You can use it to easy add a GUI (Graphics User Interface)...
Read more >
Processing.py in Ten Lessons – 7.5: ControlP5
ControlP5 is a feature-packed GUI library, full of options for building and customising user interfaces. It provides an extensive set of control ...
Read more >
Adding ControlP5 Sliders to Make Parametric Designs
Your browser can't play this video. Learn more. Switch camera.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found