-
-
Notifications
You must be signed in to change notification settings - Fork 106
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
Switch to a quadratic curve for note brightness based on note velocity #3260
base: community
Are you sure you want to change the base?
Conversation
Switched to a quadratic curve to make the brightness gradient based on note velocity much more apparent. Float calculations made this much simpler, and means that the adjustFractional() function is not needed anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM pending the small cast nit
src/deluge/model/note/note_row.cpp
Outdated
// The brightness is reduced as necessary to be proportional to the note velocity. | ||
// below .03 (~4/127) it is not visible enough, so we set that as the minimum | ||
// A quadratic curve makes the brightness gradient appear more linear. | ||
pixel = rowColour.transform([colour_intensity](uint8_t chan) { return (chan * colour_intensity); }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want to, instead of using the small transform here, you can add an
[[nodiscard]] constexpr RGB operator*(float value) const {
return RGB(r * value, g * value, b * value);
}
to the RGB class which simply returns a new RGB with each of the channels multiplied by the input value.
It would turn this line into
pixel = rowColour * colour_intensity;
which I think is much easier to understand
Do we know how this looks with blurred notes and tails? I think in the previous implementation the note head was still distinguishable from the note tail. Also would be curious what happens with blurred notes. |
Fine with blurred notes. Not great with tails, as the dimmer notes become difficult to distinguish from the tails. After Sean and I experimented with different methods of addressing that issue, it seems it will need some more consideration as to how to address this issue. It will probably be possible, but if no satisfactory solution can be found, we may need to discuss whether we want to incorporate this change or even whether we should eliminate this feature. |
Hey so after speaking with a couple folks on the discord, let's try out this change with just the quadratic curve and then go from there. We'll see what people think. |
Co-authored-by: Katherine Whitlock <[email protected]>
simplifies things when you just want to multiply by a single float value.
…ware into Metamere-Exp
Switching PR to draft just to prevent accidentally merging this until @Metamere gives the go ahead |
Switched to a quadratic curve to make the brightness gradient based on note velocity much more apparent. Float calculations made this much simpler, and means that the adjustFractional() function is not needed anymore. This is similar to what was done for PR #3132 for the kit drum velocity keyboard view updates. See comparison photos below, which were taken with the same exposure settings.
Comparing before/after changes for green, blue, and red.
And here it is at the lowest system brightness setting possible, with a drastically longer exposure time needed to capture the images.
It is still well visible at the lowest brightness settings in a dark room. Not that those super low velocities and settings are commonly used, but it still makes for a good baseline check.