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

Meter refactoring #276

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open

Meter refactoring #276

wants to merge 5 commits into from

Conversation

FrancescoCeruti
Copy link
Owner

@FrancescoCeruti FrancescoCeruti commented Jun 3, 2023

I'm not 100% satisfied with the current "DBMeter", this pull address a few points

  • since it can actually be used to measure other parameters, we can this more obvious by using a different name
  • condense a few arguments that, in some cases are dependent, into a new "Scale" class (min, max and the scale function)
    • we might move the label and steps into this, but allow users to init with theirs values
  • Reduce scale label density to avoid collisions at certain screen sizes
  • Use more pixmaps to reduce iterations in the paintEvent
  • Make the paintEvent code more coincise and reduce the use of magic numbers

Any feedback is welcome :)

Update: Scaling logic now encapsulated into dedicated classes
Update: Remove nested loop inside paintEvent by using a cached pixmap for "markings"
Update: various adjustments to the meter/scale rendering
@FrancescoCeruti FrancescoCeruti added the UI Related to the User Interface label Jun 3, 2023
@FrancescoCeruti FrancescoCeruti added this to the v0.7 milestone Jun 6, 2023
Copy link
Contributor

@s0600204 s0600204 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I notice that the bottom edge of the meter isn't drawn - or more that it is, but outside the widget:
digitalMeter_noBottom


I was wondering if you've considered making the meter widget available separate from LiSP? Such a thing could be useful for other audio software projects (I have a couple on the go that could make use of it); a quick look on PyPi and here on GitHub didn't turn up any alternatives; and I don't really want to copy-paste parts of LiSP code into my own projects.

lisp/ui/widgets/meters/digitalmeter.py Outdated Show resolved Hide resolved
lisp/ui/widgets/meters/scales.py Outdated Show resolved Hide resolved
@FrancescoCeruti
Copy link
Owner Author

Thanks for the feedback :)

I was wondering if you've considered making the meter widget available separate from LiSP? Such a thing could be useful for other audio software projects (I have a couple on the go that could make use of it); a quick look on PyPi and here on GitHub didn't turn up any alternatives; and I don't really want to copy-paste parts of LiSP code into my own projects.

I've not considered it, I'll look into it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
UI Related to the User Interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants