Slow or fast acquisition time

Can I slow down or speed up the flow of time that I can get within oF?


float time = ofGetElapsedTimef();
float frequency = 2.0;
float amplitude = 1.0;

float yourValue = sin(time*frequency) * amplitude

Try to draw a circle using yourValue as radius. Try to change frequency and amplitude and look at how those affect your sketch.

Thank you! !
This is a very interesting result! !

However, it seems to be a little different from the answer I am seeking.

Is there an equation that I am seeking to slow down (halve) or speed up (double speed) the speed of time flowing all the way?

Yes, changing the frequency. It should be quite visible in the example. “the flow of time” is quite generic, please be more specific if this is not what you are looking for.

It may be impossible to explain well because it is a beginner, but to get time with ofGetElapsedTimef () to double speed or halve!

For example, when giving a time axis with video such as ofGetElapsedTimef () etc., what kind of variable should be used to create a time value when you want to double speed or slow playback?

Hi, to change video playback speed you can write like

yourVideo.setSpeed(0.5); // 50% speed

See videoPlayerExample for more details and how to control video.

If you want to change FPS, you can call,

ofSetFrameRate(30); // 30 fps

But this has no effect to video playback speed.