MidiKeyboardComponent request

I want to use a MidiKeyboardComponent vertically, with its notes going from top (0) towards bottom (132), instead bottom(0) towards top(132).

I assume it isn't possible right now, is it?

Well yes.. There are two different vertical modes: verticalKeyboardFacingLeft and verticalKeyboardFacingRight.

Surely one of those will do what you need?

No, but it's no problem, it's solved. I can start my octaves since F, instead normal C, and I achieve the same visual effect. And taking care about shifting the notes numbers I get. Thanks!

Along those lines: When I place the MidiKeyboard vertical facing left, the pitches for from 0 to 127 starting at the top. Is there a way to have the pitches go from 127 to 0.

I suspect you’ll have to fork and patch JUCE to get this, because it’s “wrong”.

If you have a keyboard in it’s “default” orientation (facing you) it goes 0-127 from left to right.

Rotate it 90º clockwise (so the keys “face left”) and 0 is at the top, 127 is at the bottom.

To get 0 at the bottom and 127 at the top you’d need the keys to face right for it to be “correct”.

So if i want the keyboard on the vertical left like every daw with pitch 127 at top, i can’t do this. It’s ok because i have my own keyboatd code to do it. I was hoping juce would do it for me.
Thank you for the reply.

I’m not sure I follow. Surely if you use verticalKeyboardFacingRight for the orientation, this will give you a keyboard with 0 at the bottom and 127 at the top, with the widget to be placed on the left hand side of your UI (the keys “face” the right).

If you want the keys facing left then the orientation should be 0 at the top and 127 at the bottom, otherwise the keyboard has been mirrored vertically compared to a “real” keyboard.

Are there real examples of a virtual keyboard sitting on the right hand side of the UI with 0-127 → bottom-top order?

edit: it’s worth mentioning I’m making assumptions about what “facing left/right” means. I assume it maps to my image.

1 Like

I was wrong when i said facing left, i meant facing right, and when i did this, 0 was at the top. Thanks anyway as i just used my old code.