Page 1 of 1
XY PAD for Parametric EQ
Posted: Tue Nov 29, 2016 5:13 pm
by Rocko
Hi all,
I'm building a nice XY pad as a basis for a parametric GUI. In the style of 'EQ eight" (ableton live) or Pro-Q (FabFilter).
For this stage I'm after:
* No audio path
* No Freuqneuncy repsonse line (gain line - this is the next stage to be added)
* Single band only
* params can be edited on "XY pad" as well as the "edit boxes". Changes to be reflected on both sides.
My goal is to lower CPU from the graphihc side.
I measure the CPU by exporting it to *.EXE and measuring the CPU by windows_7 analysis
(resource monitor, Image).
I got this far:
When mouse is not pressed, the CPU reaches ZERO. nice.
When mouse is pressed and not dragged, CPU reaches 12.
When mosue is pressed and dragged, CPU reaches 40% !!
My question is how can I lower the CPU especially on dragging mouse.
Any ideas?
Re: XY PAD for Parametric EQ
Posted: Tue Nov 29, 2016 5:22 pm
by Rocko
More...
If you open the schematic, go to "mouse and normalize" and then "mouse" modules.
You can see two lines:
Code: Select all
#redraw 0,[@cx-@d,@cy-@d,2*@d,2*@d] #if no "gain line" is added
redraw 0 #if "gain line is added"
The idea here is that by enabling the first option, I can redraw the mouse area only (round dot). Good for XY pad. Saves CPU.
However, for 'EQ mode' in which I plan to add a frequency response line, I will need to redraw the whole XY_Pad area for the "frequency response line" to be responsive.
So - the whole XY_PAD has to be redrawn, as far as I can see it - which is the cause for high CPU.
Any better ideas or understanding of this topic ??
Re: XY PAD for Parametric EQ
Posted: Wed Nov 30, 2016 10:04 am
by Spogg
I checked this out last night and on my Core i7 system the CPU peaked at 11% while dragging. I checked against a ruby-based vector knob and it maxed at around 1% while moving the knob around, so it seems the Ruby code is maybe drawing too frequently. I tried everything I could to reduce this but came to the conclusion it's the Ruby code that needs attention and I don't do Ruby. Maybe there's a way to limit the Ruby execution rate? Something like a hop command?
We need a Ruby guy to look into this but I'd be very interested to see the solution. One day I might start learning Ruby you see!
Cheers
Spogg
Re: XY PAD for Parametric EQ
Posted: Wed Nov 30, 2016 3:06 pm
by Lex248
Try to use external redraw with trigger div and timer.
Re: XY PAD for Parametric EQ
Posted: Wed Nov 30, 2016 3:56 pm
by Rocko
Hi,
Thanks for the help.
Sorry to say that I had tried that - without positive results.
Notice that I had also tried this 'trigger filter':
Code: Select all
def init
@t2 = 0
end
def event i,v,t
@t1 = time
if ((@t2-@t1).abs <= (1/@tc))
return
else end
output @v
@t2 = time
end
This one really filters out the triggers (depending on @tc --> time constant) of course.
I added a trigger counter before and after this filter, and it could filter ~x10 times the fast triggers from mouse dragging.
Albeit this result, the CPU still jumps to ~50% on mouse drag ??!
Re: XY PAD for Parametric EQ
Posted: Wed Nov 30, 2016 5:20 pm
by Lex248
And such example?
Re: XY PAD for Parametric EQ
Posted: Thu Dec 01, 2016 7:57 am
by Rocko
Hi,
Thanks for sending. I just tried it.
This version (single dot, no 'gain line', with 'return') works just like the former version (single dot, no 'gain line, without 'return') - so it seems that the 'return' function is not working as supposed.
One can also try 'clearEvents' - but it didn;t get me through either ??
See this link as well (no answer yet):
http://www.dsprobotics.com/support/viewtopic.php?f=4&t=5973&p=28463&hilit=XY+pad#p28463