# Processing

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

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

**Page:** 356

---

## [Target VM failed to initialise error message](https://discourse.processing.org/t/target-vm-failed-to-initialise-error-message/4490)

<div class="topic-metadata">

**Author:** [@RossY99](https://discourse.processing.org/u/RossY99)\
**Replies:** 0\
**Last updated:** [October 15, 2018, 12:41pm UTC](https://discourse.processing.org/t/target-vm-failed-to-initialise-error-message/4490 "2018-10-15T12:41:46Z")

</div>

I’m trying to test and see if a particular audio file I have is working but i’m receiving an error message that I don’t fully understand. The code looks like this: import processing.sound.\*; SoundFile file; String audi…

---

## [ArrayList - would like to get it printed in a window](https://discourse.processing.org/t/arraylist-would-like-to-get-it-printed-in-a-window/4461)

<div class="topic-metadata">

**Author:** [@sljivan](https://discourse.processing.org/u/sljivan)\
**Replies:** 2\
**Last updated:** [October 24, 2018, 7:15pm UTC](https://discourse.processing.org/t/arraylist-would-like-to-get-it-printed-in-a-window/4461 "2018-10-24T19:15:07Z")

</div>

Hello guys, I would like to print list of COM ports list in a window, so user could pick one from the list. I used an example I found on the forum, and tried to upgrade it with my request. I have tryed this: int stat…

---

## [Using a webcam to trigger off sound](https://discourse.processing.org/t/using-a-webcam-to-trigger-off-sound/4449)

<div class="topic-metadata">

**Author:** [@sean](https://discourse.processing.org/u/sean)\
**Replies:** 1\
**Last updated:** [October 24, 2018, 7:08pm UTC](https://discourse.processing.org/t/using-a-webcam-to-trigger-off-sound/4449 "2018-10-24T19:08:25Z")

</div>

Hi there. I am new to Processing. I am having problems getting a single sound to trigger when there is movement using a webcam as a motion sensor and when there is no movement the sound stops. My main problem is the s…

---

## [Syncing phase of multiple Oscil in Minim?](https://discourse.processing.org/t/syncing-phase-of-multiple-oscil-in-minim/4408)

<div class="topic-metadata">

**Author:** [@ffd8](https://discourse.processing.org/u/ffd8)\
**Replies:** 1\
**Last updated:** [October 24, 2018, 6:55pm UTC](https://discourse.processing.org/t/syncing-phase-of-multiple-oscil-in-minim/4408 "2018-10-24T18:55:31Z")

</div>

Kinda odd question (and hoping Dami Quartz might offer insight here) – is anyone familiar with syncing the phase between multiple Oscil (oscillator) objects in Minim? Over the years I’ve played a lot with both default wa…

---

## [Time-base Pattern Help](https://discourse.processing.org/t/time-base-pattern-help/4398)

<div class="topic-metadata">

**Author:** [@ehasti21](https://discourse.processing.org/u/ehasti21)\
**Replies:** 1\
**Last updated:** [October 24, 2018, 6:47pm UTC](https://discourse.processing.org/t/time-base-pattern-help/4398 "2018-10-24T18:47:06Z")

</div>

Hello all, we are currently working on a time-based pattern project for class but i’ve manage to hit a wall working on my code. I am new to working in the program so i’m a tad confused. I would like to make it to where…

---

## [Font anti-aliasing: Processing 2 vs Processing 3](https://discourse.processing.org/t/font-anti-aliasing-processing-2-vs-processing-3/4345)

<div class="topic-metadata">

**Author:** [@dtmr](https://discourse.processing.org/u/dtmr)\
**Replies:** 1\
**Last updated:** [October 24, 2018, 6:26pm UTC](https://discourse.processing.org/t/font-anti-aliasing-processing-2-vs-processing-3/4345 "2018-10-24T18:26:39Z")

</div>

Processing 2.0.3 produces very different font anti-aliasing compared to Processing 3. Top Processing 2, bottom Processing 2: Can this be fixed in the code for Processing 2, so that it looks like Processing 3? Higher v…

---

## [Looping counter inside function](https://discourse.processing.org/t/looping-counter-inside-function/4763)

<div class="topic-metadata">

**Author:** [@spade](https://discourse.processing.org/u/spade)\
**Replies:** 3\
**Last updated:** [October 24, 2018, 6:16pm UTC](https://discourse.processing.org/t/looping-counter-inside-function/4763 "2018-10-24T18:16:56Z")

</div>

Hi, I was trying to initiate a variable inside a function that saves a time reference so I know how much time has passed since it was used (to sync with the BPM). This is my function: void rainbow(int bpm){ float b…

---

## [Interaction of objects parameters](https://discourse.processing.org/t/interaction-of-objects-parameters/4750)

<div class="topic-metadata">

**Author:** [@LizrichVonEinzbern08](https://discourse.processing.org/u/LizrichVonEinzbern08)\
**Replies:** 2\
**Last updated:** [October 24, 2018, 5:22pm UTC](https://discourse.processing.org/t/interaction-of-objects-parameters/4750 "2018-10-24T17:22:30Z")

</div>

Particle p; Particle p1; void setup(){ //fullScreen(); size(640,320); p = new Particle(); p1 = new Particle(); } void draw(){ background(150); p.display(); p1.display(); } class Particle{ float x = rand…

---

## [Changing the 5000ms timeout?](https://discourse.processing.org/t/changing-the-5000ms-timeout/4729)

<div class="topic-metadata">

**Author:** [@bbulkow](https://discourse.processing.org/u/bbulkow)\
**Replies:** 7\
**Last updated:** [October 24, 2018, 5:19pm UTC](https://discourse.processing.org/t/changing-the-5000ms-timeout/4729 "2018-10-24T17:19:12Z")

</div>

I have some code where we’ve changed the initalization sequence, and we’re right up against the 5000ms timeout where, so I read, JOGL is waiting for an initial draw to the canvas. I’d really rather not put processing co…

---

## [Color threadsafe in Processing?](https://discourse.processing.org/t/color-threadsafe-in-processing/4563)

<div class="topic-metadata">

**Author:** [@gerome](https://discourse.processing.org/u/gerome)\
**Replies:** 11\
**Last updated:** [October 24, 2018, 5:15pm UTC](https://discourse.processing.org/t/color-threadsafe-in-processing/4563 "2018-10-24T17:15:49Z")

</div>

I have two threads running in one sketch and have the problem that the colors interfere and flicker. the background color changes by setFill of a pShape in one thread. I suppose that there is no “clean” solution because …

---

## [Library/Class Error](https://discourse.processing.org/t/library-class-error/4467)

<div class="topic-metadata">

**Author:** [@JuniorGenius](https://discourse.processing.org/u/JuniorGenius)\
**Replies:** 11\
**Last updated:** [October 24, 2018, 3:40pm UTC](https://discourse.processing.org/t/library-class-error/4467 "2018-10-24T15:40:20Z")

</div>

So I am creating a physics library, and I made a class for shapes. I included the class in the collisions file, tried creating a shape in the collisions class, and got the error “the class does not exist”. I tried moving…

---

## [Help changing colours in my animation](https://discourse.processing.org/t/help-changing-colours-in-my-animation/4799)

<div class="topic-metadata">

**Author:** [@joe891](https://discourse.processing.org/u/joe891)\
**Replies:** 2\
**Last updated:** [October 24, 2018, 12:26pm UTC](https://discourse.processing.org/t/help-changing-colours-in-my-animation/4799 "2018-10-24T12:26:22Z")

</div>

Hi! I want my 3 triangle to randomly be changing colours throughout the whole animation. I’m a little stuck on where to go next but this is what I have so far. float x = 0; float speed = 1; float r = random(255); float …

---

## [Rotate a sinusoidal wave (2D traslation)](https://discourse.processing.org/t/rotate-a-sinusoidal-wave-2d-traslation/4796)

<div class="topic-metadata">

**Author:** [@saotome](https://discourse.processing.org/u/saotome)\
**Replies:** 12\
**Last updated:** [October 24, 2018, 10:21am UTC](https://discourse.processing.org/t/rotate-a-sinusoidal-wave-2d-traslation/4796 "2018-10-24T10:21:00Z")

</div>

Hello everybody This program simulate a sinusoidal wave running along x axis \`\` int xspacing = 16; // How far apart should each horizontal location be spaced int w; // Width of entire wave float theta …

---

## [How to make a program that works by coloring each pixel by distance to another?](https://discourse.processing.org/t/how-to-make-a-program-that-works-by-coloring-each-pixel-by-distance-to-another/4669)

<div class="topic-metadata">

**Author:** [@Lexyth](https://discourse.processing.org/u/Lexyth)\
**Replies:** 12\
**Last updated:** [October 23, 2018, 9:58pm UTC](https://discourse.processing.org/t/how-to-make-a-program-that-works-by-coloring-each-pixel-by-distance-to-another/4669 "2018-10-23T21:58:01Z")

</div>

Hey, so the question might be very confusing, but its actually pretty simple^^ What i would like to do, is to write a program that has an unspecified number of Points (1-20 or so… maybe more) that all maintain a certain …

---

## [How to connect (draw lines) of all elements (ellipses) of an ArrayList?](https://discourse.processing.org/t/how-to-connect-draw-lines-of-all-elements-ellipses-of-an-arraylist/4731)

<div class="topic-metadata">

**Author:** [@philpq12](https://discourse.processing.org/u/philpq12)\
**Replies:** 5\
**Last updated:** [October 24, 2018, 7:47am UTC](https://discourse.processing.org/t/how-to-connect-draw-lines-of-all-elements-ellipses-of-an-arraylist/4731 "2018-10-24T07:47:35Z")

</div>

Hi, In my project, I’m trying to draw a multitude of ellipses that will spawn randomly on the y-axis, all of them scrolling toward the left on the x-axis. Then after, my goal is to connected all those ellipses with a l…

---

## [Camera SEEMS upside down](https://discourse.processing.org/t/camera-seems-upside-down/4787)

<div class="topic-metadata">

**Author:** [@Grim4d](https://discourse.processing.org/u/Grim4d)\
**Replies:** 0\
**Last updated:** [October 23, 2018, 11:04pm UTC](https://discourse.processing.org/t/camera-seems-upside-down/4787 "2018-10-23T23:04:38Z")

</div>

So I created a grid on the z x plane, and then drew small lines that showed the positive x, y, and z axis as red, green, and blue respectively. When I set the camera up I made the up values 0, 1, 0, which I’m assuming ma…

---

## [Windows Defender reports virus in Downloads](https://discourse.processing.org/t/windows-defender-reports-virus-in-downloads/4742)

<div class="topic-metadata">

**Author:** [@steved](https://discourse.processing.org/u/steved)\
**Replies:** 3\
**Last updated:** [October 23, 2018, 10:32pm UTC](https://discourse.processing.org/t/windows-defender-reports-virus-in-downloads/4742 "2018-10-23T22:32:45Z")

</div>

Windows Defender reports virus in Downloads, on both 32 and 64 bit versions of Processing. I have tried again on a different machine (still with Windows 10) and get the same issue…

---

## [Adding Texture(img);](https://discourse.processing.org/t/adding-texture-img/4573)

<div class="topic-metadata">

**Author:** [@vanoevelenstef](https://discourse.processing.org/u/vanoevelenstef)\
**Replies:** 7\
**Last updated:** [October 23, 2018, 10:21pm UTC](https://discourse.processing.org/t/adding-texture-img/4573 "2018-10-23T22:21:45Z")

</div>

Hey There peeps. I’m trying stuff out on the file from the Codingtrain’s SuperShape and i’m trying to add a texture(image) on the object instead of giving it a color. I tried to load in an image and set it up as a textu…

---

## [Project creation error](https://discourse.processing.org/t/project-creation-error/4660)

<div class="topic-metadata">

**Author:** [@ThatRetroGuy](https://discourse.processing.org/u/ThatRetroGuy)\
**Replies:** 1\
**Last updated:** [October 23, 2018, 10:07pm UTC](https://discourse.processing.org/t/project-creation-error/4660 "2018-10-23T22:07:02Z")

</div>

Hi I’m trying to create a new processing eclipse project. This error message appears and ive tried using multiple other files. The error never goes away or simply changes to (file) does not contain processing libs. Co…

---

## [XY Pad (OSC ) to procesing](https://discourse.processing.org/t/xy-pad-osc-to-procesing/4575)

<div class="topic-metadata">

**Author:** [@zpyn](https://discourse.processing.org/u/zpyn)\
**Replies:** 5\
**Last updated:** [October 23, 2018, 9:29pm UTC](https://discourse.processing.org/t/xy-pad-osc-to-procesing/4575 "2018-10-23T21:29:23Z")

</div>

Hi! Im a CG animator and Im learning a little of scripting to improve my skills. I was wondering if someone know how to get the x and y values of a XY Pad, using oscP5. (https://vimeo.com/14734980) I don’t have idea of…

---

## [How to register 2 keys at a time](https://discourse.processing.org/t/how-to-register-2-keys-at-a-time/4635)

<div class="topic-metadata">

**Author:** [@Schred](https://discourse.processing.org/u/Schred)\
**Replies:** 7\
**Last updated:** [October 23, 2018, 8:33pm UTC](https://discourse.processing.org/t/how-to-register-2-keys-at-a-time/4635 "2018-10-23T20:33:57Z")

</div>

Hi, so I’m trying to make a small game in which you control a litlle space ship and dodge some stuff. Something like that. The player should be able to move in 8 directions, including the 4 diagonal ones. I guess you ca…

---

## [Controlp5 - Buttons with private functions](https://discourse.processing.org/t/controlp5-buttons-with-private-functions/4641)

<div class="topic-metadata">

**Author:** [@Zac-04](https://discourse.processing.org/u/Zac-04)\
**Replies:** 0\
**Last updated:** [October 19, 2018, 3:42pm UTC](https://discourse.processing.org/t/controlp5-buttons-with-private-functions/4641 "2018-10-19T15:42:12Z")

</div>

Lets say I had a a method that was apple.eat() how would I put that in a button: cp5.addButton("apple.eat") doesn’t seem to work

---

## [Compare ArrayLists / detect line intersections](https://discourse.processing.org/t/compare-arraylists-detect-line-intersections/4509)

<div class="topic-metadata">

**Author:** [@germaine](https://discourse.processing.org/u/germaine)\
**Replies:** 3\
**Last updated:** [October 23, 2018, 9:01pm UTC](https://discourse.processing.org/t/compare-arraylists-detect-line-intersections/4509 "2018-10-23T21:01:12Z")

</div>

Hello! I’m trying to write code that checks if any two lines drawn on the canvas have intersecting points. Currently, I have an ArrayList of “Line” objects, each containing their own ArrayList of PVectors (“coords”). I …

---

## [Value as a string from a void function](https://discourse.processing.org/t/value-as-a-string-from-a-void-function/4243)

<div class="topic-metadata">

**Author:** [@netphysicist](https://discourse.processing.org/u/netphysicist)\
**Replies:** 17\
**Last updated:** [October 23, 2018, 8:50pm UTC](https://discourse.processing.org/t/value-as-a-string-from-a-void-function/4243 "2018-10-23T20:50:36Z")

</div>

Hello,i have these two functions in the end of a code and i call into the draw() the function displayinformation() to show in the screen of Android the characteristics(Name, age,…) everytime i select a specific choice f…

---

## [Interactive lightinstallation Processing with Arduino](https://discourse.processing.org/t/interactive-lightinstallation-processing-with-arduino/4690)

<div class="topic-metadata">

**Author:** [@martinatina42](https://discourse.processing.org/u/martinatina42)\
**Replies:** 1\
**Last updated:** [October 23, 2018, 8:40pm UTC](https://discourse.processing.org/t/interactive-lightinstallation-processing-with-arduino/4690 "2018-10-23T20:40:11Z")

</div>

Hi Forum I have a question regarding a code made in Processing which is also connected to Arduino. There is a buzzer which should be pushed and the signal goes directly to Processing and then to Arduino. The Code btw. …

---

## [Use two texture with in a shader!](https://discourse.processing.org/t/use-two-texture-with-in-a-shader/4688)

<div class="topic-metadata">

**Author:** [@bitCrasher](https://discourse.processing.org/u/bitCrasher)\
**Replies:** 1\
**Last updated:** [October 23, 2018, 8:37pm UTC](https://discourse.processing.org/t/use-two-texture-with-in-a-shader/4688 "2018-10-23T20:37:06Z")

</div>

hi guys, my question today is quite simple i hope, i want to use 2 differ!ent textures in a shader. them are 2 images. i need to pass from processing the two textures but i don’t know how! can anyone help me please? g…

---

## [Sound in Processing](https://discourse.processing.org/t/sound-in-processing/4728)

<div class="topic-metadata">

**Author:** [@Lore](https://discourse.processing.org/u/Lore)\
**Replies:** 3\
**Last updated:** [October 23, 2018, 6:34pm UTC](https://discourse.processing.org/t/sound-in-processing/4728 "2018-10-23T18:34:36Z")

</div>

Hello, How do you stop a song that is playing? I know how to play a song in processing, but I was wondering how to make the current song stop playing. Here is my code, //Make movie variables //Load every movie //If to…

---

## [Best random number generator](https://discourse.processing.org/t/best-random-number-generator/4674)

<div class="topic-metadata">

**Author:** [@poppanona](https://discourse.processing.org/u/poppanona)\
**Replies:** 5\
**Last updated:** [October 23, 2018, 3:29pm UTC](https://discourse.processing.org/t/best-random-number-generator/4674 "2018-10-23T15:29:51Z")

</div>

I have found that the random number function isn’t quite a normal distribution. My experiments result in errors over 10% at times, even with 100 samples. I am working on a coin toss program. Are there better formulation…

---

## [Add several values to IntList](https://discourse.processing.org/t/add-several-values-to-intlist/4779)

<div class="topic-metadata">

**Author:** [@flashbacker](https://discourse.processing.org/u/flashbacker)\
**Replies:** 8\
**Last updated:** [October 23, 2018, 3:11pm UTC](https://discourse.processing.org/t/add-several-values-to-intlist/4779 "2018-10-23T15:11:41Z")

</div>

Hi, I’m starting to use IntList in a project, not absolutely comfortable with everything yet… I’m seeing in the documentation that I can add several int at once with myList.append(values) or myList.append(list) but eac…

---

## [Detecting highlighted text in a file](https://discourse.processing.org/t/detecting-highlighted-text-in-a-file/4724)

<div class="topic-metadata">

**Author:** [@destro](https://discourse.processing.org/u/destro)\
**Replies:** 5\
**Last updated:** [October 23, 2018, 2:48pm UTC](https://discourse.processing.org/t/detecting-highlighted-text-in-a-file/4724 "2018-10-23T14:48:35Z")

</div>

hi all, is it possible to be able to detect words highlighted in a text file? for instance, if i select “who” in text file, would i be able to save “who” in a variable? thanks in advance, destro

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

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