# Latest

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

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

**Page:** 283

---

## [Closest point on SVG path](https://discourse.processing.org/t/closest-point-on-svg-path/25592)

<div class="topic-metadata">

**Author:** [@sixfeet](https://discourse.processing.org/u/sixfeet)\
**Replies:** 16\
**Last updated:** [November 25, 2020, 8:36am UTC](https://discourse.processing.org/t/closest-point-on-svg-path/25592 "2020-11-25T08:36:11Z")

</div>

Instead of looking for the closest point to the mouse from all the points of the svg, how do I limit to finding just the closest point on a specific path? For example If I keyPressed 3, it would just look for the closes…

---

## [Turning audio into a pattern](https://discourse.processing.org/t/turning-audio-into-a-pattern/25694)

<div class="topic-metadata">

**Author:** [@scooijmans](https://discourse.processing.org/u/scooijmans)\
**Replies:** 1\
**Last updated:** [November 25, 2020, 11:34am UTC](https://discourse.processing.org/t/turning-audio-into-a-pattern/25694 "2020-11-25T11:34:33Z")

</div>

Hi, I’m a beginner in programming and got this code, it draws a line of the audio input as time goes by. Is it possible that when the line is formed till the end of the screen it stays still and then starts again underne…

---

## [Counter that increases with mouse click](https://discourse.processing.org/t/counter-that-increases-with-mouse-click/25342)

<div class="topic-metadata">

**Author:** [@thedarklord](https://discourse.processing.org/u/thedarklord)\
**Replies:** 9\
**Last updated:** [November 25, 2020, 10:41am UTC](https://discourse.processing.org/t/counter-that-increases-with-mouse-click/25342 "2020-11-25T10:41:53Z")

</div>

I’m making a simple game in which I want a counter which invreases every time an object is clicked.

---

## [URGENT: How to repeat an image movement per second](https://discourse.processing.org/t/urgent-how-to-repeat-an-image-movement-per-second/25683)

<div class="topic-metadata">

**Author:** [@tank](https://discourse.processing.org/u/tank)\
**Replies:** 16\
**Last updated:** [November 25, 2020, 10:24am UTC](https://discourse.processing.org/t/urgent-how-to-repeat-an-image-movement-per-second/25683 "2020-11-25T10:24:00Z")

</div>

I would like drop either 2 imageA or 1 imageB from the y = 0 border / upper border by using a coin to decide which to fall. I am using Processing 2.2.1. if (millis() - startTime \>= 1000) { float coin = random(1, 100…

---

## [processPeaks() not returning in p5.Sound](https://discourse.processing.org/t/processpeaks-not-returning-in-p5-sound/25649)

<div class="topic-metadata">

**Author:** [@koopakondra](https://discourse.processing.org/u/koopakondra)\
**Replies:** 0\
**Last updated:** [November 23, 2020, 11:38pm UTC](https://discourse.processing.org/t/processpeaks-not-returning-in-p5-sound/25649 "2020-11-23T23:38:15Z")

</div>

I’m trying to get the processPeaks() method in the Sound library to return the Array it says it should in documentation. None of the examples provided in the p5 github/website work either. I’ve tried the sketches in both…

---

## [New Processing Media Art Book for Extreme Beginners!](https://discourse.processing.org/t/new-processing-media-art-book-for-extreme-beginners/25675)

<div class="topic-metadata">

**Author:** [@mnoble](https://discourse.processing.org/u/mnoble)\
**Replies:** 0\
**Last updated:** [November 24, 2020, 9:46pm UTC](https://discourse.processing.org/t/new-processing-media-art-book-for-extreme-beginners/25675 "2020-11-24T21:46:11Z")

</div>

Hello Processing Educators, Over the past few years, I have been teaching (and learning) Processing in an inclusive high school classroom of diverse learners. In order to succeed, I worked to create examples and lessons…

---

## [ArrayList - having different images when moving using arrow keys](https://discourse.processing.org/t/arraylist-having-different-images-when-moving-using-arrow-keys/25669)

<div class="topic-metadata">

**Author:** [@TheGullible1](https://discourse.processing.org/u/TheGullible1)\
**Replies:** 15\
**Last updated:** [November 24, 2020, 8:59pm UTC](https://discourse.processing.org/t/arraylist-having-different-images-when-moving-using-arrow-keys/25669 "2020-11-24T20:59:47Z")

</div>

Hi, I’m using ArrayList to store the multiple amounts of images I have. i want to do is if I move left by using arrow keys, the images that pointing towards left move etc. this goes for up, down and right as well. code …

---

## [2D, Changing sprite set based on direction of movement](https://discourse.processing.org/t/2d-changing-sprite-set-based-on-direction-of-movement/25672)

<div class="topic-metadata">

**Author:** [@Myth](https://discourse.processing.org/u/Myth)\
**Replies:** 3\
**Last updated:** [November 24, 2020, 8:28pm UTC](https://discourse.processing.org/t/2d-changing-sprite-set-based-on-direction-of-movement/25672 "2020-11-24T20:28:19Z")

</div>

Hello everybody. I’m trying to make a simple “game” if it could even be called that, in which i have a character moving in the 4 main directions (up/down/left/right) with the WASD keys, using the following code void mo…

---

## [Remove the first character from a string when keyPressed is equal to the character](https://discourse.processing.org/t/remove-the-first-character-from-a-string-when-keypressed-is-equal-to-the-character/25598)

<div class="topic-metadata">

**Author:** [@vestergaard12](https://discourse.processing.org/u/vestergaard12)\
**Replies:** 3\
**Last updated:** [November 24, 2020, 6:31pm UTC](https://discourse.processing.org/t/remove-the-first-character-from-a-string-when-keypressed-is-equal-to-the-character/25598 "2020-11-24T18:31:56Z")

</div>

Hello processing foundation. I want to remove the first character from a string when the key pressed is equal to the first character. For example if the string word is “hello”, when I want the “h” in the word to be remo…

---

## [Remove Trail, can't figure out how (bot follows a random walker)](https://discourse.processing.org/t/remove-trail-cant-figure-out-how-bot-follows-a-random-walker/25616)

<div class="topic-metadata">

**Author:** [@noobcoder](https://discourse.processing.org/u/noobcoder)\
**Replies:** 6\
**Last updated:** [November 24, 2020, 3:42pm UTC](https://discourse.processing.org/t/remove-trail-cant-figure-out-how-bot-follows-a-random-walker/25616 "2020-11-24T15:42:27Z")

</div>

Hello, I have two random walkers. One of them(AntC) leaves a trail and the other one(AntD) is suppose to pick it up. How can i do this. AntC \[\] armyC = new AntC\[1\]; AntD \[\] armyD = new AntD\[1\]; void setup() { size(90…

---

## [Cannot read property of split() undefined](https://discourse.processing.org/t/cannot-read-property-of-split-undefined/25652)

<div class="topic-metadata">

**Author:** [@MattC0des](https://discourse.processing.org/u/MattC0des)\
**Replies:** 2\
**Last updated:** [November 24, 2020, 1:33pm UTC](https://discourse.processing.org/t/cannot-read-property-of-split-undefined/25652 "2020-11-24T13:33:51Z")

</div>

Hello, I am quite new to p5js (on and off for the past few months) but as of recently, I have run into a problem that myself nor my peers or teacher can solve. We are working on an application that is like a word per min…

---

## [Sound cuts off, then plays again](https://discourse.processing.org/t/sound-cuts-off-then-plays-again/25641)

<div class="topic-metadata">

**Author:** [@AlexW](https://discourse.processing.org/u/AlexW)\
**Replies:** 1\
**Last updated:** [November 23, 2020, 8:59pm UTC](https://discourse.processing.org/t/sound-cuts-off-then-plays-again/25641 "2020-11-23T20:59:34Z")

</div>

Hello, I’ve just about got my project for a class finished. Unfortunately I’ve run into a problem with sound. When I press a button to start the thing, it plays the start of calmsound, then stops completely. When I pre…

---

## [Blending two PGraphics - how would this work? - what is the syntax?](https://discourse.processing.org/t/blending-two-pgraphics-how-would-this-work-what-is-the-syntax/25630)

<div class="topic-metadata">

**Author:** [@MuddyGardener](https://discourse.processing.org/u/MuddyGardener)\
**Replies:** 6\
**Last updated:** [November 24, 2020, 12:16pm UTC](https://discourse.processing.org/t/blending-two-pgraphics-how-would-this-work-what-is-the-syntax/25630 "2020-11-24T12:16:00Z")

</div>

The Processing reference for blend suggests there is flexibility of specifying the destination image as well as the source image. \> Blends a region of pixels from one image into another (or in itself again) with full al…

---

## [Create automatic pdf at certain point](https://discourse.processing.org/t/create-automatic-pdf-at-certain-point/25602)

<div class="topic-metadata">

**Author:** [@scooijmans](https://discourse.processing.org/u/scooijmans)\
**Replies:** 3\
**Last updated:** [November 24, 2020, 12:13pm UTC](https://discourse.processing.org/t/create-automatic-pdf-at-certain-point/25602 "2020-11-24T12:13:43Z")

</div>

Hi, I’m a beginner in programming and got this code, it draws a line of the audio input as time goes by. What I need is when the line hits the end of the screen it needs to take an automatic screenshot/pdf of this is aro…

---

## [How to make: if timer is finished end game](https://discourse.processing.org/t/how-to-make-if-timer-is-finished-end-game/25661)

<div class="topic-metadata">

**Author:** [@TheGullible1](https://discourse.processing.org/u/TheGullible1)\
**Replies:** 2\
**Last updated:** [November 24, 2020, 11:39am UTC](https://discourse.processing.org/t/how-to-make-if-timer-is-finished-end-game/25661 "2020-11-24T11:39:17Z")

</div>

Hi, I’m tryna make an if statement consisting of my timer and how to end the game after my countdown of 60 seconds has finished. i have a class called countdown: class CountDown //start of CountDown class { private …

---

## [How to make particles with tails on the picture](https://discourse.processing.org/t/how-to-make-particles-with-tails-on-the-picture/24941)

<div class="topic-metadata">

**Author:** [@AbleYudada](https://discourse.processing.org/u/AbleYudada)\
**Replies:** 5\
**Last updated:** [November 24, 2020, 8:46am UTC](https://discourse.processing.org/t/how-to-make-particles-with-tails-on-the-picture/24941 "2020-11-24T08:46:22Z")

</div>

Hi. I want to know how to make particles with tails on the picture? I try to do this. But it not work. :confounded:

---

## [Curved Vertex Drawing Dilemma](https://discourse.processing.org/t/curved-vertex-drawing-dilemma/25653)

<div class="topic-metadata">

**Author:** [@lkalotihos](https://discourse.processing.org/u/lkalotihos)\
**Replies:** 1\
**Last updated:** [November 24, 2020, 8:42am UTC](https://discourse.processing.org/t/curved-vertex-drawing-dilemma/25653 "2020-11-24T08:42:37Z")

</div>

I’m having some issues with my curved vertex drawing. I’ve set it up so the x/y coordinates display as my mouse moves, so it would be easier to get the exact sketch I want. Except for some reason, it’s still not displayi…

---

## [Printing all PVector coordinates stored in an ArrayList](https://discourse.processing.org/t/printing-all-pvector-coordinates-stored-in-an-arraylist/25485)

<div class="topic-metadata">

**Author:** [@papaboo](https://discourse.processing.org/u/papaboo)\
**Replies:** 7\
**Last updated:** [November 24, 2020, 6:55am UTC](https://discourse.processing.org/t/printing-all-pvector-coordinates-stored-in-an-arraylist/25485 "2020-11-24T06:55:50Z")

</div>

I’m trying to get the whole set of x, y coordinates that are stored in an array. ArrayList\<Points\> recorded = new ArrayList(); void store (float x, float y) { int ArrayListSize = recorded.size()-1; if (Arra…

---

## [Exported Linux app can't see its images when launched from AUTOSTART](https://discourse.processing.org/t/exported-linux-app-cant-see-its-images-when-launched-from-autostart/25643)

<div class="topic-metadata">

**Author:** [@hondaman900](https://discourse.processing.org/u/hondaman900)\
**Replies:** 2\
**Last updated:** [November 23, 2020, 10:07pm UTC](https://discourse.processing.org/t/exported-linux-app-cant-see-its-images-when-launched-from-autostart/25643 "2020-11-23T22:07:51Z")

</div>

please format code with \</\> button \* homework policy \* asking questions I have an exported Linux application and can run it fine in Linux directly executing it, from a .desktop file in the Desktop folder, and from te…

---

## [How to get the color value of an image, not that of what's drawn on the background](https://discourse.processing.org/t/how-to-get-the-color-value-of-an-image-not-that-of-whats-drawn-on-the-background/25642)

<div class="topic-metadata">

**Author:** [@papaboo](https://discourse.processing.org/u/papaboo)\
**Replies:** 1\
**Last updated:** [November 23, 2020, 7:53pm UTC](https://discourse.processing.org/t/how-to-get-the-color-value-of-an-image-not-that-of-whats-drawn-on-the-background/25642 "2020-11-23T19:53:16Z")

</div>

In this example, (no image, I’ve just used a background colour to demonstrate) the background colour value is 25 but when there’s a brush that overlays the background, mouseX and mouseY returns the value of what’s drawn …

---

## [Rotation movement during noLoop](https://discourse.processing.org/t/rotation-movement-during-noloop/25629)

<div class="topic-metadata">

**Author:** [@sally](https://discourse.processing.org/u/sally)\
**Replies:** 3\
**Last updated:** [November 23, 2020, 7:47pm UTC](https://discourse.processing.org/t/rotation-movement-during-noloop/25629 "2020-11-23T19:47:17Z")

</div>

Hi, I’m new to coding for my student work. I’m making combining random objects + random words. I’m trying to put related code and some point it’s working. But when I put noLoop, the rotation movement is not working… …

---

## [Sounds/Frequencies on Processing](https://discourse.processing.org/t/sounds-frequencies-on-processing/25636)

<div class="topic-metadata">

**Author:** [@Rita\_Mera](https://discourse.processing.org/u/Rita_Mera)\
**Replies:** 2\
**Last updated:** [November 23, 2020, 6:58pm UTC](https://discourse.processing.org/t/sounds-frequencies-on-processing/25636 "2020-11-23T18:58:44Z")

</div>

How do I play frequencies with the movement of the mouse (X, Y)?

---

## [Unexpected void error](https://discourse.processing.org/t/unexpected-void-error/25640)

<div class="topic-metadata">

**Author:** [@type.gaurav](https://discourse.processing.org/u/type.gaurav)\
**Replies:** 8\
**Last updated:** [November 23, 2020, 6:47pm UTC](https://discourse.processing.org/t/unexpected-void-error/25640 "2020-11-23T18:47:19Z")

</div>

void setup(){ size(900,900); background(255); } void draw(){ for(int x = 0; x \< height; x = x+90){ for (int y = 0; ABy \< width; y = y+90){ shapeX(x, y, 90, 90, random(255)); } } void shapeX(float x, float y, fl…

---

## [Syncing processing with synths/pocket operators using MIDI CV or a click track?](https://discourse.processing.org/t/syncing-processing-with-synths-pocket-operators-using-midi-cv-or-a-click-track/25632)

<div class="topic-metadata">

**Author:** [@neel](https://discourse.processing.org/u/neel)\
**Replies:** 1\
**Last updated:** [November 23, 2020, 5:14pm UTC](https://discourse.processing.org/t/syncing-processing-with-synths-pocket-operators-using-midi-cv-or-a-click-track/25632 "2020-11-23T17:14:24Z")

</div>

I’ve got some processing code I’ve been working on to make generative visuals that go along with music. I’ve increasingly been creating the music myself using pocket operators. They sync to each other using what they cal…

---

## [Pixel sorting in processing 3.4](https://discourse.processing.org/t/pixel-sorting-in-processing-3-4/7479)

<div class="topic-metadata">

**Author:** [@thrm](https://discourse.processing.org/u/thrm)\
**Replies:** 6\
**Last updated:** [November 23, 2020, 5:08pm UTC](https://discourse.processing.org/t/pixel-sorting-in-processing-3-4/7479 "2020-11-23T17:08:25Z")

</div>

Hi I have a somewhat simple question (I think). Hope someone is able to help. I’m doing a project where I need to sort the pixels of an image by different parameters. As I’m very new to processing and self-learning I’m…

---

## [Having trouble with a code and its structure](https://discourse.processing.org/t/having-trouble-with-a-code-and-its-structure/25533)

<div class="topic-metadata">

**Author:** [@Spomch](https://discourse.processing.org/u/Spomch)\
**Replies:** 33\
**Last updated:** [November 23, 2020, 3:49pm UTC](https://discourse.processing.org/t/having-trouble-with-a-code-and-its-structure/25533 "2020-11-23T15:49:19Z")

</div>

Hi everyone, I’ve been struggling with my art project due to my lack of experience and knowledge of Processing. My problem concerns coding, which then lead to a project guidance problem. I will try my best to explain cle…

---

## [How to set random colors](https://discourse.processing.org/t/how-to-set-random-colors/25627)

<div class="topic-metadata">

**Author:** [@Ipboro](https://discourse.processing.org/u/Ipboro)\
**Replies:** 7\
**Last updated:** [November 23, 2020, 1:46pm UTC](https://discourse.processing.org/t/how-to-set-random-colors/25627 "2020-11-23T13:46:25Z")

</div>

please format code with \</\> button \* homework policy \* asking questions Hello, So I was wondering how can I (or if i can) randomize the colors in the set of code. This is my code for now, it is basiclly parametric l…

---

## [Google Material Design buttons in Processing ( With the ripple effect)](https://discourse.processing.org/t/google-material-design-buttons-in-processing-with-the-ripple-effect/25594)

<div class="topic-metadata">

**Author:** [@qewer3322](https://discourse.processing.org/u/qewer3322)\
**Replies:** 4\
**Last updated:** [November 23, 2020, 12:29pm UTC](https://discourse.processing.org/t/google-material-design-buttons-in-processing-with-the-ripple-effect/25594 "2020-11-23T12:29:51Z")

</div>

I always loved the look and feel of Google’s Material Design components, especially the ripple effect on the buttons. And I realized it had been some time since I did something with processing so I decided to replicate i…

---

## [Running in Browser](https://discourse.processing.org/t/running-in-browser/25621)

<div class="topic-metadata">

**Author:** [@cpw](https://discourse.processing.org/u/cpw)\
**Replies:** 3\
**Last updated:** [November 23, 2020, 11:20am UTC](https://discourse.processing.org/t/running-in-browser/25621 "2020-11-23T11:20:19Z")

</div>

Hi guys I have some code running in p5.js fine. I thought all I needed to do was export and be able to open the index.html file with a browser to run on my desktop however I am getting just a loading message. Any ideas…

---

## [How to create a simple timer?](https://discourse.processing.org/t/how-to-create-a-simple-timer/3901)

<div class="topic-metadata">

**Author:** [@Schred](https://discourse.processing.org/u/Schred)\
**Replies:** 15\
**Last updated:** [November 23, 2020, 7:20am UTC](https://discourse.processing.org/t/how-to-create-a-simple-timer/3901 "2020-11-23T07:20:59Z")

</div>

Hello, I think this is a rather simple question, but how do I create a timer(or something like that), that tells the programm to do thing 1, and then, after half a second, do thing 2? I tried using the frameRate() comma…

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

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