-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Scalable envelope graph #7194
Merged
michaelgregorius
merged 6 commits into
LMMS:master
from
michaelgregorius:EnvelopeGraphDynamicallyRendered
Apr 11, 2024
Merged
Scalable envelope graph #7194
michaelgregorius
merged 6 commits into
LMMS:master
from
michaelgregorius:EnvelopeGraphDynamicallyRendered
Apr 11, 2024
Commits on Apr 5, 2024
-
Remove the setting of a fixed size from the envelope graph and only set a minimum size. Adjust the painting code of the envelope so that it does not assume fixed widths and heights anymore. The new code is more or less divided into two parts. The first part calculates `QPointF` instances for the different points. In the second part these points are then used to draw the lines and markers. This makes the actual rendering code much more straight forward, readable and maintainable. The interpolation between the line color of an inactive and an active envelope has also been restructured so that it is much more obvious that we are doing an interpolation in the first place. The colors at both ends of the interpolation are explicit now and can therefore be adjusted much easier. The actual color interpolation is done in the new helper function `interpolateInRgb` which might be moved elsewhere later if needed. The line is rendered as a polyline instead of single line segments. The drawing of the markers has been abstracted into a lambda (with some outside captures though) so that it can be easily adjusted if necessary. The markers are rendered as circles instead of rectangles because that looks much nicer especially when the widget is rendered at a larger size. The width of the lines and marker outlines is determined using the size of the widget so that it scales with the size. A `lerp` function has been added to `lmms_math.h`.
Configuration menu - View commit details
-
Copy full SHA for 701af7c - Browse repository at this point
Copy the full SHA 701af7cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1c8ca85 - Browse repository at this point
Copy the full SHA 1c8ca85View commit details
Commits on Apr 8, 2024
-
Add the two new scaling modes "Dynamic" and "Relative" so that there are three modes now: * "Dynamic": This modes corresponds to the rendering strategy of the previous implementation. Initially 80/182 of the available width is used as the maximum width per segment. This can be interpreted like a "zoomed" version of the absolute mode. If the needed space becomes larger than the full width though then it falls back to relative rendering. * "Absolute": Each of the five segments is assigned 1/5 of the available width. The envelopes will always fit but might appear small depending of the current settings. This is a good mode to compare envelopes though. * "Relative": If there is at least one non-zero segment then the whole width is always used to present the envelope. The default scaling mode is "Dynamic". Add a context menu to the graph what can be used to set the current scaling mode.
Configuration menu - View commit details
-
Copy full SHA for de1c4a9 - Browse repository at this point
Copy the full SHA de1c4a9View commit details -
Move the function `interpolateInRgb` into the new class `ColorHelper` as it will later also be needed when the LFO graph is made scalable.
Configuration menu - View commit details
-
Copy full SHA for 05082b1 - Browse repository at this point
Copy the full SHA 05082b1View commit details
Commits on Apr 9, 2024
-
Configuration menu - View commit details
-
Copy full SHA for af4672b - Browse repository at this point
Copy the full SHA af4672bView commit details
Commits on Apr 10, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 26d260e - Browse repository at this point
Copy the full SHA 26d260eView commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.