void MidiKeyboardComponent::mouseWheelMove (const MouseEvent&, float ix, float iy) { const float amount = (orientation == horizontalKeyboard && ix != 0) ? ix : (orientation == verticalKeyboardFacingLeft ? iy : -iy); setLowestVisibleKeyFloat (firstKey - amount * keyWidth); }
void MidiKeyboardComponent::mouseWheelMove (const MouseEvent&, const MouseWheelDetails& wheel) { auto amount = (orientation == horizontalKeyboard && wheel.deltaX != 0) ? wheel.deltaX : (orientation == verticalKeyboardFacingLeft ? wheel.deltaY : -wheel.deltaY); setLowestVisibleKeyFloat (firstKey - amount * keyWidth); }
void MidiKeyboardComponent::setLowestVisibleKey (int noteNumber) { setLowestVisibleKeyFloat ((float) noteNumber); }