FPS efficiency tracker...

Post and discuss Lemur Modules.
Post Reply
Traxus
Regular
Posts: 211
Joined: 30 Nov 2012 06:19
Location: Detroit
Contact:

FPS efficiency tracker...

Post by Traxus »

I am still unclear as to whether Lemur always runs at 60 FPS, but logic tells me it does not.

I have created a small module that tracks FPS via an onFrame script, as well as gives an efficiency readout compared to peak FPS ( current FPS / 60 )...

I've dropped it into different templates and gotten different results. I've been doing more with intervals (automatic timed fade outs and the like) and have been using this as a reference tool.

The editor will sometimes run at 62 or 63 FPS for me, but once dropped into a template by itself the counter holds steady at or below 60 FPS

http://liine.net/en/community/user-library/view/369/
Attachments
FPStracker.png
FPStracker.png (5.28 KiB) Viewed 4598 times
Softcore
Regular
Posts: 1613
Joined: 04 Nov 2012 08:34

Re: FPS efficiency tracker...

Post by Softcore »

Interesting...
Joe Soap
Regular
Posts: 462
Joined: 07 Jul 2012 15:04

Re: FPS efficiency tracker...

Post by Joe Soap »

That's a nice thing to have, thanks Traxus.
wul
Regular
Posts: 181
Joined: 10 Apr 2012 13:25

Re: FPS efficiency tracker...

Post by wul »

great stuff
all these tools are useful just to drag in from the library when needed
I use this to monitor frame rate , definitely not a constant, doesnt take much to slow it down
Attachments
Frame Timer.jzlib
(2.72 KiB) Downloaded 180 times
Traxus
Regular
Posts: 211
Joined: 30 Nov 2012 06:19
Location: Detroit
Contact:

Re: FPS efficiency tracker...

Post by Traxus »

I find it particularly handy for time sensitive actions that don't necessarily have a definite start and end point.

For instance, I needed an encoder to complete a rotation every ~2 seconds. Of course, you add to the x value of the encoder onFrame, but how much you add is dependent on the current frame rate. Lower frame rates = more added to the x value every frame to maintain the 2 second cycle.
Traxus
Regular
Posts: 211
Joined: 30 Nov 2012 06:19
Location: Detroit
Contact:

Re: FPS efficiency tracker...

Post by Traxus »

Traxus wrote:I find it particularly handy for time sensitive actions that don't necessarily have a definite start and end point.

For instance, I needed an encoder to complete a rotation every ~2 seconds. Of course, you add to the x value of the encoder onFrame, but how much you add is dependent on the current frame rate. Lower frame rates = more added to the x value every frame to maintain the 2 second cycle.
I was revisiting this last night, and realized the better way to do it is by calculating the time between intervals (frames), as well as calculating the expected distance to be traveled during that amount of time, rather than tying it directly into FPS. You end up one frame behind but at worse that's like 1/30th of a second so no big deal.

I had actually figured all this out awhile ago, and then forgot how I did it.

In other words, you can use the FPS value directly but its better used as a monitor to the weight of your template.
Macciza
Regular
Posts: 1315
Joined: 07 Dec 2011 04:57
Location: Sydney, Australia.

Re: FPS efficiency tracker...

Post by Macciza »

Hi
For things like this I would link them to time() directly using it for the phase. . .
Something like a function phasor(timer) - (time*1/timer)%1
Then for the 2 second rotation Knob a script - x=phasor(2) will do what you want . . .
MM
iMac 2.8G i7 12G 10.6.8/10.7.2, Legacy Dexter/Lemur, Liine Lemur/iPad2, KMI SoftStep, 12Step & QuNeo , B-Controls, Mackie C4 etc
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]
Traxus
Regular
Posts: 211
Joined: 30 Nov 2012 06:19
Location: Detroit
Contact:

Re: FPS efficiency tracker...

Post by Traxus »

Macciza wrote:Hi
For things like this I would link them to time() directly using it for the phase. . .
Something like a function phasor(timer) - (time*1/timer)%1
Then for the 2 second rotation Knob a script - x=phasor(2) will do what you want . . .
MM
I think the problem I would have with that is, on release of a scratch action, the x position would jump to the position expected by that calculation rather than resume from its current spot. This could be worked around, but my intuition is the work around would then be heavier than what I've got, I'd have to revisit it.

I believe I've used a similar solution to what you've proposed for simpler applications like automated fade outs where there are less potential factors altering the x position.
Macciza
Regular
Posts: 1315
Joined: 07 Dec 2011 04:57
Location: Sydney, Australia.

Re: FPS efficiency tracker...

Post by Macciza »

Aah thats a bit different then
Did not realise you wanted to be able to 'scratch' it . .
For that you would need to introduce 'phase' or 'phase angle' into it
Then it would simply inhibit the phasor when scratching (z=1) and then set a new phase position when z returns to 0 . . .
Cheers
iMac 2.8G i7 12G 10.6.8/10.7.2, Legacy Dexter/Lemur, Liine Lemur/iPad2, KMI SoftStep, 12Step & QuNeo , B-Controls, Mackie C4 etc
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]
Post Reply