# Latest

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

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

**Page:** 225

---

## [Having trouble understanding why the information is not being passed correctly in p5js](https://discourse.processing.org/t/having-trouble-understanding-why-the-information-is-not-being-passed-correctly-in-p5js/30010)

<div class="topic-metadata">

**Author:** [@Bife](https://discourse.processing.org/u/Bife)\
**Replies:** 1\
**Last updated:** [May 10, 2021, 7:28pm UTC](https://discourse.processing.org/t/having-trouble-understanding-why-the-information-is-not-being-passed-correctly-in-p5js/30010 "2021-05-10T19:28:42Z")

</div>

I’ll start of by posting the link to the code: https://editor.p5js.org/bsilva.aulas/sketches/T0NVv6ya4 So this was something my teacher did in one of our classes, but didn’t finish, and hasn’t gone back to it, and I’m …

---

## [Need clarification on how this piece of found code is working (recursion)](https://discourse.processing.org/t/need-clarification-on-how-this-piece-of-found-code-is-working-recursion/29969)

<div class="topic-metadata">

**Author:** [@debxyz](https://discourse.processing.org/u/debxyz)\
**Replies:** 5\
**Last updated:** [May 10, 2021, 4:08pm UTC](https://discourse.processing.org/t/need-clarification-on-how-this-piece-of-found-code-is-working-recursion/29969 "2021-05-10T16:08:44Z")

</div>

Hello! I am trying to understand how a sketch works that I saw on the openprocessing.org site by Naoto Hieda. The use of “level” in this sketch, I am not fully understanding. And it’s probably a very simple oversight o…

---

## [How do i ensure preload() has finished?](https://discourse.processing.org/t/how-do-i-ensure-preload-has-finished/30006)

<div class="topic-metadata">

**Author:** [@whatsinausername](https://discourse.processing.org/u/whatsinausername)\
**Replies:** 7\
**Last updated:** [May 10, 2021, 3:23pm UTC](https://discourse.processing.org/t/how-do-i-ensure-preload-has-finished/30006 "2021-05-10T15:23:45Z")

</div>

i’m attempting to use p5.js for some audio processing and phaser.js for some game code. function phaser\_preload() { boop = loadSound('boop.wav'); } function phaser\_create() { fft = new p5.FFT(); boop.play();…

---

## [Node.js and JSON syntax error in a p5 project](https://discourse.processing.org/t/node-js-and-json-syntax-error-in-a-p5-project/29996)

<div class="topic-metadata">

**Author:** [@mattobject](https://discourse.processing.org/u/mattobject)\
**Replies:** 4\
**Last updated:** [May 10, 2021, 2:45pm UTC](https://discourse.processing.org/t/node-js-and-json-syntax-error-in-a-p5-project/29996 "2021-05-10T14:45:40Z")

</div>

Hello all has anyone found success deploying a Node.js/p5 project to Bluehost? I have a working project (locally and on heroku and gltich) but the same project craps out on Bluehost with an “Uncaught (in promise) Syntax…

---

## [P5.js copy function slow performance since version 0.10.0](https://discourse.processing.org/t/p5-js-copy-function-slow-performance-since-version-0-10-0/30007)

<div class="topic-metadata">

**Author:** [@Esi](https://discourse.processing.org/u/Esi)\
**Replies:** 2\
**Last updated:** [May 10, 2021, 12:15pm UTC](https://discourse.processing.org/t/p5-js-copy-function-slow-performance-since-version-0-10-0/30007 "2021-05-10T12:15:19Z")

</div>

Hey everyone, my question is about the copy function. As many before I tried to recreate the tutorial of Tim Rodenbröcker about kinetic typography with p5. It runs very slow (3fps) in the current p5 version 1.3.1, but w…

---

## [How to run 2 java sketches in a single window](https://discourse.processing.org/t/how-to-run-2-java-sketches-in-a-single-window/29908)

<div class="topic-metadata">

**Author:** [@chaima](https://discourse.processing.org/u/chaima)\
**Replies:** 11\
**Last updated:** [May 10, 2021, 9:00am UTC](https://discourse.processing.org/t/how-to-run-2-java-sketches-in-a-single-window/29908 "2021-05-10T09:00:38Z")

</div>

Hello, I need to run two independent sketches in a single window. Is there any way to divide the window into 2 frames and run each sketch in a frame?

---

## [Easiest way to save a canvas for access on the next webpage?](https://discourse.processing.org/t/easiest-way-to-save-a-canvas-for-access-on-the-next-webpage/29985)

<div class="topic-metadata">

**Author:** [@Gershy13](https://discourse.processing.org/u/Gershy13)\
**Replies:** 7\
**Last updated:** [May 10, 2021, 7:55am UTC](https://discourse.processing.org/t/easiest-way-to-save-a-canvas-for-access-on-the-next-webpage/29985 "2021-05-10T07:55:48Z")

</div>

If i needed to save the p5 canvas as an image file to somewhere on the webserver, and then have the next page pick it up and display it as a standard html image? How would I do this? I’m assuming i need to use PHP or som…

---

## [How do i make an object bounce off another](https://discourse.processing.org/t/how-do-i-make-an-object-bounce-off-another/29999)

<div class="topic-metadata">

**Author:** [@cloofs](https://discourse.processing.org/u/cloofs)\
**Replies:** 1\
**Last updated:** [May 10, 2021, 4:19am UTC](https://discourse.processing.org/t/how-do-i-make-an-object-bounce-off-another/29999 "2021-05-10T04:19:43Z")

</div>

I’m doing a code where i want a ball(pong) to bounce off a rectangle(bouncer). does anyone know the code for a bounce off?

---

## [Bouncing line with for loops](https://discourse.processing.org/t/bouncing-line-with-for-loops/29972)

<div class="topic-metadata">

**Author:** [@Bromo](https://discourse.processing.org/u/Bromo)\
**Replies:** 15\
**Last updated:** [May 10, 2021, 1:06am UTC](https://discourse.processing.org/t/bouncing-line-with-for-loops/29972 "2021-05-10T01:06:44Z")

</div>

Hi, I’m currently trying to make a program that draws a line moving across the screen, if it reaches the edge ideally it’ll move in the opposite direction. When I run the program it seems to be stuck on the far left side…

---

## [Arc in layer. How to put an arc() in a layer](https://discourse.processing.org/t/arc-in-layer-how-to-put-an-arc-in-a-layer/29991)

<div class="topic-metadata">

**Author:** [@patricio1979](https://discourse.processing.org/u/patricio1979)\
**Replies:** 9\
**Last updated:** [May 9, 2021, 10:48pm UTC](https://discourse.processing.org/t/arc-in-layer-how-to-put-an-arc-in-a-layer/29991 "2021-05-09T22:48:25Z")

</div>

let botonito, indice=-1, segmentos=\[\], global\_layer; let a,b,c,d,e,f; function setup() { var ww = windowWidth, wh = windowHeight; var wwg = ww/20, whg = wh/20; let uno = \[wwg\*8,whg\*2,wwg\*8,whg,3.14,6.28\], dos = …

---

## [3.3.6 Manual set-up](https://discourse.processing.org/t/3-3-6-manual-set-up/29987)

<div class="topic-metadata">

**Author:** [@delorean](https://discourse.processing.org/u/delorean)\
**Replies:** 2\
**Last updated:** [May 9, 2021, 10:36pm UTC](https://discourse.processing.org/t/3-3-6-manual-set-up/29987 "2021-05-09T22:36:32Z")

</div>

Hello, Processing community, I hope you can help, I have an old version of Processing 3.3.6 which I am moving from one computer to another. I have a sketch which uses video and webcam, it opens but hangs, and I think i…

---

## [Simple java TTS (text-to-speech) library / tool](https://discourse.processing.org/t/simple-java-tts-text-to-speech-library-tool/29986)

<div class="topic-metadata">

**Author:** [@CodeMasterX](https://discourse.processing.org/u/CodeMasterX)\
**Replies:** 1\
**Last updated:** [May 9, 2021, 2:35pm UTC](https://discourse.processing.org/t/simple-java-tts-text-to-speech-library-tool/29986 "2021-05-09T14:35:37Z")

</div>

Hi! I recently received a request for a text to speech program with a pause button. Is there any java library that has simple syntax and sounds understandable? Thank you.

---

## [Display PImage array elements in specific locations](https://discourse.processing.org/t/display-pimage-array-elements-in-specific-locations/29979)

<div class="topic-metadata">

**Author:** [@12345](https://discourse.processing.org/u/12345)\
**Replies:** 2\
**Last updated:** [May 9, 2021, 10:20am UTC](https://discourse.processing.org/t/display-pimage-array-elements-in-specific-locations/29979 "2021-05-09T10:20:36Z")

</div>

Hi! I’ve written a sketch that loads one PImage then slices this image into 16 equal (200px x 200px) “slices”. I have then created an array of PImage “slices” with 16 slots. I have written a for loop to look through the …

---

## [Save mouse coordinates and draw arrows with it](https://discourse.processing.org/t/save-mouse-coordinates-and-draw-arrows-with-it/29982)

<div class="topic-metadata">

**Author:** [@elenanito](https://discourse.processing.org/u/elenanito)\
**Replies:** 2\
**Last updated:** [May 9, 2021, 12:26pm UTC](https://discourse.processing.org/t/save-mouse-coordinates-and-draw-arrows-with-it/29982 "2021-05-09T12:26:06Z")

</div>

Im working on a program that draws arrows with the mouse, so for the tip of the arrow to be pointing in the right direction Im using PVector (one for the base and one for the tip of the arrow). I made it work so you can …

---

## [Generate editable drawing of audio waveform from audio file in p5js?](https://discourse.processing.org/t/generate-editable-drawing-of-audio-waveform-from-audio-file-in-p5js/29926)

<div class="topic-metadata">

**Author:** [@Gershy13](https://discourse.processing.org/u/Gershy13)\
**Replies:** 7\
**Last updated:** [May 9, 2021, 12:22pm UTC](https://discourse.processing.org/t/generate-editable-drawing-of-audio-waveform-from-audio-file-in-p5js/29926 "2021-05-09T12:22:12Z")

</div>

Can anyone help me? Im trying to draw a audio waveform of an mp3 file in p5js. Essentially like what you would see on the track in a DAW like LogicPro/Audacity/Adobe Audition. I want the full track to be generated as a d…

---

## [Text function wrapping - Hyphens vs Full word line break](https://discourse.processing.org/t/text-function-wrapping-hyphens-vs-full-word-line-break/29975)

<div class="topic-metadata">

**Author:** [@mikthelegend](https://discourse.processing.org/u/mikthelegend)\
**Replies:** 2\
**Last updated:** [May 9, 2021, 11:12am UTC](https://discourse.processing.org/t/text-function-wrapping-hyphens-vs-full-word-line-break/29975 "2021-05-09T11:12:02Z")

</div>

Hello! I’m having trouble using the text() function in p5.js. I understand that when you provide 5 inputs to the function, the last four describe a rectangle in which it will wrap your provided string. However, in some …

---

## [Using swipe with p5.js](https://discourse.processing.org/t/using-swipe-with-p5-js/24287)

<div class="topic-metadata">

**Author:** [@BSiemens](https://discourse.processing.org/u/BSiemens)\
**Replies:** 1\
**Last updated:** [May 9, 2021, 8:27am UTC](https://discourse.processing.org/t/using-swipe-with-p5-js/24287 "2021-05-09T08:27:13Z")

</div>

Does anyone know of an example of the proper implementation of swipe left/right/up/down on mobile?

---

## [Making random only appear once](https://discourse.processing.org/t/making-random-only-appear-once/29783)

<div class="topic-metadata">

**Author:** [@yagirl\_belle](https://discourse.processing.org/u/yagirl_belle)\
**Replies:** 5\
**Last updated:** [May 9, 2021, 1:47am UTC](https://discourse.processing.org/t/making-random-only-appear-once/29783 "2021-05-09T01:47:20Z")

</div>

PLEASE DO NOT RUN THIS CODE IF YOU HAVE EPILEPSY So I was able to create randomly generated green colours for a golf course, however it is consistently running and I don’t know what kind of ‘if’ statement I should be pu…

---

## [Animate vertex shapes on p5.js](https://discourse.processing.org/t/animate-vertex-shapes-on-p5-js/29966)

<div class="topic-metadata">

**Author:** [@yaelmogyoros](https://discourse.processing.org/u/yaelmogyoros)\
**Replies:** 1\
**Last updated:** [May 8, 2021, 7:54pm UTC](https://discourse.processing.org/t/animate-vertex-shapes-on-p5-js/29966 "2021-05-08T19:54:24Z")

</div>

hello everybody I have difficulty doing my homework. I need to make the tears I created using the curveVertex disappear one after the other like a timer and I tried everything everything i learned and I can’t figure ou…

---

## [When i build this application it just makes a blank grey window](https://discourse.processing.org/t/when-i-build-this-application-it-just-makes-a-blank-grey-window/28642)

<div class="topic-metadata">

**Author:** [@canslp](https://discourse.processing.org/u/canslp)\
**Replies:** 5\
**Last updated:** [May 8, 2021, 10:17pm UTC](https://discourse.processing.org/t/when-i-build-this-application-it-just-makes-a-blank-grey-window/28642 "2021-05-08T22:17:46Z")

</div>

okay i’m sure this is a very common problem but i haven’t found anything helpful, i’m just getting a totally blank grey sketch window when building a processing app for mac. this is the first time i’ve had this error, ev…

---

## [Using Vertex in for loop to generate a curve](https://discourse.processing.org/t/using-vertex-in-for-loop-to-generate-a-curve/29964)

<div class="topic-metadata">

**Author:** [@ChadKagan](https://discourse.processing.org/u/ChadKagan)\
**Replies:** 4\
**Last updated:** [May 8, 2021, 8:43pm UTC](https://discourse.processing.org/t/using-vertex-in-for-loop-to-generate-a-curve/29964 "2021-05-08T20:43:27Z")

</div>

Hello, We are trying to draw a curve based on a formula that takes control points clicked on a canvas and generates a cubic B Spline curve. Our functions generate a series of points that should lie on the curve, but the…

---

## [While loop is not working in processing](https://discourse.processing.org/t/while-loop-is-not-working-in-processing/29954)

<div class="topic-metadata">

**Author:** [@nothingelse](https://discourse.processing.org/u/nothingelse)\
**Replies:** 8\
**Last updated:** [May 8, 2021, 6:09pm UTC](https://discourse.processing.org/t/while-loop-is-not-working-in-processing/29954 "2021-05-08T18:09:32Z")

</div>

I am beginner in processing, just started few days ago. I am learning while loop now but when i run the program, while loop does not seem to be working. I tried so much but still don’t know what problem is occuring floa…

---

## [Why does drawing an image for the first time slow down the sketch](https://discourse.processing.org/t/why-does-drawing-an-image-for-the-first-time-slow-down-the-sketch/29909)

<div class="topic-metadata">

**Author:** [@s31](https://discourse.processing.org/u/s31)\
**Replies:** 10\
**Last updated:** [May 8, 2021, 1:38pm UTC](https://discourse.processing.org/t/why-does-drawing-an-image-for-the-first-time-slow-down-the-sketch/29909 "2021-05-08T13:38:35Z")

</div>

Every time my code uses a new image, my sketch slows down considerably and I don’t understand why. I’m loading all of my images in the setup() function like everyone says I should, so I don’t understand why this is happe…

---

## [Create Visual Scripting Tool / Mode](https://discourse.processing.org/t/create-visual-scripting-tool-mode/29958)

<div class="topic-metadata">

**Author:** [@Flolo](https://discourse.processing.org/u/Flolo)\
**Replies:** 1\
**Last updated:** [May 8, 2021, 10:45am UTC](https://discourse.processing.org/t/create-visual-scripting-tool-mode/29958 "2021-05-08T10:45:28Z")

</div>

Hey, I recently watched a few videos about Unreal Engines Blueprint (Visual Scripting Language) and wondered if I could program a mode / tool for processing (JAVA) with which you can visual script. I would like to do it…

---

## [Anyone know how to Convert p5js to processing?](https://discourse.processing.org/t/anyone-know-how-to-convert-p5js-to-processing/29952)

<div class="topic-metadata">

**Author:** [@98Mabs](https://discourse.processing.org/u/98Mabs)\
**Replies:** 2\
**Last updated:** [May 8, 2021, 8:49am UTC](https://discourse.processing.org/t/anyone-know-how-to-convert-p5js-to-processing/29952 "2021-05-08T08:49:51Z")

</div>

Hi guys, could anyone help me converting this code into Processing please? i really dont know how to convert it, and when i do it with the processing manual it doesn’t work…

---

## [Slow down object's speed](https://discourse.processing.org/t/slow-down-objects-speed/29937)

<div class="topic-metadata">

**Author:** [@akira](https://discourse.processing.org/u/akira)\
**Replies:** 11\
**Last updated:** [May 8, 2021, 7:13am UTC](https://discourse.processing.org/t/slow-down-objects-speed/29937 "2021-05-08T07:13:38Z")

</div>

Hello! I’m a bit stuck with my conditional statement for this basic program I’m working on. Two objects at different y coordinates start moving towards the width of the screen at varying speeds. When they approach each o…

---

## [P5 pixel array to copy canvas region to Image object](https://discourse.processing.org/t/p5-pixel-array-to-copy-canvas-region-to-image-object/29946)

<div class="topic-metadata">

**Author:** [@mattobject](https://discourse.processing.org/u/mattobject)\
**Replies:** 4\
**Last updated:** [May 8, 2021, 12:23am UTC](https://discourse.processing.org/t/p5-pixel-array-to-copy-canvas-region-to-image-object/29946 "2021-05-08T00:23:19Z")

</div>

Working on a project that uses the webcam, lays some graphics on top of the cam image, then I need to store the cam image with the overlayed graphics in an Image object variable. Currently, my code works but the resultin…

---

## [Reflect color of one object to another object through cursor position](https://discourse.processing.org/t/reflect-color-of-one-object-to-another-object-through-cursor-position/29888)

<div class="topic-metadata">

**Author:** [@joelm03](https://discourse.processing.org/u/joelm03)\
**Replies:** 13\
**Last updated:** [May 7, 2021, 2:49pm UTC](https://discourse.processing.org/t/reflect-color-of-one-object-to-another-object-through-cursor-position/29888 "2021-05-07T14:49:27Z")

</div>

I am trying to have a gradient RGB rectangle to reflect each color on a bigger rectangle depending on the mouse’s position. I was able to come up with this: void draw() { noStroke(); for (i = 0;i \< width; i++) { fil…

---

## [Function parameters causing unwanted animation](https://discourse.processing.org/t/function-parameters-causing-unwanted-animation/29940)

<div class="topic-metadata">

**Author:** [@theta](https://discourse.processing.org/u/theta)\
**Replies:** 1\
**Last updated:** [May 7, 2021, 2:38pm UTC](https://discourse.processing.org/t/function-parameters-causing-unwanted-animation/29940 "2021-05-07T14:38:48Z")

</div>

Hey everyone. I started exploring functions with parameters and can’t for the life of me figure out why the example below is animating. Waves w1 = new Waves(); float amp = 100; float phase = 1; float freq = 100; float …

---

## [Question: Running multiple draw loops simultaneously in a grid](https://discourse.processing.org/t/question-running-multiple-draw-loops-simultaneously-in-a-grid/29927)

<div class="topic-metadata">

**Author:** [@markcburke](https://discourse.processing.org/u/markcburke)\
**Replies:** 5\
**Last updated:** [May 7, 2021, 1:29pm UTC](https://discourse.processing.org/t/question-running-multiple-draw-loops-simultaneously-in-a-grid/29927 "2021-05-07T13:29:54Z")

</div>

I’m quite new to processing and am interested in using it to generate grids of semi-randomized objects of various kinds. I’ve managed to produce code that can generate the kind of objects that I want, but I don’t know ho…

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

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