# Latest

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

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

**Page:** 261

---

## [How to split image into several ones (spirtes)](https://discourse.processing.org/t/how-to-split-image-into-several-ones-spirtes/27365)

<div class="topic-metadata">

**Author:** [@CodeMasterX](https://discourse.processing.org/u/CodeMasterX)\
**Replies:** 1\
**Last updated:** [January 25, 2021, 6:03pm UTC](https://discourse.processing.org/t/how-to-split-image-into-several-ones-spirtes/27365 "2021-01-25T18:03:12Z")

</div>

Hi! I am trying to make the basics for chess and I am interested how to turn an image into an array of sprites. CodePImage source = loadImage("chessPieces2.png"); println(source.width, source.height); size(12…

---

## [Connecting to AWS S3 Bucket](https://discourse.processing.org/t/connecting-to-aws-s3-bucket/27307)

<div class="topic-metadata">

**Author:** [@bertin](https://discourse.processing.org/u/bertin)\
**Replies:** 1\
**Last updated:** [January 25, 2021, 5:33pm UTC](https://discourse.processing.org/t/connecting-to-aws-s3-bucket/27307 "2021-01-25T17:33:33Z")

</div>

Hi :slightly\_smiling\_face: I’m building a game with Processing for Android and I need to reach some centralized data that I have in a text file on Amazon S3. I’ve already tested some Java code that gets and updates this…

---

## [Stroke Decrease isnt working](https://discourse.processing.org/t/stroke-decrease-isnt-working/27349)

<div class="topic-metadata">

**Author:** [@Prxt.3k](https://discourse.processing.org/u/Prxt.3k)\
**Replies:** 6\
**Last updated:** [January 25, 2021, 4:51pm UTC](https://discourse.processing.org/t/stroke-decrease-isnt-working/27349 "2021-01-25T16:51:38Z")

</div>

//Minim Library import ddf.minim.\*; import ddf.minim.analysis.\*; import ddf.minim.effects.\*; import ddf.minim.signals.\*; import ddf.minim.spi.\*; import ddf.minim.ugens.\*; //Global Variables \<--------------------------…

---

## [How to parse this string?](https://discourse.processing.org/t/how-to-parse-this-string/27362)

<div class="topic-metadata">

**Author:** [@SNICKRS](https://discourse.processing.org/u/SNICKRS)\
**Replies:** 3\
**Last updated:** [January 25, 2021, 2:53pm UTC](https://discourse.processing.org/t/how-to-parse-this-string/27362 "2021-01-25T14:53:36Z")

</div>

I have this string: "0000A000" How would I be able to group the zeros to get a string like this: 4A3

---

## [How would you import an external library into processing?](https://discourse.processing.org/t/how-would-you-import-an-external-library-into-processing/27337)

<div class="topic-metadata">

**Author:** [@SNICKRS](https://discourse.processing.org/u/SNICKRS)\
**Replies:** 1\
**Last updated:** [January 25, 2021, 2:29pm UTC](https://discourse.processing.org/t/how-would-you-import-an-external-library-into-processing/27337 "2021-01-25T14:29:52Z")

</div>

I have this game in which I want to use an AI engine for the opponent, but it requires I use an external file as making an AI for this game is VERY complicated. However, I found a great java library that has everything I…

---

## [Want to work on bugs at examples page on p5.js-website but I can't GET the pages from examples page on my localhost](https://discourse.processing.org/t/want-to-work-on-bugs-at-examples-page-on-p5-js-website-but-i-cant-get-the-pages-from-examples-page-on-my-localhost/27329)

<div class="topic-metadata">

**Author:** [@Shubham](https://discourse.processing.org/u/Shubham)\
**Replies:** 2\
**Last updated:** [January 25, 2021, 2:13pm UTC](https://discourse.processing.org/t/want-to-work-on-bugs-at-examples-page-on-p5-js-website-but-i-cant-get-the-pages-from-examples-page-on-my-localhost/27329 "2021-01-25T14:13:22Z")

</div>

I am new to open source contributions and want to work on a bug and improve some code to the ‘examples’ page. Is there any way I can do that?

---

## [Can't load PImage](https://discourse.processing.org/t/cant-load-pimage/17696)

<div class="topic-metadata">

**Author:** [@DogeMastr](https://discourse.processing.org/u/DogeMastr)\
**Replies:** 7\
**Last updated:** [January 25, 2021, 1:42pm UTC](https://discourse.processing.org/t/cant-load-pimage/17696 "2021-01-25T13:42:17Z")

</div>

I’m working on a project where I have to load a ton of images into an array list, The code works on Java fine and good but when I switch over to Android and export it to my phone it crashes. My folder set up is like thi…

---

## [@p5js.org into spam filter](https://discourse.processing.org/t/p5js-org-into-spam-filter/23940)

<div class="topic-metadata">

**Author:** [@Laurent](https://discourse.processing.org/u/Laurent)\
**Replies:** 5\
**Last updated:** [January 25, 2021, 11:24am UTC](https://discourse.processing.org/t/p5js-org-into-spam-filter/23940 "2021-01-25T11:24:10Z")

</div>

Hi, I use the online p5.js editor with my students (editor.p5js.org). Some of them have observed that they don’t get the confirmation e-mail sent to them just after creating their account on editor.p5js.org. So they can…

---

## [Effect not applying on a image in array](https://discourse.processing.org/t/effect-not-applying-on-a-image-in-array/27200)

<div class="topic-metadata">

**Author:** [@anarts\_3](https://discourse.processing.org/u/anarts_3)\
**Replies:** 2\
**Last updated:** [January 25, 2021, 9:56am UTC](https://discourse.processing.org/t/effect-not-applying-on-a-image-in-array/27200 "2021-01-25T09:56:33Z")

</div>

Hello everyone! I have this code that has a dot effect on the images and has code to change said image into the next one when the mouse is pressed. int numFrames = 18; // The number of frames in the animation int frame…

---

## [Translating Processing to P5js](https://discourse.processing.org/t/translating-processing-to-p5js/27332)

<div class="topic-metadata">

**Author:** [@codeflow](https://discourse.processing.org/u/codeflow)\
**Replies:** 6\
**Last updated:** [January 25, 2021, 9:50am UTC](https://discourse.processing.org/t/translating-processing-to-p5js/27332 "2021-01-25T09:50:33Z")

</div>

Hey guys, this problem is driving me crazy, so I hope somebody can help. I have this code written in processing, that I want to implement into my html website. I was doing research and realized I need to convert it in…

---

## [How to apply easing to p5js sketch](https://discourse.processing.org/t/how-to-apply-easing-to-p5js-sketch/27322)

<div class="topic-metadata">

**Author:** [@StudioBoe](https://discourse.processing.org/u/StudioBoe)\
**Replies:** 2\
**Last updated:** [January 24, 2021, 11:12pm UTC](https://discourse.processing.org/t/how-to-apply-easing-to-p5js-sketch/27322 "2021-01-24T23:12:03Z")

</div>

Complete beginner here so apologies for what is probably an obvious solution — I’m using the atan2 function in p5.js to create a simple sketch where an arrow (imported svg) is following the cursor. How would one add eas…

---

## [How to fix the positions of lines (Math related)](https://discourse.processing.org/t/how-to-fix-the-positions-of-lines-math-related/27344)

<div class="topic-metadata">

**Author:** [@CodeMasterX](https://discourse.processing.org/u/CodeMasterX)\
**Replies:** 1\
**Last updated:** [January 24, 2021, 9:45pm UTC](https://discourse.processing.org/t/how-to-fix-the-positions-of-lines-math-related/27344 "2021-01-24T21:45:35Z")

</div>

(I am trying to do this with a n-sided shape) but it is not working. The program works by having a position of the corner and giving a dir and r. How do I get the correct position? The current program only works for…

---

## [How to check if there is an image with the same file name?](https://discourse.processing.org/t/how-to-check-if-there-is-an-image-with-the-same-file-name/27336)

<div class="topic-metadata">

**Author:** [@Lukerfull](https://discourse.processing.org/u/Lukerfull)\
**Replies:** 6\
**Last updated:** [January 24, 2021, 8:44pm UTC](https://discourse.processing.org/t/how-to-check-if-there-is-an-image-with-the-same-file-name/27336 "2021-01-24T20:44:12Z")

</div>

I want to save images without overwriting them. This is my code: if (controlDown) { if (keyCode == 83) { PImage partialSave = get(0,0,1098,650); nimg++; partialSave.save("drawings/draw"+nimg+".…

---

## [Open close windows](https://discourse.processing.org/t/open-close-windows/27312)

<div class="topic-metadata">

**Author:** [@jafal](https://discourse.processing.org/u/jafal)\
**Replies:** 3\
**Last updated:** [January 24, 2021, 6:51pm UTC](https://discourse.processing.org/t/open-close-windows/27312 "2021-01-24T18:51:44Z")

</div>

hi is there away to call one window from other window ? void setup() { String\[\] args = {"TwoFrameTest"}; SecondApplet sa = new SecondApplet(); PApplet.runSketch(args, sa); } void settings() { size(300, 100);…

---

## [decodeAudioData' of undefined](https://discourse.processing.org/t/decodeaudiodata-of-undefined/27340)

<div class="topic-metadata">

**Author:** [@kokosic](https://discourse.processing.org/u/kokosic)\
**Replies:** 0\
**Last updated:** [January 24, 2021, 5:39pm UTC](https://discourse.processing.org/t/decodeaudiodata-of-undefined/27340 "2021-01-24T17:39:58Z")

</div>

Hi, I was trying to rewrite some code and then I started getting an error Uncaught TypeError: Cannot read property 'decodeAudioData' of undefined at FileReader.reader.onload (lvl.js:131) on this line this.conte…

---

## [Play music - Clicking in objects](https://discourse.processing.org/t/play-music-clicking-in-objects/27339)

<div class="topic-metadata">

**Author:** [@leobarros](https://discourse.processing.org/u/leobarros)\
**Replies:** 0\
**Last updated:** [January 24, 2021, 4:57pm UTC](https://discourse.processing.org/t/play-music-clicking-in-objects/27339 "2021-01-24T16:57:54Z")

</div>

please format code with \</\> button \* homework policy \* asking questions Hello guys. I am trying to make a specific mp3 file plays when a specific circle is clicked. I have a class named as Balls. Can someone help m…

---

## [For structure not generating shapes](https://discourse.processing.org/t/for-structure-not-generating-shapes/27153)

<div class="topic-metadata">

**Author:** [@Townhaus](https://discourse.processing.org/u/Townhaus)\
**Replies:** 3\
**Last updated:** [January 24, 2021, 9:32am UTC](https://discourse.processing.org/t/for-structure-not-generating-shapes/27153 "2021-01-24T09:32:28Z")

</div>

/\* the first for structure generates rectangles but I’m not sure why the second for structure doesn’t generate rectangles \*/ size (500, 600); background (115, 10, 125); int x = 0; noStroke (); for (int i = 250; i \<=…

---

## [How to test various sketches in nested folders](https://discourse.processing.org/t/how-to-test-various-sketches-in-nested-folders/27323)

<div class="topic-metadata">

**Author:** [@skypickle](https://discourse.processing.org/u/skypickle)\
**Replies:** 1\
**Last updated:** [January 24, 2021, 2:36am UTC](https://discourse.processing.org/t/how-to-test-various-sketches-in-nested-folders/27323 "2021-01-24T02:36:29Z")

</div>

I use browser sync and sublime text to test my sketches. In a folder named project, I have: the index.html file (that refers to sketch.js) the sketch.js file the p5 folder. I subsequently made a modification to inde…

---

## [Website sometimes unable to load. Preload() sound file issue](https://discourse.processing.org/t/website-sometimes-unable-to-load-preload-sound-file-issue/27324)

<div class="topic-metadata">

**Author:** [@nsegal](https://discourse.processing.org/u/nsegal)\
**Replies:** 0\
**Last updated:** [January 24, 2021, 2:18am UTC](https://discourse.processing.org/t/website-sometimes-unable-to-load-preload-sound-file-issue/27324 "2021-01-24T02:18:29Z")

</div>

I’ve made a website with a sketch that utilizes the preload() function to load a sound file. When one visits the website for the first time, it gets stuck loading. If you open the console through developer tools you see …

---

## [P5.js Array: Multiple Objects getting Spliced instead of Single](https://discourse.processing.org/t/p5-js-array-multiple-objects-getting-spliced-instead-of-single/27317)

<div class="topic-metadata">

**Author:** [@devalladares](https://discourse.processing.org/u/devalladares)\
**Replies:** 1\
**Last updated:** [January 23, 2021, 11:32pm UTC](https://discourse.processing.org/t/p5-js-array-multiple-objects-getting-spliced-instead-of-single/27317 "2021-01-23T23:32:11Z")

</div>

I’m trying to create a moving array of decorative circles, and as soon as a circle moves off the edge of the screen I would like to remove it from the array. I have tried both splicing and filtering from the array – howe…

---

## [Communication over laptop's Bluetooth](https://discourse.processing.org/t/communication-over-laptops-bluetooth/14056)

<div class="topic-metadata">

**Author:** [@Alex\_Pr](https://discourse.processing.org/u/Alex_Pr)\
**Replies:** 10\
**Last updated:** [January 23, 2021, 10:01pm UTC](https://discourse.processing.org/t/communication-over-laptops-bluetooth/14056 "2021-01-23T22:01:21Z")

</div>

How can I send & receive data through the laptop’s bluetooth? For example, have an android sketch communicate with a java sketch (running on the laptop) over bluetooth? It’s fairly straightforward how to do the android s…

---

## [Bonjour je suis debutant au.processing](https://discourse.processing.org/t/bonjour-je-suis-debutant-au-processing/27315)

<div class="topic-metadata">

**Author:** [@Douhane](https://discourse.processing.org/u/Douhane)\
**Replies:** 3\
**Last updated:** [January 23, 2021, 9:41pm UTC](https://discourse.processing.org/t/bonjour-je-suis-debutant-au-processing/27315 "2021-01-23T21:41:53Z")

</div>

bonjour je suis nouveau et debutant a processing alors g reussi a allumer 3 led de mon arduino… via processing c mon premier programe la je veux utilisé le bleutooth de mon pc sur processing pour les allumer via bleu…

---

## [Find the second occurrence of an object in an array](https://discourse.processing.org/t/find-the-second-occurrence-of-an-object-in-an-array/27309)

<div class="topic-metadata">

**Author:** [@SNICKRS](https://discourse.processing.org/u/SNICKRS)\
**Replies:** 2\
**Last updated:** [January 23, 2021, 8:05pm UTC](https://discourse.processing.org/t/find-the-second-occurrence-of-an-object-in-an-array/27309 "2021-01-23T20:05:43Z")

</div>

Hello, I am doing a coding project but it requires me to get the second occurrence of an object in an array. int\[\]\[\] array = {1, 2, 3, 4}, {5, 6, 7, 8}, {1, 2, 3, 4}; How would you get the second occurrence of “1” in …

---

## [PWM dimmer LED Android](https://discourse.processing.org/t/pwm-dimmer-led-android/25906)

<div class="topic-metadata">

**Author:** [@r0x15](https://discourse.processing.org/u/r0x15)\
**Replies:** 42\
**Last updated:** [January 23, 2021, 6:42pm UTC](https://discourse.processing.org/t/pwm-dimmer-led-android/25906 "2021-01-23T18:42:19Z")

</div>

Who know one code on android mode to dimmer led to arduino bluetooth ?

---

## [Brushstroke for Drawing Program](https://discourse.processing.org/t/brushstroke-for-drawing-program/27300)

<div class="topic-metadata">

**Author:** [@Prxt.3k](https://discourse.processing.org/u/Prxt.3k)\
**Replies:** 3\
**Last updated:** [January 23, 2021, 6:39pm UTC](https://discourse.processing.org/t/brushstroke-for-drawing-program/27300 "2021-01-23T18:39:04Z")

</div>

Anyone know whats the code for a Crayon and Paintbrush-like stroke? Thanks,

---

## [GPanel object position using G4P](https://discourse.processing.org/t/gpanel-object-position-using-g4p/27311)

<div class="topic-metadata">

**Author:** [@R2processing](https://discourse.processing.org/u/R2processing)\
**Replies:** 2\
**Last updated:** [January 23, 2021, 5:49pm UTC](https://discourse.processing.org/t/gpanel-object-position-using-g4p/27311 "2021-01-23T17:49:36Z")

</div>

Hello, I’m using the useful G4P library. using lblTest.setText(“XXX”); I’m able to change the text of a GLAbel object. I’d like to change the location of a GLabel object inside a Panel with G4P. I didn’t succeed on t…

---

## [15 coins game - pls help im stuck](https://discourse.processing.org/t/15-coins-game-pls-help-im-stuck/27268)

<div class="topic-metadata">

**Author:** [@Grave](https://discourse.processing.org/u/Grave)\
**Replies:** 2\
**Last updated:** [January 23, 2021, 6:56am UTC](https://discourse.processing.org/t/15-coins-game-pls-help-im-stuck/27268 "2021-01-23T06:56:47Z")

</div>

How can I make the class Candy disappear when Eyeball touch it? String gameState; PImage sc; // SCARLET FOREST void setup() { size(810, 810); eyeballSetup(); for(int i=0;i\<candies.length;i++){ candies\[i\] = new Can…

---

## [Undo and Redo Button](https://discourse.processing.org/t/undo-and-redo-button/27301)

<div class="topic-metadata">

**Author:** [@Prxt.3k](https://discourse.processing.org/u/Prxt.3k)\
**Replies:** 4\
**Last updated:** [January 23, 2021, 5:59am UTC](https://discourse.processing.org/t/undo-and-redo-button/27301 "2021-01-23T05:59:57Z")

</div>

// Press CTRL+Z to undo, CTRL+SHIFT+Z to redo // We need these to know if CTRL/SHIFT are pressed boolean controlDown = false; boolean shiftDown = false; Undo undo; void setup() { size(500, 500); background(255); …

---

## [Adding a Start Screen to my drawing program](https://discourse.processing.org/t/adding-a-start-screen-to-my-drawing-program/27290)

<div class="topic-metadata">

**Author:** [@Prxt.3k](https://discourse.processing.org/u/Prxt.3k)\
**Replies:** 5\
**Last updated:** [January 23, 2021, 5:18am UTC](https://discourse.processing.org/t/adding-a-start-screen-to-my-drawing-program/27290 "2021-01-23T05:18:14Z")

</div>

Can someone let me know how it’s possible to add this to my code, for example, I want to add a start game button in this code and this screen should pop up every time I start a canvas and to enter the program I would nee…

---

## [Length in milliseconds of .wav from Sampler class](https://discourse.processing.org/t/length-in-milliseconds-of-wav-from-sampler-class/27299)

<div class="topic-metadata">

**Author:** [@dangerousclive](https://discourse.processing.org/u/dangerousclive)\
**Replies:** 0\
**Last updated:** [January 23, 2021, 12:31am UTC](https://discourse.processing.org/t/length-in-milliseconds-of-wav-from-sampler-class/27299 "2021-01-23T00:31:08Z")

</div>

Hi, I’m having a bit of a problem trying to get the length of time in milliseconds of a .wav loaded into the Sampler class in Minim. I’m probably over looking something but can it be found by something as simple as .le…

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

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