# Latest

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

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

**Page:** 214

---

## [Contour rectangle with an ellipse](https://discourse.processing.org/t/contour-rectangle-with-an-ellipse/30408)

<div class="topic-metadata">

**Author:** [@guidoDimasi](https://discourse.processing.org/u/guidoDimasi)\
**Replies:** 2\
**Last updated:** [June 20, 2021, 1:33pm UTC](https://discourse.processing.org/t/contour-rectangle-with-an-ellipse/30408 "2021-06-20T13:33:05Z")

</div>

Hi, there a simple way to contour a rectangle with an ellipse? i’ve tried vertex, curvedvertex but nothing work well what i’m trying to accomplish is a way to apply some sort of a circle mask to a underlyng object,sha…

---

## [Save and write an odt file](https://discourse.processing.org/t/save-and-write-an-odt-file/30239)

<div class="topic-metadata">

**Author:** [@SimonAbitbol](https://discourse.processing.org/u/SimonAbitbol)\
**Replies:** 8\
**Last updated:** [June 20, 2021, 12:28pm UTC](https://discourse.processing.org/t/save-and-write-an-odt-file/30239 "2021-06-20T12:28:56Z")

</div>

Hi, I would like to write and save a file with open office. Is this feasible ?

---

## [GestureDetector does not exist](https://discourse.processing.org/t/gesturedetector-does-not-exist/30776)

<div class="topic-metadata">

**Author:** [@paturn](https://discourse.processing.org/u/paturn)\
**Replies:** 5\
**Last updated:** [June 20, 2021, 10:50am UTC](https://discourse.processing.org/t/gesturedetector-does-not-exist/30776 "2021-06-20T10:50:42Z")

</div>

I am attempting to use GestureDetector in one of my apps but in Processing 3 it says it doesn’t exist. I notice from one of noel’s answers in 2020 that it does exist. Do you have any further information? Is it (only) in …

---

## [Rect Animation (Android)](https://discourse.processing.org/t/rect-animation-android/30809)

<div class="topic-metadata">

**Author:** [@Rogo](https://discourse.processing.org/u/Rogo)\
**Replies:** 2\
**Last updated:** [June 20, 2021, 9:54am UTC](https://discourse.processing.org/t/rect-animation-android/30809 "2021-06-20T09:54:23Z")

</div>

can i do a rect (); animate like that? I tried it for 3 hours but it doesn’t quite work

---

## [Grilla de circulos hechas con imagenes aleatorias](https://discourse.processing.org/t/grilla-de-circulos-hechas-con-imagenes-aleatorias/30806)

<div class="topic-metadata">

**Author:** [@userfc](https://discourse.processing.org/u/userfc)\
**Replies:** 1\
**Last updated:** [June 19, 2021, 10:44pm UTC](https://discourse.processing.org/t/grilla-de-circulos-hechas-con-imagenes-aleatorias/30806 "2021-06-19T22:44:42Z")

</div>

Hola! Estoy comenzando un pequeño proyecto escolar y soy bastante novato en Processing. No sé si puedo preguntar en este foro, pero nuestro trabajo si o si debemos realizarlo en p5.js. Mi problema: la pequeña interactivi…

---

## [Grid of circles made with images randomly selected](https://discourse.processing.org/t/grid-of-circles-made-with-images-randomly-selected/30802)

<div class="topic-metadata">

**Author:** [@userfc](https://discourse.processing.org/u/userfc)\
**Replies:** 5\
**Last updated:** [June 19, 2021, 10:42pm UTC](https://discourse.processing.org/t/grid-of-circles-made-with-images-randomly-selected/30802 "2021-06-19T22:42:11Z")

</div>

https://editor.p5js.org/rfcanas/sketches/X-c\_v8L9n Hi! I’m starting a little school project and I’m quite a newbie to Processing. I do not know if I can ask in this forum, but our work if or if we should do it in p5.js.…

---

## [Creating an I2C address for a RPi slave](https://discourse.processing.org/t/creating-an-i2c-address-for-a-rpi-slave/30732)

<div class="topic-metadata">

**Author:** [@TheDek](https://discourse.processing.org/u/TheDek)\
**Replies:** 1\
**Last updated:** [June 19, 2021, 9:00pm UTC](https://discourse.processing.org/t/creating-an-i2c-address-for-a-rpi-slave/30732 "2021-06-19T21:00:18Z")

</div>

I am trying to connect two Raspberry Pi’s using an I2C connection. I planned to use one as the slave sending data, and the other as the master. When I do i2cdetect -y 1 on my system the two pi’s can see each other, but n…

---

## [How to improve frequency detection? with mini library, or with a an other library?](https://discourse.processing.org/t/how-to-improve-frequency-detection-with-mini-library-or-with-a-an-other-library/30665)

<div class="topic-metadata">

**Author:** [@bking](https://discourse.processing.org/u/bking)\
**Replies:** 3\
**Last updated:** [June 19, 2021, 5:41pm UTC](https://discourse.processing.org/t/how-to-improve-frequency-detection-with-mini-library-or-with-a-an-other-library/30665 "2021-06-19T17:41:53Z")

</div>

Hello, I work on a machine whose movement is actualized with certain frequencies of a music. You can see an exemple here: I started with the beat detect example from the minim library. But the detection i…

---

## [Trying to target an area of square to apply noise function](https://discourse.processing.org/t/trying-to-target-an-area-of-square-to-apply-noise-function/30786)

<div class="topic-metadata">

**Author:** [@debxyz](https://discourse.processing.org/u/debxyz)\
**Replies:** 4\
**Last updated:** [June 19, 2021, 4:47pm UTC](https://discourse.processing.org/t/trying-to-target-an-area-of-square-to-apply-noise-function/30786 "2021-06-19T16:47:34Z")

</div>

I am trying to target selected areas of a square. In the code below I have targeted the top edge of the shape. Am I on the right path? It seems like this current iteration should work, but it’s not. Any guidance is mos…

---

## ["Wait until" function](https://discourse.processing.org/t/wait-until-function/30792)

<div class="topic-metadata">

**Author:** [@CodeMasterX](https://discourse.processing.org/u/CodeMasterX)\
**Replies:** 1\
**Last updated:** [June 19, 2021, 2:14pm UTC](https://discourse.processing.org/t/wait-until-function/30792 "2021-06-19T14:14:39Z")

</div>

Hi! I developing a game when I realised a “wait until” function would be interesting. Is there any way to do it other than (I want to use delay() with it, since it will be used in thread(""):wink: while(condition == fal…

---

## [Why a= a\* -1 doesn't work here?](https://discourse.processing.org/t/why-a-a-1-doesnt-work-here/30794)

<div class="topic-metadata">

**Author:** [@karenChip](https://discourse.processing.org/u/karenChip)\
**Replies:** 4\
**Last updated:** [June 19, 2021, 12:40pm UTC](https://discourse.processing.org/t/why-a-a-1-doesnt-work-here/30794 "2021-06-19T12:40:38Z")

</div>

Hi, I just made a rectangle which moves along the width and height of the window. I managed to make one but during the process, i encountered a problem that ‘a = a \* -1’ can’t work. I couldn’t figure it out the reason. …

---

## [Why is curveTightness acting so weird?](https://discourse.processing.org/t/why-is-curvetightness-acting-so-weird/30770)

<div class="topic-metadata">

**Author:** [@cog](https://discourse.processing.org/u/cog)\
**Replies:** 2\
**Last updated:** [June 19, 2021, 1:06am UTC](https://discourse.processing.org/t/why-is-curvetightness-acting-so-weird/30770 "2021-06-19T01:06:17Z")

</div>

https://editor.p5js.org/CarlyRaeJepsenStan/sketches/xH6tvmKep I am applying curveTightness to a shape made out of points and curveVertex. For some reason, after a certain level of tightness on the curve, this strang…

---

## [Keypress in other application](https://discourse.processing.org/t/keypress-in-other-application/30783)

<div class="topic-metadata">

**Author:** [@MoonAlien822](https://discourse.processing.org/u/MoonAlien822)\
**Replies:** 1\
**Last updated:** [June 18, 2021, 10:50pm UTC](https://discourse.processing.org/t/keypress-in-other-application/30783 "2021-06-18T22:50:03Z")

</div>

Is there any way to have a program press a key in another application?

---

## [Declare and use array of colors](https://discourse.processing.org/t/declare-and-use-array-of-colors/30785)

<div class="topic-metadata">

**Author:** [@yalaniv](https://discourse.processing.org/u/yalaniv)\
**Replies:** 2\
**Last updated:** [June 18, 2021, 10:15pm UTC](https://discourse.processing.org/t/declare-and-use-array-of-colors/30785 "2021-06-18T22:15:01Z")

</div>

I have a list of rgb colors. I want to store them in an array, and while running, choose randomly index. since the fill function require 3 numbers, I wonder how to declare it and use it

---

## [ControlP5 buttons issue Android](https://discourse.processing.org/t/controlp5-buttons-issue-android/30779)

<div class="topic-metadata">

**Author:** [@mmuylle](https://discourse.processing.org/u/mmuylle)\
**Replies:** 1\
**Last updated:** [June 18, 2021, 9:04pm UTC](https://discourse.processing.org/t/controlp5-buttons-issue-android/30779 "2021-06-18T21:04:34Z")

</div>

A test sketch consists of two ControlP5 buttons. When run in Java mode, the buttons behaves as expected, a click immediately generates a response text. However, in Android mode, one has to click twice to get the response…

---

## [Println() prints incorrect text](https://discourse.processing.org/t/println-prints-incorrect-text/30614)

<div class="topic-metadata">

**Author:** [@lzo](https://discourse.processing.org/u/lzo)\
**Replies:** 3\
**Last updated:** [June 18, 2021, 7:33pm UTC](https://discourse.processing.org/t/println-prints-incorrect-text/30614 "2021-06-18T19:33:14Z")

</div>

Hello all, Running processing 3.5.4 under Window 10, println() prints incorrect text to the console. For example void setup(){ println("XYZ!"); } produces the following output: VWX/ I chose ‘XYZ’ because I noticed t…

---

## [Multiply an array with a number](https://discourse.processing.org/t/multiply-an-array-with-a-number/30778)

<div class="topic-metadata">

**Author:** [@Sayochi](https://discourse.processing.org/u/Sayochi)\
**Replies:** 1\
**Last updated:** [June 18, 2021, 3:17pm UTC](https://discourse.processing.org/t/multiply-an-array-with-a-number/30778 "2021-06-18T15:17:13Z")

</div>

I need to multiply a float array with a float value without looping over every item. I checked internet a bit and tried some stuff. array.map(number); looks okay to me but Im getting an error: cannot invoke map(float) o…

---

## [Mouse event unwantedly interferes with button click](https://discourse.processing.org/t/mouse-event-unwantedly-interferes-with-button-click/30664)

<div class="topic-metadata">

**Author:** [@mmuylle](https://discourse.processing.org/u/mmuylle)\
**Replies:** 2\
**Last updated:** [June 18, 2021, 1:09pm UTC](https://discourse.processing.org/t/mouse-event-unwantedly-interferes-with-button-click/30664 "2021-06-18T13:09:13Z")

</div>

Part of a sketch uses a button and a mouse event where the mouse event should only occur within the border of a rectangle. Unfortunately, my code forces the user to click the button twice before taking any action. This i…

---

## [How to stop moving the slider until the key is released](https://discourse.processing.org/t/how-to-stop-moving-the-slider-until-the-key-is-released/30775)

<div class="topic-metadata">

**Author:** [@noobcoderxx](https://discourse.processing.org/u/noobcoderxx)\
**Replies:** 5\
**Last updated:** [June 18, 2021, 8:02am UTC](https://discourse.processing.org/t/how-to-stop-moving-the-slider-until-the-key-is-released/30775 "2021-06-18T08:02:42Z")

</div>

class slider { int y = 0; void draw() { keyPressed(); keyReleased(); //not going out of frame if(y \< 0) y += 25; if(y \> height-25) y -= 25; rect(width-30, y, 10, rectSize); } void k…

---

## [Processing Usability Survey](https://discourse.processing.org/t/processing-usability-survey/30768)

<div class="topic-metadata">

**Author:** [@joserivas1998](https://discourse.processing.org/u/joserivas1998)\
**Replies:** 1\
**Last updated:** [June 18, 2021, 5:21am UTC](https://discourse.processing.org/t/processing-usability-survey/30768 "2021-06-18T05:21:37Z")

</div>

Hello everyone! I am not sure if this kind of post is appropriate here. I am taking a course on Human-Computer Interaction to finish up my undergrad in Computer Science this summer. My term project is to evaluate a prog…

---

## [Stop A Timer (10 second timer)](https://discourse.processing.org/t/stop-a-timer-10-second-timer/30764)

<div class="topic-metadata">

**Author:** [@UrguitaLoka](https://discourse.processing.org/u/UrguitaLoka)\
**Replies:** 1\
**Last updated:** [June 17, 2021, 6:36pm UTC](https://discourse.processing.org/t/stop-a-timer-10-second-timer/30764 "2021-06-17T18:36:37Z")

</div>

I am trying to build a Clicks Per Second Test (CPS), but I can’t make the timer stop at the 10-second mark. This would allow gamemode-2 to be activated and calculate the actual clicks per second. My attempt of doing that…

---

## [Using Processing to control strips](https://discourse.processing.org/t/using-processing-to-control-strips/30710)

<div class="topic-metadata">

**Author:** [@dlewin](https://discourse.processing.org/u/dlewin)\
**Replies:** 4\
**Last updated:** [June 17, 2021, 6:30pm UTC](https://discourse.processing.org/t/using-processing-to-control-strips/30710 "2021-06-17T18:30:36Z")

</div>

Hi, I have 12 Dotstar strips from Adafruit https://learn.adafruit.com/adafruit-dotstar-leds?view=all and I’d like to use them as a big matrix to display animated images or animations. Therefore my question is : how to …

---

## [Distance between two objects](https://discourse.processing.org/t/distance-between-two-objects/30751)

<div class="topic-metadata">

**Author:** [@MacJ](https://discourse.processing.org/u/MacJ)\
**Replies:** 3\
**Last updated:** [June 17, 2021, 5:25pm UTC](https://discourse.processing.org/t/distance-between-two-objects/30751 "2021-06-17T17:25:40Z")

</div>

Hello i want to calculate the distance between the centre of Pac-Man and the centre of the treat and If this distance is less than the radius of Pac-Man, we will consider Pac-Man to have “eaten” the treat. When Pac-Man …

---

## [Change size of G4P controls](https://discourse.processing.org/t/change-size-of-g4p-controls/30722)

<div class="topic-metadata">

**Author:** [@gyula](https://discourse.processing.org/u/gyula)\
**Replies:** 14\
**Last updated:** [June 17, 2021, 5:08pm UTC](https://discourse.processing.org/t/change-size-of-g4p-controls/30722 "2021-06-17T17:08:46Z")

</div>

I’d like to be able to rearrange my G4P controls with the mouse. I’ve found an easy way to move them around with moveTo(newX, newY): //G4P library import g4p\_controls.\*; GButton button; GTextField textField; ArrayList\<…

---

## [Make two sketches comunicate](https://discourse.processing.org/t/make-two-sketches-comunicate/30755)

<div class="topic-metadata">

**Author:** [@fatou](https://discourse.processing.org/u/fatou)\
**Replies:** 2\
**Last updated:** [June 17, 2021, 4:53pm UTC](https://discourse.processing.org/t/make-two-sketches-comunicate/30755 "2021-06-17T16:53:33Z")

</div>

please format code with \</\> button \* homework policy \* asking questions Hello everyone! I´m working on a project that consists of two sketches that communicate. In the first one, you can draw with the mouse, and whe…

---

## [Parsing object to array/Getting name of an object attribute](https://discourse.processing.org/t/parsing-object-to-array-getting-name-of-an-object-attribute/30759)

<div class="topic-metadata">

**Author:** [@Naik\_Trofimov](https://discourse.processing.org/u/Naik_Trofimov)\
**Replies:** 3\
**Last updated:** [June 17, 2021, 4:40pm UTC](https://discourse.processing.org/t/parsing-object-to-array-getting-name-of-an-object-attribute/30759 "2021-06-17T16:40:44Z")

</div>

Hello everyone, I had an idea to try to make a tool for saving the state of a running program on processing, which could be applied by adding just a couple of lines, I would call it “quick save”. The problem is that in a…

---

## [Error in sound player](https://discourse.processing.org/t/error-in-sound-player/30717)

<div class="topic-metadata">

**Author:** [@Pauls](https://discourse.processing.org/u/Pauls)\
**Replies:** 1\
**Last updated:** [June 17, 2021, 4:05pm UTC](https://discourse.processing.org/t/error-in-sound-player/30717 "2021-06-17T16:05:23Z")

</div>

I tried to test sound file but there is no respond. Can some one tell me the reason. The music.play become yellow and the following error is on consol: NullPointerException Here is the code: import processing.sound.\*; …

---

## [How to install and import jgrapht in Python mode](https://discourse.processing.org/t/how-to-install-and-import-jgrapht-in-python-mode/25620)

<div class="topic-metadata">

**Author:** [@solub](https://discourse.processing.org/u/solub)\
**Replies:** 12\
**Last updated:** [June 17, 2021, 11:09am UTC](https://discourse.processing.org/t/how-to-install-and-import-jgrapht-in-python-mode/25620 "2021-06-17T11:09:43Z")

</div>

Hi all, I have an issue installing and using the latest version of jgrapht with Python mode. I used to work with an older version tailored for Processing but that port is very limited and is missing most of the function…

---

## [Python Mode for Processing 4 alpha](https://discourse.processing.org/t/python-mode-for-processing-4-alpha/30760)

<div class="topic-metadata">

**Author:** [@tabreturn](https://discourse.processing.org/u/tabreturn)\
**Replies:** 0\
**Last updated:** [June 17, 2021, 10:49am UTC](https://discourse.processing.org/t/python-mode-for-processing-4-alpha/30760 "2021-06-17T10:49:42Z")

</div>

For anybody who wants to help test this – Download this file: https://github.com/tabreturn/processing.py-for-processing-4/raw/main/PythonMode-4.0a4.zip Extract it and place the PythonMode directory in your sketchbook m…

---

## [Get coordinate of character on canvas](https://discourse.processing.org/t/get-coordinate-of-character-on-canvas/30749)

<div class="topic-metadata">

**Author:** [@slow\_izzm](https://discourse.processing.org/u/slow_izzm)\
**Replies:** 5\
**Last updated:** [June 17, 2021, 12:09am UTC](https://discourse.processing.org/t/get-coordinate-of-character-on-canvas/30749 "2021-06-17T00:09:16Z")

</div>

Is there a method or some way of getting the coordinate (or coordinate range ) of a character or portion of a string in a string drawn to canvas using text()? Say I draw text('hello p5', 100,100); … what are the coordin…

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

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