# Latest

**URL:** https://discourse.processing.org/latest.md?page=124

[Latest](https://discourse.processing.org/latest.md) · [Categories](https://discourse.processing.org/categories.md) · [Tags](https://discourse.processing.org/tags.md)

**Page:** 125

---

## [How to minimize Processing Sketch window?](https://discourse.processing.org/t/how-to-minimize-processing-sketch-window/35061)

<div class="topic-metadata">

**Author:** [@CaseyJ](https://discourse.processing.org/u/CaseyJ)\
**Replies:** 3\
**Last updated:** [July 18, 2022, 2:22am UTC](https://discourse.processing.org/t/how-to-minimize-processing-sketch-window/35061 "2022-07-18T02:22:55Z")

</div>

Is there a way to run a line of code similar to exit(); that will minimize the window instead of closing it like exit(); does? I need the window to go away so another can take its place. It just still needs to exist to …

---

## [Combining classes and instance mode in p5js?](https://discourse.processing.org/t/combining-classes-and-instance-mode-in-p5js/38006)

<div class="topic-metadata">

**Author:** [@basicvisual](https://discourse.processing.org/u/basicvisual)\
**Replies:** 1\
**Last updated:** [July 17, 2022, 6:37pm UTC](https://discourse.processing.org/t/combining-classes-and-instance-mode-in-p5js/38006 "2022-07-17T18:37:30Z")

</div>

Hi recently I came across the topic of running sketches in p5js in an instance mode. I had been able to draw shapes and do basic visualization using the instance mode. However I am quite confused when it comes in dealing…

---

## [Parallel for loops in p5js](https://discourse.processing.org/t/parallel-for-loops-in-p5js/37997)

<div class="topic-metadata">

**Author:** [@mldvxcc](https://discourse.processing.org/u/mldvxcc)\
**Replies:** 0\
**Last updated:** [July 17, 2022, 4:19am UTC](https://discourse.processing.org/t/parallel-for-loops-in-p5js/37997 "2022-07-17T04:19:28Z")

</div>

I was wondering if it is possible to run parallel for loops in JavaScript using the p5js library? I am trying to speed up the following code and run multiple points in parallel given each is independent. \< for (ix = 0…

---

## [Painting/revealing a layer](https://discourse.processing.org/t/painting-revealing-a-layer/38000)

<div class="topic-metadata">

**Author:** [@bringmeflowers](https://discourse.processing.org/u/bringmeflowers)\
**Replies:** 1\
**Last updated:** [July 17, 2022, 11:32am UTC](https://discourse.processing.org/t/painting-revealing-a-layer/38000 "2022-07-17T11:32:46Z")

</div>

I want to create this effect in processing - where the mouse goes, the bottom painting layer is revealed. I try to loop through the pixels to the right of the mouseX to get the pixels for an area, but it does not wor…

---

## [2D surface growth: how to make my code run faster?](https://discourse.processing.org/t/2d-surface-growth-how-to-make-my-code-run-faster/37992)

<div class="topic-metadata">

**Author:** [@amundsen](https://discourse.processing.org/u/amundsen)\
**Replies:** 3\
**Last updated:** [July 17, 2022, 7:25am UTC](https://discourse.processing.org/t/2d-surface-growth-how-to-make-my-code-run-faster/37992 "2022-07-17T07:25:23Z")

</div>

Hello, I am programming some pixel-based 2d growth on a PImage from a random point. However I would like the code to run faster, especially the addNeighbour() function. On an i7-7820HQ/2.90GHz I need something like 5s …

---

## [java.lang.NoSuchMethodException from a Class.forName instantiation](https://discourse.processing.org/t/java-lang-nosuchmethodexception-from-a-class-forname-instantiation/37961)

<div class="topic-metadata">

**Author:** [@rowanmcnitt](https://discourse.processing.org/u/rowanmcnitt)\
**Replies:** 5\
**Last updated:** [July 16, 2022, 11:42pm UTC](https://discourse.processing.org/t/java-lang-nosuchmethodexception-from-a-class-forname-instantiation/37961 "2022-07-16T23:42:58Z")

</div>

Hello all, have been trying to debug this issue for hours with no luck, I’m trying to instantiate classes using a csv file: (I’ve also tried using getDeclaredConstructor) \*for this example, gun\_name = "m4"\* Object n…

---

## [Kinect v2 library and find Users](https://discourse.processing.org/t/kinect-v2-library-and-find-users/37994)

<div class="topic-metadata">

**Author:** [@potter3366](https://discourse.processing.org/u/potter3366)\
**Replies:** 0\
**Last updated:** [July 16, 2022, 9:50pm UTC](https://discourse.processing.org/t/kinect-v2-library-and-find-users/37994 "2022-07-16T21:50:00Z")

</div>

When I run the app, the user is immediately detected. When he leaves the Kinect sensor field, the app still shows foundUsers = true and kinect.getNumOfUsers()=1. The number of users entering the Kinect field of view doe…

---

## [Save and recall variable in a file](https://discourse.processing.org/t/save-and-recall-variable-in-a-file/37968)

<div class="topic-metadata">

**Author:** [@leuwenn](https://discourse.processing.org/u/leuwenn)\
**Replies:** 4\
**Last updated:** [July 16, 2022, 5:50pm UTC](https://discourse.processing.org/t/save-and-recall-variable-in-a-file/37968 "2022-07-16T17:50:08Z")

</div>

Hi, I’m trying to save several variables to a file so I can reload them when the program opens. I manage to create a JSON file but I have to manually add the code, I would like to automate this by adding in an Array, th…

---

## [RuntimeException: Expected a ',' or '}'](https://discourse.processing.org/t/runtimeexception-expected-a-or/37990)

<div class="topic-metadata">

**Author:** [@nanto2016](https://discourse.processing.org/u/nanto2016)\
**Replies:** 2\
**Last updated:** [July 16, 2022, 5:30pm UTC](https://discourse.processing.org/t/runtimeexception-expected-a-or/37990 "2022-07-16T17:30:56Z")

</div>

Hi, i was working on a game, it worked when i last tested it, then i went watch video on youtube, and the sketch doesn’t work anymore, and i really do not understand at all where is the error. it just says in the console…

---

## [Change Background Color on Key Press](https://discourse.processing.org/t/change-background-color-on-key-press/37970)

<div class="topic-metadata">

**Author:** [@roaringcrex](https://discourse.processing.org/u/roaringcrex)\
**Replies:** 3\
**Last updated:** [July 16, 2022, 1:55pm UTC](https://discourse.processing.org/t/change-background-color-on-key-press/37970 "2022-07-16T13:55:00Z")

</div>

Hey, I’d like to change the background Color and it should stay the same after choosing one, but I can’t wrap my head around how that should be possible… Can someone please help me out on this? I’ve tried to google my w…

---

## [Tint() in for loop doesn't work](https://discourse.processing.org/t/tint-in-for-loop-doesnt-work/37976)

<div class="topic-metadata">

**Author:** [@Andry](https://discourse.processing.org/u/Andry)\
**Replies:** 10\
**Last updated:** [July 16, 2022, 1:47pm UTC](https://discourse.processing.org/t/tint-in-for-loop-doesnt-work/37976 "2022-07-16T13:47:58Z")

</div>

Hi, I have this code that doesn’t work, why? PImage img; void setup() { size(400, 300); img= loadImage("myimage.jpg"); image(img,0,0,width, height); } void draw() { } float transparency = 255; void keyPres…

---

## [myMovie.speed() is not working](https://discourse.processing.org/t/mymovie-speed-is-not-working/11956)

<div class="topic-metadata">

**Author:** [@anty](https://discourse.processing.org/u/anty)\
**Replies:** 7\
**Last updated:** [July 16, 2022, 12:52pm UTC](https://discourse.processing.org/t/mymovie-speed-is-not-working/11956 "2022-07-16T12:52:37Z")

</div>

Hi friends, I am Anty and I want to control the movie’s speed by .speed() but it seems not working in my code. Whatever the number I wrote to “.speed(0.5)” “.speed(5)” all of them are the same speed. This is my code: …

---

## [Playing different videos from Serial](https://discourse.processing.org/t/playing-different-videos-from-serial/37705)

<div class="topic-metadata">

**Author:** [@ccheee](https://discourse.processing.org/u/ccheee)\
**Replies:** 1\
**Last updated:** [July 16, 2022, 2:56am UTC](https://discourse.processing.org/t/playing-different-videos-from-serial/37705 "2022-07-16T02:56:55Z")

</div>

I’m very new to Processing, so please forgive me if I’m missing something very basic! I’m trying to use an Arduino/Serial input that will trigger different videos to play in a Processing sketch. The code below is based …

---

## [Pros & Cons (GUI Builder): Java Swing vs ControlP5](https://discourse.processing.org/t/pros-cons-gui-builder-java-swing-vs-controlp5/37958)

<div class="topic-metadata">

**Author:** [@Ghostsss](https://discourse.processing.org/u/Ghostsss)\
**Replies:** 2\
**Last updated:** [July 15, 2022, 10:03pm UTC](https://discourse.processing.org/t/pros-cons-gui-builder-java-swing-vs-controlp5/37958 "2022-07-15T22:03:38Z")

</div>

I am new to Java and Processing. I want ot build GUI using processing. I found that there are two ways to build GUI, using Java Swing & ControlP5 library. Can someone experienced explain me the pros and cons of using…

---

## [DALLE 2 - Transparent background and load image](https://discourse.processing.org/t/dalle-2-transparent-background-and-load-image/37973)

<div class="topic-metadata">

**Author:** [@Scaprendering](https://discourse.processing.org/u/Scaprendering)\
**Replies:** 4\
**Last updated:** [July 15, 2022, 9:03pm UTC](https://discourse.processing.org/t/dalle-2-transparent-background-and-load-image/37973 "2022-07-15T21:03:04Z")

</div>

Hi brains ! I’ll be honest, first day into processing today. I’ve done what I needed, basically crop and reposition images but I still have an issue about how to set the gray background to transparent. Here’s the c…

---

## [How can I see additive filter frequency with two LFOs?](https://discourse.processing.org/t/how-can-i-see-additive-filter-frequency-with-two-lfos/37895)

<div class="topic-metadata">

**Author:** [@exactspace](https://discourse.processing.org/u/exactspace)\
**Replies:** 9\
**Last updated:** [July 15, 2022, 7:03pm UTC](https://discourse.processing.org/t/how-can-i-see-additive-filter-frequency-with-two-lfos/37895 "2022-07-15T19:03:35Z")

</div>

please format code with \</\> button \* homework policy \* asking questions I have two LFOs (which are oscillators) running at 2.9 and 3.9 for their frequencies, set to 1500, and 1600 for their amplitude, and I’m setting…

---

## [How to check if com Port is already being used by another application?](https://discourse.processing.org/t/how-to-check-if-com-port-is-already-being-used-by-another-application/37946)

<div class="topic-metadata">

**Author:** [@Ghostsss](https://discourse.processing.org/u/Ghostsss)\
**Replies:** 2\
**Last updated:** [July 15, 2022, 10:37am UTC](https://discourse.processing.org/t/how-to-check-if-com-port-is-already-being-used-by-another-application/37946 "2022-07-15T10:37:02Z")

</div>

How do I check if com Port is already being used by another application or if it is free to be used ? import processing.serial.\*; Serial myPort; void setup(){ myPort = new Serial(this, Serial.list()\[0\], 9600); // H…

---

## [How to solve this fps problem?](https://discourse.processing.org/t/how-to-solve-this-fps-problem/37959)

<div class="topic-metadata">

**Author:** [@Coder1](https://discourse.processing.org/u/Coder1)\
**Replies:** 8\
**Last updated:** [July 15, 2022, 5:28pm UTC](https://discourse.processing.org/t/how-to-solve-this-fps-problem/37959 "2022-07-15T17:28:31Z")

</div>

please format code with \</\> button \* homework policy \* asking questions Hello. I have been working on a game very well but after time my biggest issue became the bad fps in my game. I have tried using threads to someho…

---

## [Moving 'backwards through time' of animation frame by frame?](https://discourse.processing.org/t/moving-backwards-through-time-of-animation-frame-by-frame/37657)

<div class="topic-metadata">

**Author:** [@CamSos](https://discourse.processing.org/u/CamSos)\
**Replies:** 11\
**Last updated:** [July 15, 2022, 5:03pm UTC](https://discourse.processing.org/t/moving-backwards-through-time-of-animation-frame-by-frame/37657 "2022-07-15T17:03:21Z")

</div>

I’m trying to tab through the ‘frames’ of my animation, as it is useful for troubleshooting. Stepping forward in time, one frame at a time, is easy enough: void keyPressed() { if (key == CODED) { if (keyCode == R…

---

## [Issue with graphics, processing python](https://discourse.processing.org/t/issue-with-graphics-processing-python/37943)

<div class="topic-metadata">

**Author:** [@Daniel11](https://discourse.processing.org/u/Daniel11)\
**Replies:** 1\
**Last updated:** [July 15, 2022, 5:01pm UTC](https://discourse.processing.org/t/issue-with-graphics-processing-python/37943 "2022-07-15T17:01:08Z")

</div>

Hi all, I have created a Rubik’s cube and it works really well, however when a piece turns, the piece also appears in its original position at the same time. The problem is I rotate it, then I draw it but for some reaso…

---

## [Color detect with Kinect v2](https://discourse.processing.org/t/color-detect-with-kinect-v2/37971)

<div class="topic-metadata">

**Author:** [@potter3366](https://discourse.processing.org/u/potter3366)\
**Replies:** 0\
**Last updated:** [July 15, 2022, 3:34pm UTC](https://discourse.processing.org/t/color-detect-with-kinect-v2/37971 "2022-07-15T15:34:09Z")

</div>

I detect the color of the glove and check if it is one of the three colors (RGB). Every frame I get integer values: NColor = 0 for RED NColor = 1 for GREEN NColor = 2 for BLUE NColor = -1 for unknown color As the li…

---

## [Array of new p5 instance & DOM](https://discourse.processing.org/t/array-of-new-p5-instance-dom/37964)

<div class="topic-metadata">

**Author:** [@louise00](https://discourse.processing.org/u/louise00)\
**Replies:** 1\
**Last updated:** [July 15, 2022, 10:57am UTC](https://discourse.processing.org/t/array-of-new-p5-instance-dom/37964 "2022-07-15T10:57:10Z")

</div>

Hello I have been building a script with a fractal grid wherein a more complicated vector shape is created per grid square and I want to be able to crop the shape into its square but without turning it into a bitmap imag…

---

## [Cannot play the video after exporting the application](https://discourse.processing.org/t/cannot-play-the-video-after-exporting-the-application/25889)

<div class="topic-metadata">

**Author:** [@caseywang777](https://discourse.processing.org/u/caseywang777)\
**Replies:** 1\
**Last updated:** [December 2, 2020, 4:21pm UTC](https://discourse.processing.org/t/cannot-play-the-video-after-exporting-the-application/25889 "2020-12-02T16:21:23Z")

</div>

Hi, I use the Gstream based video library (import processing.video.\*) to play the video. When I use the IDE to run the application, it works well. (just a minor warning: after I close the window, processing give me a w…

---

## [Tinkercad+Arduino](https://discourse.processing.org/t/tinkercad-arduino/37962)

<div class="topic-metadata">

**Author:** [@Leonid](https://discourse.processing.org/u/Leonid)\
**Replies:** 2\
**Last updated:** [July 15, 2022, 6:30am UTC](https://discourse.processing.org/t/tinkercad-arduino/37962 "2022-07-15T06:30:14Z")

</div>

Hi all ! I did not find a forum for Tinkercad. Maybe you can help me ? How to add a caption on the chart along the x-axis in it? Thanks

---

## [Tooltip with ControlP5](https://discourse.processing.org/t/tooltip-with-controlp5/37917)

<div class="topic-metadata">

**Author:** [@Ghostsss](https://discourse.processing.org/u/Ghostsss)\
**Replies:** 12\
**Last updated:** [July 15, 2022, 5:26am UTC](https://discourse.processing.org/t/tooltip-with-controlp5/37917 "2022-07-15T05:26:36Z")

</div>

I want to add tooltip to GUI built using ControlP5. I found that some old examples (from around 2011) of tooltip in ControlP5 examples say that tooltip is not working as of now. I want to know if it is still not workin…

---

## [Can't make image rotate around it's own axis](https://discourse.processing.org/t/cant-make-image-rotate-around-its-own-axis/37956)

<div class="topic-metadata">

**Author:** [@ultimakey](https://discourse.processing.org/u/ultimakey)\
**Replies:** 1\
**Last updated:** [July 15, 2022, 3:08am UTC](https://discourse.processing.org/t/cant-make-image-rotate-around-its-own-axis/37956 "2022-07-15T03:08:23Z")

</div>

Hello! I want to make a 2D game with a top view where you control a car and you have to park it. But I can’t make the car rotate around it’s axis. I’ve tried placing in the translate the car coordinates, but I can’t make…

---

## [P5js error when adding a function call to draw()](https://discourse.processing.org/t/p5js-error-when-adding-a-function-call-to-draw/37934)

<div class="topic-metadata">

**Author:** [@Steve](https://discourse.processing.org/u/Steve)\
**Replies:** 0\
**Last updated:** [July 12, 2022, 6:06pm UTC](https://discourse.processing.org/t/p5js-error-when-adding-a-function-call-to-draw/37934 "2022-07-12T18:06:56Z")

</div>

I’m working on a sketch as part of a raycasting course and I keep seeing the error “TypeError: e.set is not a function” and my CPU spins up to 100% which kills browser performance. I can reproduce this a couple differen…

---

## [How to close serial port when window is closed](https://discourse.processing.org/t/how-to-close-serial-port-when-window-is-closed/37854)

<div class="topic-metadata">

**Author:** [@Ghostsss](https://discourse.processing.org/u/Ghostsss)\
**Replies:** 4\
**Last updated:** [July 14, 2022, 12:15pm UTC](https://discourse.processing.org/t/how-to-close-serial-port-when-window-is-closed/37854 "2022-07-14T12:15:22Z")

</div>

I am using serial port for building GUI with ControlP5. I open serial port in setup() function. i.e. tha start of program. I want to close the serial port when user closes the window. I know that port.close() can be u…

---

## [How To Test for Lost Serial Port?](https://discourse.processing.org/t/how-to-test-for-lost-serial-port/15437)

<div class="topic-metadata">

**Author:** [@Forrest\_Erickson](https://discourse.processing.org/u/Forrest_Erickson)\
**Replies:** 15\
**Last updated:** [July 14, 2022, 11:59am UTC](https://discourse.processing.org/t/how-to-test-for-lost-serial-port/15437 "2022-07-14T11:59:41Z")

</div>

I am using the processing serial library. In processing I am monitoring serial data. I want to detect when a USB device which identifies on a Windows computer as a COM port is turned off and therefor the COM port goes aw…

---

## [Accelerometer data STK8231 to 3d view](https://discourse.processing.org/t/accelerometer-data-stk8231-to-3d-view/37923)

<div class="topic-metadata">

**Author:** [@narendok](https://discourse.processing.org/u/narendok)\
**Replies:** 6\
**Last updated:** [July 14, 2022, 1:52am UTC](https://discourse.processing.org/t/accelerometer-data-stk8231-to-3d-view/37923 "2022-07-14T01:52:53Z")

</div>

import processing.opengl.\*; import processing.serial.\*; //Sets variables for serial port, bytes, and floats Serial sp; byte\[\] buff; float\[\] r; float OFFSET\_X = 2.5, OFFSET\_Y = -2.5; //These offsets are chip specific,…

[Previous page](https://discourse.processing.org/latest.md?page=123)

[Next page](https://discourse.processing.org/latest.md?page=125)
