Page 1 of 2

Measuring frame rate/re-draws...

PostPosted: Sun Jul 23, 2017 7:04 am
by Spogg
Hi to all!

Does anyone have a tool or technique for measuring the frame rate (or re-draw rate) of a project in Flowstone or a VST plugin? Preferably for the whole schematic but it would still be helpful if it could be per module with an MGUI.

The reason I ask is that I have a complex project on the go and I’m not happy with the re-draw behaviour. It’s much better in the VSTi export but I’d like it even better.

I’ve read and applied Trogg’s Trigger tutorial info but some actions produce no change that I can perceive, so it would be nice to know the effect of any change more precisely, since every little helps.

Thanks in advance for any advice!

Cheers

Spogg

Re: Measuring frame rate/re-draws...

PostPosted: Sun Jul 23, 2017 8:23 am
by tulamide
Here's an example for a single RubyEdit. To test it, just activate the view by clicking on it, then move the mouse over it and back out. The rate is shown as fps, but as a peak value. I don't think it makes much sense to use the average over time.

If you want to use it in your RubyEdits, you would need to add everything to them that doesn't exist yet from my example (code and outputs)

Basically, drawing in Flowstone is a triggered event. So, each trigger somehow leading to a module with a view has the potential to trigger a redraw (depending on how the data is used). Counting the draw orders (as in my example) is the only way to exactly tell the number of draws that are occurring.

Re: Measuring frame rate/re-draws...

PostPosted: Sun Jul 23, 2017 9:00 am
by Spogg
WOW!!!

Thank you so much for that, really appreciated.

I know I'm pushing it now, but is there a way I could reset the re-draw counter. I would find that useful but not essential.

Thanks again :D

Spogg

Re: Measuring frame rate/re-draws...

PostPosted: Sun Jul 23, 2017 2:33 pm
by tulamide
Here is an advanced module. It is more comfortable (you don't need to copy any code or place any outputs), but it needs you to pay attention how to set it up.

The module shows rate and redraws of whatever view is connected wireless, and a button to reset the redraw count. I have added a knob for you to see it in action. Just turn the knob and the inspector module should react.

The wireless input is named "redraw_inspector". Any wireless output you want to connect must have the same name and the "view" type.

If you use a standard wireless output, remember that it only transfers to inputs on lower layers. In that case the inspector module needs to be at the layer of the wireless output or lower.

If you use a module wireless output, the module itself is "sending" the signal. In that case the inspector module must be on the same layer as the module you want to inspect, or lower.

Just look at how I connected the knob's MGUI to the wireless input of the inspector module as an example.

EDIT: This one should work with everything that outputs a view connection (not just Ruby)

Re: Measuring frame rate/re-draws...

PostPosted: Sun Jul 23, 2017 3:48 pm
by Spogg
That is absolutely fantastic tulamide :o :D

It can record bursts of redraws which I think will be useful for checking out automation and stuff like pitchbend and modwheel overheads too.

This is going to be a useful tool for me, and others I suspect!

I do have a question and please pardon my ignorance on this. When it just sits there it records a redraw rate of 20 and the counter increments accordingly. Is this like a minimum refresh rate that's showing up?

I need to say, that thanks to your previous version, I found the main culprit. For some ungodly reason I'd used a Tick 25 on a redraw prim, instead of drawing when a float value changed.

You made a very old Vulcan very happy today :lol:

Cheers!!

Spogg

Re: Measuring frame rate/re-draws...

PostPosted: Sun Jul 23, 2017 4:06 pm
by tulamide
Spogg wrote:I do have a question and please pardon my ignorance on this. When it just sits there it records a redraw rate of 20 and the counter increments accordingly. Is this like a minimum refresh rate that's showing up?
No, that sounds like a serious issue. On my pc the rate goes down to 0 as it should when no drawing occurs, and as high as 60 (which is the maximum for green, IIRC) if I'm really fast moving knobs.

The module you connected seems to have an issue. Do you have access to 3.0.6? You could test if the inspector works correctly there (I'm on 3.0.6)

Spogg wrote:I need to say, that thanks to your previous version, I found the main culprit. For some ungodly reason I'd used a Tick 25 on a redraw prim, instead of drawing when a float value changed.
:shock: That's pretty much the worst case scenario! I'm glad the tool could help you tracking it down!

Spogg wrote:You made a very old Vulcan very happy today :lol:
You're welcome! :D

And here's the definition of "cool".
Spock.jpg
Spock.jpg (195.48 KiB) Viewed 26200 times

Re: Measuring frame rate/re-draws...

PostPosted: Sun Jul 23, 2017 4:53 pm
by Spogg
tulamide wrote:The module you connected seems to have an issue. Do you have access to 3.0.6? You could test if the inspector works correctly there (I'm on 3.0.6)


Hey thanks for the picture of my 2nd cousin. Takes me back (actually forwards I guess :lol: ).

No I don't have 3.06 but it's an issue with 3.081. I know this because I just tested it with the latest alpha and it works fine. Reads zero with no activity.
So we've uncovered another issue with 3.081 then. I wonder what else is broken...

Many thanks again. You are my hero!

Spogg

Re: Measuring frame rate/re-draws...

PostPosted: Sun Jul 23, 2017 5:40 pm
by RJHollins
This is really cool !

Thanks T :mrgreen:

Re: Measuring frame rate/re-draws...

PostPosted: Mon Jul 24, 2017 11:17 am
by Walter Sommerfeld
Awesome work - just check my project gui module with 16 pads, 20 buttons, a touch field and a led levelmeter:
detected 3 sources for steady triggering :)
I had a flasher bool switched by an add prim: this is now correctly replaced with a trigger switch prim ;-)

I use v3.081 skylark...

Cheers

Walter

P.S.: Never ever had found this w/o ur tool!

Re: Measuring frame rate/re-draws...

PostPosted: Wed Aug 02, 2017 2:22 pm
by FlowStoner
Great StarTeck :D