uiMidiKeyboard keyboard shortcuts for changing octave and velocity #701
-
I just realized that component uiMidiKeyboard accepts computer keyboard keys A, S, D, etc. (when the keyboard component has the focus) and generates MIDI notes, after using it for a while only with the mouse; and, using the keyboard keys allows playing chords. Part of the reason that I hadn't noticed is that with a newly-created uiMidiKeyboard component, keyboard letter A was generating MIDI note number zero (too low for the synth to respond). I happened to notice in the MIDI Monitor that note on/off were being generated. I now see that in the panel editor, component property "key press for middle octave" can change the octave of the generated notes. Velocity for every note-on is at maximum (127). Does uiMidiKeyboard have keyboard shortcuts which control the octave range, and the velocity? I tried but didn't find any such shortcuts. I was expecting something similar to GarageBand, where Z = octave down, X = octave up, C = lower velocity, V = higher velocity. If there are no predefined shortcuts for those, can a Lua method be written to intercept those keys and make those changes? (I did find component property uiMidiKeyboardBaseOctaveKeyPress, which appears to be what the panel editor changes, so I could create a separate component which changes that property for the uiMidiKeyboard component; but I was hoping to just have uiMidiKeyboard itself respond.) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Hi, there's no shortcuts for octave keyswitch yet. setKeyPressBaseOctave() seems to be the one you're looking for right ?
It's easy to add in Ctrlr code, the midiKeyboard functions are declared in : /Source/UIComponents/CtrlrComponents/Specials/CtrlrMidiKeyboard.cpp EDIT : |
Beta Was this translation helpful? Give feedback.
Hi, there's no shortcuts for octave keyswitch yet.
We can add key combos to change any parameters listed here :
https://docs.juce.com/master/classMidiKeyboardComponent.html
setKeyPressBaseOctave() seems to be the one you're looking for right ?
https://docs.juce.com/master/classMidiKeyboardComponent.html#ad79211e120662c2ce6079e78f724209f
It's easy to add in…