# Processing

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

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

**Page:** 218

---

## [Hello all I have problem with a sound](https://discourse.processing.org/t/hello-all-i-have-problem-with-a-sound/3492)

<div class="topic-metadata">

**Author:** [@cupko24](https://discourse.processing.org/u/cupko24)\
**Replies:** 6\
**Last updated:** [April 21, 2020, 5:16am UTC](https://discourse.processing.org/t/hello-all-i-have-problem-with-a-sound/3492 "2020-04-21T05:16:27Z")

</div>

I got this report, and the sound after every click is lagging more and more. sep 12, 2018 8:09:41 PM com.jsyn.devices.javasound.JavaSoundAudioDevice INFO: JSyn: default output latency set to 80 msec for Windows 7 se…

---

## [Can't get any audio using AudioIn](https://discourse.processing.org/t/cant-get-any-audio-using-audioin/8490)

<div class="topic-metadata">

**Author:** [@SkinnyPete](https://discourse.processing.org/u/SkinnyPete)\
**Replies:** 1\
**Last updated:** [April 21, 2020, 4:54am UTC](https://discourse.processing.org/t/cant-get-any-audio-using-audioin/8490 "2020-04-21T04:54:49Z")

</div>

Hello, I am new to processing.sound and not that experienced generally so please forgive any silly mistakes. import processing.sound.\*; FFT fft; AudioIn in; SoundFile snd; int bands = 256; float\[\] spectrum = new floa…

---

## [SVG file does not rotate in place on it's center](https://discourse.processing.org/t/svg-file-does-not-rotate-in-place-on-its-center/19829)

<div class="topic-metadata">

**Author:** [@moziauddin](https://discourse.processing.org/u/moziauddin)\
**Replies:** 10\
**Last updated:** [April 21, 2020, 12:45am UTC](https://discourse.processing.org/t/svg-file-does-not-rotate-in-place-on-its-center/19829 "2020-04-21T00:45:52Z")

</div>

Hello, I have an svg file I would like to load and rotate. I have tried it by the traditional translate() and rotate() methods, but they don’t seem to have any effect. I was successfully able to rotate the svg shape usi…

---

## [Trying to convert 2 objects into a super class and a subclass](https://discourse.processing.org/t/trying-to-convert-2-objects-into-a-super-class-and-a-subclass/19977)

<div class="topic-metadata">

**Author:** [@debxyz](https://discourse.processing.org/u/debxyz)\
**Replies:** 2\
**Last updated:** [April 21, 2020, 12:21am UTC](https://discourse.processing.org/t/trying-to-convert-2-objects-into-a-super-class-and-a-subclass/19977 "2020-04-21T00:21:58Z")

</div>

I’ve watched the videos, read the reference, but am hitting a wall. Not sure what I’m overlooking at this point. Attempting to convert an earlier sketch into one implementing inheritance classes. I think part of the pr…

---

## [Sorting ArrayList of Objects](https://discourse.processing.org/t/sorting-arraylist-of-objects/19552)

<div class="topic-metadata">

**Author:** [@eduzal](https://discourse.processing.org/u/eduzal)\
**Replies:** 11\
**Last updated:** [April 20, 2020, 8:58pm UTC](https://discourse.processing.org/t/sorting-arraylist-of-objects/19552 "2020-04-20T20:58:42Z")

</div>

Hi. I’m having some trouble with sorting ArrayLists of Objects. I’m studying the Comprable interface but still have doubts on it’s implementation. I’m doing a sketch that reads and compile local Covid-19 data. All my da…

---

## [Question: Index Values of Arrays](https://discourse.processing.org/t/question-index-values-of-arrays/19975)

<div class="topic-metadata">

**Author:** [@confusedstudent](https://discourse.processing.org/u/confusedstudent)\
**Replies:** 1\
**Last updated:** [April 20, 2020, 9:15pm UTC](https://discourse.processing.org/t/question-index-values-of-arrays/19975 "2020-04-20T21:15:18Z")

</div>

I was just wondering, if I have an array with 1,000 elements, what is the range of index values for that array?

---

## [Generating Arguments in Functions](https://discourse.processing.org/t/generating-arguments-in-functions/19859)

<div class="topic-metadata">

**Author:** [@confusedstudent](https://discourse.processing.org/u/confusedstudent)\
**Replies:** 2\
**Last updated:** [April 20, 2020, 8:58pm UTC](https://discourse.processing.org/t/generating-arguments-in-functions/19859 "2020-04-20T20:58:55Z")

</div>

Hello! I need some help with functions. My teacher has asked, “Write a function named distance that accepts a vehicle’s speed and time as arguments, and returns the distance the vehicle has traveled.” I am able to c…

---

## [Understanding millis()](https://discourse.processing.org/t/understanding-millis/19964)

<div class="topic-metadata">

**Author:** [@14mmss](https://discourse.processing.org/u/14mmss)\
**Replies:** 1\
**Last updated:** [April 20, 2020, 4:10pm UTC](https://discourse.processing.org/t/understanding-millis/19964 "2020-04-20T16:10:46Z")

</div>

hello, I never seem to understand how the mills() function works, I am working on the variation simple stimulus assignment now and the time only continues counting if I keep pressing space, where should I put my initial…

---

## [Is there any way to split a string into an array of characters?](https://discourse.processing.org/t/is-there-any-way-to-split-a-string-into-an-array-of-characters/19521)

<div class="topic-metadata">

**Author:** [@Math\_Machine](https://discourse.processing.org/u/Math_Machine)\
**Replies:** 8\
**Last updated:** [April 20, 2020, 5:31pm UTC](https://discourse.processing.org/t/is-there-any-way-to-split-a-string-into-an-array-of-characters/19521 "2020-04-20T17:31:38Z")

</div>

Is there any way that I can split up a string into an array of its individual components? Like, for example, if I had the string “hello?”, is there any way I could convert that into an array in the form {“h”,“e”,“l”,“l”…

---

## [Help with lab "Changeable Chain"](https://discourse.processing.org/t/help-with-lab-changeable-chain/19966)

<div class="topic-metadata">

**Author:** [@Jonathan25711](https://discourse.processing.org/u/Jonathan25711)\
**Replies:** 3\
**Last updated:** [April 20, 2020, 5:16pm UTC](https://discourse.processing.org/t/help-with-lab-changeable-chain/19966 "2020-04-20T17:16:50Z")

</div>

please format code with \</\> button \* homework policy \* asking questions The labs require this. Instructions for Lab 7.5 Changeable Chain First Lab: First declare two Integer arrays of size 5 to store the x locati…

---

## [Is there any way to get the current state of a checkbox in G4P?](https://discourse.processing.org/t/is-there-any-way-to-get-the-current-state-of-a-checkbox-in-g4p/19963)

<div class="topic-metadata">

**Author:** [@David](https://discourse.processing.org/u/David)\
**Replies:** 2\
**Last updated:** [April 20, 2020, 4:01pm UTC](https://discourse.processing.org/t/is-there-any-way-to-get-the-current-state-of-a-checkbox-in-g4p/19963 "2020-04-20T16:01:36Z")

</div>

Is there any way to get the current state of a checkbox in G4P? I can get the value of a slider or knob with the function ‘getValueF’, but I couldn’t find any corresponding function to get the value of a checkbox (ie, on…

---

## [Is there a library that allows for the convenient use of doubles?](https://discourse.processing.org/t/is-there-a-library-that-allows-for-the-convenient-use-of-doubles/19532)

<div class="topic-metadata">

**Author:** [@Math\_Machine](https://discourse.processing.org/u/Math_Machine)\
**Replies:** 21\
**Last updated:** [April 20, 2020, 10:44am UTC](https://discourse.processing.org/t/is-there-a-library-that-allows-for-the-convenient-use-of-doubles/19532 "2020-04-20T10:44:36Z")

</div>

So, from what I understand, processing functions aren’t built to handle double floating points. Are there any external libraries I can download that can overload functions so they can handle doubles? Or is there no rea…

---

## [Computer vision brightness or colour tracking](https://discourse.processing.org/t/computer-vision-brightness-or-colour-tracking/19811)

<div class="topic-metadata">

**Author:** [@maddyna](https://discourse.processing.org/u/maddyna)\
**Replies:** 3\
**Last updated:** [April 20, 2020, 9:53am UTC](https://discourse.processing.org/t/computer-vision-brightness-or-colour-tracking/19811 "2020-04-20T09:53:31Z")

</div>

while doing color tracking using the camera as a sensor is thr a way to get a continuous line as you move the tracker around the way i am doing is using an ellipse to follow the tracker but am not getting a continuous …

---

## [Read from 2 videos at the same time](https://discourse.processing.org/t/read-from-2-videos-at-the-same-time/19937)

<div class="topic-metadata">

**Author:** [@costachemadalin](https://discourse.processing.org/u/costachemadalin)\
**Replies:** 4\
**Last updated:** [April 20, 2020, 9:51am UTC](https://discourse.processing.org/t/read-from-2-videos-at-the-same-time/19937 "2020-04-20T09:51:11Z")

</div>

Hi, for my algorithm i want to process first frame from videoA and first frame from videoB at the same time and so on until the last frame. In my implementation i have a problem,in theory it should read alternately lik…

---

## [Pong multiple keys](https://discourse.processing.org/t/pong-multiple-keys/19915)

<div class="topic-metadata">

**Author:** [@alphakay](https://discourse.processing.org/u/alphakay)\
**Replies:** 2\
**Last updated:** [April 19, 2020, 9:12pm UTC](https://discourse.processing.org/t/pong-multiple-keys/19915 "2020-04-19T21:12:51Z")

</div>

Hey guys, im programming a pong game and I want to use multiples keys. I want for the left paddle ‘‘w’’ and ‘’ s’’ to move and for the right side up and down. it is based on coding trains pong game but i want to make it …

---

## [How to use threads in a sketch?](https://discourse.processing.org/t/how-to-use-threads-in-a-sketch/17832)

<div class="topic-metadata">

**Author:** [@spflanze](https://discourse.processing.org/u/spflanze)\
**Replies:** 7\
**Last updated:** [April 19, 2020, 5:23pm UTC](https://discourse.processing.org/t/how-to-use-threads-in-a-sketch/17832 "2020-04-19T17:23:05Z")

</div>

The need has arisen to make the draw() function the run function of a consumer thread that receives from a producer thread, as is demonstrated in this example: In my application the producer thread reads data from a …

---

## [Blending fill colors across mouse movements](https://discourse.processing.org/t/blending-fill-colors-across-mouse-movements/19899)

<div class="topic-metadata">

**Author:** [@sixfeet](https://discourse.processing.org/u/sixfeet)\
**Replies:** 2\
**Last updated:** [April 19, 2020, 4:02pm UTC](https://discourse.processing.org/t/blending-fill-colors-across-mouse-movements/19899 "2020-04-19T16:02:19Z")

</div>

I saw this cool video the other day and am trying to replicate how its done. It’s pretty straight forward but the thing I’m stuck on is how to get the drawn shapes to be more blurred and have a smooth gradient across th…

---

## [mousePressed() to change image on openCV](https://discourse.processing.org/t/mousepressed-to-change-image-on-opencv/19931)

<div class="topic-metadata">

**Author:** [@uwu](https://discourse.processing.org/u/uwu)\
**Replies:** 3\
**Last updated:** [April 19, 2020, 3:23pm UTC](https://discourse.processing.org/t/mousepressed-to-change-image-on-opencv/19931 "2020-04-19T15:23:54Z")

</div>

Hey, I’m just starting out with Processing! I’m trying to make a simple ‘digital fitting room’. I’m using openCV to attach the clothes to the body (it isn’t perfect but it’s enough). I want to change the clothes attach…

---

## [N-dimensional sorting and color](https://discourse.processing.org/t/n-dimensional-sorting-and-color/19711)

<div class="topic-metadata">

**Author:** [@Pisicandru](https://discourse.processing.org/u/Pisicandru)\
**Replies:** 25\
**Last updated:** [April 19, 2020, 3:47pm UTC](https://discourse.processing.org/t/n-dimensional-sorting-and-color/19711 "2020-04-19T15:47:09Z")

</div>

---

## [setSwitch(true) Error](https://discourse.processing.org/t/setswitch-true-error/19927)

<div class="topic-metadata">

**Author:** [@shoaibmirza](https://discourse.processing.org/u/shoaibmirza)\
**Replies:** 0\
**Last updated:** [April 19, 2020, 11:20am UTC](https://discourse.processing.org/t/setswitch-true-error/19927 "2020-04-19T11:20:06Z")

</div>

Hi, I’m having an issue with the controlP5 Library in processing. setSwitch(true) I’m using this line of code to make the button toggle. it works but I’m getting this error message. controlP5.ControlBroadcaster in…

---

## [What are PConstants](https://discourse.processing.org/t/what-are-pconstants/19923)

<div class="topic-metadata">

**Author:** [@Ruchi](https://discourse.processing.org/u/Ruchi)\
**Replies:** 1\
**Last updated:** [April 19, 2020, 8:56am UTC](https://discourse.processing.org/t/what-are-pconstants/19923 "2020-04-19T08:56:39Z")

</div>

I am sorry if this is very trivial to ask. I couldn’t find a satisfactory definition on java sites.What are they & why are they used in begin shapes for eg beginShape(PConstants.TRIANGLES).?

---

## [Need help rotating flags every 2 seconds](https://discourse.processing.org/t/need-help-rotating-flags-every-2-seconds/19776)

<div class="topic-metadata">

**Author:** [@Hypercube](https://discourse.processing.org/u/Hypercube)\
**Replies:** 4\
**Last updated:** [April 19, 2020, 8:13am UTC](https://discourse.processing.org/t/need-help-rotating-flags-every-2-seconds/19776 "2020-04-19T08:13:46Z")

</div>

I’m trying to write a program that draws 4 flags of different countries and rotates them every 2 seconds. For example it starts out as: Iceland Italy Russia Sweden After two seconds it should be: Italy Russia Swede…

---

## [Sending an exit (return) code](https://discourse.processing.org/t/sending-an-exit-return-code/19879)

<div class="topic-metadata">

**Author:** [@rhole](https://discourse.processing.org/u/rhole)\
**Replies:** 8\
**Last updated:** [April 18, 2020, 10:04pm UTC](https://discourse.processing.org/t/sending-an-exit-return-code/19879 "2020-04-18T22:04:30Z")

</div>

I have a need for my sketch to exit and provide a return code to the program which invoked it. I envision something like: // program is ready to end if( errorDetected ) exit(1); // for an error exit else exit(0); I…

---

## [Multiple Cursors](https://discourse.processing.org/t/multiple-cursors/19481)

<div class="topic-metadata">

**Author:** [@JGSalgueiro](https://discourse.processing.org/u/JGSalgueiro)\
**Replies:** 1\
**Last updated:** [April 18, 2020, 10:00pm UTC](https://discourse.processing.org/t/multiple-cursors/19481 "2020-04-18T22:00:37Z")

</div>

Hi guys! Its my first post here and i hope it wont be my last. I ve been coding for a couple years but im still new to java and Processing. My question is: Is it possible to have multiple cursors all comanded by your m…

---

## [Cannot make static reference to non static method](https://discourse.processing.org/t/cannot-make-static-reference-to-non-static-method/19504)

<div class="topic-metadata">

**Author:** [@smep](https://discourse.processing.org/u/smep)\
**Replies:** 1\
**Last updated:** [April 18, 2020, 9:43pm UTC](https://discourse.processing.org/t/cannot-make-static-reference-to-non-static-method/19504 "2020-04-18T21:43:57Z")

</div>

creating a virtual stock market having been given a data list of 1000 daily stock prices which has been loaded in separately. my problem is when I try to do Graph.draw(); in my main class it gives me an error of cannot m…

---

## [Bouncing of an immovable large circle, a moving small circle and a gravity and right force vector](https://discourse.processing.org/t/bouncing-of-an-immovable-large-circle-a-moving-small-circle-and-a-gravity-and-right-force-vector/19443)

<div class="topic-metadata">

**Author:** [@worm888](https://discourse.processing.org/u/worm888)\
**Replies:** 2\
**Last updated:** [April 18, 2020, 9:26pm UTC](https://discourse.processing.org/t/bouncing-of-an-immovable-large-circle-a-moving-small-circle-and-a-gravity-and-right-force-vector/19443 "2020-04-18T21:26:16Z")

</div>

planangle = new PVector(location.x-plan.location.x, location.y-plan.location.y); // if (-90\<velocity.heading() && velocity.heading()\<90) { // planangle.rotate(PI); //} if (dist(location.x, location.y, pla…

---

## [How Can I Control Vectors via Grayscale Values of An Image?](https://discourse.processing.org/t/how-can-i-control-vectors-via-grayscale-values-of-an-image/19905)

<div class="topic-metadata">

**Author:** [@Peyton](https://discourse.processing.org/u/Peyton)\
**Replies:** 0\
**Last updated:** [April 18, 2020, 8:55pm UTC](https://discourse.processing.org/t/how-can-i-control-vectors-via-grayscale-values-of-an-image/19905 "2020-04-18T20:55:35Z")

</div>

Hi! I am obsessed with the look of Perlin noise, and decided to try to use it (and Processing) for the first time, to design a piece for a design project. At the moment, I have a flowfield that creates some awesome looki…

---

## [Problems with video library instalation](https://discourse.processing.org/t/problems-with-video-library-instalation/19592)

<div class="topic-metadata">

**Author:** [@Ferz](https://discourse.processing.org/u/Ferz)\
**Replies:** 1\
**Last updated:** [April 18, 2020, 8:16pm UTC](https://discourse.processing.org/t/problems-with-video-library-instalation/19592 "2020-04-18T20:16:53Z")

</div>

Excuse me if I have bad grammar, I am russian. I downloaded video library from contribution manager. When I try to use it, it shows the message: A library relies on native code that’s not available. Or only works prop…

---

## [WebSocket Pro library for processing](https://discourse.processing.org/t/websocket-pro-library-for-processing/19697)

<div class="topic-metadata">

**Author:** [@erkosone](https://discourse.processing.org/u/erkosone)\
**Replies:** 2\
**Last updated:** [April 18, 2020, 8:12pm UTC](https://discourse.processing.org/t/websocket-pro-library-for-processing/19697 "2020-04-18T20:12:20Z")

</div>

Hello community, how are you all? I want to share my work with all of you, it is a very high-level WebSocket library with all the built-in and serial abstraction mechanisms to be able to create concurrent servers with a…

---

## [Unable to append to an array of G4P objects](https://discourse.processing.org/t/unable-to-append-to-an-array-of-g4p-objects/19898)

<div class="topic-metadata">

**Author:** [@David](https://discourse.processing.org/u/David)\
**Replies:** 6\
**Last updated:** [April 18, 2020, 7:50pm UTC](https://discourse.processing.org/t/unable-to-append-to-an-array-of-g4p-objects/19898 "2020-04-18T19:50:05Z")

</div>

I can create arrays of G4P objects and access them using an index or subscript, but I don’t seem to be able to append to an array of G4P objects. I get an error message “cannot convert from Object to GPanel\[\]” on the lin…

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

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