We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › frameRate shouldn't affect console prints
Page Index Toggle Pages: 1
frameRate shouldn't affect console prints (Read 1309 times)
frameRate shouldn't affect console prints
Nov 19th, 2007, 6:59pm
 
isn't it quite illogic that frameRate affects the console results. with the print function i mean. thats stupid
Re: frameRate shouldn't affect console prints
Reply #1 - Nov 19th, 2007, 7:16pm
 
Example?

frameRate I thought is simply slowing down the draw() block to a specified amount. Thus the print functions are only going to get called when the computer sees them - as slow as it gets to them.

Which is what you want. I don't want the program scrying into the future for me and telling me stuff out of synch. Unless you can provide an example proving otherwise that is, which would sound like a bug.
Re: frameRate shouldn't affect console prints
Reply #2 - Nov 19th, 2007, 10:02pm
 
i want to monitor a sound input as an int in the console and do graphics at low frameRates
Re: frameRate shouldn't affect console prints
Reply #3 - Nov 19th, 2007, 10:44pm
 
You will have to have your sound monitoring code in a seperate thread to have it run indipendant of the drawing rate.
Re: frameRate shouldn't affect console prints
Reply #4 - Nov 20th, 2007, 12:40pm
 
I know how to. its just illogic that the framerate affects the  speed of the prints.
Re: frameRate shouldn't affect console prints
Reply #5 - Nov 20th, 2007, 12:46pm
 
if you want something to be printed immediately after something happens you shouldnt have to wait for the frame to update.
Re: frameRate shouldn't affect console prints
Reply #6 - Nov 20th, 2007, 1:15pm
 
println() doesn't wait for the frame to update.
Code:

void setup() {
frameRate(1);
}

void draw() {
println(1);
delay(5000);
println(2);
delay(5000);
println(3);
}


The way it works doesn't seem 'illogic' to me Smiley, much less 'stupid'.
Re: frameRate shouldn't affect console prints
Reply #7 - Nov 20th, 2007, 4:16pm
 
kontrol wrote on Nov 20th, 2007, 12:46pm:
if you want something to be printed immediately after something happens you shouldnt have to wait for the frame to update.


frameRate dtermines how often draw() is run. How often draw is run determins ho woften your functions get called. How often your functions get called defines how fast your print statements get called. Processing hs no idea that you want a function to be run even when draw isn't being run, how could it There's no way to say "magically know when this value has changed, then do this..."

You could do something like:

Code:
//in setup
frameRate(5*animationSpeed);

// draw
void draw()
{
if(frameRate%5>0)
{
printOnly();
return;
}
//only gets to here every 5th frame..
drawStuff();
}
Re: frameRate shouldn't affect console prints
Reply #8 - Nov 21st, 2007, 2:25pm
 
kontrol wrote on Nov 19th, 2007, 6:59pm:
isn't it quite illogic that frameRate affects the console results. with the print function i mean. thats stupid

the irony is calling something "stupid" when haven't taken the time to figure it out.

please use better language next time and save the rudeness for other forums.
Re: frameRate shouldn't affect console prints
Reply #9 - Nov 21st, 2007, 2:44pm
 
seriously would you relax, I had no intent of being rude om your forum. haven't you ever thought "oh that seems stupid" without having to be rude?
thank you for the answers and the help. very much appriciated, really. sorry for my ignorance.

Slm
Re: frameRate shouldn't affect console prints
Reply #10 - Nov 21st, 2007, 3:26pm
 
kontrol wrote on Nov 21st, 2007, 2:44pm:
seriously would you relax, I had no intent of being rude om your forum. haven't you ever thought "oh that seems stupid" without having to be rude

you've missed my point: we don't talk that way on this forum. try searching for "stupid" on the board and you're the first to use it in this context, and i'd like the board to remain more mature that way.
Re: frameRate shouldn't affect console prints
Reply #11 - Nov 21st, 2007, 4:35pm
 
point taken, you just mentioned my so called rudeness which deosn´t really have anything to do with the point. But really peace. sorry
Page Index Toggle Pages: 1