-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Pitch Bending Directly in the Piano Roll #7759
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
Conversation
|
@szeli1 I believe you had similar ideas, but it was for manually editing automation clips directly in the Song Editor? |
|
What if I slide pitch from one note onto a place where another note already exists, and then click on that other note? If you don't get what I mean, I'll record a video demo when I can. |
|
Just tried it, it works on selections, so even if you overlap notes, there's no issue! And it supports making selections in the automation mode! Excellent! 😁 |
|
Mind the quality of the video, I overcompressed it. But I found a bug! out.mp4 |
szeli1
left a comment
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.
I didn't test this PR, but I reviewed it.
Co-authored-by: Sotonye Atemie <[email protected]>
Co-authored-by: Sotonye Atemie <[email protected]>
|
@regulus79, could very well be! My exact steps were Ctrl+A, Shift-Dragging new notes into existence, and then attempting to change the pitch of those new notes, since they were selected afterwards. I'll try that on master and let you know if that's the same behavior. |
…rning the right automation clip (Currently only detuning is supported)
|
I have added a lot of comments and refactored the switch statement out into a separate function. Hopefully the PR is easier to read now. |
|
Out of scope for this PR, i see a chance we can replace |
|
@regulus79, the named issue definitely exists on master. Adding it to my notes and opening a corresponding issue if there isn't one. |
…ecks to prevent holding left and right at the same time
|
Not big on Qt (please interpret as "barely has any idea what they're doing"), but the overall logic the PR seems okay to me.
I'll keep testing, but I think there's nothing more to see. @messmerd could we get some final opinions and merge? |
sakertooth
left a comment
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.
Could've made a couple of nitpicks but don't want to withhold this much needed feature. Tested it and it works mostly fine, but found a minor bug (?) where the green line disconnects once moved to the edge near the keys in the Piano Roll. Not sure if you want to look into that here or later (or at all).
|
Thanks for approving!
I'm not sure what bug you are referring to. I did notice a similar potential bug where dragging a node past the left edge of the note and dragging it back without releasing the mouse could cause it to update the height of the first node, even though it wasn't explicitly clicked and dragged. That's mainly due to the hacky way I'm using the automation clip editing functions to disallow the user from dragging the first node left/right. I think it's a pretty minor bug (and would probably be tricky to solve without a lot of reworking) so it might be okay to leave it for now. Though I'm not sure if that's the same bug you are referring to. |
2026-01-03.10-19-06.mp4I think this is the same bug you're mentioning, but just for clarify I attached a video. I think we should fix this before merge? |
|
I've fixed the bug. I also made it smoother to use, so instead of the old drag ending and a new drag starting, it just kind of clamps the drag but still lets you move it up and down. It's hard to explain, but I think it feels better. 2026-01-04.10-35-58.mp4 |
Great, thats a bit better, but I think the first node should always be attached to the note right? |
|
Are we good to merge? |
|
IMO, yes. |
|
I am okay with it. We can revisit later if something pops up but this seems good for now and was tested quite aggressively. |
|
Will this new tool support 0.5 semitone bending in the future, like the automation editor (or even finer tuning, for that matter)? |
It probably wouldn't be extremely hard to add, perhaps letting the user hold down alt or ctrl or something. For vertical un-quantized movement, that's fine. But for the horizontal un-quantized adjustment, the current implementation where it essentially interfaces with the functions used by the automation editor means that it's a bit more tricky to get that to work. |
I think it's just noise, since it's a rare use-case.
That'd require a rewrite of that part of the core, I'd think. |
|
I feel like I end up using half-semitone detuning very often, frequently as an intermediate in a larger bend, or when I'm just bending a note for an effect rather than trying to hit a particular pitch |


This PR modifies how the Detuning tool works in the piano roll to let the user modify the automation curve right on the notes. This is actually fairly simple, as automation clips already contain the functions for dragging and removing points like in the Automation Editor. So essentially all that's being done is calculating the relative pos of the mouse to the nearest note, and setting the drag value in the automation clip to that position and key.
You can still access the old automation editor version by shift-click (should I change it to be double-click?)
pitchbending_demo.mp4
(Apologies for the non-standard theme; I didn't feel like recording another demo)
@messmerd asked if the code could be made general for any future note parameter besides detuning, in preparation for CLAP per-note parameter automation. I have refactored the relevant functions to accept an enum type for the kind of note parameter, although currently only detuning is supported.
Changes
Note::ParameterType, which currently only hasDetuning.PianoRoll.h, to store the mouse states, the current notes being operated on, and the last changed tick.Note::ParameterTypeand use a switch statement to get the right automation clip in the note (currently only detuning is supported). Another function was also added to get the closest note to the mouse taking into account the shape of the automation curve.