# Latest

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

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

**Page:** 324

---

## [P5.js bug report (semicolons)](https://discourse.processing.org/t/p5-js-bug-report-semicolons/22542)

<div class="topic-metadata">

**Author:** [@DavidMatuszek](https://discourse.processing.org/u/DavidMatuszek)\
**Replies:** 5\
**Last updated:** [July 16, 2020, 7:48pm UTC](https://discourse.processing.org/t/p5-js-bug-report-semicolons/22542 "2020-07-16T19:48:04Z")

</div>

JavaScript does not require semicolons at the end of lines. For the most part, p5.js does not require semicolons at the end of lines. Nevertheless, it appears that lines not ending in semicolons are being counted as err…

---

## [Objects moving at the same time](https://discourse.processing.org/t/objects-moving-at-the-same-time/22640)

<div class="topic-metadata">

**Author:** [@luimi](https://discourse.processing.org/u/luimi)\
**Replies:** 2\
**Last updated:** [July 16, 2020, 4:08pm UTC](https://discourse.processing.org/t/objects-moving-at-the-same-time/22640 "2020-07-16T16:08:33Z")

</div>

hi, i have made a random walker proggram and my goal is to be able to have a walker appear on the mouse position with every mouse click, but when a new one appears the previous one always stops moving, please help me. so…

---

## [When do you use keyPressed as function?](https://discourse.processing.org/t/when-do-you-use-keypressed-as-function/22278)

<div class="topic-metadata">

**Author:** [@klap](https://discourse.processing.org/u/klap)\
**Replies:** 5\
**Last updated:** [July 16, 2020, 3:52pm UTC](https://discourse.processing.org/t/when-do-you-use-keypressed-as-function/22278 "2020-07-16T15:52:53Z")

</div>

There seems to be multiple ways to use keyPressed. if (keyPressed == true) { … or void keyPressed() { … When do you use it as function and when not? When and how do you combine both?

---

## [About Live Video Capturing](https://discourse.processing.org/t/about-live-video-capturing/22298)

<div class="topic-metadata">

**Author:** [@SouSageYa](https://discourse.processing.org/u/SouSageYa)\
**Replies:** 8\
**Last updated:** [July 16, 2020, 2:36pm UTC](https://discourse.processing.org/t/about-live-video-capturing/22298 "2020-07-16T14:36:24Z")

</div>

Is there a way to capture live videos and render those live videos

---

## [Problem mapping audio to different output device](https://discourse.processing.org/t/problem-mapping-audio-to-different-output-device/22663)

<div class="topic-metadata">

**Author:** [@chickman](https://discourse.processing.org/u/chickman)\
**Replies:** 0\
**Last updated:** [July 16, 2020, 2:22pm UTC](https://discourse.processing.org/t/problem-mapping-audio-to-different-output-device/22663 "2020-07-16T14:22:13Z")

</div>

Hey guys, I’m trying to play audio files to a different sound card connected to my laptop. I attached my code below. I keep getting the following error when attempting to write to the sound card (I do this through line …

---

## [Serial communications on two ports](https://discourse.processing.org/t/serial-communications-on-two-ports/22630)

<div class="topic-metadata">

**Author:** [@Jaguar](https://discourse.processing.org/u/Jaguar)\
**Replies:** 4\
**Last updated:** [July 16, 2020, 1:32am UTC](https://discourse.processing.org/t/serial-communications-on-two-ports/22630 "2020-07-16T01:32:57Z")

</div>

I am new to processing software and Arduino too. I would very much appreciate if any of you can guide me on below project: Arduino Uno board connected to com port 7 of computer. Using two pins 9 & 10 to turn on two ligh…

---

## [Trying to make something like a visual novel with a lot of booleans](https://discourse.processing.org/t/trying-to-make-something-like-a-visual-novel-with-a-lot-of-booleans/22633)

<div class="topic-metadata">

**Author:** [@qewer3322](https://discourse.processing.org/u/qewer3322)\
**Replies:** 7\
**Last updated:** [July 16, 2020, 11:47am UTC](https://discourse.processing.org/t/trying-to-make-something-like-a-visual-novel-with-a-lot-of-booleans/22633 "2020-07-16T11:47:27Z")

</div>

I’m trying to make something like a visual novel game but without choices (but there will be other interactive stuff of course). I decided to use booleans for scenes like this: boolean s1 = true; boolean s2 = false; boo…

---

## [VectorLerp for walking on a path](https://discourse.processing.org/t/vectorlerp-for-walking-on-a-path/22660)

<div class="topic-metadata">

**Author:** [@villares](https://discourse.processing.org/u/villares)\
**Replies:** 0\
**Last updated:** [July 16, 2020, 11:41am UTC](https://discourse.processing.org/t/vectorlerp-for-walking-on-a-path/22660 "2020-07-16T11:41:25Z")

</div>

@jeremydouglass posted this example somewhere on this forum, and I enjoyed porting it to Python mode. That’s the post. # LerpVectorsSimplified # 2019-04 Processing 3.4 - based on LerpVectorsExample by Jeremy Douglass …

---

## [New version of PiCrate (processing in ruby)](https://discourse.processing.org/t/new-version-of-picrate-processing-in-ruby/22643)

<div class="topic-metadata">

**Author:** [@monkstone](https://discourse.processing.org/u/monkstone)\
**Replies:** 0\
**Last updated:** [July 15, 2020, 6:43pm UTC](https://discourse.processing.org/t/new-version-of-picrate-processing-in-ruby/22643 "2020-07-15T18:43:22Z")

</div>

Announcing the latest release of my PiCrate gem for the RaspberryPI. Tested on:- RaspberryPI OS (32 bit) with RaspberryPI 3B+ and RaspberryPI 4. Manjaro LInux ARM (64 bit) and RaspberryPI 4. NB: does require jdk11+. F…

---

## [Processing file association on Linux (Ubuntu)](https://discourse.processing.org/t/processing-file-association-on-linux-ubuntu/22637)

<div class="topic-metadata">

**Author:** [@RenanRabelo](https://discourse.processing.org/u/RenanRabelo)\
**Replies:** 2\
**Last updated:** [July 15, 2020, 10:48pm UTC](https://discourse.processing.org/t/processing-file-association-on-linux-ubuntu/22637 "2020-07-15T22:48:55Z")

</div>

I started using Linux Ubuntu this week and the first thing I realized when trying to install Processing is that it doesn’t appear in the apps panel nor is possible to execute the “Processing” file on the installation fol…

---

## [Processing Sketch on Macbook Air Won’t Connect with XBee](https://discourse.processing.org/t/processing-sketch-on-macbook-air-won-t-connect-with-xbee/22644)

<div class="topic-metadata">

**Author:** [@sdc020583](https://discourse.processing.org/u/sdc020583)\
**Replies:** 0\
**Last updated:** [July 15, 2020, 8:23pm UTC](https://discourse.processing.org/t/processing-sketch-on-macbook-air-won-t-connect-with-xbee/22644 "2020-07-15T20:23:21Z")

</div>

HELP! My Macbook Air, running a Processing sketch, doesn’t connect with my XBee, There are several anomalies that really have me confused. In fact, I’m totally stuck. Here are the details: Hardware- The XBee is a Seri…

---

## [How to edit the path of an SVG using the code](https://discourse.processing.org/t/how-to-edit-the-path-of-an-svg-using-the-code/22604)

<div class="topic-metadata">

**Author:** [@DeathEater](https://discourse.processing.org/u/DeathEater)\
**Replies:** 1\
**Last updated:** [July 15, 2020, 3:10pm UTC](https://discourse.processing.org/t/how-to-edit-the-path-of-an-svg-using-the-code/22604 "2020-07-15T15:10:19Z")

</div>

In the path of an SVG file \<path id =“12121”, fill=“FF0000”…\>. How to get the attributes inside the path and edit any specific attribute. For example, if i want to change the color of that path for any selected ids. how …

---

## [Sound library lag](https://discourse.processing.org/t/sound-library-lag/22632)

<div class="topic-metadata">

**Author:** [@Bubloo7](https://discourse.processing.org/u/Bubloo7)\
**Replies:** 0\
**Last updated:** [July 15, 2020, 8:24am UTC](https://discourse.processing.org/t/sound-library-lag/22632 "2020-07-15T08:24:50Z")

</div>

Hi, I’m a beginner to processing and I’m trying to use the sound library. It works as it should but whenever I run the sketch it takes 2-3 minutes of loading before the sketch actually starts. While it’s loading, all I s…

---

## [A function that takes in a function Y and a number, and returns a function which when called, invokes Y some number of times](https://discourse.processing.org/t/a-function-that-takes-in-a-function-y-and-a-number-and-returns-a-function-which-when-called-invokes-y-some-number-of-times/22512)

<div class="topic-metadata">

**Author:** [@Biggy](https://discourse.processing.org/u/Biggy)\
**Replies:** 5\
**Last updated:** [July 15, 2020, 1:02am UTC](https://discourse.processing.org/t/a-function-that-takes-in-a-function-y-and-a-number-and-returns-a-function-which-when-called-invokes-y-some-number-of-times/22512 "2020-07-15T01:02:14Z")

</div>

please format code with \</\> button \* homework policy \* asking questions function loopable(n, func) { return function (...args) { function looper() { if (n === 0) { return undefined; } n -=…

---

## [Sequence of actions from array](https://discourse.processing.org/t/sequence-of-actions-from-array/22480)

<div class="topic-metadata">

**Author:** [@LordCacops](https://discourse.processing.org/u/LordCacops)\
**Replies:** 5\
**Last updated:** [July 14, 2020, 10:14pm UTC](https://discourse.processing.org/t/sequence-of-actions-from-array/22480 "2020-07-14T22:14:54Z")

</div>

Howdy! I want to create a sequence of events as determined by an array, but for some reason, only the last element of the array is accounted for. Also, I would like the actions to occur with a slight delay with respect…

---

## [About Restarting](https://discourse.processing.org/t/about-restarting/22557)

<div class="topic-metadata">

**Author:** [@SouSageYa](https://discourse.processing.org/u/SouSageYa)\
**Replies:** 2\
**Last updated:** [July 14, 2020, 9:42pm UTC](https://discourse.processing.org/t/about-restarting/22557 "2020-07-14T21:42:40Z")

</div>

Can I write a Reset code for my sketch. Like the Stop and Run method

---

## [Struggling to find cause of mouseX shifting to the right when used](https://discourse.processing.org/t/struggling-to-find-cause-of-mousex-shifting-to-the-right-when-used/22602)

<div class="topic-metadata">

**Author:** [@falseStart](https://discourse.processing.org/u/falseStart)\
**Replies:** 7\
**Last updated:** [July 14, 2020, 8:38pm UTC](https://discourse.processing.org/t/struggling-to-find-cause-of-mousex-shifting-to-the-right-when-used/22602 "2020-07-14T20:38:03Z")

</div>

I’m currently trying to make a program that shows a grid of tiles that change color when clicked. I’ve made it so that the tiles are evenly distributed with an edge or gutter around the sides no matter the number of tile…

---

## [Keyword "new" and arrays - clarification](https://discourse.processing.org/t/keyword-new-and-arrays-clarification/22598)

<div class="topic-metadata">

**Author:** [@mnoble](https://discourse.processing.org/u/mnoble)\
**Replies:** 8\
**Last updated:** [July 14, 2020, 6:59pm UTC](https://discourse.processing.org/t/keyword-new-and-arrays-clarification/22598 "2020-07-14T18:59:29Z")

</div>

Hello Forum, This question is about explaining arrays simply to beginners…please correct or clarify, thank you :slight\_smile: When an array is declared and initialized at the same time like this: int mySet\[\] = {15,75,…

---

## [Mapping sound files to different sound cards](https://discourse.processing.org/t/mapping-sound-files-to-different-sound-cards/22616)

<div class="topic-metadata">

**Author:** [@chickman](https://discourse.processing.org/u/chickman)\
**Replies:** 0\
**Last updated:** [July 14, 2020, 3:11pm UTC](https://discourse.processing.org/t/mapping-sound-files-to-different-sound-cards/22616 "2020-07-14T15:11:00Z")

</div>

Hi! I’m trying to play different WAV files to different sound cards. I’m going to have 6 sound cards connected (Over a Dante audio network). I see that with a “Sound” object you can select the output device (Ex: Sound zo…

---

## [P5.new to start a new sketch on editor.p5js.org](https://discourse.processing.org/t/p5-new-to-start-a-new-sketch-on-editor-p5js-org/22621)

<div class="topic-metadata">

**Author:** [@haideralipunjabi](https://discourse.processing.org/u/haideralipunjabi)\
**Replies:** 0\
**Last updated:** [July 14, 2020, 4:25pm UTC](https://discourse.processing.org/t/p5-new-to-start-a-new-sketch-on-editor-p5js-org/22621 "2020-07-14T16:25:22Z")

</div>

Many organisations have started to use the .new TLD to create a shortcut for their web apps. Github has repo.new and gist.new to create a new repository & gist respectively. I also heard CodePen has one as well, but I ca…

---

## [ArrayList function add doesn't work](https://discourse.processing.org/t/arraylist-function-add-doesnt-work/22359)

<div class="topic-metadata">

**Author:** [@Kai](https://discourse.processing.org/u/Kai)\
**Replies:** 10\
**Last updated:** [July 5, 2020, 5:08am UTC](https://discourse.processing.org/t/arraylist-function-add-doesnt-work/22359 "2020-07-05T05:08:52Z")

</div>

Hello guys, I’m new to processing and have been recently following some youtube online tutorials to learn. The topic is called ArrayList. However, when I followed the scripts some errors occurred, suggesting"The functi…

---

## [Hardware optimization for the Hamoid Video Export Library (FFMPEG)](https://discourse.processing.org/t/hardware-optimization-for-the-hamoid-video-export-library-ffmpeg/22617)

<div class="topic-metadata">

**Author:** [@gudmundursteinn](https://discourse.processing.org/u/gudmundursteinn)\
**Replies:** 0\
**Last updated:** [July 14, 2020, 3:18pm UTC](https://discourse.processing.org/t/hardware-optimization-for-the-hamoid-video-export-library-ffmpeg/22617 "2020-07-14T15:18:39Z")

</div>

I’m a big fan of the Hamoid Video Export Library and have been using it recently with great results. I do have encountered frame drop with some sketches, however, and usually, they are longer, and have more things going …

---

## [Why is this keyPressed not working](https://discourse.processing.org/t/why-is-this-keypressed-not-working/22603)

<div class="topic-metadata">

**Author:** [@DeathEater](https://discourse.processing.org/u/DeathEater)\
**Replies:** 5\
**Last updated:** [July 14, 2020, 12:35pm UTC](https://discourse.processing.org/t/why-is-this-keypressed-not-working/22603 "2020-07-14T12:35:49Z")

</div>

Inside the draw function i made a keyPressed. I want that piece of code to run only if i press r, but for some reason it is not working. Is there a better way to do it. I also want to put multiple different keys to run d…

---

## [How do I declare an array of objects?](https://discourse.processing.org/t/how-do-i-declare-an-array-of-objects/22591)

<div class="topic-metadata">

**Author:** [@fabeck01](https://discourse.processing.org/u/fabeck01)\
**Replies:** 2\
**Last updated:** [July 14, 2020, 1:54pm UTC](https://discourse.processing.org/t/how-do-i-declare-an-array-of-objects/22591 "2020-07-14T13:54:37Z")

</div>

Hello, I’m struggling with the definition of an array with the following (nested) structure - refer to picture: For each item in phase\[\] there should be: a title (string) a subtitle (string) an array of milestone …

---

## [Calling createGraphics() many times causing memory leak](https://discourse.processing.org/t/calling-creategraphics-many-times-causing-memory-leak/22388)

<div class="topic-metadata">

**Author:** [@benp](https://discourse.processing.org/u/benp)\
**Replies:** 4\
**Last updated:** [July 14, 2020, 12:59pm UTC](https://discourse.processing.org/t/calling-creategraphics-many-times-causing-memory-leak/22388 "2020-07-14T12:59:43Z")

</div>

I have a sketch I’ve been working on, and I found that calling createGraphics() repeatedly causes memory to not be freed. Representative example: var size = 600; function setup() { createCanvas(size, size); stroke(…

---

## [Splitting a String into an Array](https://discourse.processing.org/t/splitting-a-string-into-an-array/22495)

<div class="topic-metadata">

**Author:** [@CKMJPEG](https://discourse.processing.org/u/CKMJPEG)\
**Replies:** 8\
**Last updated:** [July 14, 2020, 1:53am UTC](https://discourse.processing.org/t/splitting-a-string-into-an-array/22495 "2020-07-14T01:53:31Z")

</div>

Hi Processing friends, I have a string .txt file that has 6 columns of data, which corresponds to x,y,z,r,g,b I want to load the string file and parse the data into an array. I would like to have the data as an array …

---

## [Optimization, CSV files and how to know which functions are easier for the computer?](https://discourse.processing.org/t/optimization-csv-files-and-how-to-know-which-functions-are-easier-for-the-computer/22596)

<div class="topic-metadata">

**Author:** [@jessy87](https://discourse.processing.org/u/jessy87)\
**Replies:** 1\
**Last updated:** [July 13, 2020, 10:54pm UTC](https://discourse.processing.org/t/optimization-csv-files-and-how-to-know-which-functions-are-easier-for-the-computer/22596 "2020-07-13T22:54:25Z")

</div>

Hey guys ! I’m currently trying to learn processing with the amazing videos by the Coding Train on Youtube. So I’m pretty new to programming and I started using CVS files to keep a good bunch of data I could otherwise p…

---

## [Processing PRError: setPenT4: invalid pen transformation (singular)](https://discourse.processing.org/t/processing-prerror-setpent4-invalid-pen-transformation-singular/22595)

<div class="topic-metadata">

**Author:** [@Leo\_Aguiar](https://discourse.processing.org/u/Leo_Aguiar)\
**Replies:** 0\
**Last updated:** [July 13, 2020, 8:57pm UTC](https://discourse.processing.org/t/processing-prerror-setpent4-invalid-pen-transformation-singular/22595 "2020-07-13T20:57:59Z")

</div>

Hi forum, I was working on a sketch using the scale() function and a control P5 slider to set one of the values for it. I got the above error when one of the scale parameters was set to zero. I couldn’t find any documen…

---

## [Rotate png in 90 degree](https://discourse.processing.org/t/rotate-png-in-90-degree/22492)

<div class="topic-metadata">

**Author:** [@aerob](https://discourse.processing.org/u/aerob)\
**Replies:** 6\
**Last updated:** [July 13, 2020, 2:38pm UTC](https://discourse.processing.org/t/rotate-png-in-90-degree/22492 "2020-07-13T14:38:42Z")

</div>

Hello guys, I am very short on time and new to processing but i need help on fixing my code. I have a large screen filled with a png. It looks like this: my goal is that they all spin every second for random 90-180 or…

---

## [How to add Hindi Font in Processing?](https://discourse.processing.org/t/how-to-add-hindi-font-in-processing/11653)

<div class="topic-metadata">

**Author:** [@Anmol](https://discourse.processing.org/u/Anmol)\
**Replies:** 9\
**Last updated:** [July 13, 2020, 10:08am UTC](https://discourse.processing.org/t/how-to-add-hindi-font-in-processing/11653 "2020-07-13T10:08:21Z")

</div>

Hi, I’m trying to add Hindi fonts in Processing for typography but it’s not working? Any idea how it can be achieved. I’m getting the following error:

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

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