# Latest

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

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

**Page:** 345

---

## [How to trigger an animation based on realtime audio](https://discourse.processing.org/t/how-to-trigger-an-animation-based-on-realtime-audio/21066)

<div class="topic-metadata">

**Author:** [@rkk16](https://discourse.processing.org/u/rkk16)\
**Replies:** 3\
**Last updated:** [May 26, 2020, 8:23am UTC](https://discourse.processing.org/t/how-to-trigger-an-animation-based-on-realtime-audio/21066 "2020-05-26T08:23:52Z")

</div>

Trying to build a face with moving lips as someone speaks realtime, any idea how to use audio as a trigger like if(mousePressed) - instead being if a threshold of amplitude is received, then perform {block of code}?

---

## [Javascript: Question re prototpyes](https://discourse.processing.org/t/javascript-question-re-prototpyes/21149)

<div class="topic-metadata">

**Author:** [@femke.blanco](https://discourse.processing.org/u/femke.blanco)\
**Replies:** 3\
**Last updated:** [May 25, 2020, 11:57pm UTC](https://discourse.processing.org/t/javascript-question-re-prototpyes/21149 "2020-05-25T23:57:24Z")

</div>

Why would I want to use Object.create() when I can just assign one object’s prototype to another object’s prototype? function Thingy() {} Thingy.prototype.change = function () { return this.char1 + this.char2; } funct…

---

## [Server & Client](https://discourse.processing.org/t/server-client/1007)

<div class="topic-metadata">

**Author:** [@basher24](https://discourse.processing.org/u/basher24)\
**Replies:** 3\
**Last updated:** [May 25, 2020, 11:24pm UTC](https://discourse.processing.org/t/server-client/1007 "2020-05-25T23:24:37Z")

</div>

hi all What is the best,fastes and safety library to use for communication between Server(PC) and Client’s(android) ? I want to send/receive a text(~500 chars) and Images (0-1 Mbytes) . thanx basher

---

## [Switch the array places in a loop](https://discourse.processing.org/t/switch-the-array-places-in-a-loop/21084)

<div class="topic-metadata">

**Author:** [@gurki](https://discourse.processing.org/u/gurki)\
**Replies:** 12\
**Last updated:** [May 25, 2020, 11:09pm UTC](https://discourse.processing.org/t/switch-the-array-places-in-a-loop/21084 "2020-05-25T23:09:23Z")

</div>

Hello Together, I have an important question. I have a task where I need your help. this is the question. Given! Be! Two! Equal! Long! Arrays:! int\[\] a = {1,2,3,4}; int\[\] b = {10, 20, 30, 40}; Create a new array c th…

---

## [I want to change the size of each class](https://discourse.processing.org/t/i-want-to-change-the-size-of-each-class/21205)

<div class="topic-metadata">

**Author:** [@yeon](https://discourse.processing.org/u/yeon)\
**Replies:** 4\
**Last updated:** [May 25, 2020, 8:39pm UTC](https://discourse.processing.org/t/i-want-to-change-the-size-of-each-class/21205 "2020-05-25T20:39:55Z")

</div>

I’m making a game with processing. I want to change the size of each class. What should I do?

---

## [Creating a temperature simulation](https://discourse.processing.org/t/creating-a-temperature-simulation/21183)

<div class="topic-metadata">

**Author:** [@abc123](https://discourse.processing.org/u/abc123)\
**Replies:** 13\
**Last updated:** [May 25, 2020, 8:06pm UTC](https://discourse.processing.org/t/creating-a-temperature-simulation/21183 "2020-05-25T20:06:34Z")

</div>

I’m trying to creating a temperature simulation. I’m loading a picture of a room, and I want to add an arrow showing the temperature. The temperature should increase when a certain key is pressed. I’m wondering how I can…

---

## [PeasyCam automatic camera movements](https://discourse.processing.org/t/peasycam-automatic-camera-movements/20515)

<div class="topic-metadata">

**Author:** [@alejo\_rgb](https://discourse.processing.org/u/alejo_rgb)\
**Replies:** 5\
**Last updated:** [May 25, 2020, 7:31pm UTC](https://discourse.processing.org/t/peasycam-automatic-camera-movements/20515 "2020-05-25T19:31:48Z")

</div>

hi. Im trying to automate movement with peasy cam. Right now with this code i have to manuale position the camera in 5 diferent places and by pressing the keys from 1 to 5, it sets those positions. Then by pressing the k…

---

## [G4P GUI Builder - how to export](https://discourse.processing.org/t/g4p-gui-builder-how-to-export/21277)

<div class="topic-metadata">

**Author:** [@rkk16](https://discourse.processing.org/u/rkk16)\
**Replies:** 3\
**Last updated:** [May 25, 2020, 5:06pm UTC](https://discourse.processing.org/t/g4p-gui-builder-how-to-export/21277 "2020-05-25T17:06:04Z")

</div>

Hey, I was initially making a lot of the sliders and buttons myself but this ended up in hundreds of classes as I’m working on a complex project, so I downloaded the GUI builder tool. If anyone’s used this before, my que…

---

## [Permanent coloring for text in p5.js](https://discourse.processing.org/t/permanent-coloring-for-text-in-p5-js/21271)

<div class="topic-metadata">

**Author:** [@Johann75](https://discourse.processing.org/u/Johann75)\
**Replies:** 1\
**Last updated:** [May 25, 2020, 3:18pm UTC](https://discourse.processing.org/t/permanent-coloring-for-text-in-p5-js/21271 "2020-05-25T15:18:05Z")

</div>

Could anyone please suggest a way to not loop the text colour separately from my sound loop. I was creating a timer which would highlight as red after the last 5 seconds. Also, I added a beep sound to remind the user(th…

---

## [Matmul function and PVectors](https://discourse.processing.org/t/matmul-function-and-pvectors/21279)

<div class="topic-metadata">

**Author:** [@cyberjaakko](https://discourse.processing.org/u/cyberjaakko)\
**Replies:** 1\
**Last updated:** [May 25, 2020, 2:49pm UTC](https://discourse.processing.org/t/matmul-function-and-pvectors/21279 "2020-05-25T14:49:52Z")

</div>

Hey, I’ve been learning matrix multiplication, but problems started while trying to setup a PVector that utlilzes a matmul function similar to Daniel Schiffman’s example for making 3D projections. I ran into problems wh…

---

## [Possibility to avoid redraw with virtual mouse cursor](https://discourse.processing.org/t/possibility-to-avoid-redraw-with-virtual-mouse-cursor/21168)

<div class="topic-metadata">

**Author:** [@monade](https://discourse.processing.org/u/monade)\
**Replies:** 3\
**Last updated:** [May 25, 2020, 12:11pm UTC](https://discourse.processing.org/t/possibility-to-avoid-redraw-with-virtual-mouse-cursor/21168 "2020-05-25T12:11:40Z")

</div>

I am developing a little game with p5.js in which I need to draw my own mouse cursor (for reasons that are not so important). Apart from the mouse cursor, the game has mostly static content and each frame consist of arou…

---

## [How do you stop a timer as it reaches 0 in p5.js](https://discourse.processing.org/t/how-do-you-stop-a-timer-as-it-reaches-0-in-p5-js/21240)

<div class="topic-metadata">

**Author:** [@Johann75](https://discourse.processing.org/u/Johann75)\
**Replies:** 2\
**Last updated:** [May 25, 2020, 8:49am UTC](https://discourse.processing.org/t/how-do-you-stop-a-timer-as-it-reaches-0-in-p5-js/21240 "2020-05-25T08:49:02Z")

</div>

Referring the code made by Mr.Shiffman, i found that he couldn’t explain the code for stopping the timer at 0, so could anyone help with it…-Johann

---

## ["paste" event listener not working for a P5.Graphic?](https://discourse.processing.org/t/paste-event-listener-not-working-for-a-p5-graphic/20095)

<div class="topic-metadata">

**Author:** [@Yom](https://discourse.processing.org/u/Yom)\
**Replies:** 3\
**Last updated:** [May 25, 2020, 5:10am UTC](https://discourse.processing.org/t/paste-event-listener-not-working-for-a-p5-graphic/20095 "2020-05-25T05:10:42Z")

</div>

Hello :slight\_smile: I would like to add a “paste” event listener to a p5.Graphic, how can I do that ? I’ve tried like this: g = createGraphics(100, 100); g.elt.addEventListener("paste", pasteEvent =\> console.log("pas…

---

## [Web browser integration on Android](https://discourse.processing.org/t/web-browser-integration-on-android/21252)

<div class="topic-metadata">

**Author:** [@uheinema](https://discourse.processing.org/u/uheinema)\
**Replies:** 1\
**Last updated:** [May 24, 2020, 11:20pm UTC](https://discourse.processing.org/t/web-browser-integration-on-android/21252 "2020-05-24T23:20:03Z")

</div>

Just a small annoyance, might be specific my phone, Android / Chrome. Specifics available if needed. I like to grab places I want to come back to by just opening the the “⋮”-menu (top right) and selecting “Add to strat…

---

## [.render() PRoBleM](https://discourse.processing.org/t/render-problem/21255)

<div class="topic-metadata">

**Author:** [@pinchme](https://discourse.processing.org/u/pinchme)\
**Replies:** 6\
**Last updated:** [May 24, 2020, 10:22pm UTC](https://discourse.processing.org/t/render-problem/21255 "2020-05-24T22:22:52Z")

</div>

I am very new to this but like to jump in at the deep end and learn that way. I’m making a fork of an existing processing prog. and wishing to use sound rather than mouse to interact with it. I’ve probably done lots of t…

---

## [Best ways to manage a canvas larger than the screen size?](https://discourse.processing.org/t/best-ways-to-manage-a-canvas-larger-than-the-screen-size/21265)

<div class="topic-metadata">

**Author:** [@dtreybig](https://discourse.processing.org/u/dtreybig)\
**Replies:** 2\
**Last updated:** [May 24, 2020, 9:14pm UTC](https://discourse.processing.org/t/best-ways-to-manage-a-canvas-larger-than-the-screen-size/21265 "2020-05-24T21:14:49Z")

</div>

Hi! I am new to Processing and having a lot of fun with it. I have developed a few algorithms I like and that I now want to try printing as a piece of physical art. So far, all of my work has been with a processing reso…

---

## [Using fisica and geomerative to add physics to typography](https://discourse.processing.org/t/using-fisica-and-geomerative-to-add-physics-to-typography/21225)

<div class="topic-metadata">

**Author:** [@hiphophooray](https://discourse.processing.org/u/hiphophooray)\
**Replies:** 5\
**Last updated:** [May 24, 2020, 9:11pm UTC](https://discourse.processing.org/t/using-fisica-and-geomerative-to-add-physics-to-typography/21225 "2020-05-24T21:11:36Z")

</div>

Hi guys. I have this idea for a project but I can’t really figured it out and the documentation for both of these libraries (fisica and geomerative) that I want to use are not that good. Does anyone know how can this be…

---

## [How to change picture on p5](https://discourse.processing.org/t/how-to-change-picture-on-p5/21231)

<div class="topic-metadata">

**Author:** [@Gravic216](https://discourse.processing.org/u/Gravic216)\
**Replies:** 1\
**Last updated:** [May 24, 2020, 8:41pm UTC](https://discourse.processing.org/t/how-to-change-picture-on-p5/21231 "2020-05-24T20:41:14Z")

</div>

Hi, I’m looking for how just mouse click once time and the load picture will change to another change picture as well as never change.

---

## [Processing button on/off](https://discourse.processing.org/t/processing-button-on-off/21256)

<div class="topic-metadata">

**Author:** [@rkk16](https://discourse.processing.org/u/rkk16)\
**Replies:** 2\
**Last updated:** [May 24, 2020, 8:00pm UTC](https://discourse.processing.org/t/processing-button-on-off/21256 "2020-05-24T20:00:15Z")

</div>

If on is true, change the background. But what happens is it flickers - I think it’s because it detects multiple mouseclicks and goes on, off, on, off. How do we avoid this? Do I need a delay term? It works, but I only n…

---

## [Null Pointer Exception on Object Array](https://discourse.processing.org/t/null-pointer-exception-on-object-array/21249)

<div class="topic-metadata">

**Author:** [@koleon03](https://discourse.processing.org/u/koleon03)\
**Replies:** 6\
**Last updated:** [May 24, 2020, 5:37pm UTC](https://discourse.processing.org/t/null-pointer-exception-on-object-array/21249 "2020-05-24T17:37:30Z")

</div>

Hey you guys, I hope you can help me with this. I am creating a little game, for which I need an array of Snowflakes (an object I created), which I create and instantiate. Despite that I am still getting a NPE. Here’s m…

---

## [Sending over Arduino analog values to Processing doesn't work](https://discourse.processing.org/t/sending-over-arduino-analog-values-to-processing-doesnt-work/21241)

<div class="topic-metadata">

**Author:** [@Monfan123](https://discourse.processing.org/u/Monfan123)\
**Replies:** 2\
**Last updated:** [May 24, 2020, 5:13pm UTC](https://discourse.processing.org/t/sending-over-arduino-analog-values-to-processing-doesnt-work/21241 "2020-05-24T17:13:50Z")

</div>

Hi all, For a schoolassignment i’am creating a 3D boxchart from a CSV file which represents COVID-19 cases in the Netherlands. The whole code is working fine for me as it is. At this moment i’ve got three buttons, a LED…

---

## [Utah Teapot (using Bezier surfaces)](https://discourse.processing.org/t/utah-teapot-using-bezier-surfaces/21243)

<div class="topic-metadata">

**Author:** [@quark](https://discourse.processing.org/u/quark)\
**Replies:** 0\
**Last updated:** [May 24, 2020, 2:32pm UTC](https://discourse.processing.org/t/utah-teapot-using-bezier-surfaces/21243 "2020-05-24T14:32:20Z")

</div>

This sketch show the Utah Teapot 3D test model that was created over 45 years ago. The teapot surface comprises of 32 Bezier surfaces and each surface is controlled by 16 Bezier control points. Although the code is quit…

---

## [Simple Button - works sometimes, doesn't work sometimes](https://discourse.processing.org/t/simple-button-works-sometimes-doesnt-work-sometimes/21232)

<div class="topic-metadata">

**Author:** [@rkk16](https://discourse.processing.org/u/rkk16)\
**Replies:** 2\
**Last updated:** [May 24, 2020, 2:12pm UTC](https://discourse.processing.org/t/simple-button-works-sometimes-doesnt-work-sometimes/21232 "2020-05-24T14:12:07Z")

</div>

I’ve got a class defined for a button. I define this button globally as b1 and in setup define the size and values. Then in draw I have b1.update() and b1.display() and if(b1.press()) {functionon = !functionon}; where fu…

---

## [How do I pass a value from one sketch to another sketch?](https://discourse.processing.org/t/how-do-i-pass-a-value-from-one-sketch-to-another-sketch/21176)

<div class="topic-metadata">

**Author:** [@paulstgeorge](https://discourse.processing.org/u/paulstgeorge)\
**Replies:** 9\
**Last updated:** [May 24, 2020, 1:45pm UTC](https://discourse.processing.org/t/how-do-i-pass-a-value-from-one-sketch-to-another-sketch/21176 "2020-05-24T13:45:50Z")

</div>

I tried to do it by using saveStrings() in one sketch and loadStrings() in the other. writer.pde String\[\] Pipe = new String\[2\]; // Declare, create void setup() { size(400, 400); noStroke(); } void draw() { back…

---

## [Another question about dropdown lists in G4P](https://discourse.processing.org/t/another-question-about-dropdown-lists-in-g4p/21090)

<div class="topic-metadata">

**Author:** [@David](https://discourse.processing.org/u/David)\
**Replies:** 5\
**Last updated:** [May 24, 2020, 1:40pm UTC](https://discourse.processing.org/t/another-question-about-dropdown-lists-in-g4p/21090 "2020-05-24T13:40:52Z")

</div>

I’ve noticed that if I click on a dropdown list and select the current selection, no event is triggered. Is this the intended behaviour? In most cases, this is OK because no action needs to be taken, but in some cases I …

---

## [Lerp rate/speed - how to change the number of interpolation steps attached to a slider?](https://discourse.processing.org/t/lerp-rate-speed-how-to-change-the-number-of-interpolation-steps-attached-to-a-slider/21234)

<div class="topic-metadata">

**Author:** [@rkk16](https://discourse.processing.org/u/rkk16)\
**Replies:** 1\
**Last updated:** [May 24, 2020, 12:49pm UTC](https://discourse.processing.org/t/lerp-rate-speed-how-to-change-the-number-of-interpolation-steps-attached-to-a-slider/21234 "2020-05-24T12:49:11Z")

</div>

Hey guys, I’ve got a slider and I convert the position of it’s x and y coordinates into an amount from 0 to 1 which I then lerp to result in an animation when you slide from left to right. Is there a way to control the s…

---

## [Rotate p5 Vector and get angleBetweend](https://discourse.processing.org/t/rotate-p5-vector-and-get-anglebetweend/21215)

<div class="topic-metadata">

**Author:** [@Bouls631](https://discourse.processing.org/u/Bouls631)\
**Replies:** 3\
**Last updated:** [May 24, 2020, 12:23pm UTC](https://discourse.processing.org/t/rotate-p5-vector-and-get-anglebetweend/21215 "2020-05-24T12:23:17Z")

</div>

Hy every one, Here is my probleme i try to get angle between two Vectors in p5 when both Can moove. What i’ve done is : Push(); Translate(...); Bb= createVector (mouseX,mouseY) RotateZ(x); Aa= createVector(0,100); Pop(…

---

## [Rotate () like earth around sun](https://discourse.processing.org/t/rotate-like-earth-around-sun/16713)

<div class="topic-metadata">

**Author:** [@Bouls631](https://discourse.processing.org/u/Bouls631)\
**Replies:** 5\
**Last updated:** [May 24, 2020, 7:40am UTC](https://discourse.processing.org/t/rotate-like-earth-around-sun/16713 "2020-05-24T07:40:57Z")

</div>

Hello every one… Is it possible to rotate an object around imself and around a other point on the same time? Thank’s a lot.

---

## [How to make a pulling mouse constraint?](https://discourse.processing.org/t/how-to-make-a-pulling-mouse-constraint/21200)

<div class="topic-metadata">

**Author:** [@Nis](https://discourse.processing.org/u/Nis)\
**Replies:** 1\
**Last updated:** [May 24, 2020, 5:06am UTC](https://discourse.processing.org/t/how-to-make-a-pulling-mouse-constraint/21200 "2020-05-24T05:06:36Z")

</div>

https://editor.p5js.org/Nis\_Collect/sketches/U0p3GjOK1 Above is the link of my code. Please check it and please let me know how can I make my player get pulled towards an enemy (like Spiderman is attracted with some sp…

---

## [Perlin noise detail](https://discourse.processing.org/t/perlin-noise-detail/21223)

<div class="topic-metadata">

**Author:** [@BongoTurtle](https://discourse.processing.org/u/BongoTurtle)\
**Replies:** 5\
**Last updated:** [May 24, 2020, 4:58am UTC](https://discourse.processing.org/t/perlin-noise-detail/21223 "2020-05-24T04:58:18Z")

</div>

Is there any way to make the noise() function more continuous? It seems it only goes down to steps of around 0.003 until it acts discontinuously. For example noise(0.000) = noise(0.002).

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

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