Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-implement the VU meter for two reasons #639

Closed
baconpaul opened this issue Feb 20, 2019 · 1 comment · Fixed by #640
Closed

Re-implement the VU meter for two reasons #639

baconpaul opened this issue Feb 20, 2019 · 1 comment · Fixed by #640

Comments

@baconpaul
Copy link
Collaborator

There are two reasons I would like to re-implement the VU meter

1: It invalidates and invalidates the background of its parent on every call. This means we are doing lots of redraw calls to the background bitmap. Some careful subclassing to suppress invalidation to the background is probably the way to go

2: It looks like pixel bits at high zoom since it is using pixels to draw rather than paths.

So add this to the list.

Couples to #446

@baconpaul
Copy link
Collaborator Author

Also couples to #556

baconpaul added a commit to baconpaul/surge that referenced this issue Feb 21, 2019
The VU Meter was a cause of substantial idle load. In a 30 second
timer sample, a full half second was spent drawing background
images - as much time as was spent filling up the audio buffer
with no sound. There were a couple of key reasons for this:

1. The VU Meter invalidates every idle even if value hasn't changed
2. When the VU meter invalidates even legitimately it forces a
   full repaint of the background image into a clip rect because
   that's what VSTGUI::CViewContainer does

So - somewhat unsatisfactorily in the second case - this diff
fixes those by only invalidating when value changes (which is
great for idle) and supressing the background image repaint
using knowledge of the placement of the VU meter (which is
fragile and unsatisfying but the only option we have given
the protection of VSTGUI::CFrame's final status and so on).

While at it, replace the pixel painted edges so the VU meeter
has a better boundary when zoomed.

Closes surge-synthesizer#639 - Re-Implement VU Meter
Addresses parts of surge-synthesizer#446 and surge-synthesizer#556; performance and pixely bits
baconpaul added a commit to baconpaul/surge that referenced this issue Feb 21, 2019
The VU Meter was a cause of substantial idle load. In a 30 second
timer sample, a full half second was spent drawing background
images - as much time as was spent filling up the audio buffer
with no sound. There were a couple of key reasons for this:

1. The VU Meter invalidates every idle even if value hasn't changed
2. When the VU meter invalidates even legitimately it forces a
   full repaint of the background image into a clip rect because
   that's what VSTGUI::CViewContainer does

So - somewhat unsatisfactorily in the second case - this diff
fixes those by only invalidating when value changes (which is
great for idle) and supressing the background image repaint
using knowledge of the placement of the VU meter (which is
fragile and unsatisfying but the only option we have given
the protection of VSTGUI::CFrame's final status and so on).

While at it, replace the pixel painted edges so the VU meeter
has a better boundary when zoomed.

Closes surge-synthesizer#639 - Re-Implement VU Meter
Addresses parts of surge-synthesizer#446 and surge-synthesizer#556; performance and pixely bits
@baconpaul baconpaul added Linux Issues which only occur on Linux and removed Linux Issues which only occur on Linux labels Feb 21, 2019
baconpaul added a commit that referenced this issue Feb 23, 2019
The VU Meter was a cause of substantial idle load. In a 30 second
timer sample, a full half second was spent drawing background
images - as much time as was spent filling up the audio buffer
with no sound. There were a couple of key reasons for this:

1. The VU Meter invalidates every idle even if value hasn't changed
2. When the VU meter invalidates even legitimately it forces a
   full repaint of the background image into a clip rect because
   that's what VSTGUI::CViewContainer does

So - somewhat unsatisfactorily in the second case - this diff
fixes those by only invalidating when value changes (which is
great for idle) and supressing the background image repaint
using knowledge of the placement of the VU meter (which is
fragile and unsatisfying but the only option we have given
the protection of VSTGUI::CFrame's final status and so on).

While at it, replace the pixel painted edges so the VU meeter
has a better boundary when zoomed.

Closes #639 - Re-Implement VU Meter
Addresses parts of #446 and #556; performance and pixely bits
baconpaul added a commit to baconpaul/surge that referenced this issue Jul 10, 2019
The VU Meter was a cause of substantial idle load. In a 30 second
timer sample, a full half second was spent drawing background
images - as much time as was spent filling up the audio buffer
with no sound. There were a couple of key reasons for this:

1. The VU Meter invalidates every idle even if value hasn't changed
2. When the VU meter invalidates even legitimately it forces a
   full repaint of the background image into a clip rect because
   that's what VSTGUI::CViewContainer does

So - somewhat unsatisfactorily in the second case - this diff
fixes those by only invalidating when value changes (which is
great for idle) and supressing the background image repaint
using knowledge of the placement of the VU meter (which is
fragile and unsatisfying but the only option we have given
the protection of VSTGUI::CFrame's final status and so on).

While at it, replace the pixel painted edges so the VU meeter
has a better boundary when zoomed.

Closes surge-synthesizer#639 - Re-Implement VU Meter
Addresses parts of surge-synthesizer#446 and surge-synthesizer#556; performance and pixely bits

Former-commit-id: 0e650308bda2a949e7c32265c3c534c9252835ec [formerly b51bdd2]
Former-commit-id: 075d28ec6fb51087fe96dcac3aa76def95574427
Former-commit-id: ce8d1c8ea41323ee2fce9dab210c644cbc9de14a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant