From 35bacbbacef039a867d4dc7b8a38a0d2f7bdb4d2 Mon Sep 17 00:00:00 2001 From: Paul LaMendola Date: Sun, 14 Jun 2020 01:14:12 -0400 Subject: [PATCH] Extend the top row of keyboard keys in to the 5th octave. I find this makes it easier to have the upper octave to play the octave note over the root plus add a bit of range above that for soloing over a bassline played on the bottom row. --- c++/widgets/pixmapkeyboard.cpp | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/c++/widgets/pixmapkeyboard.cpp b/c++/widgets/pixmapkeyboard.cpp index b95ab4c7..abc875c1 100644 --- a/c++/widgets/pixmapkeyboard.cpp +++ b/c++/widgets/pixmapkeyboard.cpp @@ -64,7 +64,7 @@ static std::map kMidiKey2RectMapVertical = { static std::map kMidiKeyboard2KeyMap; #else static const std::map kMidiKeyboard2KeyMap = { - // 3th octave + // bottom row, 3rd octave {Qt::Key_Z, 48}, {Qt::Key_S, 49}, {Qt::Key_X, 50}, @@ -77,7 +77,7 @@ static const std::map kMidiKeyboard2KeyMap = { {Qt::Key_N, 57}, {Qt::Key_J, 58}, {Qt::Key_M, 59}, - // 4th octave + // top row, 4th octave {Qt::Key_Q, 60}, {Qt::Key_2, 61}, {Qt::Key_W, 62}, @@ -89,7 +89,13 @@ static const std::map kMidiKeyboard2KeyMap = { {Qt::Key_6, 68}, {Qt::Key_Y, 69}, {Qt::Key_7, 70}, - {Qt::Key_U, 71} + {Qt::Key_U, 71}, + // continue the top row in to the 5th octave + {Qt::Key_I, 72}, + {Qt::Key_9, 73}, + {Qt::Key_O, 74}, + {Qt::Key_0, 75}, + {Qt::Key_P, 76} }; #endif @@ -156,6 +162,12 @@ static const struct PixmapKeyboardInit { kMidiKeyboard2KeyMap[Qt::Key_Y] = 69; kMidiKeyboard2KeyMap[Qt::Key_7] = 70; kMidiKeyboard2KeyMap[Qt::Key_U] = 71; + // kMidiKeyboard2KeyMap, 5th octave + kMidiKeyboard2KeyMap[Qt::Key_I] = 72; + kMidiKeyboard2KeyMap[Qt::Key_9] = 73; + kMidiKeyboard2KeyMap[Qt::Key_O] = 74; + kMidiKeyboard2KeyMap[Qt::Key_0] = 75; + kMidiKeyboard2KeyMap[Qt::Key_P] = 76; // kBlackNotes kBlackNotes << 1;