How to make sound repeat ?
Im doing a Pong Game, and I want that when the ball hits the block/paddle to make a sound, but I only manage to make the sound play once.It hits the block the first time and it makes the sound and...
View ArticleSetting decimal point for formatting floats.
In Processing 1.5 I used Locale.setDefault(Locale.US); in the setup() to make nf() produce decimal points for floats. If I did not, it would use decimal comma, as my window-pc is localized for Denmark....
View ArticleRe : How to make sound repeat ?
I don't know the answer right now, but I suggest to look at the examples coming with Processing:PDE > File > Examples > Libraries > MinimI am pretty sure there is one example showing how to...
View ArticleRe : Turning on (& off) a webcam reacting to sound
Thanks for helping me mate! Still no clue how to make it actually... Anyone with some help?
View ArticleIssues with TargetRegion in frame differencing
Hi allIm working with sound and spaces and trying to set an installation, based on webcam triggers. I was wondering if anyone can help. I have 5 targetRegions to trigger and play a file, however only...
View ArticleRe : Advanced GLSL - pass 1D, 3D and float textures form processing?
I don't know the answer to this either, but I suspect that it may be possible to do what you want by making low-level GL calls directly from within your sketch (circumventing the Processing interface...
View ArticleRe : Advanced GLSL - pass 1D, 3D and float textures form processing?
Checkout Andres bloghttp://codeanticode.wordpress.com/2013/06/04/processing-2-0-is-out-processing-2-0-is-in/#more-1681
View ArticleRe : Issues with TargetRegion in frame differencing
now fixed....float checkMovement(int x, int y, int w, int h){ int movementSum = 0; // Amount of movement in the frame for(int ypos = y;ypos < y + h; ypos ++) { for(int xpos = x;xpos < x +...
View ArticleCannot figure out why alpha is acting strange here!
Hi all. I am having what appears to be a strange bug, but I'm sure I'm doing something stupid.I have a "HeatPoint" class which is basically a point that is assigned a color value. From that color...
View ArticleRe : Cannot figure out why alpha is acting strange here!
All pixels drawn at the main screen surface (PGraphics g) are 100% opaque!Processing converts all transparent colors into an equivalent opaque one!Alpha attribute is only preserved in separate PImage...
View ArticleRe : Cannot figure out why alpha is acting strange here!
Thank you for your response.I still don't understand why it won't work though. I changed the code to render the "fading circle" in PGraphics: pg.beginDraw(); pg.noStroke(); pg.background(0);...
View ArticleRe : Cannot figure out why alpha is acting strange here!
In the end, all colors become 100% opaque! Once you stamp your PGraphics instance at the main canvas, any alpha color of it is transformed into an opaque equivalent too!
View ArticleRe : Cannot figure out why alpha is acting strange here!
So basically what you're saying is that transparency is not possible.I don't understand at all since I have made things overlapping and transparent before. Actually it works fine with the original...
View ArticleRe : Cannot figure out why alpha is acting strange here!
Transparency works! It's just that Processing transforms a transparent color into an opaque equivalent when it is drawn at the main screen!The deal is, the color code you draw isn't the same you read...
View ArticleRe : Cannot figure out why alpha is acting strange here!
Reading your code, taking notes...- distanceBetween() duplicates the dist() function in Processing! Beside, no need for abs(), since you square the value anyway.- You can use x += 4 as increment of the...
View ArticleRe : Cannot figure out why alpha is acting strange here!
Thank you Phil for your help of both the main issue and also suggesting better/more efficient programming solutions. I will keep hacking away at this problem as well.Thanks again.
View ArticleRe : Cannot figure out why alpha is acting strange here!
GoToLoop, the second example given by lasko25 already tried your suggestion (which was my guess too...).That said, indeed the pixels on the main graphics are opaque, but the rectangles drawn over them...
View ArticleRe : Cannot figure out why alpha is acting strange here!
Implemented first solution, after all.int numHeatPoints = 5;HeatPoint[] heatPoints = new HeatPoint[numHeatPoints]; void setup(){ size(1280,800); smooth(); for (int i=0;i<numHeatPoints;i++){...
View ArticleRe : Cannot figure out why alpha is acting strange here!
PhiLho, thank you so much!I can certainly work with this, but while the thread is still hot I figured I'd ask one more question.The code you provided is slightly problematic in reaching my end goal (I...
View ArticleRe : Cannot figure out why alpha is acting strange here!
"Not really a question I suppose."Indeed, I don't see a question mark... At the end of draw(), they are all unified. You can do additional processing of the resulting image there. Or draw them all in a...
View Article