Better minimum length when resizing notes (#5512)

* Limit note length to quantization value

Draging a note to it's minimum value of 1 will add this new length to
the note if you later choose to stretch it which will not be clearly
visible in the Piano Roll unless you zoom in a bit. Limit the note
length to the quantization value and use <Alt> key to override and set
a smaller value.

* Update src/gui/editors/PianoRoll.cpp

Co-authored-by: Spekular <Spekular@users.noreply.github.com>

* Remember min note length if shorter than quantization()

* Find note length modulo quantization, pick smallest from selected notes

* Comment on and improve m_minResizeLen calculation

Co-authored-by: Oskar Wallgren <oskar.wallgren13@gmail.com>
This commit is contained in:
Spekular
2020-07-09 17:18:57 +02:00
committed by GitHub
parent afbf80bfcb
commit e07c78d2fc
2 changed files with 22 additions and 5 deletions

View File

@@ -406,6 +406,9 @@ private:
volume_t m_lastNoteVolume;
panning_t m_lastNotePanning;
//When resizing several notes, we want to calculate a common minimum length
MidiTime m_minResizeLen;
int m_startKey; // first key when drawing
int m_lastKey;