# Processing

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

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

**Page:** 22

---

## [How to warp an image](https://discourse.processing.org/t/how-to-warp-an-image/44386)

<div class="topic-metadata">

**Author:** [@doni](https://discourse.processing.org/u/doni)\
**Replies:** 8\
**Last updated:** [May 10, 2024, 8:30am UTC](https://discourse.processing.org/t/how-to-warp-an-image/44386 "2024-05-10T08:30:02Z")

</div>

hi i try to warp an image use following code but not works. need a help thank you PImage img; // Declare a variable to hold the image int widthTop = 102; // Example parameters int heightTop = 80; int widthBottom = 20; i…

---

## [Identical code works in Processing IDE, but not from VS Code/CLI](https://discourse.processing.org/t/identical-code-works-in-processing-ide-but-not-from-vs-code-cli/40124)

<div class="topic-metadata">

**Author:** [@blasphemy](https://discourse.processing.org/u/blasphemy)\
**Replies:** 2\
**Last updated:** [May 10, 2024, 7:29am UTC](https://discourse.processing.org/t/identical-code-works-in-processing-ide-but-not-from-vs-code-cli/40124 "2024-05-10T07:29:57Z")

</div>

I was going through this example from the website: Array 2D / Examples / Processing.org and I had no problem running it with the pre-built processing IDE. The file can also be run using CLI once saved to sketchbook. ada…

---

## [Pushing and Popping a PGraphics Grid (pushMatrix / popMatrix in a grid)](https://discourse.processing.org/t/pushing-and-popping-a-pgraphics-grid-pushmatrix-popmatrix-in-a-grid/44403)

<div class="topic-metadata">

**Author:** [@bdon](https://discourse.processing.org/u/bdon)\
**Replies:** 5\
**Last updated:** [May 8, 2024, 10:40am UTC](https://discourse.processing.org/t/pushing-and-popping-a-pgraphics-grid-pushmatrix-popmatrix-in-a-grid/44403 "2024-05-08T10:40:44Z")

</div>

Hi there - I was hoping to draw a basic grid of rectangles with PGraphics, but something I’m doing is wrong here and I’m not sure what it is. Can anyone shed some light? PGraphics img; void setup() { size(100, 10…

---

## [String Index Out Of Bounds Exception](https://discourse.processing.org/t/string-index-out-of-bounds-exception/44375)

<div class="topic-metadata">

**Author:** [@mohitSingh](https://discourse.processing.org/u/mohitSingh)\
**Replies:** 3\
**Last updated:** [May 8, 2024, 4:07am UTC](https://discourse.processing.org/t/string-index-out-of-bounds-exception/44375 "2024-05-08T04:07:03Z")

</div>

I am encountering a java.lang.StringIndexOutOfBoundsException when receiving data from a TCP server in my Processing application. The error occurs after sending a configuration command and receiving an acknowledgment fro…

---

## [Triangled terrain audio visualizer](https://discourse.processing.org/t/triangled-terrain-audio-visualizer/44384)

<div class="topic-metadata">

**Author:** [@funnyrectangles](https://discourse.processing.org/u/funnyrectangles)\
**Replies:** 3\
**Last updated:** [May 7, 2024, 1:27am UTC](https://discourse.processing.org/t/triangled-terrain-audio-visualizer/44384 "2024-05-07T01:27:21Z")

</div>

Inspired by Coding Challenge: 3D Terrain Generation with Perlin Noise I would like to create an audio visualizer that display several successive audio frames as a terrain. I managed to create a basic working sketch bu…

---

## [G4P Droplist - Can it open UP?](https://discourse.processing.org/t/g4p-droplist-can-it-open-up/44390)

<div class="topic-metadata">

**Author:** [@Thundercat](https://discourse.processing.org/u/Thundercat)\
**Replies:** 2\
**Last updated:** [May 6, 2024, 10:28am UTC](https://discourse.processing.org/t/g4p-droplist-can-it-open-up/44390 "2024-05-06T10:28:34Z")

</div>

OK here’s a little bit of a weird one, but I want to use a droplist at the bottom of the app window. But it drops DOWN only, so options are not visible. I can’t find a property to set it to open “upwards” instead of dow…

---

## [G4P TextArea/Textfield Length Filter - ALMOST working](https://discourse.processing.org/t/g4p-textarea-textfield-length-filter-almost-working/44363)

<div class="topic-metadata">

**Author:** [@Thundercat](https://discourse.processing.org/u/Thundercat)\
**Replies:** 12\
**Last updated:** [May 4, 2024, 5:02pm UTC](https://discourse.processing.org/t/g4p-textarea-textfield-length-filter-almost-working/44363 "2024-05-04T17:02:36Z")

</div>

Hi Peter, I started this as a new thread because the old one was really about filtering for data type. Based on your helpful sketch, I’ve implemented the following to limit character entry to 3 in a textAREA: public v…

---

## [Hello, just interesting b is link to a?](https://discourse.processing.org/t/hello-just-interesting-b-is-link-to-a/44376)

<div class="topic-metadata">

**Author:** [@zlfp](https://discourse.processing.org/u/zlfp)\
**Replies:** 3\
**Last updated:** [May 3, 2024, 2:24pm UTC](https://discourse.processing.org/t/hello-just-interesting-b-is-link-to-a/44376 "2024-05-03T14:24:44Z")

</div>

just interesting if we like do that int\[\] a = {1,2,3}; int\[\] b = a; b is link to a, or b is {1,2,3}? and if we redact b (if its link), we redact b or a? anyways, thanx

---

## [Why i can't do operations for arrays to arrays of custom classes](https://discourse.processing.org/t/why-i-cant-do-operations-for-arrays-to-arrays-of-custom-classes/44369)

<div class="topic-metadata">

**Author:** [@zlfp](https://discourse.processing.org/u/zlfp)\
**Replies:** 4\
**Last updated:** [May 2, 2024, 10:10am UTC](https://discourse.processing.org/t/why-i-cant-do-operations-for-arrays-to-arrays-of-custom-classes/44369 "2024-05-02T10:10:56Z")

</div>

shorter, there is the code we need class creature { float xp,yp; PImage ifa; } class animal extends creature { animal(float sxp,float syp,PImage sifa) { xp = sxp; yp = syp; ifa = sifa; } void NP(float n…

---

## [Beginner looking to translate sound to 'drawing'](https://discourse.processing.org/t/beginner-looking-to-translate-sound-to-drawing/44367)

<div class="topic-metadata">

**Author:** [@Lee14](https://discourse.processing.org/u/Lee14)\
**Replies:** 1\
**Last updated:** [May 1, 2024, 3:23pm UTC](https://discourse.processing.org/t/beginner-looking-to-translate-sound-to-drawing/44367 "2024-05-01T15:23:25Z")

</div>

I was wondering whether someone has some code which i can play with to take a recorded bit of sound and translate into graphic marks …

---

## [Using array of images to spawn enemies in game](https://discourse.processing.org/t/using-array-of-images-to-spawn-enemies-in-game/44341)

<div class="topic-metadata">

**Author:** [@dsdsdsds](https://discourse.processing.org/u/dsdsdsds)\
**Replies:** 9\
**Last updated:** [April 30, 2024, 8:48pm UTC](https://discourse.processing.org/t/using-array-of-images-to-spawn-enemies-in-game/44341 "2024-04-30T20:48:43Z")

</div>

Hi, I’m new to Processing and I’m trying to create a part of the game where enemies appear on the left side of the screen and move towards the right side of the screen in a 5 second interval. I’m using an array of image…

---

## [G4P textArea Questions (delete text in textArea, textArea text jittering)](https://discourse.processing.org/t/g4p-textarea-questions-delete-text-in-textarea-textarea-text-jittering/28645)

<div class="topic-metadata">

**Author:** [@C-Level-Increment](https://discourse.processing.org/u/C-Level-Increment)\
**Replies:** 17\
**Last updated:** [April 29, 2024, 3:16pm UTC](https://discourse.processing.org/t/g4p-textarea-questions-delete-text-in-textarea-textarea-text-jittering/28645 "2024-04-29T15:16:34Z")

</div>

Hi There, first of all: the G4P GUI builder is awesome, thanks for such a great tool. I am using the tool together with the grafica library to make a graphic plotter applet with multiple windows (main, settings, help…)…

---

## [Trying to convert shadertoy 'ping pong feedback' buffer(?) to Processing](https://discourse.processing.org/t/trying-to-convert-shadertoy-ping-pong-feedback-buffer-to-processing/43863)

<div class="topic-metadata">

**Author:** [@psamead](https://discourse.processing.org/u/psamead)\
**Replies:** 13\
**Last updated:** [April 28, 2024, 11:27pm UTC](https://discourse.processing.org/t/trying-to-convert-shadertoy-ping-pong-feedback-buffer-to-processing/43863 "2024-04-28T23:27:19Z")

</div>

Hi my friends, I am trying to convert this shadertoy effect to the porcessing with shaders. In the shadertoy solution, it appears the Buffer A tap loads a channel with a buffer b and the Buffer C tap loads channel with…

---

## [Operations on TableRow object? Can't find sum](https://discourse.processing.org/t/operations-on-tablerow-object-cant-find-sum/44360)

<div class="topic-metadata">

**Author:** [@syzygy](https://discourse.processing.org/u/syzygy)\
**Replies:** 6\
**Last updated:** [April 28, 2024, 9:55pm UTC](https://discourse.processing.org/t/operations-on-tablerow-object-cant-find-sum/44360 "2024-04-28T21:55:52Z")

</div>

/\*data.csv looks like this- header 1, 1, 1, \*/ Table table; table = loadTable("…

---

## [Problem with storing packed-data in a texture](https://discourse.processing.org/t/problem-with-storing-packed-data-in-a-texture/44317)

<div class="topic-metadata">

**Author:** [@Jon](https://discourse.processing.org/u/Jon)\
**Replies:** 17\
**Last updated:** [April 26, 2024, 10:59pm UTC](https://discourse.processing.org/t/problem-with-storing-packed-data-in-a-texture/44317 "2024-04-26T22:59:35Z")

</div>

Hello forum members, I’m new to using shaders in Processing and need some help please. There is something I don’t understand about my code and I’m hoping one of you experts will be able to give me some guidance. In sum…

---

## [Export sketch (using G4P) successful, but app run fails](https://discourse.processing.org/t/export-sketch-using-g4p-successful-but-app-run-fails/44345)

<div class="topic-metadata">

**Author:** [@Marcel](https://discourse.processing.org/u/Marcel)\
**Replies:** 7\
**Last updated:** [April 26, 2024, 8:25pm UTC](https://discourse.processing.org/t/export-sketch-using-g4p-successful-but-app-run-fails/44345 "2024-04-26T20:25:51Z")

</div>

Hey There, I did searched for any similar problems on the forum but unlucky to find anything that could help me further. I’ve created a sketch, using G4P, exported the file successfully ( Processing feedback window : …

---

## [Missing overlay elements!](https://discourse.processing.org/t/missing-overlay-elements/44351)

<div class="topic-metadata">

**Author:** [@Unnikrishna](https://discourse.processing.org/u/Unnikrishna)\
**Replies:** 6\
**Last updated:** [April 25, 2024, 6:03pm UTC](https://discourse.processing.org/t/missing-overlay-elements/44351 "2024-04-25T18:03:28Z")

</div>

My background image is loading correctly. However, the overlay elements above the background image is not appearing. These are the overlay elements not appearing: Draw overlay, Draw Agent, Agent, Draw agents with dynami…

---

## [Analyze sound without playing it out loud](https://discourse.processing.org/t/analyze-sound-without-playing-it-out-loud/44339)

<div class="topic-metadata">

**Author:** [@lucedan](https://discourse.processing.org/u/lucedan)\
**Replies:** 1\
**Last updated:** [April 25, 2024, 11:35am UTC](https://discourse.processing.org/t/analyze-sound-without-playing-it-out-loud/44339 "2024-04-25T11:35:05Z")

</div>

Hello, I am creating a patch to add visuals to my musical composition. So, I am planning to have a number of musical channels (in and out) in SuperCollider. Then, I would like to listen to have Processing listen to thes…

---

## [Help: Arduino Joystick Shield tracing a wave](https://discourse.processing.org/t/help-arduino-joystick-shield-tracing-a-wave/44295)

<div class="topic-metadata">

**Author:** [@jzeng21](https://discourse.processing.org/u/jzeng21)\
**Replies:** 1\
**Last updated:** [April 25, 2024, 10:57am UTC](https://discourse.processing.org/t/help-arduino-joystick-shield-tracing-a-wave/44295 "2024-04-25T10:57:37Z")

</div>

The goal of my project is using a ardunino leonardo with a joystick shield to trace a wave in processing. The joystick is able to control the y axis of the cursor (red dot) and the x is static. A generated wave moves acr…

---

## [Array and PGraphics](https://discourse.processing.org/t/array-and-pgraphics/44344)

<div class="topic-metadata">

**Author:** [@Erif](https://discourse.processing.org/u/Erif)\
**Replies:** 4\
**Last updated:** [April 24, 2024, 8:05pm UTC](https://discourse.processing.org/t/array-and-pgraphics/44344 "2024-04-24T20:05:55Z")

</div>

Hi everyone, I’m trying to run this PGraphics example where the output is shown in an off-screen graphics buffer (3000x3000 canvas), however it seems the mouseX,mouseY coordinates are being taken from the actual 500x500…

---

## [Player() class flies itself into the void on run](https://discourse.processing.org/t/player-class-flies-itself-into-the-void-on-run/44332)

<div class="topic-metadata">

**Author:** [@Superfixion16](https://discourse.processing.org/u/Superfixion16)\
**Replies:** 1\
**Last updated:** [April 23, 2024, 1:31am UTC](https://discourse.processing.org/t/player-class-flies-itself-into-the-void-on-run/44332 "2024-04-23T01:31:54Z")

</div>

Im working on creating movable players and wall collisions for my maze game, but whenever I run the code my player model instantly flies itself upwards. I know it’s something within my collision function, but I’ve looked…

---

## [New tab in Processing](https://discourse.processing.org/t/new-tab-in-processing/44330)

<div class="topic-metadata">

**Author:** [@Simon1](https://discourse.processing.org/u/Simon1)\
**Replies:** 6\
**Last updated:** [April 22, 2024, 7:57pm UTC](https://discourse.processing.org/t/new-tab-in-processing/44330 "2024-04-22T19:57:25Z")

</div>

Can someone please tell how to add code to a new tab please?

---

## [Digitech Retro Arcade Game Controller](https://discourse.processing.org/t/digitech-retro-arcade-game-controller/44313)

<div class="topic-metadata">

**Author:** [@tribblesontoast](https://discourse.processing.org/u/tribblesontoast)\
**Replies:** 5\
**Last updated:** [April 19, 2024, 7:40pm UTC](https://discourse.processing.org/t/digitech-retro-arcade-game-controller/44313 "2024-04-19T19:40:07Z")

</div>

Hi all, long time no see. Salient info: 2021 M1 Mac Sonoma 14.4.1 I have just received a Digitech Retro Arcade Game Controller that I’d like to incorporate into my processing projects. I assumed ( and after talking t…

---

## [How to open multiple windows?](https://discourse.processing.org/t/how-to-open-multiple-windows/44271)

<div class="topic-metadata">

**Author:** [@WillyGrz](https://discourse.processing.org/u/WillyGrz)\
**Replies:** 3\
**Last updated:** [April 19, 2024, 1:06am UTC](https://discourse.processing.org/t/how-to-open-multiple-windows/44271 "2024-04-19T01:06:18Z")

</div>

When you’re messing around for fun or something, I’m able to make the window move or resize if I want to. Is there a way to open multiple windows with the same code?

---

## [How make game independent of frame rate](https://discourse.processing.org/t/how-make-game-independent-of-frame-rate/44312)

<div class="topic-metadata">

**Author:** [@payalo](https://discourse.processing.org/u/payalo)\
**Replies:** 1\
**Last updated:** [April 18, 2024, 4:40pm UTC](https://discourse.processing.org/t/how-make-game-independent-of-frame-rate/44312 "2024-04-18T16:40:18Z")

</div>

how i can make game independent of frame rate? example: frame rate is 360 = all functions are perform 360 times per second frame rate is 240 = all functions are perform 240 times per second frame rate is 120 = all fu…

---

## [How to Access Class Properties in While Loop](https://discourse.processing.org/t/how-to-access-class-properties-in-while-loop/44282)

<div class="topic-metadata">

**Author:** [@Thundercat](https://discourse.processing.org/u/Thundercat)\
**Replies:** 26\
**Last updated:** [April 16, 2024, 1:50pm UTC](https://discourse.processing.org/t/how-to-access-class-properties-in-while-loop/44282 "2024-04-16T13:50:37Z")

</div>

Hi, I’ve got a sketch with a separate class file for buttons. I’m making an app, and I want to be able to click a button and run a void for serial communication. The void needs to be in its own loop so it can wait for se…

---

## [Why is hex(255,2) != hex(255,2)?](https://discourse.processing.org/t/why-is-hex-255-2-hex-255-2/44274)

<div class="topic-metadata">

**Author:** [@bbcwarrior](https://discourse.processing.org/u/bbcwarrior)\
**Replies:** 1\
**Last updated:** [April 14, 2024, 12:15am UTC](https://discourse.processing.org/t/why-is-hex-255-2-hex-255-2/44274 "2024-04-14T00:15:47Z")

</div>

Why doesn’t this piece of code output anything: if(hex(255,2) == hex(255,2)) { println("foo"); } But this one does?: if(unhex(hex(255,2)) == unhex(hex(255,2))) { println("bar"); }

---

## [P5.js translation to Processing (saving frames)](https://discourse.processing.org/t/p5-js-translation-to-processing-saving-frames/44267)

<div class="topic-metadata">

**Author:** [@humano](https://discourse.processing.org/u/humano)\
**Replies:** 7\
**Last updated:** [April 13, 2024, 1:29pm UTC](https://discourse.processing.org/t/p5-js-translation-to-processing-saving-frames/44267 "2024-04-13T13:29:10Z")

</div>

Hello! I am working with an open processing sketch of constructivist art. I have translated to processing and I am trying to save a picture everytime the animation stops, but it makes the sketch so slow and it rewrite t…

---

## [How to Highlight Text in a ControlP5 Textfield?](https://discourse.processing.org/t/how-to-highlight-text-in-a-controlp5-textfield/44256)

<div class="topic-metadata">

**Author:** [@Thundercat](https://discourse.processing.org/u/Thundercat)\
**Replies:** 26\
**Last updated:** [April 11, 2024, 2:36pm UTC](https://discourse.processing.org/t/how-to-highlight-text-in-a-controlp5-textfield/44256 "2024-04-11T14:36:02Z")

</div>

I’m feeling rather dense ATM, but I’m using the standard example that comes with Control5P for text fields, and I cannot seem to highlight text that I enter. I want to the user to be able to type something, then highligh…

---

## [G4P Lib - Slow Loading & GUI Builder Crashing Issues](https://discourse.processing.org/t/g4p-lib-slow-loading-gui-builder-crashing-issues/44250)

<div class="topic-metadata">

**Author:** [@Thundercat](https://discourse.processing.org/u/Thundercat)\
**Replies:** 7\
**Last updated:** [April 11, 2024, 2:04pm UTC](https://discourse.processing.org/t/g4p-lib-slow-loading-gui-builder-crashing-issues/44250 "2024-04-11T14:04:07Z")

</div>

Hi, two general issues, on a terrific library. 1). I noticed if I have some G4P controls, like toggle buttons or sliders, or whatever, and also the sketch has some static elements I’m drawing in draw(), like rectangles …

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

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