Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

NEW REGISTRATIONS - please contact us if you wish to register on the forum

Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright

XY PAD for Parametric EQ

DSP related issues, mathematics, processing and techniques

XY PAD for Parametric EQ

Postby Rocko » Tue Nov 29, 2016 5:13 pm

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?
Attachments
XY_Pad_2D.fsm
(33.4 KiB) Downloaded 1442 times
Last edited by Rocko on Thu Dec 01, 2016 8:13 am, edited 1 time in total.
Rocko
 
Posts: 186
Joined: Tue May 15, 2012 12:42 pm

Re: XY PAD for Parametric EQ

Postby Rocko » Tue Nov 29, 2016 5:22 pm

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 ??
Rocko
 
Posts: 186
Joined: Tue May 15, 2012 12:42 pm

Re: XY PAD for Parametric EQ

Postby Spogg » Wed Nov 30, 2016 10:04 am

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
User avatar
Spogg
 
Posts: 3358
Joined: Thu Nov 20, 2014 4:24 pm
Location: Birmingham, England

Re: XY PAD for Parametric EQ

Postby Lex248 » Wed Nov 30, 2016 3:06 pm

Try to use external redraw with trigger div and timer.
Attachments
Redraw Limit.jpg
Redraw Limit.jpg (21.77 KiB) Viewed 26514 times
Sorry, I bad speak english.
---
My plug-ins http://nalexsoft.blogspot.com/
Lex248
 
Posts: 33
Joined: Mon Aug 29, 2016 7:44 pm
Location: Russia

Re: XY PAD for Parametric EQ

Postby Rocko » Wed Nov 30, 2016 3:56 pm

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 ??!
Rocko
 
Posts: 186
Joined: Tue May 15, 2012 12:42 pm

Re: XY PAD for Parametric EQ

Postby Lex248 » Wed Nov 30, 2016 5:20 pm

And such example?
Attachments
XY_PAD_A_ext_redraw.fsm
(1.04 KiB) Downloaded 1387 times
Sorry, I bad speak english.
---
My plug-ins http://nalexsoft.blogspot.com/
Lex248
 
Posts: 33
Joined: Mon Aug 29, 2016 7:44 pm
Location: Russia

Re: XY PAD for Parametric EQ

Postby Rocko » Thu Dec 01, 2016 7:57 am

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
Rocko
 
Posts: 186
Joined: Tue May 15, 2012 12:42 pm


Return to DSP

Who is online

Users browsing this forum: No registered users and 26 guests