# Latest

**URL:** https://discourse.processing.org/latest.md?no_subcategories=false&page=341

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

**Page:** 342

---

## [Getting amplitude of multiple p5.Oscillators without using multiple p5.Amplitudes](https://discourse.processing.org/t/getting-amplitude-of-multiple-p5-oscillators-without-using-multiple-p5-amplitudes/21503)

<div class="topic-metadata">

**Author:** [@umutreldem](https://discourse.processing.org/u/umutreldem)\
**Replies:** 0\
**Last updated:** [June 2, 2020, 3:02pm UTC](https://discourse.processing.org/t/getting-amplitude-of-multiple-p5-oscillators-without-using-multiple-p5-amplitudes/21503 "2020-06-02T15:02:46Z")

</div>

I would like to create multiple oscillators, and tie the current amplitude of each to a color dimension. Oscillator 1’s amplitude is scaled to 0-255 Red value, 2 to Green, and so on. The problem is, setting multiple p5.…

---

## [Why doesn't this code work? (Noob question)](https://discourse.processing.org/t/why-doesnt-this-code-work-noob-question/21483)

<div class="topic-metadata">

**Author:** [@panic](https://discourse.processing.org/u/panic)\
**Replies:** 2\
**Last updated:** [June 2, 2020, 12:57pm UTC](https://discourse.processing.org/t/why-doesnt-this-code-work-noob-question/21483 "2020-06-02T12:57:45Z")

</div>

please format code with \</\> button \* homework policy \* asking questions I am new to processing and I had doubts when creating a code for a project. I want that detecting the face with the camera produces changes in …

---

## [Passing a parameter through a thread](https://discourse.processing.org/t/passing-a-parameter-through-a-thread/21498)

<div class="topic-metadata">

**Author:** [@paulgoux](https://discourse.processing.org/u/paulgoux)\
**Replies:** 1\
**Last updated:** [June 2, 2020, 8:06am UTC](https://discourse.processing.org/t/passing-a-parameter-through-a-thread/21498 "2020-06-02T08:06:33Z")

</div>

Hi again everyone, currently stuck on a problem, I wish to create multiple threads to maximize cpu usage as I understand processing only uses the one thread by default, (perhaps this is java by default). I have done some…

---

## [FrameRate drop when I play movie](https://discourse.processing.org/t/framerate-drop-when-i-play-movie/21480)

<div class="topic-metadata">

**Author:** [@OohYuma](https://discourse.processing.org/u/OohYuma)\
**Replies:** 4\
**Last updated:** [June 2, 2020, 7:43am UTC](https://discourse.processing.org/t/framerate-drop-when-i-play-movie/21480 "2020-06-02T07:43:40Z")

</div>

ArrayList\<Integer\> x = new ArrayList\<Integer\>(), y = new ArrayList\<Integer\>(); import processing.sound.\*; SoundFile file; import processing.video.\*; Movie movie; void setup() { size(400, 450); background(0); x.add…

---

## [Background hides circles inside the for loop](https://discourse.processing.org/t/background-hides-circles-inside-the-for-loop/21377)

<div class="topic-metadata">

**Author:** [@dumash](https://discourse.processing.org/u/dumash)\
**Replies:** 3\
**Last updated:** [June 2, 2020, 7:29am UTC](https://discourse.processing.org/t/background-hides-circles-inside-the-for-loop/21377 "2020-06-02T07:29:14Z")

</div>

Hi, I am trying to draw a set of circles using the for loop. It works just fine, the problem is that the background (also inside the draw() function) makes the circle disappear. When I move the background to the setup…

---

## [Easy question from new user! +Parallel lines drawing](https://discourse.processing.org/t/easy-question-from-new-user-parallel-lines-drawing/21464)

<div class="topic-metadata">

**Author:** [@Ateroma](https://discourse.processing.org/u/Ateroma)\
**Replies:** 1\
**Last updated:** [June 1, 2020, 6:23pm UTC](https://discourse.processing.org/t/easy-question-from-new-user-parallel-lines-drawing/21464 "2020-06-01T18:23:18Z")

</div>

Hello! I’m new here and I just found this incredible software during the quarantine. I’m reading the Processing: A Programming Handbook for Visual Designers and Artists book for learning, but I remained stuck while try…

---

## [Slowdown in Game of Life with Objects - Why?](https://discourse.processing.org/t/slowdown-in-game-of-life-with-objects-why/21481)

<div class="topic-metadata">

**Author:** [@umutreldem](https://discourse.processing.org/u/umutreldem)\
**Replies:** 2\
**Last updated:** [June 1, 2020, 9:19pm UTC](https://discourse.processing.org/t/slowdown-in-game-of-life-with-objects-why/21481 "2020-06-01T21:19:12Z")

</div>

I am working on recreating Game of Life in different ways, taking Coding Train’s video as the starting point. What I am trying to add is ‘color inheritance’: A newborn cell ‘inheriting’ the color from the average of the …

---

## [GSOC 20, Support for Kotlin Native](https://discourse.processing.org/t/gsoc-20-support-for-kotlin-native/18474)

<div class="topic-metadata">

**Author:** [@AdityaRana](https://discourse.processing.org/u/AdityaRana)\
**Replies:** 8\
**Last updated:** [May 31, 2020, 9:38am UTC](https://discourse.processing.org/t/gsoc-20-support-for-kotlin-native/18474 "2020-05-31T09:38:38Z")

</div>

Hi to community , I am Aditya Rana , undergrad student at National Institute of Technology ,Trichy ,India. Currently pursuing BTech 2nd year with Major in Instrumnentation and Control Engineering and Minor in Computer …

---

## [createFileInput function](https://discourse.processing.org/t/createfileinput-function/21478)

<div class="topic-metadata">

**Author:** [@RbRB](https://discourse.processing.org/u/RbRB)\
**Replies:** 1\
**Last updated:** [June 1, 2020, 3:33pm UTC](https://discourse.processing.org/t/createfileinput-function/21478 "2020-06-01T15:33:10Z")

</div>

I create the code like this but the error keeps popping up. what’s should I do? let song; let input; function setup() { input = createFileInput(handleFile); input.position(0, 0); createCanvas(720, 200); backgrou…

---

## [Random words from text file - how to avoid duplicate index numbers?](https://discourse.processing.org/t/random-words-from-text-file-how-to-avoid-duplicate-index-numbers/21456)

<div class="topic-metadata">

**Author:** [@Jonathan\_2](https://discourse.processing.org/u/Jonathan_2)\
**Replies:** 5\
**Last updated:** [June 1, 2020, 3:14pm UTC](https://discourse.processing.org/t/random-words-from-text-file-how-to-avoid-duplicate-index-numbers/21456 "2020-06-01T15:14:04Z")

</div>

Hey. I am quite new to processing so excuse me if my explanation of this is in the wrong terms or if things are slightly misunderstood. I am working on a code that write random words from a text on the screen every tim…

---

## [Another question re prototpytes](https://discourse.processing.org/t/another-question-re-prototpytes/21475)

<div class="topic-metadata">

**Author:** [@femke.blanco](https://discourse.processing.org/u/femke.blanco)\
**Replies:** 1\
**Last updated:** [June 1, 2020, 2:39pm UTC](https://discourse.processing.org/t/another-question-re-prototpytes/21475 "2020-06-01T14:39:09Z")

</div>

(Please excuse the old technique.) I am able to add a function to a constructor’s prototype after I create an object, and use the function: function Thing() { this.prop1 = 1; this.prop2 = 2; } var thing1 = new …

---

## [About public voids / functions](https://discourse.processing.org/t/about-public-voids-functions/21469)

<div class="topic-metadata">

**Author:** [@SouSageYa](https://discourse.processing.org/u/SouSageYa)\
**Replies:** 4\
**Last updated:** [June 1, 2020, 2:04pm UTC](https://discourse.processing.org/t/about-public-voids-functions/21469 "2020-06-01T14:04:34Z")

</div>

Hi. Do I have to place Public Voids into void draw if I want to use it repeatedly ??

---

## [Random to initialize variables](https://discourse.processing.org/t/random-to-initialize-variables/21466)

<div class="topic-metadata">

**Author:** [@davidhurwich](https://discourse.processing.org/u/davidhurwich)\
**Replies:** 2\
**Last updated:** [June 1, 2020, 10:46am UTC](https://discourse.processing.org/t/random-to-initialize-variables/21466 "2020-06-01T10:46:08Z")

</div>

I have a question. I’ve noticed that when I initialize variables with a value before setup(); or draw(); that it works for a string, boolean, number. However, if I try to set that value to a random number using random()…

---

## [Is it possible to add charts or some values into a new window created by G4P?](https://discourse.processing.org/t/is-it-possible-to-add-charts-or-some-values-into-a-new-window-created-by-g4p/21472)

<div class="topic-metadata">

**Author:** [@SouSageYa](https://discourse.processing.org/u/SouSageYa)\
**Replies:** 2\
**Last updated:** [June 1, 2020, 10:09am UTC](https://discourse.processing.org/t/is-it-possible-to-add-charts-or-some-values-into-a-new-window-created-by-g4p/21472 "2020-06-01T10:09:39Z")

</div>

I could manage to open a new window with G4P. But I couldnt figure out how to add values or charts boxes or something. Is there a way

---

## [Problemas con surface.setResizable(true) y fullscreen](https://discourse.processing.org/t/problemas-con-surface-setresizable-true-y-fullscreen/21396)

<div class="topic-metadata">

**Author:** [@hokuto](https://discourse.processing.org/u/hokuto)\
**Replies:** 4\
**Last updated:** [June 1, 2020, 9:16am UTC](https://discourse.processing.org/t/problemas-con-surface-setresizable-true-y-fullscreen/21396 "2020-06-01T09:16:27Z")

</div>

Hola que tal. Estoy intentando hacer un pequeño juego de naves a una resolucion de 640x480,el problema que tengo es que cuando uso la funcion surface.setResizable(true) y maximizo la ventana,la imagen del juego no se es…

---

## [PImage object from current sketch state](https://discourse.processing.org/t/pimage-object-from-current-sketch-state/21433)

<div class="topic-metadata">

**Author:** [@arcadeperfect](https://discourse.processing.org/u/arcadeperfect)\
**Replies:** 4\
**Last updated:** [June 1, 2020, 3:26am UTC](https://discourse.processing.org/t/pimage-object-from-current-sketch-state/21433 "2020-06-01T03:26:58Z")

</div>

Hi, Can I create a PImage object from the pixels in the sketch rather than by loading an image from disk? Thanks

---

## [How can i save a small canvas with high resolution 8k image file](https://discourse.processing.org/t/how-can-i-save-a-small-canvas-with-high-resolution-8k-image-file/21422)

<div class="topic-metadata">

**Author:** [@biard](https://discourse.processing.org/u/biard)\
**Replies:** 4\
**Last updated:** [May 31, 2020, 11:15pm UTC](https://discourse.processing.org/t/how-can-i-save-a-small-canvas-with-high-resolution-8k-image-file/21422 "2020-05-31T23:15:21Z")

</div>

please format code with \</\> button \* homework policy \* asking questions i have a canvas of 500x500 .and i want to save the canvas as a super high resolution image. but i don’t know how to do it. i don’t wanna to incr…

---

## [What causes a graphical sketch to start glitching out?](https://discourse.processing.org/t/what-causes-a-graphical-sketch-to-start-glitching-out/21458)

<div class="topic-metadata">

**Author:** [@BennyHacker](https://discourse.processing.org/u/BennyHacker)\
**Replies:** 3\
**Last updated:** [May 31, 2020, 7:20pm UTC](https://discourse.processing.org/t/what-causes-a-graphical-sketch-to-start-glitching-out/21458 "2020-05-31T19:20:39Z")

</div>

Hey forum, sometimes when I’m working on a particularly graphics oriented sketch it will all of a sudden start to behave very strange with no apparent cause. Has this ever happened to anyone else? I have a sketch that’s…

---

## [RotationX, RotationY and RotationZ not working on some servers?](https://discourse.processing.org/t/rotationx-rotationy-and-rotationz-not-working-on-some-servers/21460)

<div class="topic-metadata">

**Author:** [@JoeMcKay](https://discourse.processing.org/u/JoeMcKay)\
**Replies:** 4\
**Last updated:** [May 31, 2020, 5:41pm UTC](https://discourse.processing.org/t/rotationx-rotationy-and-rotationz-not-working-on-some-servers/21460 "2020-05-31T17:41:31Z")

</div>

Hello P5 folks, I’m working on a WEBGL project that uses phone accelerometers. I’m finding that sketches hosted by the p5 servers work great. But when I host a project on my own server the site not longer responds to th…

---

## [Embedding Processing 3 Sketch Into Swing](https://discourse.processing.org/t/embedding-processing-3-sketch-into-swing/21410)

<div class="topic-metadata">

**Author:** [@Xenthera](https://discourse.processing.org/u/Xenthera)\
**Replies:** 3\
**Last updated:** [May 31, 2020, 5:16pm UTC](https://discourse.processing.org/t/embedding-processing-3-sketch-into-swing/21410 "2020-05-31T17:16:20Z")

</div>

Whether I need to do this or not (IE use a gui framework in processing) is not what i’m asking. I have reasons why I would like to do this, from proof of concept all the way to using processing to do visual rendering ins…

---

## [Homework Help! Getting random string from array](https://discourse.processing.org/t/homework-help-getting-random-string-from-array/21420)

<div class="topic-metadata">

**Author:** [@JoshuaStark](https://discourse.processing.org/u/JoshuaStark)\
**Replies:** 1\
**Last updated:** [May 30, 2020, 6:23am UTC](https://discourse.processing.org/t/homework-help-getting-random-string-from-array/21420 "2020-05-30T06:23:14Z")

</div>

I need to get a random greeting from my array using their index and display that random greeting when I press the button and it needs to be done in my greeting function. import controlP5.\*; ControlP5 cp5; controlP5.Bu…

---

## [Loading Large Sound Files- problem with loading SOLVED!](https://discourse.processing.org/t/loading-large-sound-files-problem-with-loading-solved/21351)

<div class="topic-metadata">

**Author:** [@Kris1](https://discourse.processing.org/u/Kris1)\
**Replies:** 7\
**Last updated:** [May 31, 2020, 12:26pm UTC](https://discourse.processing.org/t/loading-large-sound-files-problem-with-loading-solved/21351 "2020-05-31T12:26:43Z")

</div>

I am having problems loading a large sound file. It is too large to be uploaded directly to the P5js editor. I have tried linking it to my dropbox, this has failed. I have tried both load sound, and new p5.SoundFile (…

---

## [How to make repeating 3D ball on Y-coordinate?](https://discourse.processing.org/t/how-to-make-repeating-3d-ball-on-y-coordinate/21435)

<div class="topic-metadata">

**Author:** [@processingart](https://discourse.processing.org/u/processingart)\
**Replies:** 4\
**Last updated:** [May 31, 2020, 12:23pm UTC](https://discourse.processing.org/t/how-to-make-repeating-3d-ball-on-y-coordinate/21435 "2020-05-31T12:23:51Z")

</div>

Hello, I was making an animation on processing. Then, I confused about on a problem. I prepare a simple code for you. Also, I think the question can helpfull for beginners. :revolving\_hearts: :smiling\_face\_with\_three\_hea…

---

## [Help with space bar movement of ellipses](https://discourse.processing.org/t/help-with-space-bar-movement-of-ellipses/21428)

<div class="topic-metadata">

**Author:** [@s6277](https://discourse.processing.org/u/s6277)\
**Replies:** 5\
**Last updated:** [May 31, 2020, 11:51am UTC](https://discourse.processing.org/t/help-with-space-bar-movement-of-ellipses/21428 "2020-05-31T11:51:20Z")

</div>

Hi, im new to processing and i was wondering if anyone could help me out me in this task. I want to move an ellipse up and down, and basically every time i press the space bar the previous ellipse stops on its spot and a…

---

## [Processing input microphone](https://discourse.processing.org/t/processing-input-microphone/21440)

<div class="topic-metadata">

**Author:** [@Vickydcl](https://discourse.processing.org/u/Vickydcl)\
**Replies:** 1\
**Last updated:** [May 31, 2020, 11:49am UTC](https://discourse.processing.org/t/processing-input-microphone/21440 "2020-05-31T11:49:08Z")

</div>

Hi! I want to use my microphone (audio input) and then calculate the amplitude (volume) and frequency of my voice (the idea is using this values and then map them). I’ve been researching in minim library but i’m a littl…

---

## [Using JNI to talk to C struct](https://discourse.processing.org/t/using-jni-to-talk-to-c-struct/21381)

<div class="topic-metadata">

**Author:** [@HackinHarry](https://discourse.processing.org/u/HackinHarry)\
**Replies:** 2\
**Last updated:** [May 31, 2020, 3:18am UTC](https://discourse.processing.org/t/using-jni-to-talk-to-c-struct/21381 "2020-05-31T03:18:16Z")

</div>

I barely understand what a struct is other than sorta like a class in java. I want to use processing and java to provide the input and then get the result back to java. I went to this link and found some code I want to…

---

## [Having proplems with string arrays](https://discourse.processing.org/t/having-proplems-with-string-arrays/21436)

<div class="topic-metadata">

**Author:** [@AntiViral\_Builder](https://discourse.processing.org/u/AntiViral_Builder)\
**Replies:** 1\
**Last updated:** [May 30, 2020, 10:13pm UTC](https://discourse.processing.org/t/having-proplems-with-string-arrays/21436 "2020-05-30T22:13:47Z")

</div>

I set my array to a size 1000000 and initialized its contents with: (int I=0;i\<1000000;i++) mytext\[I\] =" "; so why when I use something like: rec\[I\] = mytext\[I\]; to get a temporary instance of the mytext\[I\] that the …

---

## [About Processing's serial port](https://discourse.processing.org/t/about-processings-serial-port/21432)

<div class="topic-metadata">

**Author:** [@SouSageYa](https://discourse.processing.org/u/SouSageYa)\
**Replies:** 9\
**Last updated:** [May 30, 2020, 9:26pm UTC](https://discourse.processing.org/t/about-processings-serial-port/21432 "2020-05-30T21:26:30Z")

</div>

Hi there It’s me again so Here is a photo about the issue. . So as you can see (here is the code btw import processing.serial.\*; import controlP5.\*; ///////////////// int interval = 0; int end = 10; String received…

---

## [Compute Shaders in Processing](https://discourse.processing.org/t/compute-shaders-in-processing/21400)

<div class="topic-metadata">

**Author:** [@micycle](https://discourse.processing.org/u/micycle)\
**Replies:** 5\
**Last updated:** [May 30, 2020, 12:16pm UTC](https://discourse.processing.org/t/compute-shaders-in-processing/21400 "2020-05-30T12:16:35Z")

</div>

I’m working on a gradient library for Processing and I am exploring the use of colour spaces other than RGB to use as the basis to interpolate between different colors (to generate the gradient). One of these alternativ…

---

## [Video preload Property](https://discourse.processing.org/t/video-preload-property/21419)

<div class="topic-metadata">

**Author:** [@stephanschulz](https://discourse.processing.org/u/stephanschulz)\
**Replies:** 3\
**Last updated:** [May 30, 2020, 11:32am UTC](https://discourse.processing.org/t/video-preload-property/21419 "2020-05-30T11:32:38Z")

</div>

Is there a way to force a dynamically loaded video to preload? I do not want to use the preload() function mentioned in the reference page. But rather the HTML DOM element, as described here: https://www.w3schools.com…

[Previous page](https://discourse.processing.org/latest.md?no_subcategories=false&page=340)

[Next page](https://discourse.processing.org/latest.md?no_subcategories=false&page=342)
