# Processing

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

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

**Page:** 388

---

## [Drawing "Windows style" screen](https://discourse.processing.org/t/drawing-windows-style-screen/918)

<div class="topic-metadata">

**Author:** [@F6EEQ](https://discourse.processing.org/u/F6EEQ)\
**Replies:** 2\
**Last updated:** [June 14, 2018, 8:55am UTC](https://discourse.processing.org/t/drawing-windows-style-screen/918 "2018-06-14T08:55:11Z")

</div>

Hi all, To implement a measuring system, I wish to drive an ARDUINO and get back some ADC measurement. I know the basic stuff (how to send a command with a click of the mouse and the like …) but I would like to know if…

---

## [For some reason some math results in 0](https://discourse.processing.org/t/for-some-reason-some-math-results-in-0/949)

<div class="topic-metadata">

**Author:** [@Grimtin10](https://discourse.processing.org/u/Grimtin10)\
**Replies:** 3\
**Last updated:** [June 14, 2018, 8:17am UTC](https://discourse.processing.org/t/for-some-reason-some-math-results-in-0/949 "2018-06-14T08:17:29Z")

</div>

So I am trying to calculate pi (don’t ask), I have a variable, P, which when two random numbers don’t share a common factor, it goes up. Then I divide by the amount of times I do that. The problem is, when doing somethin…

---

## [Using a part of the computer screen for computer vision](https://discourse.processing.org/t/using-a-part-of-the-computer-screen-for-computer-vision/902)

<div class="topic-metadata">

**Author:** [@jan-jelle](https://discourse.processing.org/u/jan-jelle)\
**Replies:** 2\
**Last updated:** [June 14, 2018, 12:01am UTC](https://discourse.processing.org/t/using-a-part-of-the-computer-screen-for-computer-vision/902 "2018-06-14T00:01:25Z")

</div>

Hello everybody, I am trying to manipulate a video input with data from a software program that is running on the PC itself. basically, i try to implement information from the PC screen into the live video screen. howev…

---

## [Minim, Song starts in the middle?](https://discourse.processing.org/t/minim-song-starts-in-the-middle/928)

<div class="topic-metadata">

**Author:** [@Seraphinit](https://discourse.processing.org/u/Seraphinit)\
**Replies:** 0\
**Last updated:** [June 13, 2018, 7:52pm UTC](https://discourse.processing.org/t/minim-song-starts-in-the-middle/928 "2018-06-13T19:52:16Z")

</div>

Hey there, I’m trying to make a simple music player with a selfdrawn animation in the background. Animation and everything works fine, but the song keeps starting in the middle of it? Is there a limit to the lenght of…

---

## [Need help changing background with mouse!](https://discourse.processing.org/t/need-help-changing-background-with-mouse/904)

<div class="topic-metadata">

**Author:** [@QuazArxx](https://discourse.processing.org/u/QuazArxx)\
**Replies:** 8\
**Last updated:** [June 13, 2018, 1:32pm UTC](https://discourse.processing.org/t/need-help-changing-background-with-mouse/904 "2018-06-13T13:32:14Z")

</div>

i understand coding it is as simple as background(mouseX) or anything in those variations. My concern is getting the top left corner in a 250x250 window to be background(255) and the bottom right corner to be background(…

---

## [Serial port error with ARDUINO](https://discourse.processing.org/t/serial-port-error-with-arduino/871)

<div class="topic-metadata">

**Author:** [@F6EEQ](https://discourse.processing.org/u/F6EEQ)\
**Replies:** 6\
**Last updated:** [June 13, 2018, 1:17pm UTC](https://discourse.processing.org/t/serial-port-error-with-arduino/871 "2018-06-13T13:17:54Z")

</div>

First hello to all, I’m brand new to this community! So forgive me if my questions are basic. I tried to find answer with a search, but did not find. As a first attempt, I wish to link an ARDUINO and Processing, using…

---

## [Crashing a lot after updates](https://discourse.processing.org/t/crashing-a-lot-after-updates/702)

<div class="topic-metadata">

**Author:** [@barryalen1992](https://discourse.processing.org/u/barryalen1992)\
**Replies:** 4\
**Last updated:** [June 13, 2018, 11:19am UTC](https://discourse.processing.org/t/crashing-a-lot-after-updates/702 "2018-06-13T11:19:14Z")

</div>

After recent Windows 10 updates all of my coding crashes instantly when I opened them. What is happening with those updates. Does anyone suffer the same problem? Help me please!

---

## [How to scale text and image to responsive canvas?](https://discourse.processing.org/t/how-to-scale-text-and-image-to-responsive-canvas/909)

<div class="topic-metadata">

**Author:** [@LoCamillo](https://discourse.processing.org/u/LoCamillo)\
**Replies:** 1\
**Last updated:** [June 13, 2018, 10:45am UTC](https://discourse.processing.org/t/how-to-scale-text-and-image-to-responsive-canvas/909 "2018-06-13T10:45:35Z")

</div>

Hi! I’m trying to do a big project, but I’m stuck in a part of it. The canvas I’m working on is responsive, but the text and image aren’t. Here’s a simple code that make what i’m needing. function setup(){ createCanva…

---

## [NullPointedException](https://discourse.processing.org/t/nullpointedexception/911)

<div class="topic-metadata">

**Author:** [@inesacsaraiva](https://discourse.processing.org/u/inesacsaraiva)\
**Replies:** 3\
**Last updated:** [June 13, 2018, 1:10am UTC](https://discourse.processing.org/t/nullpointedexception/911 "2018-06-13T01:10:00Z")

</div>

When I run the program it says NullPointedException… could someone help me see what’s wrong? Sorry if it’s a bit disorganised… import processing.video.\*; Capture video; PImage prev; ArrayList\<Circle\> circles; ArrayList\<…

---

## [Indexed color mode?](https://discourse.processing.org/t/indexed-color-mode/879)

<div class="topic-metadata">

**Author:** [@DSW](https://discourse.processing.org/u/DSW)\
**Replies:** 2\
**Last updated:** [June 12, 2018, 2:34pm UTC](https://discourse.processing.org/t/indexed-color-mode/879 "2018-06-12T14:34:08Z")

</div>

I’m currently writing a visualizer for a live band (MIDI in \> pixels out). Because it’s going to be running alongside audio software, I’m trying to keep it as small and efficient as possible. I’m currently drawing each f…

---

## [LiquidFun setting properties such as colorMixingStrength](https://discourse.processing.org/t/liquidfun-setting-properties-such-as-colormixingstrength/783)

<div class="topic-metadata">

**Author:** [@ReinoudvanLaar](https://discourse.processing.org/u/ReinoudvanLaar)\
**Replies:** 3\
**Last updated:** [June 12, 2018, 11:25am UTC](https://discourse.processing.org/t/liquidfun-setting-properties-such-as-colormixingstrength/783 "2018-06-12T11:25:36Z")

</div>

Hi there, I’m using the LiquidFun library by Thomas Diewald and am running against a brickwall trying to set the colorMixingStrength so the colours mix more slowly. At this stage Im trying to get any of the sketches in t…

---

## [Drawing Heart,problem with class](https://discourse.processing.org/t/drawing-heart-problem-with-class/890)

<div class="topic-metadata">

**Author:** [@AbuYazid](https://discourse.processing.org/u/AbuYazid)\
**Replies:** 2\
**Last updated:** [June 12, 2018, 10:06am UTC](https://discourse.processing.org/t/drawing-heart-problem-with-class/890 "2018-06-12T10:06:38Z")

</div>

Hi all coders out there, i have drawn a heart shape using points and it is working , for drawing multiple hearts i have made a object “heart” with a constructor of passing 3 variable (size,x position and y position ) and…

---

## [Scrollable list to Bang](https://discourse.processing.org/t/scrollable-list-to-bang/857)

<div class="topic-metadata">

**Author:** [@GarethWilkins](https://discourse.processing.org/u/GarethWilkins)\
**Replies:** 4\
**Last updated:** [June 12, 2018, 9:17am UTC](https://discourse.processing.org/t/scrollable-list-to-bang/857 "2018-06-12T09:17:19Z")

</div>

I have scrollable list and i want to use the picked items in these to feed into 4 bangs which will then play different sets of sounds. I am struggling working out how to get this info to the bangs. Any help will be grea…

---

## [How do you create a wall?](https://discourse.processing.org/t/how-do-you-create-a-wall/873)

<div class="topic-metadata">

**Author:** [@Ssskyyy](https://discourse.processing.org/u/Ssskyyy)\
**Replies:** 6\
**Last updated:** [June 11, 2018, 5:04pm UTC](https://discourse.processing.org/t/how-do-you-create-a-wall/873 "2018-06-11T17:04:31Z")

</div>

Hi there! I’ve just started with Processing and am still learning. But I’ve ran into a problem already. This is my code: int xPos = 25; int yPos = 25; void setup(){ fullScreen(); } void draw(){ //This is the bac…

---

## [Multiple windows - clone one to another with pgraphics obj](https://discourse.processing.org/t/multiple-windows-clone-one-to-another-with-pgraphics-obj/869)

<div class="topic-metadata">

**Author:** [@bitCrasher](https://discourse.processing.org/u/bitCrasher)\
**Replies:** 7\
**Last updated:** [June 11, 2018, 4:28pm UTC](https://discourse.processing.org/t/multiple-windows-clone-one-to-another-with-pgraphics-obj/869 "2018-06-11T16:28:52Z")

</div>

hi to all! i want clone one windows into another: if i use this code: PWindow win; PGraphics pg; public void settings() { size(640, 480); } void setup() { win = new PWindow(); pg = createGraphics(width, hei…

---

## [How can I switch between ControlP5s without skipping pages?](https://discourse.processing.org/t/how-can-i-switch-between-controlp5s-without-skipping-pages/864)

<div class="topic-metadata">

**Author:** [@britnicanale](https://discourse.processing.org/u/britnicanale)\
**Replies:** 1\
**Last updated:** [June 11, 2018, 4:15pm UTC](https://discourse.processing.org/t/how-can-i-switch-between-controlp5s-without-skipping-pages/864 "2018-06-11T16:15:38Z")

</div>

I’m creating a game in processing and I’m having issues with my GUI using ControlP5. My current setup is that there is a startwindow ControlP5, a tankswindow ControlP5, a howtoplaywindow ControlP5, etc. My issue is that …

---

## [Array Isn't Detected In Parameter](https://discourse.processing.org/t/array-isnt-detected-in-parameter/862)

<div class="topic-metadata">

**Author:** [@Avid\_Coder](https://discourse.processing.org/u/Avid_Coder)\
**Replies:** 3\
**Last updated:** [June 11, 2018, 3:40pm UTC](https://discourse.processing.org/t/array-isnt-detected-in-parameter/862 "2018-06-11T15:40:28Z")

</div>

I am trying to make an animation system to display images with a certain frame rate. While attempting to pass the function an array, it said I had not created an array or variable with that name. I tried adding square br…

---

## [Inserting a variable into a 2D array](https://discourse.processing.org/t/inserting-a-variable-into-a-2d-array/866)

<div class="topic-metadata">

**Author:** [@JaKa](https://discourse.processing.org/u/JaKa)\
**Replies:** 1\
**Last updated:** [June 11, 2018, 8:15am UTC](https://discourse.processing.org/t/inserting-a-variable-into-a-2d-array/866 "2018-06-11T08:15:41Z")

</div>

Im unsure of how i can put either the x or an o into my 2d array for my 7x7 naughts and crosses type game? class cell{ String player; int turnNum; char shape; cell(int row, int col){ } } cell\[\]\[\] grid=new c…

---

## [Random not working](https://discourse.processing.org/t/random-not-working/838)

<div class="topic-metadata">

**Author:** [@pootis](https://discourse.processing.org/u/pootis)\
**Replies:** 3\
**Last updated:** [June 10, 2018, 8:08pm UTC](https://discourse.processing.org/t/random-not-working/838 "2018-06-10T20:08:51Z")

</div>

im trying to get a ball to spawn on one of three heights: 100, 200 and 300. i set the random to produce a number from 1 to 3. when the outcome is 1 the height is 100, when it’s 2 the height is 200 and when it’s 3 the hei…

---

## [Execution time of one program](https://discourse.processing.org/t/execution-time-of-one-program/253)

<div class="topic-metadata">

**Author:** [@totovr76](https://discourse.processing.org/u/totovr76)\
**Replies:** 8\
**Last updated:** [June 10, 2018, 5:56pm UTC](https://discourse.processing.org/t/execution-time-of-one-program/253 "2018-06-10T17:56:56Z")

</div>

Hello! How can I measure the execution time of one program?

---

## [Inaccuracy in exponential pow() function](https://discourse.processing.org/t/inaccuracy-in-exponential-pow-function/817)

<div class="topic-metadata">

**Author:** [@neoumlaut](https://discourse.processing.org/u/neoumlaut)\
**Replies:** 4\
**Last updated:** [June 10, 2018, 2:50pm UTC](https://discourse.processing.org/t/inaccuracy-in-exponential-pow-function/817 "2018-06-10T14:50:58Z")

</div>

I’m working on a program that displays data from an oscilloscope over a serial connection and have run into a problem converting from scientific notation. If I receive a number, for example, 5.72E-1, I then convert it us…

---

## [Wave displaced circle](https://discourse.processing.org/t/wave-displaced-circle/808)

<div class="topic-metadata">

**Author:** [@josephh](https://discourse.processing.org/u/josephh)\
**Replies:** 4\
**Last updated:** [June 10, 2018, 11:08am UTC](https://discourse.processing.org/t/wave-displaced-circle/808 "2018-06-10T11:08:31Z")

</div>

Hi guys, I’m trying to replicate this animation in processing : But I can’t figure out how to do it, this is my code : Circle c1,c2; void setup() { size(800, 800); c1 = new Circle(0,0,200,0); c…

---

## [Smart TV, RPi, Processing, Arduino and Ambilight](https://discourse.processing.org/t/smart-tv-rpi-processing-arduino-and-ambilight/797)

<div class="topic-metadata">

**Author:** [@jb4x](https://discourse.processing.org/u/jb4x)\
**Replies:** 2\
**Last updated:** [June 10, 2018, 8:50am UTC](https://discourse.processing.org/t/smart-tv-rpi-processing-arduino-and-ambilight/797 "2018-06-10T08:50:23Z")

</div>

Hi guys, I’m not sure I’m in the right place to ask that question and I should probably go on a Raspberry Pi forum but maybe someone here can help me through anyway. I recently bought a smart TV and I wanted to build a…

---

## [Issues creating a metronome](https://discourse.processing.org/t/issues-creating-a-metronome/815)

<div class="topic-metadata">

**Author:** [@ThibaultMuller](https://discourse.processing.org/u/ThibaultMuller)\
**Replies:** 8\
**Last updated:** [June 10, 2018, 6:33am UTC](https://discourse.processing.org/t/issues-creating-a-metronome/815 "2018-06-10T06:33:40Z")

</div>

Hello, I’m trying to build a video game to measure the rhythm accuracy of a player. The program should display rhythms, the player has to play them in sync with a metronome. I’ve been trying to build a sketch that woul…

---

## [Increasing maximum available memory testing. How to get better results?](https://discourse.processing.org/t/increasing-maximum-available-memory-testing-how-to-get-better-results/825)

<div class="topic-metadata">

**Author:** [@bontempos](https://discourse.processing.org/u/bontempos)\
**Replies:** 0\
**Last updated:** [June 10, 2018, 2:27am UTC](https://discourse.processing.org/t/increasing-maximum-available-memory-testing-how-to-get-better-results/825 "2018-06-10T02:27:45Z")

</div>

This is a i7-8700, 32Gb of RAM, NVIDIA GeForce GTX 1080, running Windows 10 and Java 8 (171) installed and heap memory set to max 32Gb(-Xmx32g) (?) on run parameters. I think this is not a question about library. Howev…

---

## [Writing 8-bit tiff images?](https://discourse.processing.org/t/writing-8-bit-tiff-images/726)

<div class="topic-metadata">

**Author:** [@tmhoog](https://discourse.processing.org/u/tmhoog)\
**Replies:** 6\
**Last updated:** [June 9, 2018, 2:22pm UTC](https://discourse.processing.org/t/writing-8-bit-tiff-images/726 "2018-06-09T14:22:04Z")

</div>

Hi, we are using Processing to acquire data and write a video stream to disk. However, we are unable to figure out how to write one-channel 8-bit grayscale tiff images instead of the standard RGB images. Does anyone have…

---

## [How do I get the keyCode?](https://discourse.processing.org/t/how-do-i-get-the-keycode/794)

<div class="topic-metadata">

**Author:** [@Grimtin10](https://discourse.processing.org/u/Grimtin10)\
**Replies:** 14\
**Last updated:** [June 8, 2018, 4:19pm UTC](https://discourse.processing.org/t/how-do-i-get-the-keycode/794 "2018-06-08T16:19:11Z")

</div>

I want to make a KeyHandler class to make it so I can press multiple keys, but I don’t know how to get the ASCII integer value for every key, how do I do this?

---

## [Processing 2.0 error on New GLabel](https://discourse.processing.org/t/processing-2-0-error-on-new-glabel/724)

<div class="topic-metadata">

**Author:** [@piscvau](https://discourse.processing.org/u/piscvau)\
**Replies:** 3\
**Last updated:** [June 8, 2018, 9:44am UTC](https://discourse.processing.org/t/processing-2-0-error-on-new-glabel/724 "2018-06-08T09:44:07Z")

</div>

Hello I am trying to run a code from Github which was written in october 2015. I do not knwo which version of processing was used. The code is using the G4P and Sdrop librairies. I installed processing 3 but ran into an…

---

## [Fix code to make spaceship blaster shoot](https://discourse.processing.org/t/fix-code-to-make-spaceship-blaster-shoot/789)

<div class="topic-metadata">

**Author:** [@the-junk](https://discourse.processing.org/u/the-junk)\
**Replies:** 3\
**Last updated:** [June 8, 2018, 8:17am UTC](https://discourse.processing.org/t/fix-code-to-make-spaceship-blaster-shoot/789 "2018-06-08T08:17:46Z")

</div>

Why won’t my code work to make my spaceship blaster shoot? float shipX; // player spaceship float shipY; // player spaceship float enemyX; //enemy UFO float enemyY; //enemy UFO float enemySpeed = 2; float blastX; floa…

---

## [How do i tile an image on to a shape](https://discourse.processing.org/t/how-do-i-tile-an-image-on-to-a-shape/665)

<div class="topic-metadata">

**Author:** [@Grimtin10](https://discourse.processing.org/u/Grimtin10)\
**Replies:** 5\
**Last updated:** [June 8, 2018, 2:53am UTC](https://discourse.processing.org/t/how-do-i-tile-an-image-on-to-a-shape/665 "2018-06-08T02:53:43Z")

</div>

So, i’m making a 3d renderer (because i can) and I want to be able to tile a texture on to a shape in the renderer. I am using the PShape (or whatever it’s called). How to I tile an image on to one shape? -Grim

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

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