# Processing

**URL:** https://discourse.processing.org/c/processing/6.md?no_subcategories=false&page=251

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

**Page:** 252

---

## [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…

---

## [\[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 …

---

## [Boolean trouble or something](https://discourse.processing.org/t/boolean-trouble-or-something/16217)

<div class="topic-metadata">

**Author:** [@ddownn](https://discourse.processing.org/u/ddownn)\
**Replies:** 9\
**Last updated:** [December 8, 2019, 12:38am UTC](https://discourse.processing.org/t/boolean-trouble-or-something/16217 "2019-12-08T00:38:06Z")

</div>

I can’t see why the value of pressLoc is constantly updated to the mouse PVector while the mouse is pressed and dragged around. Can someone please help me? PVector m, pressLoc; float dragDist; boolean firstPressCapture…

---

## [How to make curveTightness() setting affect curvePoint() / get the points of a curve affected by curveTightness()?](https://discourse.processing.org/t/how-to-make-curvetightness-setting-affect-curvepoint-get-the-points-of-a-curve-affected-by-curvetightness/16228)

<div class="topic-metadata">

**Author:** [@benjaminmarkus](https://discourse.processing.org/u/benjaminmarkus)\
**Replies:** 1\
**Last updated:** [December 7, 2019, 7:45pm UTC](https://discourse.processing.org/t/how-to-make-curvetightness-setting-affect-curvepoint-get-the-points-of-a-curve-affected-by-curvetightness/16228 "2019-12-07T19:45:24Z")

</div>

There’s the curveTightness() function which sets how a curve drawn using either curve() or curveVertex() is rendered, but it does not seem to affect the points returned by curvePoint(), which are always points of a curve…

---

## [Cannot convert from boolean to int](https://discourse.processing.org/t/cannot-convert-from-boolean-to-int/16218)

<div class="topic-metadata">

**Author:** [@Ardy2743](https://discourse.processing.org/u/Ardy2743)\
**Replies:** 7\
**Last updated:** [December 7, 2019, 6:09pm UTC](https://discourse.processing.org/t/cannot-convert-from-boolean-to-int/16218 "2019-12-07T18:09:09Z")

</div>

Hey! I’m new to Arduino and Processing I’m making a game and I want to play a certain sound when I or the CPU scores on Arduino. I’m getting the error cannot convert from boolean to int I don’t know what I’m doing wrong…

---

## [Code snippet needed](https://discourse.processing.org/t/code-snippet-needed/16200)

<div class="topic-metadata">

**Author:** [@urthlight](https://discourse.processing.org/u/urthlight)\
**Replies:** 4\
**Last updated:** [December 7, 2019, 5:21pm UTC](https://discourse.processing.org/t/code-snippet-needed/16200 "2019-12-07T17:21:16Z")

</div>

Does anyone have a more advanced handshaking sketch? Sensor data from Nano. Buttons and sliders from Processing to variables in the nano

---

## [Is there a way to make events happen at specific times?](https://discourse.processing.org/t/is-there-a-way-to-make-events-happen-at-specific-times/16211)

<div class="topic-metadata">

**Author:** [@pw00](https://discourse.processing.org/u/pw00)\
**Replies:** 10\
**Last updated:** [December 7, 2019, 4:14pm UTC](https://discourse.processing.org/t/is-there-a-way-to-make-events-happen-at-specific-times/16211 "2019-12-07T16:14:03Z")

</div>

I’m trying make it seem like a certain portion of an image “rots” (by using tint) after a certain time to show the decomposition rates of different types of recyclables and what not, but I can’t seem to find any tutorial…

---

## [Question about mousePressed](https://discourse.processing.org/t/question-about-mousepressed/16142)

<div class="topic-metadata">

**Author:** [@pw00](https://discourse.processing.org/u/pw00)\
**Replies:** 10\
**Last updated:** [December 7, 2019, 12:10pm UTC](https://discourse.processing.org/t/question-about-mousepressed/16142 "2019-12-07T12:10:33Z")

</div>

So I’m trying to figure out how to make one of my images appear and stay ON SCREEN with mousePressed, but it always goes away. Is there a way I can make it stay on screen? (I’ve also tried to do the same with mouseClicke…

---

## [How can I program a room full of objects during runtime](https://discourse.processing.org/t/how-can-i-program-a-room-full-of-objects-during-runtime/15330)

<div class="topic-metadata">

**Author:** [@Rutger](https://discourse.processing.org/u/Rutger)\
**Replies:** 11\
**Last updated:** [December 7, 2019, 11:30am UTC](https://discourse.processing.org/t/how-can-i-program-a-room-full-of-objects-during-runtime/15330 "2019-12-07T11:30:08Z")

</div>

Sorry for the confusing title, i’m trying to make an abstract project i’m not a native English speaker. I’m trying to make a ‘zoo’ with creatures that were programmed by people during an event. These people will progra…

---

## [Loadstrings with Umlauts Umlaut Umlaute / CSV from Excel](https://discourse.processing.org/t/loadstrings-with-umlauts-umlaut-umlaute-csv-from-excel/16132)

<div class="topic-metadata">

**Author:** [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Replies:** 10\
**Last updated:** [December 7, 2019, 10:14am UTC](https://discourse.processing.org/t/loadstrings-with-umlauts-umlaut-umlaute-csv-from-excel/16132 "2019-12-07T10:14:32Z")

</div>

Hello all, I am loading / loadstrings a CSV with swedish Umlauts öå They don’t come out right - What can I do? // ------------------------------------------------------------------------------------------- // loa…

---

## [Textures with beginContour](https://discourse.processing.org/t/textures-with-begincontour/16206)

<div class="topic-metadata">

**Author:** [@Fin](https://discourse.processing.org/u/Fin)\
**Replies:** 0\
**Last updated:** [December 7, 2019, 7:38am UTC](https://discourse.processing.org/t/textures-with-begincontour/16206 "2019-12-07T07:38:37Z")

</div>

I created a plane with a texture applied and it worked fine. I tried adding a hole in the centre using the beginContour(); function, but doing this however seemed to frick up the textures and I’m not sure how to fix them…

---

## [Minesweeper Game Function Help](https://discourse.processing.org/t/minesweeper-game-function-help/16126)

<div class="topic-metadata">

**Author:** [@IsaiahZ](https://discourse.processing.org/u/IsaiahZ)\
**Replies:** 8\
**Last updated:** [December 7, 2019, 5:38am UTC](https://discourse.processing.org/t/minesweeper-game-function-help/16126 "2019-12-07T05:38:20Z")

</div>

Hi all, I’m attempting to make a minesweeper game. I’ve been given a template and am working off of that. Right now my problem is two things: I need to write a function (I have it called drawMines), where it will acce…

---

## [Saving a frame to be printed in large format](https://discourse.processing.org/t/saving-a-frame-to-be-printed-in-large-format/16120)

<div class="topic-metadata">

**Author:** [@bp396](https://discourse.processing.org/u/bp396)\
**Replies:** 2\
**Last updated:** [December 7, 2019, 5:13am UTC](https://discourse.processing.org/t/saving-a-frame-to-be-printed-in-large-format/16120 "2019-12-07T05:13:48Z")

</div>

I am running a sketch that involves interaction so that I need to be able to see the entire sketch while it is running. I would like to run the sketch at a large size so that I have a high resolution output for the fram…

---

## [Particles reactive to sound](https://discourse.processing.org/t/particles-reactive-to-sound/15798)

<div class="topic-metadata">

**Author:** [@marcoo](https://discourse.processing.org/u/marcoo)\
**Replies:** 1\
**Last updated:** [December 7, 2019, 5:06am UTC](https://discourse.processing.org/t/particles-reactive-to-sound/15798 "2019-12-07T05:06:49Z")

</div>

Hi, i’m new at generative design/art and i was looking how i could create reactive particles to sound. What i have its the code of daniel shiffman of “particle system” and i want to add a music and see particles appearin…

[Previous page](https://discourse.processing.org/c/processing/6.md?no_subcategories=false&page=250)

[Next page](https://discourse.processing.org/c/processing/6.md?no_subcategories=false&page=252)
