# Processing

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

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

**Page:** 195

---

## ['serverEvent' operates within the time of performing the delay in 'draw()'](https://discourse.processing.org/t/serverevent-operates-within-the-time-of-performing-the-delay-in-draw/22548)

<div class="topic-metadata">

**Author:** [@GWAK](https://discourse.processing.org/u/GWAK)\
**Replies:** 4\
**Last updated:** [July 11, 2020, 11:12pm UTC](https://discourse.processing.org/t/serverevent-operates-within-the-time-of-performing-the-delay-in-draw/22548 "2020-07-11T23:12:19Z")

</div>

import processing.net.\*; int port = 10002; Server myServer; long COUNT\_NUM = 0; void setup() { size(400, 400); background(0); myServer = new Server(this, port); } void draw() { background(255); delay(10000); …

---

## [Getting file length in minutes with minim](https://discourse.processing.org/t/getting-file-length-in-minutes-with-minim/22555)

<div class="topic-metadata">

**Author:** [@qewer3322](https://discourse.processing.org/u/qewer3322)\
**Replies:** 4\
**Last updated:** [July 12, 2020, 7:15am UTC](https://discourse.processing.org/t/getting-file-length-in-minutes-with-minim/22555 "2020-07-12T07:15:33Z")

</div>

The length() function gives it in miliseconds as an integer so dividing doesn’t work. Did some research but couldn’t find anything and it seems like there is no other function similar to length(). Can somebody help?

---

## [About text() function](https://discourse.processing.org/t/about-text-function/22440)

<div class="topic-metadata">

**Author:** [@SouSageYa](https://discourse.processing.org/u/SouSageYa)\
**Replies:** 7\
**Last updated:** [July 11, 2020, 8:15pm UTC](https://discourse.processing.org/t/about-text-function/22440 "2020-07-11T20:15:24Z")

</div>

//Pressure Chart Value fill(#D6CDCD); stroke(#000000); rect(260,325,200,40,50); fill(#FF301E); text(f\[7\],340,110); //Height Chart Value fill(#D6CDCD); stroke(#000000); rect(260,285,200,40,50); fill(#FF301E); text(f\[8\]…

---

## [Coding problem NullPointerException](https://discourse.processing.org/t/coding-problem-nullpointerexception/22551)

<div class="topic-metadata">

**Author:** [@christiank79](https://discourse.processing.org/u/christiank79)\
**Replies:** 4\
**Last updated:** [July 11, 2020, 5:56pm UTC](https://discourse.processing.org/t/coding-problem-nullpointerexception/22551 "2020-07-11T17:56:55Z")

</div>

I write a code who change a picture in Dithering,but show me a NullPointerException (line 16) What can I do? I have update Processing 3.5.4: This is coding: //variable to store image import processing.svg.\*; PImage th…

---

## [How to cube a sine/cosine function in processing](https://discourse.processing.org/t/how-to-cube-a-sine-cosine-function-in-processing/17257)

<div class="topic-metadata">

**Author:** [@prathmesh](https://discourse.processing.org/u/prathmesh)\
**Replies:** 25\
**Last updated:** [July 11, 2020, 7:16pm UTC](https://discourse.processing.org/t/how-to-cube-a-sine-cosine-function-in-processing/17257 "2020-07-11T19:16:31Z")

</div>

Hello, How do I write cos"raised to the power 3"(t) in my processing code? I am trying to write this equation : Thanks :smiley:

---

## [Finding the angle of an arc?](https://discourse.processing.org/t/finding-the-angle-of-an-arc/22543)

<div class="topic-metadata">

**Author:** [@rkdnson](https://discourse.processing.org/u/rkdnson)\
**Replies:** 3\
**Last updated:** [July 11, 2020, 12:21pm UTC](https://discourse.processing.org/t/finding-the-angle-of-an-arc/22543 "2020-07-11T12:21:54Z")

</div>

Hello, please excuse my crude drawing. I am looking to constrain the amount a circle rotates on the circumference of its parent circle. I have the center of both, and I already have a function that moves it around the an…

---

## [Arduino Nano33 BLE Sense Serial Port Locked by Processing](https://discourse.processing.org/t/arduino-nano33-ble-sense-serial-port-locked-by-processing/22469)

<div class="topic-metadata">

**Author:** [@baqwas](https://discourse.processing.org/u/baqwas)\
**Replies:** 4\
**Last updated:** [July 11, 2020, 1:20pm UTC](https://discourse.processing.org/t/arduino-nano33-ble-sense-serial-port-locked-by-processing/22469 "2020-07-11T13:20:36Z")

</div>

Hello, I’m a self-certified newbie. I was working on the example at https://blog.arduino.cc/2020/06/24/machine-vision-with-low-cost-camera-modules/. Unfortunately, Camera Pattern was not displayed by Processing. I close…

---

## [Point cloud in Processing: what are the limits?](https://discourse.processing.org/t/point-cloud-in-processing-what-are-the-limits/1089)

<div class="topic-metadata">

**Author:** [@solub](https://discourse.processing.org/u/solub)\
**Replies:** 12\
**Last updated:** [July 10, 2020, 10:55pm UTC](https://discourse.processing.org/t/point-cloud-in-processing-what-are-the-limits/1089 "2020-07-10T22:55:58Z")

</div>

Hi everyone, Upon reading this interview (japanese only) of Satoshi Horii, “Rhyzomatics” main creative coder, about one of his latest work involving 3D scanning, I started to wonder if such project was possible with Pro…

---

## [Using Processing to find the value of a knob and send it through a serial port](https://discourse.processing.org/t/using-processing-to-find-the-value-of-a-knob-and-send-it-through-a-serial-port/22465)

<div class="topic-metadata">

**Author:** [@processingHax](https://discourse.processing.org/u/processingHax)\
**Replies:** 2\
**Last updated:** [July 10, 2020, 6:22pm UTC](https://discourse.processing.org/t/using-processing-to-find-the-value-of-a-knob-and-send-it-through-a-serial-port/22465 "2020-07-10T18:22:01Z")

</div>

hey i’m pretty new to processing and I was wondering if I could take a knob constantly get the value of it and send the value of the knob through the serial port. I have tried it and all I’ve gotten is this error Jul 0…

---

## [Garbage collection](https://discourse.processing.org/t/garbage-collection/22537)

<div class="topic-metadata">

**Author:** [@paulgoux](https://discourse.processing.org/u/paulgoux)\
**Replies:** 1\
**Last updated:** [July 10, 2020, 4:44pm UTC](https://discourse.processing.org/t/garbage-collection/22537 "2020-07-10T16:44:52Z")

</div>

I’m handling a big arrayList in my program to create a terrain, however I want the users to be able to load their own files, so that anything you can retrieve saves or simply create terrains using a txt file. Issue is on…

---

## [MIDI: from Processing to DAW (Windows)](https://discourse.processing.org/t/midi-from-processing-to-daw-windows/22411)

<div class="topic-metadata">

**Author:** [@minty](https://discourse.processing.org/u/minty)\
**Replies:** 1\
**Last updated:** [July 10, 2020, 2:03pm UTC](https://discourse.processing.org/t/midi-from-processing-to-daw-windows/22411 "2020-07-10T14:03:54Z")

</div>

I’m trying to get my Processing sketch to send MIDI to my DAW. Running the AdvancedMIDIMessageIO example from TheMIDIBus, I can send note on / off messages to Microsoft Sound Mapper and hear the built-in general MIDI in…

---

## [HELP. How can I intersect three colors from these ellipses?](https://discourse.processing.org/t/help-how-can-i-intersect-three-colors-from-these-ellipses/22500)

<div class="topic-metadata">

**Author:** [@johncusack](https://discourse.processing.org/u/johncusack)\
**Replies:** 2\
**Last updated:** [July 10, 2020, 1:17pm UTC](https://discourse.processing.org/t/help-how-can-i-intersect-three-colors-from-these-ellipses/22500 "2020-07-10T13:17:49Z")

</div>

Hello! I need some help with this sketch. I’m trying to draw this shape filled with three different colors, in tree different vertex. I’m thinking I need to draw three ellipses of different colors, then they intersect wi…

---

## [Displaying PShapes](https://discourse.processing.org/t/displaying-pshapes/7686)

<div class="topic-metadata">

**Author:** [@stirman](https://discourse.processing.org/u/stirman)\
**Replies:** 4\
**Last updated:** [July 10, 2020, 12:48pm UTC](https://discourse.processing.org/t/displaying-pshapes/7686 "2020-07-10T12:48:42Z")

</div>

As part of my larger Scribble Portrait series, I’m trying to make all the scribbles shapes that I can add as children to a parent shape, to manipulate them all together after they’ve been drawn. I’m having trouble gettin…

---

## [Help with classes and hexagon](https://discourse.processing.org/t/help-with-classes-and-hexagon/22510)

<div class="topic-metadata">

**Author:** [@jensemand](https://discourse.processing.org/u/jensemand)\
**Replies:** 2\
**Last updated:** [July 9, 2020, 6:04pm UTC](https://discourse.processing.org/t/help-with-classes-and-hexagon/22510 "2020-07-09T18:04:01Z")

</div>

Hi I have tried to make a hexagon by using vectors however when I try to put the shape into a class (so I later can make a grid where I can detect in which one my mouse is in) but the problem is I can’t display my shape.…

---

## [Pass parameter through selectFile()/selectFolder();](https://discourse.processing.org/t/pass-parameter-through-selectfile-selectfolder/22522)

<div class="topic-metadata">

**Author:** [@paulgoux](https://discourse.processing.org/u/paulgoux)\
**Replies:** 2\
**Last updated:** [July 9, 2020, 8:44pm UTC](https://discourse.processing.org/t/pass-parameter-through-selectfile-selectfolder/22522 "2020-07-09T20:44:07Z")

</div>

selectInput("Select a file to process:", "fileSelected"); How do I pass the parameter for a variable I wish to update in this type of function? void fileSelected(File selection){ if(selection != null)BMS.File.value =…

---

## [Processing (Java Core version) sometimes lags](https://discourse.processing.org/t/processing-java-core-version-sometimes-lags/22517)

<div class="topic-metadata">

**Author:** [@Moritz](https://discourse.processing.org/u/Moritz)\
**Replies:** 1\
**Last updated:** [July 9, 2020, 7:20pm UTC](https://discourse.processing.org/t/processing-java-core-version-sometimes-lags/22517 "2020-07-09T19:20:57Z")

</div>

Hi Guys, I’m doing a multiplayer coop / vs game and I’m having a big problem. sometimes everything works. My program has a constant 60 fps (check via eys and processing.framerate) and then there are these runs where Pro…

---

## [Sort PImage array by brightness](https://discourse.processing.org/t/sort-pimage-array-by-brightness/19423)

<div class="topic-metadata">

**Author:** [@TimoL](https://discourse.processing.org/u/TimoL)\
**Replies:** 6\
**Last updated:** [July 9, 2020, 6:12am UTC](https://discourse.processing.org/t/sort-pimage-array-by-brightness/19423 "2020-07-09T06:12:23Z")

</div>

Hi there, I have an array of say 10 images and I’m trying to re-order their indexing based on the overall brightness of each image. Darkest image is 0 & brightest is 10. I then want to save out each image with its new…

---

## [Serial plotter over bluetooth](https://discourse.processing.org/t/serial-plotter-over-bluetooth/22378)

<div class="topic-metadata">

**Author:** [@alexthesmeus](https://discourse.processing.org/u/alexthesmeus)\
**Replies:** 20\
**Last updated:** [July 8, 2020, 10:03pm UTC](https://discourse.processing.org/t/serial-plotter-over-bluetooth/22378 "2020-07-08T22:03:16Z")

</div>

Hi, I’m trying to create a portable ECG with ESP32, AD8232 and battery 18650. I modified a sketch for arduino and processing pde to use bluetooth communication instead of serial over usb. My Arduino sketch work perfect…

---

## [Math with map() to get rising and falling numbers from an increasing value](https://discourse.processing.org/t/math-with-map-to-get-rising-and-falling-numbers-from-an-increasing-value/22467)

<div class="topic-metadata">

**Author:** [@Ackados](https://discourse.processing.org/u/Ackados)\
**Replies:** 3\
**Last updated:** [July 8, 2020, 6:37pm UTC](https://discourse.processing.org/t/math-with-map-to-get-rising-and-falling-numbers-from-an-increasing-value/22467 "2020-07-08T18:37:36Z")

</div>

I have an interesting math and coding question. I had no idea how to explain this in just the title. I have int iValue = 0; and every second, iValue increases by one. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1…

---

## [A music player that automatically adds .wav or .mp3 files in the data folder to list?](https://discourse.processing.org/t/a-music-player-that-automatically-adds-wav-or-mp3-files-in-the-data-folder-to-list/22473)

<div class="topic-metadata">

**Author:** [@qewer3322](https://discourse.processing.org/u/qewer3322)\
**Replies:** 9\
**Last updated:** [July 8, 2020, 6:05pm UTC](https://discourse.processing.org/t/a-music-player-that-automatically-adds-wav-or-mp3-files-in-the-data-folder-to-list/22473 "2020-07-08T18:05:24Z")

</div>

So I’m trying to make a music player using the minim library and here is the code: import ddf.minim.analysis.\*; import ddf.minim.\*; BeatDetect heart = new BeatDetect(); Minim minim; AudioPlayer file; FFT …

---

## [VIDEO CAPTURE Processing 3.5.4 and Mojave/Catalina - 64 bit](https://discourse.processing.org/t/video-capture-processing-3-5-4-and-mojave-catalina-64-bit/22460)

<div class="topic-metadata">

**Author:** [@ggort](https://discourse.processing.org/u/ggort)\
**Replies:** 2\
**Last updated:** [July 8, 2020, 3:56pm UTC](https://discourse.processing.org/t/video-capture-processing-3-5-4-and-mojave-catalina-64-bit/22460 "2020-07-08T15:56:17Z")

</div>

Has anyone worked out the Video Capture function for 64 bit? I teach and rely on it for classroom examples. Will this be bundled in any new versions of Processing or video libraries so the corrections don’t have to be do…

---

## [Making multiple images rotate in a circle](https://discourse.processing.org/t/making-multiple-images-rotate-in-a-circle/17795)

<div class="topic-metadata">

**Author:** [@Alexsmithson](https://discourse.processing.org/u/Alexsmithson)\
**Replies:** 6\
**Last updated:** [July 8, 2020, 2:13pm UTC](https://discourse.processing.org/t/making-multiple-images-rotate-in-a-circle/17795 "2020-07-08T14:13:52Z")

</div>

I NEED HELP FROM THE PROCESSING GODS! i need to make multiple images rotate in a circular shape so it fits with the lines of text. so far i have these lines of code, and i need to make the images rotate in the same fash…

---

## [Resize window and object in class](https://discourse.processing.org/t/resize-window-and-object-in-class/22448)

<div class="topic-metadata">

**Author:** [@MiguelSanches](https://discourse.processing.org/u/MiguelSanches)\
**Replies:** 4\
**Last updated:** [July 8, 2020, 7:32am UTC](https://discourse.processing.org/t/resize-window-and-object-in-class/22448 "2020-07-08T07:32:38Z")

</div>

Hi all, I am trying to do a small GUI and I was playing with resize. So, the following sketch display’s two circles as if they were two LEDs. I start the sketch with a small window, but if I change the window size to f…

---

## [Draw every possible unique combination of a 3x3 circle grid with two colors](https://discourse.processing.org/t/draw-every-possible-unique-combination-of-a-3x3-circle-grid-with-two-colors/22338)

<div class="topic-metadata">

**Author:** [@whistlinpete](https://discourse.processing.org/u/whistlinpete)\
**Replies:** 23\
**Last updated:** [July 7, 2020, 5:47pm UTC](https://discourse.processing.org/t/draw-every-possible-unique-combination-of-a-3x3-circle-grid-with-two-colors/22338 "2020-07-07T17:47:13Z")

</div>

Hi, I’m a designer trying to draw every possible combination of a 3x3 circle grid with two colors. Here’s a example: But this is an even better example of what I’m trying to do. I know there are 512 different possibi…

---

## [Drawing movement of 2 accelerometers](https://discourse.processing.org/t/drawing-movement-of-2-accelerometers/22446)

<div class="topic-metadata">

**Author:** [@Matthias\_db](https://discourse.processing.org/u/Matthias_db)\
**Replies:** 1\
**Last updated:** [July 7, 2020, 1:26pm UTC](https://discourse.processing.org/t/drawing-movement-of-2-accelerometers/22446 "2020-07-07T13:26:06Z")

</div>

hello, i want to simulate the movement of 2 accelerometers in one drawing. the 2 boxes that i draw should move differently from each other. i managed to get my first box moving but i can not include another moving box. t…

---

## [Jagged lines appearing in animating sine wave variation code](https://discourse.processing.org/t/jagged-lines-appearing-in-animating-sine-wave-variation-code/22218)

<div class="topic-metadata">

**Author:** [@Ruchi](https://discourse.processing.org/u/Ruchi)\
**Replies:** 3\
**Last updated:** [July 7, 2020, 11:47am UTC](https://discourse.processing.org/t/jagged-lines-appearing-in-animating-sine-wave-variation-code/22218 "2020-07-07T11:47:06Z")

</div>

Wave w; int noW = 5; // No. of Waves on either side of half period int totalwaves = (noW\*2)-1; float freq = 1; // How many repetitions float period; boolean inverse; void setup() { size(800, 800); background(0); …

---

## [Cannot call circle() in seperate java file](https://discourse.processing.org/t/cannot-call-circle-in-seperate-java-file/22439)

<div class="topic-metadata">

**Author:** [@Ackados](https://discourse.processing.org/u/Ackados)\
**Replies:** 1\
**Last updated:** [July 7, 2020, 6:17am UTC](https://discourse.processing.org/t/cannot-call-circle-in-seperate-java-file/22439 "2020-07-07T06:17:40Z")

</div>

I got my sketch.java file, and I can call circle(100, 100, 10); just fine in there. However, when I go to my Particle.java, I call circle(100, 100, 10);, I get errors. First, this is my import: import processing.core.\*; …

---

## [Movie plays nomore, from one day to another](https://discourse.processing.org/t/movie-plays-nomore-from-one-day-to-another/22434)

<div class="topic-metadata">

**Author:** [@qualidax](https://discourse.processing.org/u/qualidax)\
**Replies:** 0\
**Last updated:** [July 6, 2020, 11:45pm UTC](https://discourse.processing.org/t/movie-plays-nomore-from-one-day-to-another/22434 "2020-07-06T23:45:42Z")

</div>

PC with Windows 7 Pro 64 Bit. My app plays a mp4 video since twoo years in a museum. Nobody has changed the system. From one day to another, it does not play my video. I must see this message after killing my app by task…

---

## [Iterate once and only once through all the possible configurations of an array](https://discourse.processing.org/t/iterate-once-and-only-once-through-all-the-possible-configurations-of-an-array/22366)

<div class="topic-metadata">

**Author:** [@whistlinpete](https://discourse.processing.org/u/whistlinpete)\
**Replies:** 18\
**Last updated:** [July 6, 2020, 4:10pm UTC](https://discourse.processing.org/t/iterate-once-and-only-once-through-all-the-possible-configurations-of-an-array/22366 "2020-07-06T16:10:53Z")

</div>

I am trying to create a program that will iterate through all the possible combinations for a given array once and only once, and use those combinations to color a grid of dots. I’ve simplified the problem to a one-row, …

---

## [Loading audio from mic](https://discourse.processing.org/t/loading-audio-from-mic/22419)

<div class="topic-metadata">

**Author:** [@paulgoux](https://discourse.processing.org/u/paulgoux)\
**Replies:** 2\
**Last updated:** [July 6, 2020, 7:02pm UTC](https://discourse.processing.org/t/loading-audio-from-mic/22419 "2020-07-06T19:02:28Z")

</div>

I’m trying to configure processing to accept microphone input for audio processing, however I keep getting the same error no matter what example sketch I try. error; Audio Input not configured in start() method. sketc…

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

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