# Processing

**URL:** https://discourse.processing.org/c/processing/6.md?no_subcategories=false&page=193

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

**Page:** 194

---

## [Change background in order/ using values in array](https://discourse.processing.org/t/change-background-in-order-using-values-in-array/22665)

<div class="topic-metadata">

**Author:** [@anderbaer](https://discourse.processing.org/u/anderbaer)\
**Replies:** 5\
**Last updated:** [July 16, 2020, 8:29pm UTC](https://discourse.processing.org/t/change-background-in-order-using-values-in-array/22665 "2020-07-16T20:29:35Z")

</div>

int i = 0; int\[\] array = {250, 150, 100, 50, 0}; void setup() { size(500, 500); } void draw() { for (int i = 0; i \< array.length; i++) { if (array\[i\] == 0) { println(array); background(array\[i…

---

## [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…

---

## [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…

---

## [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…

---

## [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…

---

## [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:

---

## [Mapping with set values](https://discourse.processing.org/t/mapping-with-set-values/22586)

<div class="topic-metadata">

**Author:** [@yorkie](https://discourse.processing.org/u/yorkie)\
**Replies:** 3\
**Last updated:** [July 13, 2020, 7:40am UTC](https://discourse.processing.org/t/mapping-with-set-values/22586 "2020-07-13T07:40:54Z")

</div>

Hi There, I hope one of you fine people can help be with a problem. I need to map a range a values, however my range is non linear. A few example values below. 23=8 22=15 21=19 20=20 19=22 18=23 About 4 years ag…

---

## [Map csv file data in a map of any country](https://discourse.processing.org/t/map-csv-file-data-in-a-map-of-any-country/22565)

<div class="topic-metadata">

**Author:** [@DeathEater](https://discourse.processing.org/u/DeathEater)\
**Replies:** 1\
**Last updated:** [July 13, 2020, 5:57am UTC](https://discourse.processing.org/t/map-csv-file-data-in-a-map-of-any-country/22565 "2020-07-13T05:57:57Z")

</div>

Hello guys , I am new to processing and I have a question about my program. I am planning to plot the Corona virus data in the map of Nepal. I have a SVG file for the map, and csv files for corona virus data and Latitud…

---

## [Volumetric visualizations from X-ray micro-CT datasets(s) in Processing 3.53](https://discourse.processing.org/t/volumetric-visualizations-from-x-ray-micro-ct-datasets-s-in-processing-3-53/22511)

<div class="topic-metadata">

**Author:** [@JSGauthier](https://discourse.processing.org/u/JSGauthier)\
**Replies:** 8\
**Last updated:** [July 10, 2020, 6:49pm UTC](https://discourse.processing.org/t/volumetric-visualizations-from-x-ray-micro-ct-datasets-s-in-processing-3-53/22511 "2020-07-10T18:49:23Z")

</div>

Hello, my name is JS Gauthier. I am a artist working with scientific datasets in Saskatoon, Canada (https://vimeo.com/jsgauthier or https://jsgauthier.com/ ). I have created a series of 3D scans using X-Ray micro-tomogra…

---

## [Access SVG file path ID for plotting data into it](https://discourse.processing.org/t/access-svg-file-path-id-for-plotting-data-into-it/22572)

<div class="topic-metadata">

**Author:** [@DeathEater](https://discourse.processing.org/u/DeathEater)\
**Replies:** 1\
**Last updated:** [July 12, 2020, 6:42pm UTC](https://discourse.processing.org/t/access-svg-file-path-id-for-plotting-data-into-it/22572 "2020-07-12T18:42:38Z")

</div>

please format code with \</\> button \* homework policy \* asking questions I have SVG file ( Map of Nepal). The map has 75 districts. The path has an id which is the same name as the district. As as example see the code…

---

## [About 3D Animations](https://discourse.processing.org/t/about-3d-animations/22556)

<div class="topic-metadata">

**Author:** [@SouSageYa](https://discourse.processing.org/u/SouSageYa)\
**Replies:** 1\
**Last updated:** [July 12, 2020, 3:01pm UTC](https://discourse.processing.org/t/about-3d-animations/22556 "2020-07-12T15:01:56Z")

</div>

I’m Trying to understand how “Collada Loader For SketchUp and Blender” works. Can I visualise my 3D Object and move it as I want ?

---

## [Export App Bag Processing 3.5.4 MacOS /app is not running\_solution/](https://discourse.processing.org/t/export-app-bag-processing-3-5-4-macos-app-is-not-running-solution/22570)

<div class="topic-metadata">

**Author:** [@danserme](https://discourse.processing.org/u/danserme)\
**Replies:** 0\
**Last updated:** [July 12, 2020, 3:01pm UTC](https://discourse.processing.org/t/export-app-bag-processing-3-5-4-macos-app-is-not-running-solution/22570 "2020-07-12T15:01:33Z")

</div>

I had some issues with export of applications from Processing 3.5.4 on my MacOS. I searched if someone has posted the answer and I did not find any. The problem was that the exported application did not run at all. If y…

[Previous page](https://discourse.processing.org/c/processing/6.md?no_subcategories=false&page=192)

[Next page](https://discourse.processing.org/c/processing/6.md?no_subcategories=false&page=194)
