# Latest

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

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

**Page:** 415

---

## [How to fade an image to black over time](https://discourse.processing.org/t/how-to-fade-an-image-to-black-over-time/16100)

<div class="topic-metadata">

**Author:** [@pw00](https://discourse.processing.org/u/pw00)\
**Replies:** 7\
**Last updated:** [December 9, 2019, 12:28am UTC](https://discourse.processing.org/t/how-to-fade-an-image-to-black-over-time/16100 "2019-12-09T00:28:08Z")

</div>

I’m a beginner in processing and overall coding, so I’m not really sure what and how I’m supposed to do certain things. Is there a way to fade out an image to black over time or use a tint to make an image black over tim…

---

## [How to keep music from overlapping](https://discourse.processing.org/t/how-to-keep-music-from-overlapping/15846)

<div class="topic-metadata">

**Author:** [@Lane](https://discourse.processing.org/u/Lane)\
**Replies:** 2\
**Last updated:** [December 9, 2019, 12:23am UTC](https://discourse.processing.org/t/how-to-keep-music-from-overlapping/15846 "2019-12-09T00:23:11Z")

</div>

Hi! I have it where if the mouse is clicked inside the rectangle’s bounds then music will play. But every time I click inside the rectangle’s bounds the music will will repeat on top of each other. Is there a way I can g…

---

## [Minim volume control using potentiometer](https://discourse.processing.org/t/minim-volume-control-using-potentiometer/16253)

<div class="topic-metadata">

**Author:** [@Ardy2743](https://discourse.processing.org/u/Ardy2743)\
**Replies:** 4\
**Last updated:** [December 8, 2019, 10:29pm UTC](https://discourse.processing.org/t/minim-volume-control-using-potentiometer/16253 "2019-12-08T22:29:58Z")

</div>

Hi peeps! So when my game starts the music does also but id like to be able to control the volume of the music with a potentiometer. I have sound.setGain(0); working in processing and I have the output of the potentiom…

---

## [How to make fft into a circle](https://discourse.processing.org/t/how-to-make-fft-into-a-circle/16255)

<div class="topic-metadata">

**Author:** [@Lane](https://discourse.processing.org/u/Lane)\
**Replies:** 4\
**Last updated:** [December 8, 2019, 10:25pm UTC](https://discourse.processing.org/t/how-to-make-fft-into-a-circle/16255 "2019-12-08T22:25:57Z")

</div>

Hello! Is there a way to make this fft into a circle? Or other cool shape? import processing.sound.\*; SoundFile file1; FFT fft; FFT fft2; int bands = 128; float smoothingFactor = 0.2; float \[\]sum = new float \[bands\]; …

---

## ["wait until" syntax?](https://discourse.processing.org/t/wait-until-syntax/15838)

<div class="topic-metadata">

**Author:** [@benross](https://discourse.processing.org/u/benross)\
**Replies:** 6\
**Last updated:** [December 8, 2019, 7:46pm UTC](https://discourse.processing.org/t/wait-until-syntax/15838 "2019-12-08T19:46:12Z")

</div>

Hi all - is there any way I can make some section of code in draw() only after a certain event has happened? For example can I only start drawing things after a mouseclick or if the user presses a set key? Thanks in ad…

---

## [Closing a second window](https://discourse.processing.org/t/closing-a-second-window/381)

<div class="topic-metadata">

**Author:** [@lmccandless](https://discourse.processing.org/u/lmccandless)\
**Replies:** 17\
**Last updated:** [December 8, 2019, 9:19pm UTC](https://discourse.processing.org/t/closing-a-second-window/381 "2019-12-08T21:19:10Z")

</div>

I want to be able to create a second window. The problem is I want the user to be able to close the second window, but doing so closes both the second and main frame. Is there a way I can prevent this? PWindow win; pub…

---

## [Axidraw p5 clean webusb interface](https://discourse.processing.org/t/axidraw-p5-clean-webusb-interface/5689)

<div class="topic-metadata">

**Author:** [@TiborUdvari](https://discourse.processing.org/u/TiborUdvari)\
**Replies:** 1\
**Last updated:** [December 8, 2019, 9:08pm UTC](https://discourse.processing.org/t/axidraw-p5-clean-webusb-interface/5689 "2019-12-08T21:08:10Z")

</div>

I’m looking to create an API to control my axidraw through WebUSB (currently only working on Chrome) with p5. The communication works by sending simple serial messages. My idea is to have the usual functions like line , e…

---

## [Preventing Keypress from continuously activating](https://discourse.processing.org/t/preventing-keypress-from-continuously-activating/16241)

<div class="topic-metadata">

**Author:** [@Kitty](https://discourse.processing.org/u/Kitty)\
**Replies:** 3\
**Last updated:** [December 8, 2019, 8:56pm UTC](https://discourse.processing.org/t/preventing-keypress-from-continuously-activating/16241 "2019-12-08T20:56:10Z")

</div>

I have my code for keypress here. What I’m looking for is a way to prevent the code from jumping straight from “isGameStart” to “isGameS1”. So that it requires you to hit the ENTER key again. void keyReleased() { if (ke…

---

## [Can I interrupt a closing of a sketch to save data?](https://discourse.processing.org/t/can-i-interrupt-a-closing-of-a-sketch-to-save-data/16231)

<div class="topic-metadata">

**Author:** [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Replies:** 8\
**Last updated:** [December 8, 2019, 8:46pm UTC](https://discourse.processing.org/t/can-i-interrupt-a-closing-of-a-sketch-to-save-data/16231 "2019-12-08T20:46:35Z")

</div>

Hello all, Can I interrupt a closing of a sketch to save data? When Alt-F4 is pressed or the cross in the window is clicked (OS = Windows), the program closes. I would like to interrupt this, to save a file that the u…

---

## [Is there a way to visually stretch a processing sketch?](https://discourse.processing.org/t/is-there-a-way-to-visually-stretch-a-processing-sketch/16140)

<div class="topic-metadata">

**Author:** [@nicnut](https://discourse.processing.org/u/nicnut)\
**Replies:** 18\
**Last updated:** [December 8, 2019, 8:29pm UTC](https://discourse.processing.org/t/is-there-a-way-to-visually-stretch-a-processing-sketch/16140 "2019-12-08T20:29:31Z")

</div>

Hi, Is there a way to stretch a Processing sketch? Either in a vertical or horizontal direction? This is a general question and something I would like to apply to several Processing sketches I’m working on, either in 2D…

---

## [Can you help me optimise this code?](https://discourse.processing.org/t/can-you-help-me-optimise-this-code/16251)

<div class="topic-metadata">

**Author:** [@yes](https://discourse.processing.org/u/yes)\
**Replies:** 4\
**Last updated:** [December 8, 2019, 7:01pm UTC](https://discourse.processing.org/t/can-you-help-me-optimise-this-code/16251 "2019-12-08T19:01:49Z")

</div>

I need help optimising this code: String ROMNAME = str(char(bytes\[308\]))+str(char(bytes\[309\]))+str(char(bytes\[310\]))+str(char(bytes\[311\]))+str(char(bytes\[312\]))+str(char(bytes\[313\]))+str(char(bytes\[314\]))+str(char(bytes…

---

## [How to convert a Double into an Integer?](https://discourse.processing.org/t/how-to-convert-a-double-into-an-integer/16190)

<div class="topic-metadata">

**Author:** [@paulstgeorge](https://discourse.processing.org/u/paulstgeorge)\
**Replies:** 22\
**Last updated:** [December 8, 2019, 5:58pm UTC](https://discourse.processing.org/t/how-to-convert-a-double-into-an-integer/16190 "2019-12-08T17:58:39Z")

</div>

Is there a better way to cast or convert a Double into an Integer? I want to put colour values into pixels. To do this I am using color(). The function “color()” expects parameters like “color(int,int,int)”, but the col…

---

## [Building Library with OpenJDK](https://discourse.processing.org/t/building-library-with-openjdk/16232)

<div class="topic-metadata">

**Author:** [@TomB](https://discourse.processing.org/u/TomB)\
**Replies:** 2\
**Last updated:** [December 8, 2019, 5:46pm UTC](https://discourse.processing.org/t/building-library-with-openjdk/16232 "2019-12-08T17:46:21Z")

</div>

Hi folks, I understand that building Processing itself requires Oracle’s Java 8, but there is no mention of any restriction what can be used to build contributed libraries. (https://github.com/processing/processing/wiki…

---

## [Multiple Animations For Sprite using Sprite Library](https://discourse.processing.org/t/multiple-animations-for-sprite-using-sprite-library/15909)

<div class="topic-metadata">

**Author:** [@ky16](https://discourse.processing.org/u/ky16)\
**Replies:** 2\
**Last updated:** [December 8, 2019, 3:48pm UTC](https://discourse.processing.org/t/multiple-animations-for-sprite-using-sprite-library/15909 "2019-12-08T15:48:25Z")

</div>

I am trying to create a simple game that uses an animated sprite. I am trying to learn the sprite library however I am unsure how use multiple animations for my main character if I can only load in one animation sprite s…

---

## [G4P Library / GUI builder: Move control from main window to panel or secondary window?](https://discourse.processing.org/t/g4p-library-gui-builder-move-control-from-main-window-to-panel-or-secondary-window/16215)

<div class="topic-metadata">

**Author:** [@mark\_orion](https://discourse.processing.org/u/mark_orion)\
**Replies:** 1\
**Last updated:** [December 8, 2019, 3:43pm UTC](https://discourse.processing.org/t/g4p-library-gui-builder-move-control-from-main-window-to-panel-or-secondary-window/16215 "2019-12-08T15:43:56Z")

</div>

How do I move a control in G4P from the main window into a floating panel or a secondary window ? Ideally I would like to use drag and drop in the GUI builder tool, but it does not seem to support this. I tried fiddling …

---

## [Weird bug with this code](https://discourse.processing.org/t/weird-bug-with-this-code/16222)

<div class="topic-metadata">

**Author:** [@yes](https://discourse.processing.org/u/yes)\
**Replies:** 6\
**Last updated:** [December 8, 2019, 3:12pm UTC](https://discourse.processing.org/t/weird-bug-with-this-code/16222 "2019-12-08T15:12:59Z")

</div>

void setup() { size(720,1000); background(0); } void draw() { textSize(18); text(ROMNAME,100,100); } \` String ROMNAME = "UNTITLED"; // Open a file and read its binary data byte\[\] openbytes1 = loadBytes("sk…

---

## [Can I have conditionals in movieEvent?](https://discourse.processing.org/t/can-i-have-conditionals-in-movieevent/16244)

<div class="topic-metadata">

**Author:** [@Lane](https://discourse.processing.org/u/Lane)\
**Replies:** 3\
**Last updated:** [December 8, 2019, 12:19pm UTC](https://discourse.processing.org/t/can-i-have-conditionals-in-movieevent/16244 "2019-12-08T12:19:05Z")

</div>

Hello! I am trying to code something where if one button is pressed then a video will play and when another button is pressed then a different video will play. I tried to stick the videos in a mouseClicked function, but …

---

## [Solar system simulations and the Hohmann transfer orbit](https://discourse.processing.org/t/solar-system-simulations-and-the-hohmann-transfer-orbit/16242)

<div class="topic-metadata">

**Author:** [@O-O](https://discourse.processing.org/u/O-O)\
**Replies:** 1\
**Last updated:** [December 8, 2019, 12:03pm UTC](https://discourse.processing.org/t/solar-system-simulations-and-the-hohmann-transfer-orbit/16242 "2019-12-08T12:03:18Z")

</div>

import java.text.SimpleDateFormat; import java.util.Date; //======================================================================================== float eccentricity\[\] = {0,0.205,0.007,0.017,0.094,0.049,0.057,0.046,0.0…

---

## [Extract the exe from the application.windows64?](https://discourse.processing.org/t/extract-the-exe-from-the-application-windows64/16246)

<div class="topic-metadata">

**Author:** [@Asbyx](https://discourse.processing.org/u/Asbyx)\
**Replies:** 1\
**Last updated:** [December 8, 2019, 11:57am UTC](https://discourse.processing.org/t/extract-the-exe-from-the-application-windows64/16246 "2019-12-08T11:57:31Z")

</div>

Hello, I have done a little game, I have export it, so I do have the folder named “application.windows64” with everything in it. Is it possible to extract the exe from it ? Or just rename the folder ? I have tried but …

---

## [Why do I need to swap x with y?](https://discourse.processing.org/t/why-do-i-need-to-swap-x-with-y/16227)

<div class="topic-metadata">

**Author:** [@clankill3r](https://discourse.processing.org/u/clankill3r)\
**Replies:** 4\
**Last updated:** [December 8, 2019, 11:44am UTC](https://discourse.processing.org/t/why-do-i-need-to-swap-x-with-y/16227 "2019-12-08T11:44:48Z")

</div>

I made a script where I can interpolate between the corners of a quad to get a grid of points. First off all, I have a light headache, so maybe I understand it tomorrow. Why do I need to swap x and y to make the code…

---

## [MIDI: from Processing to DAW (Linux)](https://discourse.processing.org/t/midi-from-processing-to-daw-linux/5411)

<div class="topic-metadata">

**Author:** [@moscardo](https://discourse.processing.org/u/moscardo)\
**Replies:** 4\
**Last updated:** [December 8, 2019, 10:44am UTC](https://discourse.processing.org/t/midi-from-processing-to-daw-linux/5411 "2019-12-08T10:44:32Z")

</div>

Hi everybody, I’ve created a MIDI control GUI in Processing that I would have liked to link to Reaper to control some automation by sending MIDI CCs (using the MidiBus library). Unfortunately, different from what I exp…

---

## [Where does saveTable save?](https://discourse.processing.org/t/where-does-savetable-save/16220)

<div class="topic-metadata">

**Author:** [@yes](https://discourse.processing.org/u/yes)\
**Replies:** 2\
**Last updated:** [December 8, 2019, 6:49am UTC](https://discourse.processing.org/t/where-does-savetable-save/16220 "2019-12-08T06:49:05Z")

</div>

Does anybody know where save table saves?

---

## [Ellipse/circle clipping mask in 3d text output](https://discourse.processing.org/t/ellipse-circle-clipping-mask-in-3d-text-output/16193)

<div class="topic-metadata">

**Author:** [@add02one](https://discourse.processing.org/u/add02one)\
**Replies:** 1\
**Last updated:** [December 8, 2019, 5:21am UTC](https://discourse.processing.org/t/ellipse-circle-clipping-mask-in-3d-text-output/16193 "2019-12-08T05:21:28Z")

</div>

hi, I’m working on a project where text is output in 3d renderer rotating around various axis and moving across. Below is the simplified version. It uses rectangular mask through clip(), but i can’t find a way to make it…

---

## [NullPointerException error during coding](https://discourse.processing.org/t/nullpointerexception-error-during-coding/16229)

<div class="topic-metadata">

**Author:** [@unique\_username](https://discourse.processing.org/u/unique_username)\
**Replies:** 4\
**Last updated:** [December 8, 2019, 4:52am UTC](https://discourse.processing.org/t/nullpointerexception-error-during-coding/16229 "2019-12-08T04:52:45Z")

</div>

Hello. I’m working on a project using Peter Lager’s AI for 2D games library, and tried to make a program to see if I understood how the library is used, since I am new to the concept. The program would make a world with …

---

## [Servo glitches caused by Processing](https://discourse.processing.org/t/servo-glitches-caused-by-processing/16238)

<div class="topic-metadata">

**Author:** [@urthlight](https://discourse.processing.org/u/urthlight)\
**Replies:** 2\
**Last updated:** [December 8, 2019, 4:57am UTC](https://discourse.processing.org/t/servo-glitches-caused-by-processing/16238 "2019-12-08T04:57:25Z")

</div>

I have a little weirdness here. I do not know where this spasm is coming from. The servo moves are clean but the button pushes spasm almost every time. If I send data from the Serial monitor it is ok. Any ideas where thi…

---

## [Random Crashes and Unresponsive System](https://discourse.processing.org/t/random-crashes-and-unresponsive-system/16207)

<div class="topic-metadata">

**Author:** [@Fin](https://discourse.processing.org/u/Fin)\
**Replies:** 1\
**Last updated:** [December 8, 2019, 4:13am UTC](https://discourse.processing.org/t/random-crashes-and-unresponsive-system/16207 "2019-12-08T04:13:30Z")

</div>

I’m trying to make a game where you move in a 3D environment and a minor issue has appeared. Occasionally when I try to run my program it gives the error “Exception in thread “AWT-EventQueue-0” java.lang.OutOfMemoryError…

---

## [Communication between p5js and processing](https://discourse.processing.org/t/communication-between-p5js-and-processing/1444)

<div class="topic-metadata">

**Author:** [@proxycase](https://discourse.processing.org/u/proxycase)\
**Replies:** 5\
**Last updated:** [December 8, 2019, 3:16am UTC](https://discourse.processing.org/t/communication-between-p5js-and-processing/1444 "2019-12-08T03:16:13Z")

</div>

Wondering if there’s a good solution for back and forth communication between a p5.js server running on node and a processing sketch that people think work pretty flawlessly. I’ve tried UDP/OSC but js has 2000 ways to d…

---

## [Persisting the console log](https://discourse.processing.org/t/persisting-the-console-log/15877)

<div class="topic-metadata">

**Author:** [@Dandada](https://discourse.processing.org/u/Dandada)\
**Replies:** 6\
**Last updated:** [December 8, 2019, 1:18am UTC](https://discourse.processing.org/t/persisting-the-console-log/15877 "2019-12-08T01:18:33Z")

</div>

Is there, or can an option be added, to persist the console log in p5js after stopping a program. It would greatly help with debugging.

---

## [\[NOOB\]Programming posters tutorial by Tim Rodenbroker](https://discourse.processing.org/t/noob-programming-posters-tutorial-by-tim-rodenbroker/15897)

<div class="topic-metadata">

**Author:** [@vinceibay](https://discourse.processing.org/u/vinceibay)\
**Replies:** 2\
**Last updated:** [December 8, 2019, 1:15am UTC](https://discourse.processing.org/t/noob-programming-posters-tutorial-by-tim-rodenbroker/15897 "2019-12-08T01:15:51Z")

</div>

Helloi im new to Processing and really wanted to make Tim Rodenbrokers posters, I copied his code on this vid Code: /\* ======================================= PROGRAMMING POSTERS ========================…

---

## [How can I sort JSON by ID?](https://discourse.processing.org/t/how-can-i-sort-json-by-id/15924)

<div class="topic-metadata">

**Author:** [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Replies:** 22\
**Last updated:** [December 8, 2019, 12:46am UTC](https://discourse.processing.org/t/how-can-i-sort-json-by-id/15924 "2019-12-08T00:46:23Z")

</div>

Hello all, I am working on a complex JSON file. I load the entire file (list of items A and each item has different JSON-Arrays and JSON-Objects in it). I don’t copy it into an Array of a class but just work with the …

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

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