Skip to content

Conversation

@Rolandjg
Copy link

Note duplication

duplication.mp4

Note flipping

flipping.mp4

Key bind zooming

zooming.mp4

}
break;

case Qt::Key_Equal:
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not do these as a QAction too?

Copy link
Author

Choose a reason for hiding this comment

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

We can do that, this just seemed like a more straight forward approach.

Copy link
Contributor

Choose a reason for hiding this comment

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

Use QKeySequence::ZoomIn and ZoomOut. That solves the issue with different keyboard layouts and platforms. For example, on my keyboard 0=} is the same key, and ?+\ is another key

@regulus79
Copy link
Member

regulus79 commented Nov 28, 2025

#7873 may be related, at least for the note duplication shortcut.

I am curious, reading the code, it appears that duplicateNotes creates a copy of the selected notes in place, right where they are. If I understand correctly, is that the same thing that shift-dragging on a selection does? I could see how that would be useful for keyboard users.

I am also interested what the use-cases are for vertically flipping a selection of notes. Given how scales are usually not evenly spaced, flipping a set of notes would easily create some off-scale notes. Actually, maybe that would be kind of cool sometimes.

The key bind zooming sounds cool for keyboard users. I think we have something similar with a mouse shortcut, but having a purely keyboard one is probably a good idea too.

@sqrvrt
Copy link
Contributor

sqrvrt commented Nov 28, 2025

some thoughts:

  • It's usually also a nice QoL to provide Ctrl-0, which in many programs sets zoom to 100%
  • Vertical zoom could also be done with e.g. Alt prefix when applicable

@Rolandjg
Copy link
Author

some thoughts:

* It's usually also a nice QoL to provide `Ctrl-0`, which in many programs sets zoom to 100%

* Vertical zoom could also be done with e.g. Alt prefix when applicable

Great ideas.

@Rolandjg
Copy link
Author

#7873 may be related, at least for the note duplication shortcut.

I am curious, reading the code, it appears that duplicateNotes creates a copy of the selected notes in place, right where they are. If I understand correctly, is that the same thing that shift-dragging on a selection does? I could see how that would be useful for keyboard users.

I am also interested what the use-cases are for vertically flipping a selection of notes. Given how scales are usually not evenly spaced, flipping a set of notes would easily create some off-scale notes. Actually, maybe that would be kind of cool sometimes.

The key bind zooming sounds cool for keyboard users. I think we have something similar with a mouse shortcut, but having a purely keyboard one is probably a good idea too.

Yes, duplicate notes does act like shift dragging.
I find vertical flipping for make quick call response melodies, just flipping a few notes can make a nice change.
I work primarily on my laptop with a track pad, so having binds for zooming are very nice. Scrolling up and down while holding control is way too fast on a track pad so having binds makes tiny adjustments easy.

Ctrl+0 and alt+0 are already used for setting quantization and note durations, maybe this can be revised later
@allejok96
Copy link
Contributor

Flipping a melody vertically turns major into minor and vice versa, it's pretty cool that it even works

@rdrpenguin04
Copy link
Contributor

I'd almost want to request horizontal flipping; I find myself doing that fairly often

@allejok96
Copy link
Contributor

Shift+R

bild

const NoteVector selectedNotes = getSelectedNotes();
const auto& notes = selectedNotes.empty() ? m_midiClip->notes() : selectedNotes;

m_midiClip->flipNotes(notes);
Copy link
Contributor

Choose a reason for hiding this comment

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

I understand that having Clip::flipNotes is neat, but I don't like that you can pass notes from any clip to it (yeah reverseNotes does it too). I'd rather see that the selection happens inside Clip::flipNotes. It's not a deal breaker though... I need a second opinion on this...

m_midiClip->flipNotes(notes);

update();
getGUI()->songEditor()->update();
Copy link
Contributor

Choose a reason for hiding this comment

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

Are these update calls needed? Try without. At least the first one should not be needed since the editor connects to Clip::dataChanged

Comment on lines +314 to +324
int min = notes.at(0)->key();
int max = notes.at(0)->key();

for (auto note : notes)
{
int key = note->key();
if (key > max) { max = key; }
if (key < min) { min = key; }
}

int sum = min + max;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
int min = notes.at(0)->key();
int max = notes.at(0)->key();
for (auto note : notes)
{
int key = note->key();
if (key > max) { max = key; }
if (key < min) { min = key; }
}
int sum = min + max;
auto bounds = boundsForNotes(notes)
int sum = bounds->lowest + bounds->highest;

}
}

void PianoRoll::duplicateNotes()
Copy link
Contributor

Choose a reason for hiding this comment

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

Like regulus said, there's no need for duplicate since #7873 does that better

@allejok96
Copy link
Contributor

Scrolling up and down while holding control is way too fast on a track pad

#7941 (just nagging people)

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 this pull request may close these issues.

5 participants